bosh_vsphere_cpi 1.2652.0 → 1.2657.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/vsphere/agent_env.rb +11 -5
- data/lib/cloud/vsphere/cloud.rb +6 -4
- data/lib/cloud/vsphere/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 830117bfa34478cf66609ad0662380755df39663
|
4
|
+
data.tar.gz: e6e5313e6199ac88a496eaf433f7cd455ec6e556
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d92517dd6042aea7c2a0a851f46969e082b74cbc589ef2be178388c9c2a7dac818825c3e7d3fdbda0fee2f804a7ebcb675656addaa9dd48fd0197be4ba3a507
|
7
|
+
data.tar.gz: 779f2888b44a23173adb147a1cc921c2a37664e0323d8d86095a75b8214703dd0734859a49cd45261e15cc6d4bd95234df7cd0243ef473f941303f0b21a170dc
|
@@ -10,7 +10,9 @@ module VSphereCloud
|
|
10
10
|
|
11
11
|
def get_current_env(vm, datacenter_name)
|
12
12
|
cdrom = @client.get_cdrom_device(vm)
|
13
|
-
env_iso_folder =
|
13
|
+
env_iso_folder = env_iso_folder(cdrom)
|
14
|
+
return unless env_iso_folder
|
15
|
+
|
14
16
|
datastore_name = cdrom.backing.datastore.name
|
15
17
|
env_path = env_iso_folder.match(/\[#{datastore_name}\] (.*)/)[1]
|
16
18
|
|
@@ -34,6 +36,11 @@ module VSphereCloud
|
|
34
36
|
update_cdrom_env(vm, datastore, file_name)
|
35
37
|
end
|
36
38
|
|
39
|
+
def env_iso_folder(cdrom_device)
|
40
|
+
return unless cdrom_device && cdrom_device.backing.respond_to?(:file_name)
|
41
|
+
File.dirname(cdrom_device.backing.file_name)
|
42
|
+
end
|
43
|
+
|
37
44
|
private
|
38
45
|
|
39
46
|
def update_cdrom_env(vm, datastore, file_name)
|
@@ -46,8 +53,7 @@ module VSphereCloud
|
|
46
53
|
connect_info.start_connected = true
|
47
54
|
connect_info.connected = true
|
48
55
|
|
49
|
-
|
50
|
-
cdrom = devices.find { |device| device.kind_of?(Vim::Vm::Device::VirtualCdrom) }
|
56
|
+
cdrom = @client.get_cdrom_device(vm)
|
51
57
|
cdrom.connectable = connect_info
|
52
58
|
cdrom.backing = backing_info
|
53
59
|
|
@@ -79,9 +85,9 @@ module VSphereCloud
|
|
79
85
|
|
80
86
|
def clean_up_old_env(vm)
|
81
87
|
cdrom = @client.get_cdrom_device(vm)
|
82
|
-
|
88
|
+
env_iso_folder = env_iso_folder(cdrom)
|
89
|
+
return unless env_iso_folder
|
83
90
|
|
84
|
-
env_iso_folder = File.dirname(cdrom.backing.file_name)
|
85
91
|
datacenter = @client.find_parent(vm, Vim::Datacenter)
|
86
92
|
|
87
93
|
@client.delete_path(datacenter, File.join(env_iso_folder, 'env.json'))
|
data/lib/cloud/vsphere/cloud.rb
CHANGED
@@ -238,10 +238,12 @@ module VSphereCloud
|
|
238
238
|
|
239
239
|
# Delete env.iso and VM specific files managed by the director
|
240
240
|
retry_block do
|
241
|
-
|
242
|
-
if
|
243
|
-
env_iso_folder =
|
244
|
-
|
241
|
+
cdrom = devices.find { |device| device.kind_of?(Vim::Vm::Device::VirtualCdrom) }
|
242
|
+
if cdrom
|
243
|
+
env_iso_folder = @agent_env.env_iso_folder(cdrom)
|
244
|
+
if env_iso_folder
|
245
|
+
client.delete_path(datacenter, env_iso_folder)
|
246
|
+
end
|
245
247
|
end
|
246
248
|
end
|
247
249
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bosh_vsphere_cpi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2657.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- VMware
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bosh_common
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.2657.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.2657.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bosh_cpi
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.2657.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
40
|
+
version: 1.2657.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: membrane
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -138,7 +138,7 @@ dependencies:
|
|
138
138
|
version: 2.2.4
|
139
139
|
description: |-
|
140
140
|
BOSH VSphere CPI
|
141
|
-
|
141
|
+
a6c527
|
142
142
|
email: support@cloudfoundry.com
|
143
143
|
executables:
|
144
144
|
- vsphere_cpi
|