fog-vsphere 1.4.0 → 1.5.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c29e38fdaa62dc93aec72fd59b93c8faf6f8625
|
4
|
+
data.tar.gz: 76557efdce999f2226c60ca56752661831d04890
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b7b39dd5c28e51ba0445ee47fa93608c3610daf67e30ec7ff129738ce1b3897c7e03da2c4ce8760fcd74b46653f83f969dc216bb1a291f0815d6e068102418f
|
7
|
+
data.tar.gz: 34e87ecb4ac85e87d1862365f7d33b4d1b9c27c1865f24cc569ba9ceb6b8ceb46cb66d01dd1d68d5335194237ebf81686fdb51a078fa693d7594f317609cb771
|
data/CHANGELOG.md
CHANGED
@@ -8,7 +8,7 @@ module Fog
|
|
8
8
|
if group
|
9
9
|
raise ArgumentError, "Group #{attributes[:name]} already exists!"
|
10
10
|
end
|
11
|
-
spec =
|
11
|
+
spec = get_group_spec attributes
|
12
12
|
cluster_spec = RbVmomi::VIM.ClusterConfigSpecEx(groupSpec: [
|
13
13
|
RbVmomi::VIM.ClusterGroupSpec(
|
14
14
|
operation: RbVmomi::VIM.ArrayUpdateOperation('add'),
|
@@ -26,7 +26,7 @@ module Fog
|
|
26
26
|
|
27
27
|
private
|
28
28
|
|
29
|
-
def
|
29
|
+
def get_group_spec(attributes={})
|
30
30
|
if attributes[:type].to_s == 'ClusterVmGroup'
|
31
31
|
vms = attributes[:vm_ids].to_a.map {|id| get_vm_ref(id, attributes[:datacenter])}
|
32
32
|
attributes[:type].new(
|
@@ -8,7 +8,7 @@ module Fog
|
|
8
8
|
if rule
|
9
9
|
raise ArgumentError, "Rule #{attributes[:name]} already exists!"
|
10
10
|
end
|
11
|
-
spec =
|
11
|
+
spec = get_rule_spec attributes
|
12
12
|
# Now, attach it to the cluster
|
13
13
|
cluster_spec = RbVmomi::VIM.ClusterConfigSpecEx(rulesSpec: [
|
14
14
|
RbVmomi::VIM.ClusterRuleSpec(
|
@@ -27,7 +27,7 @@ module Fog
|
|
27
27
|
|
28
28
|
private
|
29
29
|
|
30
|
-
def
|
30
|
+
def get_rule_spec(attributes={})
|
31
31
|
if (attributes[:type].to_s == 'ClusterAntiAffinityRuleSpec' || attributes[:type].to_s == 'ClusterAffinityRuleSpec')
|
32
32
|
vms = attributes[:vm_ids].to_a.map {|id| get_vm_ref(id, attributes[:datacenter])}
|
33
33
|
attributes[:type].new(
|
@@ -3,25 +3,13 @@ module Fog
|
|
3
3
|
class Vsphere
|
4
4
|
class Real
|
5
5
|
def add_vm_controller(controller)
|
6
|
-
|
7
|
-
options[:operation] = 'add'
|
8
|
-
options[:type] = controller.type
|
9
|
-
options[:key] = controller.key
|
10
|
-
options[:shared] = controller.shared_bus
|
11
|
-
|
12
|
-
vm_reconfig_hardware('instance_uuid' => controller.server_id, 'hardware_spec' => {'deviceChange'=>[create_controller(options)]})
|
6
|
+
vm_reconfig_hardware('instance_uuid' => controller.server_id, 'hardware_spec' => {'deviceChange'=>[create_controller(controller)]})
|
13
7
|
end
|
14
8
|
end
|
15
9
|
|
16
10
|
class Mock
|
17
11
|
def add_vm_controller(controller)
|
18
|
-
|
19
|
-
options[:operation] = 'add'
|
20
|
-
options[:type] = RbVmomi::VIM.VirtualLsiLogicController.class
|
21
|
-
options[:key] = 1000
|
22
|
-
options[:shared] = false
|
23
|
-
|
24
|
-
vm_reconfig_hardware('instance_uuid' => controller.server_id, 'hardware_spec' => {'deviceChange'=>[create_controller(options)]})
|
12
|
+
vm_reconfig_hardware('instance_uuid' => controller.server_id, 'hardware_spec' => {'deviceChange'=>[create_controller(controller)]})
|
25
13
|
end
|
26
14
|
end
|
27
15
|
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: 1.
|
4
|
+
version: 1.5.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: 2016-10-
|
11
|
+
date: 2016-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog-core
|