bosh_vcloud_cpi 0.9.0 → 0.10.0
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/cloud.rb +15 -2
- data/lib/cloud/vcloud/vcd_client.rb +0 -1
- data/lib/cloud/vcloud/version.rb +1 -1
- data/lib/cloud/vcloud/xml/wrapper_classes/vm.rb +8 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f833b201172d03a8115330ee935c832fdc54548
|
4
|
+
data.tar.gz: e01e6af0273de56718fd79b9355564a7fc9c625e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61d9fdaa559a42b6d995d6d44250b348ff9b44d8b6d16e8c660d6f69bea5f00eb447446ae73cb086e60076565623b5b053391c5efe010761dccee6efdbcb2c29
|
7
|
+
data.tar.gz: 841241598cfb18901db127f6b2f5953a3366c483486b7b0b7b1b922e8d2d35c959082df963847a3723d4b2df44462019d71db1eee8cc3a912ecdff6219fda877
|
data/lib/cloud/vcloud/cloud.rb
CHANGED
@@ -95,6 +95,9 @@ module VCloudCloud
|
|
95
95
|
|
96
96
|
vapp, vm =[s.state[:vapp], s.state[:vm]]
|
97
97
|
|
98
|
+
#set agent id of vm
|
99
|
+
vm.agent_id=agent_id
|
100
|
+
|
98
101
|
# To handle concurrent create_vm requests,
|
99
102
|
# if the target vApp exists, creates a temp vApp, and then recomposes its VM to the target vApp.
|
100
103
|
if requested_name
|
@@ -228,8 +231,18 @@ module VCloudCloud
|
|
228
231
|
|
229
232
|
# poweroff vm before we are able to delete it
|
230
233
|
s.next Steps::PowerOff, :vm, true
|
231
|
-
|
232
|
-
|
234
|
+
|
235
|
+
vapp = s.state[:vapp] = client.resolve_link vm.container_vapp_link
|
236
|
+
#remove vapp if it is temporary vapp
|
237
|
+
#vapp is temporary vapp if vapp name is same as agent id
|
238
|
+
if vapp.name == vm.agent_id
|
239
|
+
s.next Steps::PowerOff, :vapp, true
|
240
|
+
s.next Steps::Undeploy, :vapp
|
241
|
+
s.next Steps::Delete, s.state[:vapp], true
|
242
|
+
else
|
243
|
+
s.next Steps::Undeploy, :vm
|
244
|
+
s.next Steps::Delete, s.state[:vm], true
|
245
|
+
end
|
233
246
|
|
234
247
|
s.next Steps::DeleteCatalogMedia, vm.name
|
235
248
|
rescue RestClient::Forbidden, ObjectNotFoundError => e
|
@@ -95,7 +95,6 @@ module VCloudCloud
|
|
95
95
|
end
|
96
96
|
|
97
97
|
def vapp_by_name(name)
|
98
|
-
# @logger.debug "VAPP_BY_NAME - org.vdc_link: #{org.vdc_link}"
|
99
98
|
vdc_link = org.vdc_link vdc_name
|
100
99
|
raise ObjectNotFoundError, "Invalid virtual datacenter name: #{vdc_name}" unless vdc_link
|
101
100
|
vdc_obj = resolve_link vdc_link
|
data/lib/cloud/vcloud/version.rb
CHANGED
@@ -96,6 +96,14 @@ module VCloudSdk
|
|
96
96
|
@root["name"]= value
|
97
97
|
end
|
98
98
|
|
99
|
+
def agent_id
|
100
|
+
@root["agent_id"]
|
101
|
+
end
|
102
|
+
|
103
|
+
def agent_id=(value)
|
104
|
+
@root["agent_id"]= value
|
105
|
+
end
|
106
|
+
|
99
107
|
def hardware_section
|
100
108
|
get_nodes("VirtualHardwareSection", nil, false,
|
101
109
|
"http://schemas.dmtf.org/ovf/envelope/1").first
|
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.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- VMware
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-18 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
|
+
3754cd
|
128
128
|
email: support@cloudfoundry.com
|
129
129
|
executables: []
|
130
130
|
extensions: []
|