kitchen-vcenter 2.11.0 → 2.11.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 67058560fd24551eec490d96384db30c85da728655bde6495320c142582b82db
4
- data.tar.gz: 3b7d9ff608825c060e51bcbc1937848d7a3764435898d28e031d5a49f22006a9
3
+ metadata.gz: 28119d22d4b763e0ddbe3bcacc0fdf119e7d477a78aaab050dd0433a6656935e
4
+ data.tar.gz: 0d4ebe88e1dd7c970729c426c4b5eb19d5319a8c048ef5db1c705835efbb4a1a
5
5
  SHA512:
6
- metadata.gz: 51483886c3582d2761ec89033a452ee2c369bace2f0ede2d89d3b9000656190a368775b27a3620ede8948f8913af6fa5b0062f84998361f0034353953d6ef5f1
7
- data.tar.gz: 4e3ebba36a422d3e5b7a8a5692e825fa78e79735755f2015ee3db2bd92955c5984ec515e341ec6dc04eb622cc298b05ace2b0f090c4d7b203b6dcc5ae36a3a4e
6
+ metadata.gz: f5bf290eee4065039cd41a3b2fb74f6cdf3d6b3caf1b82b78353c84bf1e28fb69c04e029ec22327f8bc2ae0b3a60a01d60f14801c4dbf14f54b6d291b468774b
7
+ data.tar.gz: 54a3d86d39d3aa303097eab94f898d2ff015bf33af1ee2af18b2c75c8f7064f46e5b44fe13d040529321f30f44c08cb9bf64a0305c9bdace988fa6394b6ddc6d
@@ -20,5 +20,5 @@
20
20
  # The main kitchen-vcenter module
21
21
  module KitchenVcenter
22
22
  # The version of this version of test-kitchen we assume enterprises want.
23
- VERSION = "2.11.0"
23
+ VERSION = "2.11.4"
24
24
  end
@@ -184,6 +184,8 @@ class Support
184
184
 
185
185
  def reconnect_network_device(vm)
186
186
  network_device = network_device(vm)
187
+ return unless network_device
188
+
187
189
  network_device.connectable = RbVmomi::VIM.VirtualDeviceConnectInfo(
188
190
  allowGuestControl: true,
189
191
  startConnected: true,
@@ -502,13 +504,15 @@ class Support
502
504
  relocate_spec.pool = options[:resource_pool]
503
505
 
504
506
  # Change network, if wanted
505
- unless options[:network_name].nil?
507
+ network_device = network_device(src_vm)
508
+ Kitchen.logger.warn format("Source VM/template does not have any network device (use VMware IPPools and vsphere-gom transport or govc to access)") unless network_device
509
+
510
+ unless network_device.nil? || options[:network_name].nil?
506
511
  networks = dc.network.select { |n| n.name == options[:network_name] }
507
512
  raise Support::CloneError.new(format("Could not find network named %s", options[:network_name])) if networks.empty?
508
513
 
509
514
  Kitchen.logger.warn format("Found %d networks named %s, picking first one", networks.count, options[:network_name]) if networks.count > 1
510
515
  network_obj = networks.first
511
- network_device = network_device(src_vm)
512
516
 
513
517
  if network_obj.is_a? RbVmomi::VIM::DistributedVirtualPortgroup
514
518
  Kitchen.logger.info format("Assigning network %s...", network_obj.pretty_path)
@@ -572,19 +576,20 @@ class Support
572
576
  # MAC at least with 6.7.0 build 9433931
573
577
 
574
578
  # Disconnect network device, so wo don't get IP collisions on start
575
- network_device = network_device(src_vm)
576
- network_device.connectable = RbVmomi::VIM.VirtualDeviceConnectInfo(
577
- allowGuestControl: true,
578
- startConnected: true,
579
- connected: false,
580
- migrateConnect: "disconnect"
581
- )
582
- relocate_spec.deviceChange = [
583
- RbVmomi::VIM.VirtualDeviceConfigSpec(
584
- operation: RbVmomi::VIM::VirtualDeviceConfigSpecOperation("edit"),
585
- device: network_device
586
- ),
587
- ]
579
+ if network_device
580
+ network_device.connectable = RbVmomi::VIM.VirtualDeviceConnectInfo(
581
+ allowGuestControl: true,
582
+ startConnected: true,
583
+ connected: false,
584
+ migrateConnect: "disconnect"
585
+ )
586
+ relocate_spec.deviceChange = [
587
+ RbVmomi::VIM.VirtualDeviceConfigSpec(
588
+ operation: RbVmomi::VIM::VirtualDeviceConfigSpecOperation("edit"),
589
+ device: network_device
590
+ ),
591
+ ]
592
+ end
588
593
 
589
594
  clone_spec = RbVmomi::VIM.VirtualMachineInstantCloneSpec(location: relocate_spec,
590
595
  name: vm_name)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-vcenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.0
4
+ version: 2.11.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chef Software
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-28 00:00:00.000000000 Z
11
+ date: 2021-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ping
@@ -109,7 +109,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - ">="
111
111
  - !ruby/object:Gem::Version
112
- version: '2.5'
112
+ version: '2.6'
113
113
  required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="