fog-vsphere 3.2.5 → 3.3.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4eadb848b90d4f61c0f6f234cedcd9f00029541bf7c32b1bafaf0e24ea79a4d
|
4
|
+
data.tar.gz: 79ff4b683e18adfbf7a778f752ece735c89d9f20ac374724c84ebd7406e84994
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98652665e4dfa7dde5b8a43ec5f5639e7dfa16c40d6a143af55efe6dfa2a0263f8885cafb2dd17273ed868cc601e24c67bbb5d1f02f172fe35177244dfc7425e
|
7
|
+
data.tar.gz: 6cd506d0766257d3e0c2e16843dcd37d033e2f433c7d61f8af42d8709e68a4f027581a4ccf36d83966f3b48ac2f18fca7c720efcefd9602b219aa65478d5408b
|
@@ -29,6 +29,11 @@ module Fog
|
|
29
29
|
vlanid: raw_network_vlan(network['config.defaultPortConfig']),
|
30
30
|
virtualswitch: dvswitches[network['config.distributedVirtualSwitch']._ref]
|
31
31
|
)
|
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,
|
35
|
+
opaqueNetworkId: network.obj.summary.opaqueNetworkId
|
36
|
+
)
|
32
37
|
else
|
33
38
|
map_attrs_to_hash(network, network_attribute_mapping).merge(
|
34
39
|
id: network.obj._ref
|
@@ -29,12 +29,12 @@ module Fog
|
|
29
29
|
# unitNumber: 7,
|
30
30
|
#
|
31
31
|
def list_vm_interfaces(vm_id, datacenter = nil)
|
32
|
-
get_raw_interfaces(vm_id, datacenter).map { |nic| raw_to_hash
|
32
|
+
get_raw_interfaces(vm_id, datacenter).map { |nic| raw_to_hash(nic, datacenter) }
|
33
33
|
end
|
34
34
|
|
35
35
|
def get_vm_interface(vm_id, options = {})
|
36
36
|
raw = get_raw_interface(vm_id, options)
|
37
|
-
raw_to_hash(raw) if raw
|
37
|
+
raw_to_hash(raw, options[:datacenter]) if raw
|
38
38
|
end
|
39
39
|
|
40
40
|
def get_raw_interfaces(vm_id, datacenter = nil)
|
@@ -61,12 +61,16 @@ module Fog
|
|
61
61
|
|
62
62
|
private
|
63
63
|
|
64
|
-
|
65
|
-
def raw_to_hash(nic)
|
64
|
+
def raw_to_hash(nic, datacenter)
|
66
65
|
if nic.backing.respond_to?(:network)
|
67
66
|
network = nic.backing.network.name
|
68
67
|
elsif nic.backing.respond_to?(:port)
|
69
68
|
network = nic.backing.port.portgroupKey
|
69
|
+
elsif nic.backing.respond_to?(:opaqueNetworkId)
|
70
|
+
opaquenetworks = list_networks(:datacenter => datacenter).select { |net| net.key?(:opaqueNetworkId) }
|
71
|
+
network = opaquenetworks.find do |opaquenetwork|
|
72
|
+
nic.backing.opaqueNetworkId == opaquenetwork[:opaqueNetworkId]
|
73
|
+
end[:id]
|
70
74
|
else
|
71
75
|
network = nil
|
72
76
|
end
|
@@ -800,7 +800,7 @@ module Fog
|
|
800
800
|
device: template_nic
|
801
801
|
}
|
802
802
|
else
|
803
|
-
interface = Fog::Vsphere::Compute::Interface.new(raw_to_hash(template_nic))
|
803
|
+
interface = Fog::Vsphere::Compute::Interface.new(raw_to_hash(template_nic, datacenter))
|
804
804
|
specs << create_interface(interface, interface.key, :remove, datacenter: datacenter)
|
805
805
|
end
|
806
806
|
end
|
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: 3.
|
4
|
+
version: 3.3.0
|
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-
|
11
|
+
date: 2020-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog-core
|
@@ -335,7 +335,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
335
335
|
- !ruby/object:Gem::Version
|
336
336
|
version: '0'
|
337
337
|
requirements: []
|
338
|
-
|
338
|
+
rubyforge_project:
|
339
|
+
rubygems_version: 2.7.6.2
|
339
340
|
signing_key:
|
340
341
|
specification_version: 4
|
341
342
|
summary: Module for the 'fog' gem to support VMware vSphere.
|