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 +4 -4
- data/CHANGELOG.md +3 -0
- data/CONTRIBUTORS.md +1 -0
- data/lib/fog/vsphere/requests/compute/get_network.rb +3 -3
- data/lib/fog/vsphere/requests/compute/list_networks.rb +6 -8
- data/lib/fog/vsphere/requests/compute/vm_clone.rb +1 -1
- data/lib/fog/vsphere/requests/compute/vm_take_snapshot.rb +10 -6
- data/lib/fog/vsphere/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a217d08496a46e7dac6d2d8dc64deb846a3c10bd46ab68bdb23a2eacad4e5e72
|
4
|
+
data.tar.gz: 8bfb514ee9c268109026c9dc71cca9b68eaa5f9b875d6b900ed0d0d82755b126
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66e404157f86b584f7032b1bf30ccbf6dd7286d5864afd458f16d01dce6da6d6d88131612e1d2112da9c8405c26770a7da0e1b28ac596844953f7594cde6b89e
|
7
|
+
data.tar.gz: d696ad6d363c8e85322330d03c7f3b6709108274faa394b750187dc4af85203d040e0c283dbfafd5706c2387e4a6ec9aa9c8d8bdf77ab10e44a5a2a79b1f46f1
|
data/CHANGELOG.md
CHANGED
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
|
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
|
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
|
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,
|
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)
|
39
|
-
id: network.obj._ref
|
40
|
-
)
|
37
|
+
map_attrs_to_hash(network, network_attribute_mapping)
|
41
38
|
end.merge(
|
42
|
-
|
43
|
-
|
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
|
-
|
57
|
+
dvp_uuid: 'config.key'
|
60
58
|
)
|
61
59
|
end
|
62
60
|
|
@@ -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
|
|
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.5.
|
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:
|
11
|
+
date: 2022-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog-core
|