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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c4d97d94d84c1a9a705a9ba642388c1f47b34cf7
4
- data.tar.gz: 34d48cd6dfe0feb24ed2e726b4787f852c50b4c8
3
+ metadata.gz: 8f833b201172d03a8115330ee935c832fdc54548
4
+ data.tar.gz: e01e6af0273de56718fd79b9355564a7fc9c625e
5
5
  SHA512:
6
- metadata.gz: 33d7e13c598313b197ee41be1979e3d86ad3de71c5584575f192708fa6b7840c5193dd98579a6b3e4e7e3a4a95a60c92cf111bbf889b1a2f76fd8ec89bb2a7be
7
- data.tar.gz: d2d62fa77096ee532349c274d64f9e8ec3425cc34dba3771e43a55f5969b5b1d6b36b2903ebd1d211445eb96f0dd3bb52c6651b2dc119022f2de172bdba16825
6
+ metadata.gz: 61d9fdaa559a42b6d995d6d44250b348ff9b44d8b6d16e8c660d6f69bea5f00eb447446ae73cb086e60076565623b5b053391c5efe010761dccee6efdbcb2c29
7
+ data.tar.gz: 841241598cfb18901db127f6b2f5953a3366c483486b7b0b7b1b922e8d2d35c959082df963847a3723d4b2df44462019d71db1eee8cc3a912ecdff6219fda877
@@ -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
- s.next Steps::Undeploy, :vm
232
- s.next Steps::Delete, s.state[:vm], true
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
@@ -1,7 +1,7 @@
1
1
  module Bosh
2
2
  module Clouds
3
3
  class VCloud
4
- VERSION = '0.9.0'
4
+ VERSION = '0.10.0'
5
5
  end
6
6
  end
7
7
  end
@@ -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.9.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-13 00:00:00.000000000 Z
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
- b1e960
127
+ 3754cd
128
128
  email: support@cloudfoundry.com
129
129
  executables: []
130
130
  extensions: []