bosh_cli 1.2068.0 → 1.2086.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cli.rb +1 -0
- data/lib/cli/deployment_helper.rb +6 -0
- data/lib/cli/manifest_warnings.rb +37 -0
- data/lib/cli/version.rb +1 -1
- metadata +9 -8
data/lib/cli.rb
CHANGED
@@ -61,6 +61,8 @@ module Bosh::Cli
|
|
61
61
|
resolve_release_aliases(manifest)
|
62
62
|
resolve_stemcell_aliases(manifest)
|
63
63
|
|
64
|
+
report_manifest_warnings(manifest)
|
65
|
+
|
64
66
|
options[:yaml] ? Psych.dump(manifest) : manifest
|
65
67
|
end
|
66
68
|
|
@@ -375,5 +377,9 @@ module Bosh::Cli
|
|
375
377
|
end
|
376
378
|
end
|
377
379
|
end
|
380
|
+
|
381
|
+
def report_manifest_warnings(manifest)
|
382
|
+
ManifestWarnings.new(manifest).report
|
383
|
+
end
|
378
384
|
end
|
379
385
|
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module Bosh::Cli
|
2
|
+
class ManifestWarnings
|
3
|
+
WARNING_MESSAGES = {
|
4
|
+
'resource_pools.[].cloud_properties.spot_bid_price' => <<-EOM
|
5
|
+
AWS spot instance support is an experimental feature.
|
6
|
+
Please log an issue at https://github.com/cloudfoundry/bosh/issues if you run into any issues related to spot instances.
|
7
|
+
EOM
|
8
|
+
}
|
9
|
+
|
10
|
+
def initialize(manifest)
|
11
|
+
@manifest = manifest
|
12
|
+
end
|
13
|
+
|
14
|
+
def report
|
15
|
+
WARNING_MESSAGES.each do |keypath, warning|
|
16
|
+
say(warning.make_yellow) if keypath_exists?(manifest, keypath.split('.'))
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
attr_reader :manifest
|
23
|
+
|
24
|
+
def keypath_exists?(config, keypath)
|
25
|
+
case
|
26
|
+
when keypath.empty?
|
27
|
+
true
|
28
|
+
|
29
|
+
when keypath.first == '[]'
|
30
|
+
config.is_a?(Array) && config.any? { |element| keypath_exists?(element, keypath[1..-1]) }
|
31
|
+
|
32
|
+
when config.respond_to?(:has_key?) && config.has_key?(keypath.first)
|
33
|
+
keypath_exists?(config[keypath.first], keypath[1..-1])
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
data/lib/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bosh_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2086.0
|
5
5
|
prerelease:
|
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: 2014-02-
|
12
|
+
date: 2014-02-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bosh_common
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.
|
21
|
+
version: 1.2086.0
|
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.
|
29
|
+
version: 1.2086.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: json_pure
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,7 +114,7 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - ~>
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.
|
117
|
+
version: 1.2086.0
|
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.
|
125
|
+
version: 1.2086.0
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: net-ssh
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
@@ -269,7 +269,7 @@ dependencies:
|
|
269
269
|
version: '0'
|
270
270
|
description: ! 'BOSH CLI
|
271
271
|
|
272
|
-
|
272
|
+
8d26be'
|
273
273
|
email: support@cloudfoundry.com
|
274
274
|
executables:
|
275
275
|
- bosh
|
@@ -329,6 +329,7 @@ files:
|
|
329
329
|
- lib/cli/job_property_validator.rb
|
330
330
|
- lib/cli/job_state.rb
|
331
331
|
- lib/cli/line_wrap.rb
|
332
|
+
- lib/cli/manifest_warnings.rb
|
332
333
|
- lib/cli/name_version_pair.rb
|
333
334
|
- lib/cli/package_builder.rb
|
334
335
|
- lib/cli/packaging_helper.rb
|
@@ -378,7 +379,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
378
379
|
version: '0'
|
379
380
|
segments:
|
380
381
|
- 0
|
381
|
-
hash:
|
382
|
+
hash: 2109217702553857662
|
382
383
|
requirements: []
|
383
384
|
rubyforge_project:
|
384
385
|
rubygems_version: 1.8.23
|