fog-vsphere 3.5.0 → 3.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 18ada3fe97234aa0bf59aaab14ea04ba2ceaa40cb62abc6189026b6214d85759
4
- data.tar.gz: 7894e6c462e8501eb2c9a16170300d75516ba8e4431a64be14d5cc6140271fbe
3
+ metadata.gz: a217d08496a46e7dac6d2d8dc64deb846a3c10bd46ab68bdb23a2eacad4e5e72
4
+ data.tar.gz: 8bfb514ee9c268109026c9dc71cca9b68eaa5f9b875d6b900ed0d0d82755b126
5
5
  SHA512:
6
- metadata.gz: 8db1f07c4c800261506a22d0be60cc2c777a2da9e6001cee6a39a22218719af8eb4f105071383732c40f20201818645954a388420f7291bd0d3fecee0adc1a91
7
- data.tar.gz: ba9313ddc1af94248d965ae9cda4734766cf36c494f33f5f84fc40581be22532ff96700539f63dce3583d955a60e86b75e367795bd3c0ca29291fa921717d1db
6
+ metadata.gz: 66e404157f86b584f7032b1bf30ccbf6dd7286d5864afd458f16d01dce6da6d6d88131612e1d2112da9c8405c26770a7da0e1b28ac596844953f7594cde6b89e
7
+ data.tar.gz: d696ad6d363c8e85322330d03c7f3b6709108274faa394b750187dc4af85203d040e0c283dbfafd5706c2387e4a6ec9aa9c8d8bdf77ab10e44a5a2a79b1f46f1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## v3.5.1
2
+ * Creating ESX compute resource on vcenter 7.x fails with InvalidArgument: A specified parameter was not correct: deviceChange[1].device.key (#272)
3
+
1
4
  ## v3.5.0
2
5
  * Clone vm from different datacenter (#263)
3
6
  * Fix autoload issues (#267)
data/CONTRIBUTORS.md CHANGED
@@ -53,6 +53,7 @@
53
53
  * Ohad Levy <ohadlevy@redhat.com>
54
54
  * Ondrej Prazak <oprazak@redhat.com>
55
55
  * Oscar Elfving <sofam84@gmail.com>
56
+ * Pablo Hess <phess@redhat.com>
56
57
  * Paul Thornthwaite <paul@brightbox.co.uk>
57
58
  * Paul Thornthwaite <tokengeek@gmail.com>
58
59
  * Paulo Henrique Lopes Ribeiro <plribeiro3000@gmail.com>
@@ -38,7 +38,7 @@ module Fog
38
38
  # only the one will do
39
39
  proc do |n|
40
40
  n._ref == ref_or_name || (
41
- n.is_a?(RbVmomi::VIM::DistributedVirtualPortgroup) && (n.name == ref_or_name || n.key == ref_or_name) &&
41
+ n.is_a?(RbVmomi::VIM::DistributedVirtualPortgroup) && (n.name == ref_or_name) &&
42
42
  (n.config.distributedVirtualSwitch.name == distributedswitch)
43
43
  )
44
44
  end
@@ -46,12 +46,12 @@ module Fog
46
46
  # the first distributed virtual switch will do - selected by network - gives control to vsphere
47
47
  proc do |n|
48
48
  n._ref == ref_or_name || (
49
- n.is_a?(RbVmomi::VIM::DistributedVirtualPortgroup) && (n.name == ref_or_name || n.key == ref_or_name)
49
+ n.is_a?(RbVmomi::VIM::DistributedVirtualPortgroup) && (n.name == ref_or_name)
50
50
  )
51
51
  end
52
52
  else
53
53
  # the first matching network will do, seems like the non-distributed networks come first
54
- proc { |n| n._ref == ref_or_name || n.name == ref_or_name || (n.is_a?(RbVmomi::VIM::DistributedVirtualPortgroup) && n.key == ref_or_name) }
54
+ proc { |n| n._ref == ref_or_name || n.name == ref_or_name }
55
55
  end
56
56
  end
57
57
  end
@@ -30,17 +30,15 @@ module Fog
30
30
  virtualswitch: dvswitches[network['config.distributedVirtualSwitch']._ref]
31
31
  )
32
32
  elsif network.obj.is_a?(RbVmomi::VIM::OpaqueNetwork)
33
- map_attrs_to_hash(network, network_dvportgroup_attribute_mapping).merge(
34
- id: network.obj._ref,
33
+ map_attrs_to_hash(network, network_attribute_mapping).merge(
35
34
  opaqueNetworkId: network.obj.summary.opaqueNetworkId
36
35
  )
37
36
  else
38
- map_attrs_to_hash(network, network_attribute_mapping).merge(
39
- id: network.obj._ref
40
- )
37
+ map_attrs_to_hash(network, network_attribute_mapping)
41
38
  end.merge(
42
- datacenter: datacenter_name,
43
- _ref: network.obj._ref
39
+ _ref: network.obj._ref,
40
+ id: managed_obj_id(network.obj),
41
+ datacenter: datacenter_name
44
42
  )
45
43
  end.compact
46
44
  end
@@ -56,7 +54,7 @@ module Fog
56
54
 
57
55
  def network_dvportgroup_attribute_mapping
58
56
  network_attribute_mapping.merge(
59
- id: 'config.key'
57
+ dvp_uuid: 'config.key'
60
58
  )
61
59
  end
62
60
 
@@ -812,7 +812,7 @@ module Fog
812
812
  end
813
813
 
814
814
  new_nics.each do |interface|
815
- specs << create_interface(interface, 0, :add, datacenter: datacenter)
815
+ specs << create_interface(interface, -rand(25000..29999), :add, datacenter: datacenter)
816
816
  end
817
817
 
818
818
  specs
@@ -5,13 +5,17 @@ module Fog
5
5
  def vm_take_snapshot(options = {})
6
6
  raise ArgumentError, 'instance_uuid is a required parameter' unless options.key? 'instance_uuid'
7
7
  raise ArgumentError, 'name is a required parameter' unless options.key? 'name'
8
+ defaults = {
9
+ description: '',
10
+ memory: true,
11
+ quiesce: false
12
+ }
13
+ opts = options.clone
14
+ defaults.each do |k, v|
15
+ opts[k] = v unless opts.key?(k) || opts.key?(k.to_s)
16
+ end
8
17
  vm = get_vm_ref(options['instance_uuid'])
9
- task = vm.CreateSnapshot_Task(
10
- name: options['name'],
11
- description: options['description'] || '',
12
- memory: options['memory'] || true,
13
- quiesce: options['quiesce'] || false
14
- )
18
+ task = vm.CreateSnapshot_Task(opts)
15
19
 
16
20
  task.wait_for_completion
17
21
 
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Vsphere
3
- VERSION = '3.5.0'.freeze
3
+ VERSION = '3.5.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-vsphere
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - J.R. Garcia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-09 00:00:00.000000000 Z
11
+ date: 2022-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-core