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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a15179c8d68cb360d34b776f21f000a202c9f058
4
- data.tar.gz: 279e17c6e5bc45225a888bd3fb70fe750c3e58fe
3
+ metadata.gz: 9d98309744c225528a19bef7390b48890aee53ba
4
+ data.tar.gz: 67303b911ade251ff41855276d4f320b0cbc0950
5
5
  SHA512:
6
- metadata.gz: 13ce9b1112ac673d7cc70030814ea929f62cbe9e572c9ba1f70471f7073bea4a0c95893677338048a95cb99de3c2c763737553fe67777efbebba00d6eaef63a9
7
- data.tar.gz: d74268270051fe55e7fd6a14037afbbd413c35d2234c210f15deb8d1ff2cef903e47126bf46a6fd215dbba3676820cd29113b6ae2cd67a24772bf8e630d15d47
6
+ metadata.gz: 86e6da715493b630ff838740f3714906576e38055aeca7db687b3c38e164122d74599e7b041279835eae65b397a9736e81bfbb5c30bc644203037255d5f67154
7
+ data.tar.gz: 01fd81fa9f2c94829e65c69c0b361757ebf0f99a2c50899647e170f40775f5d5ed8db7b50f50c51520fd354be832af5428b7c3043ee231a7cbb37f78db848326
@@ -1,3 +1,3 @@
1
1
  module VmShepherd
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
@@ -161,29 +161,35 @@ module VmShepherd
161
161
  template: false,
162
162
  config: {numCPUs: 2, memoryMB: 2048},
163
163
  }
164
- ).wait_for_completion
165
- logger.info("END clone_vm_task tempalte=#{template.name}")
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(spec: virtual_machine_config_spec).wait_for_completion
172
- logger.info("END reconfigure_vm_task virtual_machine_cofig_spec=#{virtual_machine_config_spec.inspect}")
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 = RbVmomi::VIM::VmConfigSpec.new
178
- vm_config_spec.ovfEnvironmentTransport = ['com.vmware.guestInfo']
179
- vm_config_spec.property = create_vapp_property_specs(vm_config)
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
- virtual_machine_config_spec = RbVmomi::VIM::VirtualMachineConfigSpec.new
184
- virtual_machine_config_spec.vAppConfig = vm_config_spec
185
- logger.info("END VirtualMachineConfigSpec creation #{virtual_machine_config_spec.inspect}")
186
- virtual_machine_config_spec
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.0
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-03 00:00:00.000000000 Z
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