vm_shepherd 3.0.2 → 3.0.3
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: 2bda04a445240a1429183e7c51822cc950c901cd
|
4
|
+
data.tar.gz: 38c5e5d7a8876bc3e2178cd65d1dfaaacb7c53e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 08ace1e2afab360a8267253f487e3624f0bd7aed49a69d9040638e0181ebbf86138587918fe08f29ca08c813413a4d0676b4051541b59475fcca37a0571ddb53
|
7
|
+
data.tar.gz: d1be716a990bdfc2e76b3177d7b952e89f180fa3bd5bb025c074bb7e759ed9b4442e345b306d5630e7462cc5026e74bc12a5e92e6573f72812e27e3996ad0dcd
|
@@ -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
|
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
|
data/lib/vm_shepherd/version.rb
CHANGED
@@ -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
|
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
|
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: 3.0.
|
4
|
+
version: 3.0.3
|
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-
|
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
|