bosh-director 1.5.0.pre.1525 → 1.5.0.pre.1612
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bosh/director/deployment_plan/job.rb +12 -15
- data/lib/bosh/director/version.rb +1 -1
- metadata +17 -17
@@ -290,8 +290,7 @@ module Bosh::Director
|
|
290
290
|
end
|
291
291
|
|
292
292
|
def parse_resource_pool
|
293
|
-
resource_pool_name = safe_property(@job_spec, "resource_pool",
|
294
|
-
:class => String)
|
293
|
+
resource_pool_name = safe_property(@job_spec, "resource_pool", class: String)
|
295
294
|
@resource_pool = deployment.resource_pool(resource_pool_name)
|
296
295
|
if @resource_pool.nil?
|
297
296
|
raise JobUnknownResourcePool,
|
@@ -300,8 +299,7 @@ module Bosh::Director
|
|
300
299
|
end
|
301
300
|
|
302
301
|
def parse_update_config
|
303
|
-
update_spec = safe_property(@job_spec, "update",
|
304
|
-
:class => Hash, :optional => true)
|
302
|
+
update_spec = safe_property(@job_spec, "update", class: Hash, optional: true)
|
305
303
|
@update = UpdateConfig.new(update_spec, @deployment.update)
|
306
304
|
end
|
307
305
|
|
@@ -309,35 +307,34 @@ module Bosh::Director
|
|
309
307
|
@instances = []
|
310
308
|
@instance_states = {}
|
311
309
|
|
312
|
-
@state = safe_property(@job_spec, "state",
|
313
|
-
|
314
|
-
|
315
|
-
job_size = safe_property(@job_spec, "instances", :class => Integer)
|
316
|
-
|
317
|
-
instance_states = safe_property(@job_spec, "instance_states",
|
318
|
-
:class => Hash, :default => {})
|
310
|
+
@state = safe_property(@job_spec, "state", class: String, optional: true)
|
311
|
+
job_size = safe_property(@job_spec, "instances", class: Integer)
|
312
|
+
instance_states = safe_property(@job_spec, "instance_states", class: Hash, default: {})
|
319
313
|
|
320
314
|
instance_states.each_pair do |index, state|
|
321
315
|
begin
|
322
316
|
index = Integer(index)
|
323
317
|
rescue ArgumentError
|
324
318
|
raise JobInvalidInstanceIndex,
|
325
|
-
|
319
|
+
"Invalid job index `#{index}', integer expected"
|
326
320
|
end
|
321
|
+
|
327
322
|
unless (0...job_size).include?(index)
|
328
323
|
raise JobInvalidInstanceIndex,
|
329
|
-
|
324
|
+
"`#{@name}/#{index}' is outside of (0..#{job_size-1}) range"
|
330
325
|
end
|
326
|
+
|
331
327
|
unless VALID_JOB_STATES.include?(state)
|
332
328
|
raise JobInvalidInstanceState,
|
333
|
-
|
329
|
+
"Invalid state `#{state}' for `#{@name}/#{index}', valid states are: #{VALID_JOB_STATES.join(", ")}"
|
334
330
|
end
|
331
|
+
|
335
332
|
@instance_states[index] = state
|
336
333
|
end
|
337
334
|
|
338
335
|
if @state && !VALID_JOB_STATES.include?(@state)
|
339
336
|
raise JobInvalidJobState,
|
340
|
-
|
337
|
+
"Invalid state `#{@state}' for `#{@name}', valid states are: #{VALID_JOB_STATES.join(", ")}"
|
341
338
|
end
|
342
339
|
|
343
340
|
job_size.times do |index|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bosh-director
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.0.pre.
|
4
|
+
version: 1.5.0.pre.1612
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-12-
|
12
|
+
date: 2013-12-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bcrypt-ruby
|
@@ -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.1612
|
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.1612
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: bosh-core
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ~>
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 1.5.0.pre.
|
53
|
+
version: 1.5.0.pre.1612
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,7 +58,7 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.5.0.pre.
|
61
|
+
version: 1.5.0.pre.1612
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: bosh_common
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
requirements:
|
67
67
|
- - ~>
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 1.5.0.pre.
|
69
|
+
version: 1.5.0.pre.1612
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -74,7 +74,7 @@ dependencies:
|
|
74
74
|
requirements:
|
75
75
|
- - ~>
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: 1.5.0.pre.
|
77
|
+
version: 1.5.0.pre.1612
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
79
|
name: bosh_cpi
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|
@@ -82,7 +82,7 @@ dependencies:
|
|
82
82
|
requirements:
|
83
83
|
- - ~>
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version: 1.5.0.pre.
|
85
|
+
version: 1.5.0.pre.1612
|
86
86
|
type: :runtime
|
87
87
|
prerelease: false
|
88
88
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -90,7 +90,7 @@ dependencies:
|
|
90
90
|
requirements:
|
91
91
|
- - ~>
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version: 1.5.0.pre.
|
93
|
+
version: 1.5.0.pre.1612
|
94
94
|
- !ruby/object:Gem::Dependency
|
95
95
|
name: bosh_openstack_cpi
|
96
96
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,7 +98,7 @@ dependencies:
|
|
98
98
|
requirements:
|
99
99
|
- - ~>
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version: 1.5.0.pre.
|
101
|
+
version: 1.5.0.pre.1612
|
102
102
|
type: :runtime
|
103
103
|
prerelease: false
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -106,7 +106,7 @@ dependencies:
|
|
106
106
|
requirements:
|
107
107
|
- - ~>
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: 1.5.0.pre.
|
109
|
+
version: 1.5.0.pre.1612
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
111
|
name: bosh_aws_cpi
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,7 +114,7 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - ~>
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.5.0.pre.
|
117
|
+
version: 1.5.0.pre.1612
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -122,7 +122,7 @@ dependencies:
|
|
122
122
|
requirements:
|
123
123
|
- - ~>
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: 1.5.0.pre.
|
125
|
+
version: 1.5.0.pre.1612
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: bosh_vsphere_cpi
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
@@ -130,7 +130,7 @@ dependencies:
|
|
130
130
|
requirements:
|
131
131
|
- - ~>
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version: 1.5.0.pre.
|
133
|
+
version: 1.5.0.pre.1612
|
134
134
|
type: :runtime
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -138,7 +138,7 @@ dependencies:
|
|
138
138
|
requirements:
|
139
139
|
- - ~>
|
140
140
|
- !ruby/object:Gem::Version
|
141
|
-
version: 1.5.0.pre.
|
141
|
+
version: 1.5.0.pre.1612
|
142
142
|
- !ruby/object:Gem::Dependency
|
143
143
|
name: eventmachine
|
144
144
|
requirement: !ruby/object:Gem::Requirement
|
@@ -461,7 +461,7 @@ dependencies:
|
|
461
461
|
version: '0'
|
462
462
|
description: ! 'BOSH Director
|
463
463
|
|
464
|
-
|
464
|
+
a13d7a'
|
465
465
|
email: support@cloudfoundry.com
|
466
466
|
executables:
|
467
467
|
- bosh-director
|