bosh_vsphere_cpi 1.5.0.pre.1114 → 1.5.0.pre.1116
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cloud/vsphere/cloud.rb +6 -8
- data/lib/cloud/vsphere/version.rb +1 -1
- metadata +6 -6
data/lib/cloud/vsphere/cloud.rb
CHANGED
@@ -1029,22 +1029,20 @@ module VSphereCloud
|
|
1029
1029
|
end
|
1030
1030
|
|
1031
1031
|
def fix_device_unit_numbers(devices, device_changes)
|
1032
|
-
|
1032
|
+
controllers_available_unit_numbers = Hash.new { |h,k| h[k] = (0..15).to_a }
|
1033
1033
|
devices.each do |device|
|
1034
1034
|
if device.controller_key
|
1035
|
-
|
1036
|
-
|
1037
|
-
max_unit_numbers[device.controller_key] = device.unit_number
|
1038
|
-
end
|
1035
|
+
available_unit_numbers = controllers_available_unit_numbers[device.controller_key]
|
1036
|
+
available_unit_numbers.delete(device.unit_number)
|
1039
1037
|
end
|
1040
1038
|
end
|
1041
1039
|
|
1042
1040
|
device_changes.each do |device_change|
|
1043
1041
|
device = device_change.device
|
1044
1042
|
if device.controller_key && device.unit_number.nil?
|
1045
|
-
|
1046
|
-
device.
|
1047
|
-
|
1043
|
+
available_unit_numbers = controllers_available_unit_numbers[device.controller_key]
|
1044
|
+
raise "No available unit numbers for device: #{device.inspect}" if available_unit_numbers.empty?
|
1045
|
+
device.unit_number = available_unit_numbers.shift
|
1048
1046
|
end
|
1049
1047
|
end
|
1050
1048
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bosh_vsphere_cpi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.0.pre.
|
4
|
+
version: 1.5.0.pre.1116
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.5.0.pre.
|
21
|
+
version: 1.5.0.pre.1116
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.5.0.pre.
|
29
|
+
version: 1.5.0.pre.1116
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: bosh_cpi
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -34,7 +34,7 @@ dependencies:
|
|
34
34
|
requirements:
|
35
35
|
- - ~>
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version: 1.5.0.pre.
|
37
|
+
version: 1.5.0.pre.1116
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - ~>
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 1.5.0.pre.
|
45
|
+
version: 1.5.0.pre.1116
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: membrane
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
version: '0'
|
110
110
|
description: ! 'BOSH VSphere CPI
|
111
111
|
|
112
|
-
|
112
|
+
663451'
|
113
113
|
email: support@cloudfoundry.com
|
114
114
|
executables:
|
115
115
|
- vsphere_cpi_console
|