bosh_cli 1.2788.0 → 1.2789.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cli/commands/deployment.rb +4 -1
- data/lib/cli/deployment_helper.rb +18 -13
- data/lib/cli/version.rb +1 -1
- metadata +10 -10
@@ -81,14 +81,17 @@ module Bosh::Cli::Command
|
|
81
81
|
usage "deploy"
|
82
82
|
desc "Deploy according to the currently selected deployment manifest"
|
83
83
|
option "--recreate", "recreate all VMs in deployment"
|
84
|
+
option "--redact-diff", "redact manifest value changes in deployment"
|
84
85
|
def perform
|
85
86
|
auth_required
|
86
87
|
recreate = !!options[:recreate]
|
88
|
+
redact_diff = !!options[:redact_diff]
|
87
89
|
|
88
90
|
manifest_yaml = prepare_deployment_manifest(
|
89
91
|
:yaml => true, :resolve_properties => true)
|
90
92
|
|
91
|
-
inspect_deployment_changes(Psych.load(manifest_yaml),
|
93
|
+
inspect_deployment_changes(Psych.load(manifest_yaml),
|
94
|
+
interactive: interactive?, redact_diff: redact_diff)
|
92
95
|
say('Please review all changes carefully'.make_yellow) if interactive?
|
93
96
|
|
94
97
|
deployment_name = File.basename(deployment)
|
@@ -76,7 +76,7 @@ module Bosh::Cli
|
|
76
76
|
@_diff_key_visited = {}
|
77
77
|
diff.keys.each do |key|
|
78
78
|
unless @_diff_key_visited[key]
|
79
|
-
print_summary(diff, key)
|
79
|
+
print_summary(diff, key, false)
|
80
80
|
nl
|
81
81
|
end
|
82
82
|
end
|
@@ -93,6 +93,7 @@ module Bosh::Cli
|
|
93
93
|
def inspect_deployment_changes(manifest, options = {})
|
94
94
|
show_empty_changeset = options.fetch(:show_empty_changeset, true)
|
95
95
|
interactive = options.fetch(:interactive, false)
|
96
|
+
redact_diff = options.fetch(:redact_diff, false)
|
96
97
|
|
97
98
|
manifest = manifest.dup
|
98
99
|
current_deployment = director.get_deployment(manifest['name'])
|
@@ -120,13 +121,13 @@ module Bosh::Cli
|
|
120
121
|
end
|
121
122
|
|
122
123
|
if diff[:release]
|
123
|
-
print_summary(diff, :release)
|
124
|
+
print_summary(diff, :release, redact_diff)
|
124
125
|
warn_about_release_changes(diff[:release]) if interactive
|
125
126
|
nl
|
126
127
|
end
|
127
128
|
|
128
129
|
if diff[:releases]
|
129
|
-
print_summary(diff, :releases)
|
130
|
+
print_summary(diff, :releases, redact_diff)
|
130
131
|
if interactive
|
131
132
|
diff[:releases].each do |release_diff|
|
132
133
|
warn_about_release_changes(release_diff)
|
@@ -135,31 +136,31 @@ module Bosh::Cli
|
|
135
136
|
nl
|
136
137
|
end
|
137
138
|
|
138
|
-
print_summary(diff, :compilation)
|
139
|
+
print_summary(diff, :compilation, redact_diff)
|
139
140
|
nl
|
140
141
|
|
141
|
-
print_summary(diff, :update)
|
142
|
+
print_summary(diff, :update, redact_diff)
|
142
143
|
nl
|
143
144
|
|
144
|
-
print_summary(diff, :resource_pools)
|
145
|
+
print_summary(diff, :resource_pools, redact_diff)
|
145
146
|
warn_about_stemcell_changes(diff) if interactive
|
146
147
|
nl
|
147
148
|
|
148
|
-
print_summary(diff, :disk_pools)
|
149
|
+
print_summary(diff, :disk_pools, redact_diff)
|
149
150
|
nl
|
150
151
|
|
151
|
-
print_summary(diff, :networks)
|
152
|
+
print_summary(diff, :networks, redact_diff)
|
152
153
|
nl
|
153
154
|
|
154
|
-
print_summary(diff, :jobs)
|
155
|
+
print_summary(diff, :jobs, redact_diff)
|
155
156
|
nl
|
156
157
|
|
157
|
-
print_summary(diff, :properties)
|
158
|
+
print_summary(diff, :properties, redact_diff)
|
158
159
|
nl
|
159
160
|
|
160
161
|
diff.keys.each do |key|
|
161
162
|
unless @_diff_key_visited[key]
|
162
|
-
print_summary(diff, key)
|
163
|
+
print_summary(diff, key, redact_diff)
|
163
164
|
nl
|
164
165
|
end
|
165
166
|
end
|
@@ -323,7 +324,7 @@ module Bosh::Cli
|
|
323
324
|
EOS
|
324
325
|
end
|
325
326
|
|
326
|
-
def print_summary(diff, key, title = nil)
|
327
|
+
def print_summary(diff, key, redact, title = nil)
|
327
328
|
title ||= key.to_s.gsub(/[-_]/, ' ').capitalize
|
328
329
|
|
329
330
|
say(title.make_green)
|
@@ -332,7 +333,11 @@ module Bosh::Cli
|
|
332
333
|
if !summary || summary.empty?
|
333
334
|
say('No changes')
|
334
335
|
else
|
335
|
-
|
336
|
+
if redact
|
337
|
+
say("Changes found - Redacted")
|
338
|
+
else
|
339
|
+
say(summary.join("\n"))
|
340
|
+
end
|
336
341
|
end
|
337
342
|
|
338
343
|
@_diff_key_visited[key.to_s] = 1
|
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.2789.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-12-
|
12
|
+
date: 2014-12-13 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.2789.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.2789.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: bosh-template
|
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.
|
37
|
+
version: 1.2789.0
|
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.
|
45
|
+
version: 1.2789.0
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: json_pure
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -130,7 +130,7 @@ dependencies:
|
|
130
130
|
requirements:
|
131
131
|
- - ~>
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version: 1.
|
133
|
+
version: 1.2789.0
|
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.
|
141
|
+
version: 1.2789.0
|
142
142
|
- !ruby/object:Gem::Dependency
|
143
143
|
name: net-ssh
|
144
144
|
requirement: !ruby/object:Gem::Requirement
|
@@ -221,7 +221,7 @@ dependencies:
|
|
221
221
|
version: 0.5.4
|
222
222
|
description: ! 'BOSH CLI
|
223
223
|
|
224
|
-
|
224
|
+
177517'
|
225
225
|
email: support@cloudfoundry.com
|
226
226
|
executables:
|
227
227
|
- bosh
|
@@ -344,7 +344,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
344
344
|
version: '0'
|
345
345
|
segments:
|
346
346
|
- 0
|
347
|
-
hash:
|
347
|
+
hash: 271561866118815358
|
348
348
|
requirements: []
|
349
349
|
rubyforge_project:
|
350
350
|
rubygems_version: 1.8.23
|