fog-vsphere 1.11.2 → 1.11.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/CONTRIBUTORS.md +1 -0
- data/lib/fog/vsphere/models/compute/interface.rb +1 -0
- data/lib/fog/vsphere/requests/compute/list_vm_interfaces.rb +1 -0
- data/lib/fog/vsphere/requests/compute/vm_clone.rb +23 -8
- data/lib/fog/vsphere/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 259e868ec79a58fd97457645401a8771432781d2
|
4
|
+
data.tar.gz: 5e4890489b7f412b31af88069c3fae0f2b32bf68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf035226cec5df7395df07c46707af0369ed277dddc60ef41bf2bb8c737a01092db58b614b22ffd9285f5158b713711b078f37fa7858341243792b940c416734
|
7
|
+
data.tar.gz: 91398f19bfd736f7e14a1f91c5178a49b18a888baf4f6d225b440a9b3ac56865f4de54ef0fa450fb0acff76357f852fc5c553cc0622bb2a9eec860db0dbc80f8
|
data/CHANGELOG.md
CHANGED
data/CONTRIBUTORS.md
CHANGED
@@ -61,6 +61,7 @@
|
|
61
61
|
* Shlomi Zadok <shlomi@ben-hanna.com>
|
62
62
|
* Simon Josi <me@yokto.net>
|
63
63
|
* Tejas Ravindra Mandke <tejas@identified.com>
|
64
|
+
* Timo Goebel <mail@timogoebel.name>
|
64
65
|
* Timo Goebel <timo.goebel@dm.de>
|
65
66
|
* Timur Alperovich <timur@maginatics.com>
|
66
67
|
* Tyler Gregory <01100010011001010110010101110000@users.noreply.github.com>
|
@@ -67,6 +67,7 @@ module Fog
|
|
67
67
|
:mac => nic.macAddress,
|
68
68
|
:network => nic.backing.respond_to?("network") ? nic.backing.network.name : nic.backing.port.portgroupKey,
|
69
69
|
:status => nic.connectable.status,
|
70
|
+
:connected => nic.connectable.connected,
|
70
71
|
:summary => nic.deviceInfo.summary,
|
71
72
|
:type => nic.class,
|
72
73
|
:key => nic.key,
|
@@ -155,7 +155,7 @@ module Fog
|
|
155
155
|
if options.key?('network_label')
|
156
156
|
raise ArgumentError, "interfaces option can't be specified together with network_label"
|
157
157
|
end
|
158
|
-
device_change.concat(modify_template_nics_specs(
|
158
|
+
device_change.concat(modify_template_nics_specs(vm_mob_ref, options['interfaces'], options['datacenter']))
|
159
159
|
elsif options.key?('network_label')
|
160
160
|
device_change << modify_template_nics_simple_spec(options['network_label'], options['nic_type'], options['network_adapter_device_key'], options['datacenter'])
|
161
161
|
end
|
@@ -711,21 +711,36 @@ module Fog
|
|
711
711
|
end
|
712
712
|
|
713
713
|
|
714
|
-
def modify_template_nics_specs(
|
715
|
-
template_nics = list_vm_interfaces(template_path, datacenter).map do |old_attributes|
|
716
|
-
Fog::Compute::Vsphere::Interface.new(old_attributes)
|
717
|
-
end
|
714
|
+
def modify_template_nics_specs(vm_mob_ref, nics, datacenter)
|
718
715
|
specs = []
|
716
|
+
template_nics = vm_mob_ref.config.hardware.device.grep(RbVmomi::VIM::VirtualEthernetCard)
|
717
|
+
modified_nics = nics.take(template_nics.size)
|
718
|
+
new_nics = nics.drop(template_nics.size)
|
719
719
|
|
720
|
-
template_nics.each do |
|
721
|
-
|
720
|
+
template_nics.zip(modified_nics).each do |template_nic, new_nic|
|
721
|
+
if new_nic
|
722
|
+
backing = create_nic_backing(new_nic, {})
|
723
|
+
template_nic.backing = backing
|
724
|
+
connectable = RbVmomi::VIM::VirtualDeviceConnectInfo(
|
725
|
+
:allowGuestControl => true,
|
726
|
+
:connected => true,
|
727
|
+
:startConnected => true
|
728
|
+
)
|
729
|
+
template_nic.connectable = connectable
|
730
|
+
specs << {
|
731
|
+
operation: :edit,
|
732
|
+
device: template_nic
|
733
|
+
}
|
734
|
+
else
|
735
|
+
specs << create_interface(interface, interface.key, :remove, :datacenter => datacenter)
|
736
|
+
end
|
722
737
|
end
|
723
738
|
|
724
739
|
new_nics.each do |interface|
|
725
740
|
specs << create_interface(interface, 0, :add, :datacenter => datacenter)
|
726
741
|
end
|
727
742
|
|
728
|
-
|
743
|
+
specs
|
729
744
|
end
|
730
745
|
|
731
746
|
def modify_template_volumes_specs(vm_mob_ref, volumes)
|
data/lib/fog/vsphere/version.rb
CHANGED
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: 1.11.
|
4
|
+
version: 1.11.3
|
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: 2017-07-
|
11
|
+
date: 2017-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog-core
|