bosh_vcloud_cpi 0.7.6 → 0.7.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cloud/vcloud/steps/insert_catalog_media.rb +1 -1
- data/lib/cloud/vcloud/vcd_client.rb +8 -2
- data/lib/cloud/vcloud/xml/constants.rb +2 -0
- data/lib/cloud/vcloud/xml/wrapper_classes/admin_catalog.rb +4 -0
- data/lib/cloud/vcloud/xml/wrapper_classes/disk.rb +4 -0
- data/lib/cloud/vcloud/xml/wrapper_classes/media.rb +4 -0
- data/lib/cloud/vcloud/xml/wrapper_classes/vapp.rb +4 -0
- data/lib/cloud/vcloud/xml/wrapper_classes/vm.rb +4 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07d91dc15ea8945ce0b95c3b27544e22ef364f5b
|
4
|
+
data.tar.gz: 349ef92995b29e875dcada52f16d22e4081770ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71a8bda2ffac0f6df601119fcaf0fcd9a7b2dfdb30dec1eaca871a926a7a0dbfc7b46de099b1f365ef69e845225b4e6050c0627af52e53095b378859d7ba4ec8
|
7
|
+
data.tar.gz: c88c7e27548b5e1ed7cd7fb576f1e8d8b50202e2fd53d5cdec3724f31bc2ece235144e6541adcd61b5845fde6ca6fa275dff845ec40c715b478966d5a0b8fb2f
|
@@ -10,7 +10,7 @@ module VCloudCloud
|
|
10
10
|
client.timed_loop do
|
11
11
|
media = client.reload media
|
12
12
|
vm = client.reload vm
|
13
|
-
if media.running_tasks.empty?
|
13
|
+
if media.running_tasks.empty? && media.prerunning_tasks.empty?
|
14
14
|
client.invoke_and_wait :post, vm.insert_media_link,
|
15
15
|
:payload => params,
|
16
16
|
:headers => { :content_type => VCloudSdk::Xml::MEDIA_TYPE[:MEDIA_INSERT_EJECT_PARAMS] }
|
@@ -145,9 +145,15 @@ module VCloudCloud
|
|
145
145
|
end
|
146
146
|
|
147
147
|
def wait_entity(entity, accept_failure = false)
|
148
|
-
entity.
|
148
|
+
prerunning_tasks = entity.prerunning_tasks
|
149
|
+
prerunning_tasks.each do |task|
|
149
150
|
wait_task task, accept_failure
|
150
|
-
end if
|
151
|
+
end if prerunning_tasks && !prerunning_tasks.empty?
|
152
|
+
|
153
|
+
running_tasks = entity.running_tasks
|
154
|
+
running_tasks.each do |task|
|
155
|
+
wait_task task, accept_failure
|
156
|
+
end if running_tasks && !running_tasks.empty?
|
151
157
|
|
152
158
|
entity = reload entity
|
153
159
|
|
@@ -44,6 +44,10 @@ module VCloudSdk
|
|
44
44
|
get_nodes("Link", {"rel" => "remove"}, true).first
|
45
45
|
end
|
46
46
|
|
47
|
+
def prerunning_tasks
|
48
|
+
tasks.find_all { |t| PRE_RUNNING_TASK_STATUSES.include?(t.status) }
|
49
|
+
end
|
50
|
+
|
47
51
|
def running_tasks
|
48
52
|
get_nodes("Task", {"status" => "running"})
|
49
53
|
end
|
@@ -76,6 +76,10 @@ module VCloudSdk
|
|
76
76
|
get_nodes("Link", {"type" => MEDIA_TYPE[:VAPP]}, true).first
|
77
77
|
end
|
78
78
|
|
79
|
+
def prerunning_tasks
|
80
|
+
tasks.find_all { |t| PRE_RUNNING_TASK_STATUSES.include?(t.status) }
|
81
|
+
end
|
82
|
+
|
79
83
|
def running_tasks
|
80
84
|
get_nodes("Task", {"status" => "running"})
|
81
85
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bosh_vcloud_cpi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- VMware
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bosh_common
|
@@ -124,7 +124,7 @@ dependencies:
|
|
124
124
|
version: '0'
|
125
125
|
description: |-
|
126
126
|
BOSH vCloud CPI
|
127
|
-
|
127
|
+
c90a70
|
128
128
|
email: support@cloudfoundry.com
|
129
129
|
executables: []
|
130
130
|
extensions: []
|
@@ -417,7 +417,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
417
417
|
version: '0'
|
418
418
|
requirements: []
|
419
419
|
rubyforge_project:
|
420
|
-
rubygems_version: 2.
|
420
|
+
rubygems_version: 2.2.2
|
421
421
|
signing_key:
|
422
422
|
specification_version: 4
|
423
423
|
summary: BOSH vCloud CPI
|