vm_shepherd 1.12.6 → 1.12.7

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: 81e5a5e4d2cf0c452fad6baa8fc9d7a523569320
4
- data.tar.gz: 8cd607bfebf8a6463f12b28690b0d1d8d0b0b025
3
+ metadata.gz: 112c952184f763a10b6587d190b22fc09510f5e9
4
+ data.tar.gz: 964df991586ad1a54f474195d9674f11e8ee681e
5
5
  SHA512:
6
- metadata.gz: 5781b2118aabe37402f205739b50ab2126068cba225ac326799175337b5f67968752a62a2750a81a61d7808f3ccca634ee6cb323bdad3ddef43395227ec5ce92
7
- data.tar.gz: a2b429aff966c041b8b80d6e54650002b82d76d3bc4aea65c5b6330bdb84cc528f82780f9a48167fdbc3a2bd2cdaf02f0d028c2e91bea9c154f9f57a59a3f5d9
6
+ metadata.gz: a043d01896df947cbed3989fae19a60a2d4c0b8b12ef1e4db51338bb2aba202e1ef12e660b8090d9ab73f513a4868d78a37c5eefac1448a9e8ddfa14a19edf5c
7
+ data.tar.gz: 4e493456e16f1531d40635e38ef8a967ddb9137c3a97a6be993c46be22076cbcc834fd69bfbf72147ee63c43df916be7a8469bd5c4e89f61e577c559967fc729
@@ -1,6 +1,10 @@
1
+ require 'vm_shepherd/retry_helper'
2
+
1
3
  module VmShepherd
2
4
  module Vcloud
3
5
  class Deployer
6
+ extend RetryHelper
7
+
4
8
  def self.deploy_and_power_on_vapp(client:, ovf_dir:, vapp_config:, vdc_name:)
5
9
  catalog = client.create_catalog(vapp_config.catalog)
6
10
 
@@ -12,7 +16,10 @@ module VmShepherd
12
16
  vapp = catalog.instantiate_vapp_template(vapp_config.name, vdc_name, vapp_config.name, nil, nil, network_config)
13
17
 
14
18
  # reconfigure vm
15
- vm = vapp.find_vm_by_name(vapp_config.name)
19
+ vm = retry_until(retry_limit: 10, retry_interval: 10) do
20
+ vapp.vms.first
21
+ end
22
+
16
23
  vm.product_section_properties = vapp_config.build_properties
17
24
 
18
25
  # power on vapp
@@ -1,3 +1,3 @@
1
1
  module VmShepherd
2
- VERSION = '1.12.6'.freeze
2
+ VERSION = '1.12.7'.freeze
3
3
  end
@@ -30,7 +30,7 @@ module VmShepherd
30
30
  allow(client).to receive(:create_catalog).and_return(catalog)
31
31
  allow(catalog).to receive(:upload_vapp_template)
32
32
  allow(catalog).to receive(:instantiate_vapp_template).and_return(vapp)
33
- allow(vapp).to receive(:find_vm_by_name).and_return(vm)
33
+ allow(vapp).to receive_message_chain(:vms, :first).and_return(vm)
34
34
  allow(vm).to receive(:product_section_properties=)
35
35
  allow(vapp).to receive(:power_on)
36
36
 
@@ -140,7 +140,7 @@ module VmShepherd
140
140
 
141
141
  allow(VCloudSdk::NetworkConfig).to receive(:new).and_return(network_config)
142
142
 
143
- allow(vapp).to receive(:find_vm_by_name).and_return(vm)
143
+ allow(vapp).to receive_message_chain(:vms, :first).and_return(vm)
144
144
  allow(vm).to receive(:product_section_properties=)
145
145
  allow(vapp).to receive(:power_on)
146
146
  end
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: 1.12.6
4
+ version: 1.12.7
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: 2016-02-08 00:00:00.000000000 Z
11
+ date: 2016-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-v1