vm_shepherd 0.1.0 → 0.1.1
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 +4 -4
- data/lib/vm_shepherd/version.rb +1 -1
- data/lib/vm_shepherd/vsphere_manager.rb +17 -11
- 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: 9d98309744c225528a19bef7390b48890aee53ba
|
4
|
+
data.tar.gz: 67303b911ade251ff41855276d4f320b0cbc0950
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86e6da715493b630ff838740f3714906576e38055aeca7db687b3c38e164122d74599e7b041279835eae65b397a9736e81bfbb5c30bc644203037255d5f67154
|
7
|
+
data.tar.gz: 01fd81fa9f2c94829e65c69c0b361757ebf0f99a2c50899647e170f40775f5d5ed8db7b50f50c51520fd354be832af5428b7c3043ee231a7cbb37f78db848326
|
data/lib/vm_shepherd/version.rb
CHANGED
@@ -161,29 +161,35 @@ module VmShepherd
|
|
161
161
|
template: false,
|
162
162
|
config: {numCPUs: 2, memoryMB: 2048},
|
163
163
|
}
|
164
|
-
).wait_for_completion
|
165
|
-
|
164
|
+
).wait_for_completion.tap {
|
165
|
+
logger.info("END clone_vm_task tempalte=#{template.name}")
|
166
|
+
}
|
166
167
|
end
|
167
168
|
|
168
169
|
def reconfigure_vm(vm, vm_config)
|
169
170
|
virtual_machine_config_spec = create_virtual_machine_config_spec(vm_config)
|
170
171
|
logger.info("BEGIN reconfigure_vm_task virtual_machine_cofig_spec=#{virtual_machine_config_spec.inspect}")
|
171
|
-
vm.ReconfigVM_Task(
|
172
|
-
|
172
|
+
vm.ReconfigVM_Task(
|
173
|
+
spec: virtual_machine_config_spec
|
174
|
+
).wait_for_completion.tap {
|
175
|
+
logger.info("END reconfigure_vm_task virtual_machine_cofig_spec=#{virtual_machine_config_spec.inspect}")
|
176
|
+
}
|
173
177
|
end
|
174
178
|
|
175
179
|
def create_virtual_machine_config_spec(vm_config)
|
176
180
|
logger.info('BEGIN VmConfigSpec creation')
|
177
|
-
vm_config_spec =
|
178
|
-
|
179
|
-
|
181
|
+
vm_config_spec =
|
182
|
+
RbVmomi::VIM::VmConfigSpec.new.tap do |vcs|
|
183
|
+
vcs.ovfEnvironmentTransport = ['com.vmware.guestInfo']
|
184
|
+
vcs.property = create_vapp_property_specs(vm_config)
|
185
|
+
end
|
180
186
|
logger.info("END VmConfigSpec creation: #{vm_config_spec.inspect}")
|
181
187
|
|
182
188
|
logger.info('BEGIN VirtualMachineConfigSpec creation')
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
189
|
+
RbVmomi::VIM::VirtualMachineConfigSpec.new.tap do |virtual_machine_config_spec|
|
190
|
+
virtual_machine_config_spec.vAppConfig = vm_config_spec
|
191
|
+
logger.info("END VirtualMachineConfigSpec creation #{virtual_machine_config_spec.inspect}")
|
192
|
+
end
|
187
193
|
end
|
188
194
|
|
189
195
|
def create_vapp_property_specs(vm_config)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vm_shepherd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ops Manager Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-v1
|