bosh-director 1.3215.0 → 1.3215.3.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: ab976e0510fc7f253bd947c789f24a5df57c176d
4
- data.tar.gz: 8dde70562d5909758452163180a55cef74482e40
3
+ metadata.gz: 024dde641fbd1f0b6b6b0481f75469bb7b1d0be9
4
+ data.tar.gz: b0bb968be959a42def75ae98351143e79e5f2b63
5
5
  SHA512:
6
- metadata.gz: e4d6caa60ecfdf0814d60a867684e55880e5b4388f9b9a47191d238e32c613b7fbc33a864291c32222b9bcef27de1d382de2097defdea8cbb89d6843b0fbcfe2
7
- data.tar.gz: 6c7b62f21443ec567148d7b684e5f5cbe8b59a67e936b160d848bccd1cb86662e0179e6eeca7cd687d795c34cb1081e45d0d2516ca1f8c2cafb6ed3eb9003cd5
6
+ metadata.gz: 8d8ddb3554d8594c9adb81d1f219c03c427ede24ae38881b459bf8cefe5e697f680cd529e05935d43f801cd50a565c276bdaf24920aa492ed797681e95747767
7
+ data.tar.gz: 36c6342f4764fdd858c9493604fce5321449875d288b7d4ce75b14a6a4f6a9c76b4235301945a34fe7b7aecde4b4e706b1fd733c053d9f0f185e18b4652da832
@@ -23,25 +23,23 @@ Sequel.migration do
23
23
  stemcell_foreign_key_name = stemcell_foreign_keys.first.fetch(:name)
24
24
 
25
25
  build_indexes = indexes(:compiled_packages).select { |_, value| value.fetch(:columns) == [:package_id, :stemcell_id, :build] }
26
- raise 'Failed to run migration, found more than 1 build index' if build_indexes.size != 1
27
- # build_indexes is an array, where each element is an array with first element being the name of index
28
- build_index = build_indexes.first.first
29
-
30
- stemcell_indexes = indexes(:compiled_packages).select { |_, value| value.fetch(:columns) == [:package_id, :stemcell_id, :dependency_key_sha1]}
31
- raise 'Failed to run migration, found more than 1 stemcell_id index' if stemcell_indexes.size != 1
32
- # stemcell_indexes is an array, where each element is an array with first element being the name of index
33
- stemcell_index = stemcell_indexes.first.first
34
-
35
26
  if [:mysql2, :mysql].include?(adapter_scheme)
27
+ raise 'Failed to run migration, found more than 1 build index' if build_indexes.size != 1
28
+ # build_indexes is an array, where each element is an array with first element being the name of index
29
+ build_index = build_indexes.first.first
36
30
  alter_table(:compiled_packages) do
37
31
  drop_index(nil, name: build_index)
38
32
  end
39
33
  elsif [:postgres].include?(adapter_scheme)
34
+ build_index = build_indexes.empty? ? 'compiled_packages_package_id_stemcell_id_build_key' : build_indexes.first.first
40
35
  alter_table(:compiled_packages) do
41
36
  drop_constraint(build_index)
42
37
  end
43
38
  end
44
39
 
40
+ stemcell_indexes = indexes(:compiled_packages).select { |_, value| value.fetch(:columns) == [:package_id, :stemcell_id, :dependency_key_sha1]}
41
+ stemcell_index = stemcell_indexes.empty? ? 'package_stemcell_dependency_key_sha1_idx' : stemcell_indexes.first.first
42
+
45
43
  alter_table(:compiled_packages) do
46
44
  drop_constraint(stemcell_foreign_key_name, :type => :foreign_key)
47
45
  add_index [:package_id, :stemcell_os, :stemcell_version, :build], unique: true, name: 'package_stemcell_build_idx'
@@ -0,0 +1,15 @@
1
+ require 'json'
2
+
3
+ Sequel.migration do
4
+ up do
5
+ self[:instances].all do |instance|
6
+ unless instance[:spec_json].nil?
7
+ spec = JSON.parse(instance[:spec_json])
8
+ if !spec['update'].nil? && spec['update'].has_key?('serial') && spec['update']['serial'].nil?
9
+ spec['update']['serial'] = false
10
+ self[:instances].where(id: instance[:id]).update(spec_json: JSON.generate(spec))
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,9 @@
1
+ Sequel.migration do
2
+ up do
3
+ self[:stemcells].all do |stemcell|
4
+ if stemcell[:operating_system].nil? || stemcell[:operating_system] == ''
5
+ self[:stemcells].where(id: stemcell[:id]).update(operating_system: stemcell[:name])
6
+ end
7
+ end
8
+ end
9
+ end
@@ -371,15 +371,22 @@ module Bosh::Director
371
371
 
372
372
  redact = params['redact'] != 'false'
373
373
 
374
- diff = before_manifest.diff(after_manifest, redact)
375
-
376
- json_encode({
377
- 'context' => {
378
- 'cloud_config_id' => after_cloud_config ? after_cloud_config.id : nil,
379
- 'runtime_config_id' => after_runtime_config ? after_runtime_config.id : nil
380
- },
381
- 'diff' => diff.map { |l| [l.to_s, l.status] }
382
- })
374
+ result = {
375
+ 'context' => {
376
+ 'cloud_config_id' => after_cloud_config ? after_cloud_config.id : nil,
377
+ 'runtime_config_id' => after_runtime_config ? after_runtime_config.id : nil
378
+ }
379
+ }
380
+
381
+ begin
382
+ diff = before_manifest.diff(after_manifest, redact)
383
+ result['diff'] = diff.map { |l| [l.to_s, l.status] }
384
+ rescue => error
385
+ result['diff'] = []
386
+ result['error'] = "Unable to diff manifest: #{error.inspect}\n#{error.backtrace.join("\n")}"
387
+ end
388
+
389
+ json_encode(result)
383
390
  end
384
391
 
385
392
  post '/:deployment/errands/:errand_name/runs' do
@@ -68,7 +68,7 @@ module Bosh::Director
68
68
  'max_in_flight' => @max_in_flight,
69
69
  'canary_watch_time' => "#{@min_canary_watch_time}-#{@max_canary_watch_time}",
70
70
  'update_watch_time' => "#{@min_update_watch_time}-#{@max_update_watch_time}",
71
- 'serial' => @serial
71
+ 'serial' => serial?
72
72
  }
73
73
  end
74
74
 
@@ -1,4 +1,5 @@
1
1
  require 'securerandom'
2
+ require 'common/release/release_directory'
2
3
  require 'common/version/release_version'
3
4
  require 'bosh/director/compiled_release_downloader'
4
5
  require 'bosh/director/compiled_release_manifest'
@@ -98,7 +99,8 @@ module Bosh::Director
98
99
  output_path = File.join(download_dir, "compiled_release_#{Time.now.to_f}.tar.gz")
99
100
  archiver = Core::TarGzipper.new
100
101
 
101
- archiver.compress(download_dir, ['compiled_packages', 'jobs', 'release.MF'], output_path)
102
+ release_directory = Bosh::Common::Release::ReleaseDirectory.new(download_dir)
103
+ archiver.compress(download_dir, release_directory.ordered_release_files, output_path)
102
104
  tarball_file = File.open(output_path, 'r')
103
105
 
104
106
  oid = blobstore_client.create(tarball_file)
@@ -3,13 +3,12 @@ module Bosh::Director
3
3
 
4
4
  attr_accessor :packages
5
5
 
6
- def initialize(job_meta, release_model, release_dir, packages, logger)
6
+ def initialize(job_meta, release_model, release_dir, logger)
7
7
  @name = job_meta['name']
8
8
  @version = job_meta['version']
9
9
  @sha1 = job_meta['sha1']
10
10
  @fingerprint = job_meta['fingerprint']
11
11
 
12
- @packages = packages
13
12
  @release_model = release_model
14
13
  @release_dir = release_dir
15
14
  @logger = logger
@@ -63,8 +62,8 @@ module Bosh::Director
63
62
  result = Bosh::Exec.sh("tar -C #{job_dir} -xzf #{job_tgz} 2>&1", :on_error => :return)
64
63
  if result.failed?
65
64
  @logger.error("Extracting #{desc} archive failed in dir #{job_dir}, " +
66
- "tar returned #{result.exit_status}, " +
67
- "output: #{result.output}")
65
+ "tar returned #{result.exit_status}, " +
66
+ "output: #{result.output}")
68
67
  raise JobInvalidArchive, "Extracting #{desc} archive failed. Check task debug log for details."
69
68
  end
70
69
  end
@@ -109,24 +108,10 @@ module Bosh::Director
109
108
  end
110
109
 
111
110
  def parse_package_names(job_manifest)
112
- package_names = []
113
- if job_manifest['packages']
114
- unless job_manifest['packages'].is_a?(Array)
115
- raise JobInvalidPackageSpec,
116
- "Job `#{@name}' has invalid package spec format"
117
- end
118
-
119
- job_manifest['packages'].each do |package_name|
120
- package = @packages[package_name]
121
- if package.nil?
122
- raise JobMissingPackage,
123
- "Job `#{@name}' is referencing " +
124
- "a missing package `#{package_name}'"
125
- end
126
- package_names << package.name
127
- end
111
+ if job_manifest['packages'] && !job_manifest['packages'].is_a?(Array)
112
+ raise JobInvalidPackageSpec, "Job '#{@name}' has invalid package spec format"
128
113
  end
129
- package_names
114
+ job_manifest['packages'] || []
130
115
  end
131
116
 
132
117
  def validate_logs(job_manifest)
@@ -155,7 +140,7 @@ module Bosh::Director
155
140
  def parse_links(links, kind)
156
141
  if !links.is_a?(Array)
157
142
  raise JobInvalidLinkSpec,
158
- "Job '#{@name}' has invalid spec format: '#{kind}' must be an array of hashes with name and type"
143
+ "Job '#{@name}' has invalid spec format: '#{kind}' must be an array of hashes with name and type"
159
144
  end
160
145
 
161
146
  parsed_links = {}
@@ -150,7 +150,6 @@ module Bosh::Director
150
150
  resolve_package_dependencies(@manifest[@packages_folder])
151
151
  end
152
152
 
153
- @packages = {}
154
153
  process_packages(release_dir)
155
154
  process_jobs(release_dir)
156
155
 
@@ -202,7 +201,6 @@ module Bosh::Director
202
201
  new_packages = []
203
202
  existing_packages = []
204
203
  registered_packages = []
205
- packages_existing_from_other_releases = []
206
204
 
207
205
  @manifest[@packages_folder].each do |package_meta|
208
206
  # Checking whether we might have the same bits somewhere (in any release, not just the one being uploaded)
@@ -261,7 +259,6 @@ module Bosh::Director
261
259
  end
262
260
  end
263
261
  new_packages << package_meta
264
- packages_existing_from_other_releases << package_meta
265
262
  end
266
263
  end
267
264
 
@@ -277,7 +274,7 @@ module Bosh::Director
277
274
  }
278
275
  end
279
276
  all_package_refs = Array(created_package_refs) | Array(existing_package_refs) | registered_package_refs
280
- create_compiled_packages(all_package_refs, release_dir, packages_existing_from_other_releases)
277
+ create_compiled_packages(all_package_refs, release_dir)
281
278
  else
282
279
  backfill_source_for_packages(registered_packages, release_dir)
283
280
  end
@@ -294,7 +291,6 @@ module Bosh::Director
294
291
  logger.info("Adding source for package `#{package_desc}'")
295
292
  had_effect |= save_package_source_blob(package, package_meta, release_dir)
296
293
  package.save
297
- @packages[package.name] = package
298
294
  end
299
295
  end
300
296
 
@@ -364,11 +360,11 @@ module Bosh::Director
364
360
  end
365
361
  end
366
362
 
367
- return package_refs
363
+ package_refs
368
364
  end
369
365
 
370
366
  # @return [boolean] true if at least one job was created; false if the call had no effect.
371
- def create_compiled_packages(all_compiled_packages, release_dir, packages_existing_from_other_releases)
367
+ def create_compiled_packages(all_compiled_packages, release_dir)
372
368
  return false if all_compiled_packages.nil?
373
369
 
374
370
  event_log.begin_stage('Creating new compiled packages', all_compiled_packages.size)
@@ -387,7 +383,7 @@ module Bosh::Director
387
383
  if existing_compiled_packages.empty?
388
384
  package_desc = "#{package.name}/#{package.version} for #{stemcell_os}/#{stemcell_version}"
389
385
  event_log.track(package_desc) do
390
- other_compiled_packages = compiled_packages_matching(package, packages_existing_from_other_releases, stemcell)
386
+ other_compiled_packages = compiled_packages_matching(package, stemcell)
391
387
  if @fix
392
388
  other_compiled_packages.each do |other_compiled_package|
393
389
  fix_compiled_package(other_compiled_package, compiled_pkg_tgz)
@@ -398,7 +394,6 @@ module Bosh::Director
398
394
  end
399
395
  elsif @fix
400
396
  existing_compiled_package = existing_compiled_packages.first
401
- @packages[existing_compiled_package.name] = existing_compiled_package
402
397
  fix_compiled_package(existing_compiled_package, compiled_pkg_tgz)
403
398
  end
404
399
  end
@@ -406,16 +401,12 @@ module Bosh::Director
406
401
  had_effect
407
402
  end
408
403
 
409
- def compiled_packages_matching(package, packages_existing_from_other_releases, stemcell)
404
+ def compiled_packages_matching(package, stemcell)
410
405
  other_compiled_packages = []
411
406
  dependency_key = dependency_key(package)
412
- packages_existing_from_other_releases.each do |other_package_meta|
413
- if other_package_meta["fingerprint"] == package.fingerprint
414
- packages = Models::Package.where(fingerprint: other_package_meta["fingerprint"]).all
415
- packages.each do |pkg|
416
- other_compiled_packages.concat(find_compiled_packages(pkg.id, stemcell[:os], stemcell[:version], dependency_key).all)
417
- end
418
- end
407
+ packages = Models::Package.where(fingerprint: package.fingerprint).all
408
+ packages.each do |pkg|
409
+ other_compiled_packages.concat(find_compiled_packages(pkg.id, stemcell[:os], stemcell[:version], dependency_key).all)
419
410
  end
420
411
  other_compiled_packages
421
412
  end
@@ -529,7 +520,6 @@ module Bosh::Director
529
520
  # @param [Models::Package] package Package model
530
521
  # @return [void]
531
522
  def register_package(package)
532
- @packages[package.name] = package
533
523
  @release_version_model.add_package(package)
534
524
  end
535
525
 
@@ -591,7 +581,7 @@ module Bosh::Director
591
581
  end
592
582
 
593
583
  def create_job(job_meta, release_dir)
594
- release_job = ReleaseJob.new(job_meta, @release_model, release_dir, @packages, logger)
584
+ release_job = ReleaseJob.new(job_meta, @release_model, release_dir, logger)
595
585
  logger.info("Creating job template `#{job_meta['name']}/#{job_meta['version']}' " +
596
586
  'from provided bits')
597
587
  release_job.update(Models::Template.new())
@@ -608,7 +598,7 @@ module Bosh::Director
608
598
 
609
599
  if @fix
610
600
  logger.info("Fixing existing job `#{job_desc}'")
611
- release_job = ReleaseJob.new(job_meta, @release_model, release_dir, @packages, logger)
601
+ release_job = ReleaseJob.new(job_meta, @release_model, release_dir, logger)
612
602
  release_job.update(template)
613
603
  else
614
604
  logger.info("Using existing job `#{job_desc}'")
@@ -1,24 +1,21 @@
1
- class ::Hash
2
- def deep_merge(second)
3
- merger = proc { |key, v1, v2| Hash === v1 && Hash === v2 ? v1.merge(v2, &merger) : v2 }
4
- self.merge(second, &merger)
5
- end
6
- end
7
-
8
1
  module Bosh::Director
9
2
  class Changeset
10
3
  KEY_NAME = 'name'
11
4
 
12
- def initialize(before, after, redact = true, redacted_before = nil, redacted_after = nil)
13
- @redact = redact
14
- @redacted_before = redacted_before.nil? ? Redactor.redact_properties(Bosh::Common::DeepCopy.copy(before), redact) : redacted_before
15
- @redacted_after = redacted_after.nil? ? Redactor.redact_properties(Bosh::Common::DeepCopy.copy(after), redact) : redacted_after
5
+ REDACT_KEY_NAMES = %w(
6
+ properties
7
+ bosh
8
+ )
9
+
10
+ def initialize(before, after, redacted_before = nil, redacted_after = nil)
11
+ @redacted_before = redacted_before.nil? ? Changeset.redact_properties!(Bosh::Common::DeepCopy.copy(before)) : redacted_before
12
+ @redacted_after = redacted_after.nil? ? Changeset.redact_properties!(Bosh::Common::DeepCopy.copy(after)) : redacted_after
16
13
 
17
14
  @before = before
18
15
  @after = after
19
16
 
20
17
  if @before && @after
21
- @merged = @before.deep_merge(@after)
18
+ @merged = deep_merge(@before, @after)
22
19
  elsif @before
23
20
  @merged = @before
24
21
  else
@@ -26,64 +23,113 @@ module Bosh::Director
26
23
  end
27
24
  end
28
25
 
29
- def diff(indent = 0)
30
- lines = DiffLines.new
26
+ # redacts properties from ruby object to avoid having to use a regex to redact properties from diff output
27
+ # please do not use regexes for diffing/redacting
28
+ def self.redact_properties!(obj, redact_key_is_ancestor = false)
29
+ if redact_key_is_ancestor
30
+ if obj.respond_to?(:key?)
31
+ obj.keys.each{ |key|
32
+ if obj[key].respond_to?(:each)
33
+ redact_properties!(obj[key], true)
34
+ else
35
+ obj[key] = '<redacted>'
36
+ end
37
+ }
38
+ elsif obj.respond_to?(:each_index)
39
+ obj.each_index { |i|
40
+ if obj[i].respond_to?(:each)
41
+ redact_properties!(obj[i], true)
42
+ else
43
+ obj[i] = '<redacted>'
44
+ end
45
+ }
46
+ end
47
+ else
48
+ if obj.respond_to?(:each)
49
+ obj.each{ |a|
50
+ if obj.respond_to?(:key?) && REDACT_KEY_NAMES.any? { |key| key == a.first } && a.last.respond_to?(:key?)
51
+ redact_properties!(a.last, true)
52
+ else
53
+ redact_properties!(a.respond_to?(:last) ? a.last : a)
54
+ end
31
55
 
32
- @merged.each_pair do |key, value|
33
- if @before.nil? || @before[key].nil?
34
- lines.concat(yaml_lines({key => @redacted_after[key]}, indent, 'added'))
56
+ }
57
+ end
58
+ end
35
59
 
36
- elsif @after.nil? || @after[key].nil?
37
- lines.concat(yaml_lines({key => @redacted_before[key]}, indent, 'removed'))
60
+ obj
61
+ end
38
62
 
39
- elsif @before[key].is_a?(Array) && @after[key].is_a?(Array)
40
- lines.concat(compare_arrays(@before[key], @after[key], @redacted_before[key], @redacted_after[key], key, indent))
63
+ def diff(redact=true, indent = 0)
64
+ lines = DiffLines.new
41
65
 
42
- elsif value.is_a?(Hash)
43
- changeset = Changeset.new(@before[key], @after[key],@redact, @redacted_before[key], @redacted_after[key])
44
- diff_lines = changeset.diff(indent+1)
45
- unless diff_lines.empty?
46
- lines << Line.new(indent, "#{key}:", nil)
47
- lines.concat(diff_lines)
48
- end
66
+ if redact
67
+ output_values_before = @redacted_before
68
+ output_values_after = @redacted_after
69
+ else
70
+ output_values_before = @before
71
+ output_values_after = @after
72
+ end
49
73
 
50
- elsif @before[key] != @after[key]
51
- lines.concat(yaml_lines({key => @redacted_before[key]}, indent, 'removed'))
52
- lines.concat(yaml_lines({key => @redacted_after[key]}, indent, 'added'))
74
+ @merged.each_pair do |key, value|
75
+ if @before[key] != @after[key]
76
+ if @before.nil? || @before[key].nil?
77
+ lines.concat(yaml_lines({key => output_values_after[key]}, indent, 'added'))
78
+
79
+ elsif @after.nil? || @after[key].nil?
80
+ lines.concat(yaml_lines({key => output_values_before[key]}, indent, 'removed'))
81
+
82
+ elsif @before[key].is_a?(Array) && @after[key].is_a?(Array)
83
+ lines.concat(compare_arrays(@before[key], @after[key], output_values_before[key], output_values_after[key], key, redact, indent))
84
+
85
+ elsif @before[key].is_a?(Hash) && @after[key].is_a?(Hash)
86
+ changeset = Changeset.new(@before[key], @after[key], output_values_before[key], output_values_after[key])
87
+ diff_lines = changeset.diff(redact, indent+1)
88
+ unless diff_lines.empty?
89
+ lines << Line.new(indent, "#{key}:", nil)
90
+ lines.concat(diff_lines)
91
+ end
92
+
93
+ else
94
+ lines.concat(yaml_lines({key => output_values_before[key]}, indent, 'removed'))
95
+ lines.concat(yaml_lines({key => output_values_after[key]}, indent, 'added'))
96
+ end
53
97
  end
54
98
  end
55
99
  lines
56
100
  end
57
101
 
102
+ private
103
+
104
+ def deep_merge(first, second)
105
+ merger = proc { |key, v1, v2| Hash === v1 && Hash === v2 ? v1.merge(v2, &merger) : v2 }
106
+ first.merge(second, &merger)
107
+ end
108
+
58
109
  def yaml_lines(value, indent, state)
59
110
  lines = DiffLines.new
60
- value.to_yaml(indent: Line::INDENT).gsub("---\n", '').split("\n").each do |line|
111
+ value.to_yaml(indent: Line::INDENT).gsub(/^---\n/, '').split("\n").each do |line|
61
112
  lines << Line.new(indent, line, state)
62
113
  end
63
114
  lines
64
115
  end
65
116
 
66
- def compare_arrays(old_value, new_value, redacted_old_value, redacted_new_value, parent_name, indent)
117
+ def compare_arrays(old_value, new_value, output_old_value, output_new_value, parent_name, redact, indent)
67
118
  # combine arrays of redacted and unredacted values. unredacted arrays for diff logic, and redacted arrays for output
68
- combined_old_value = old_value.zip redacted_old_value
69
- combined_new_value = new_value.zip redacted_new_value
70
-
119
+ combined_old_value = old_value.zip output_old_value
120
+ combined_new_value = new_value.zip output_new_value
71
121
  added = combined_new_value - combined_old_value
72
122
  removed = combined_old_value - combined_new_value
73
123
 
74
124
  lines = DiffLines.new
75
125
 
76
126
  added.each do |pair|
77
-
78
127
  elem = pair.first
79
128
  redacted_elem = pair.last
80
-
81
129
  if elem.is_a?(Hash)
82
130
  using_names = (added+removed).all? { |e| e.first['name'] }
83
-
84
131
  using_ranges = (added+removed).all? { |e| e.first['range'] }
85
132
  if using_names || using_ranges
86
- #clean up duplicate values
87
133
  if using_names
88
134
  removed_same_name_element = removed.find { |e| e.first['name'] == elem['name'] }
89
135
  elsif using_ranges
@@ -92,8 +138,8 @@ module Bosh::Director
92
138
  removed.delete(removed_same_name_element)
93
139
 
94
140
  if removed_same_name_element
95
- changeset = Changeset.new(removed_same_name_element.first, elem, @redact, removed_same_name_element.last, redacted_elem)
96
- diff_lines = changeset.diff(indent+1)
141
+ changeset = Changeset.new(removed_same_name_element.first, elem, removed_same_name_element.last, redacted_elem)
142
+ diff_lines = changeset.diff(redact, indent+1)
97
143
 
98
144
  unless diff_lines.empty?
99
145
  # write name if elem has been changed
@@ -33,7 +33,7 @@ module Bosh::Director
33
33
  end
34
34
 
35
35
  def diff(other_manifest, redact)
36
- Changeset.new(to_hash, other_manifest.to_hash, redact).diff.order
36
+ Changeset.new(to_hash, other_manifest.to_hash).diff(redact).order
37
37
  end
38
38
 
39
39
  def to_hash
@@ -12,7 +12,9 @@ module Bosh::Director::Models
12
12
  end
13
13
 
14
14
  def package_by_name(package_name)
15
- packages_by_name.fetch(package_name)
15
+ packages_by_name.fetch(package_name) do
16
+ raise "Package name '#{package_name}' not found in release '#{release.name}/#{version}'"
17
+ end
16
18
  end
17
19
 
18
20
  private
@@ -35,7 +35,7 @@ module Bosh::Director
35
35
  "'#{property}' value (#{result.inspect}) should be less than #{options[:max].inspect}"
36
36
  end
37
37
 
38
- elsif options[:default]
38
+ elsif options.has_key?(:default)
39
39
  result = options[:default]
40
40
 
41
41
  elsif !options[:optional]
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Director
3
- VERSION = '1.3215.0'
3
+ VERSION = '1.3215.3.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bosh-director
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3215.0
4
+ version: 1.3215.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - VMware
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-15 00:00:00.000000000 Z
11
+ date: 2016-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bosh_common
@@ -16,98 +16,98 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.3215.0
19
+ version: 1.3215.3.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.3215.0
26
+ version: 1.3215.3.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.3215.0
33
+ version: 1.3215.3.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.3215.0
40
+ version: 1.3215.3.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bosh-registry
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.3215.0
47
+ version: 1.3215.3.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.3215.0
54
+ version: 1.3215.3.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: blobstore_client
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.3215.0
61
+ version: 1.3215.3.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.3215.0
68
+ version: 1.3215.3.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bosh-core
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 1.3215.0
75
+ version: 1.3215.3.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 1.3215.0
82
+ version: 1.3215.3.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bosh-director-core
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 1.3215.0
89
+ version: 1.3215.3.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 1.3215.0
96
+ version: 1.3215.3.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: bosh-template
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 1.3215.0
103
+ version: 1.3215.3.0
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 1.3215.0
110
+ version: 1.3215.3.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: bosh_openstack_cpi
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -681,6 +681,8 @@ files:
681
681
  - db/migrations/director/20160219175840_add_column_teams_to_deployments.rb
682
682
  - db/migrations/director/20160224222508_add_deployment_name_to_task.rb
683
683
  - db/migrations/director/20160225182206_rename_post_start_completed.rb
684
+ - db/migrations/director/20160329201256_set_instances_with_nil_serial_to_false.rb
685
+ - db/migrations/director/20160331225404_backfill_stemcell_os.rb
684
686
  - db/migrations/dns/20120123234908_initial.rb
685
687
  - lib/bosh/director.rb
686
688
  - lib/bosh/director/agent_client.rb