bosh_cli 1.3122.0 → 1.3123.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cli/client/director.rb +1 -1
- data/lib/cli/commands/instances.rb +10 -3
- data/lib/cli/commands/release/upload_release.rb +15 -6
- data/lib/cli/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9195a3624e8837dab1659d3d9bce8c49da5743f6
|
4
|
+
data.tar.gz: 49d81aded03be583e22fec042d9aa2c09d99e5e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ae89f95679f63debcdbef18b336c37d23a9149393f16d904f707a32982ae40cda342e785349833b12c993038b3043087987592ed8c2bdc3161fa0947ed4bd68
|
7
|
+
data.tar.gz: 5fcc9e11fb01d3604b41d4afbe7e63059c03e37265ea58419e10a2feb27e702d394e288e584e7c9b007db9fb041256b4f0444a62c36dca60315939746d210f0b
|
data/lib/cli/client/director.rb
CHANGED
@@ -641,7 +641,7 @@ module Bosh
|
|
641
641
|
|
642
642
|
def releases_path(options = {})
|
643
643
|
path = '/releases'
|
644
|
-
params = [:rebase, :skip_if_exists].select { |p| options[p] }.map { |p| "#{p}=true" }
|
644
|
+
params = [:rebase, :skip_if_exists, :fix].select { |p| options[p] }.map { |p| "#{p}=true" }
|
645
645
|
params.push "sha1=#{options[:sha1]}" unless options[:sha1].blank?
|
646
646
|
path << "?#{params.join('&')}" unless params.empty?
|
647
647
|
path
|
@@ -30,6 +30,7 @@ module Bosh::Cli::Command
|
|
30
30
|
|
31
31
|
def show_deployment(name, options={})
|
32
32
|
instances = director.fetch_vm_state(name)
|
33
|
+
instance_count = instances.size
|
33
34
|
|
34
35
|
if instances.empty?
|
35
36
|
nl
|
@@ -71,9 +72,15 @@ module Bosh::Cli::Command
|
|
71
72
|
if options[:failing]
|
72
73
|
if options[:ps]
|
73
74
|
instance['processes'].keep_if { |p| p['state'] != 'running' }
|
74
|
-
|
75
|
+
if instance['processes'].size == 0 && instance['job_state'] == 'running'
|
76
|
+
instance_count -= 1
|
77
|
+
next
|
78
|
+
end
|
75
79
|
else
|
76
|
-
|
80
|
+
if instance['job_state'] == 'running'
|
81
|
+
instance_count -= 1
|
82
|
+
next
|
83
|
+
end
|
77
84
|
end
|
78
85
|
end
|
79
86
|
|
@@ -137,7 +144,7 @@ module Bosh::Cli::Command
|
|
137
144
|
t << process_row
|
138
145
|
end
|
139
146
|
|
140
|
-
t << :separator if row_count <
|
147
|
+
t << :separator if row_count < instance_count
|
141
148
|
end
|
142
149
|
end
|
143
150
|
end
|
@@ -14,6 +14,7 @@ If --name & --version are provided, they will be used for checking if release ex
|
|
14
14
|
option '--sha1 SHA1', 'SHA1 of the remote release'
|
15
15
|
option '--name NAME', 'name of the release'
|
16
16
|
option '--version VERSION', 'version of the release'
|
17
|
+
option '--fix', 'verify blobstore contents and replace with correct versions'
|
17
18
|
|
18
19
|
def upload(release_file = nil)
|
19
20
|
auth_required
|
@@ -23,7 +24,8 @@ If --name & --version are provided, they will be used for checking if release ex
|
|
23
24
|
upload_options = {
|
24
25
|
:rebase => options[:rebase],
|
25
26
|
:repack => true,
|
26
|
-
:sha1 => options[:sha1]
|
27
|
+
:sha1 => options[:sha1],
|
28
|
+
:fix => options[:fix],
|
27
29
|
}
|
28
30
|
|
29
31
|
#only check release_dir if not compiled release tarball
|
@@ -43,14 +45,19 @@ If --name & --version are provided, they will be used for checking if release ex
|
|
43
45
|
end
|
44
46
|
end
|
45
47
|
|
46
|
-
if options[:name] && options[:version]
|
48
|
+
if !options[:fix] && options[:name] && options[:version]
|
49
|
+
say("Checking whether release #{options[:name]}/#{options[:version]} already exists...".make_green, '')
|
47
50
|
director.list_releases.each do |release|
|
48
51
|
if release['name'] == options[:name]
|
49
52
|
release['release_versions'].each do |version|
|
50
|
-
|
53
|
+
if version['version'] == options[:version]
|
54
|
+
say('YES'.make_yellow)
|
55
|
+
return
|
56
|
+
end
|
51
57
|
end
|
52
58
|
end
|
53
59
|
end
|
60
|
+
say('NO'.make_yellow)
|
54
61
|
end
|
55
62
|
|
56
63
|
if release_file =~ /^#{URI::regexp}$/
|
@@ -98,6 +105,7 @@ If --name & --version are provided, they will be used for checking if release ex
|
|
98
105
|
# Trying to repack release by default
|
99
106
|
repack = upload_options[:repack]
|
100
107
|
rebase = upload_options[:rebase]
|
108
|
+
fix = upload_options[:fix]
|
101
109
|
|
102
110
|
say("\nVerifying manifest...")
|
103
111
|
tarball.validate_manifest
|
@@ -116,7 +124,7 @@ If --name & --version are provided, they will be used for checking if release ex
|
|
116
124
|
Bosh::Common::Version::ReleaseVersion.parse(tarball.version) if new_director?
|
117
125
|
|
118
126
|
begin
|
119
|
-
if repack
|
127
|
+
if repack && !fix
|
120
128
|
if tarball.compiled_release?
|
121
129
|
package_matches = match_remote_compiled_packages(tarball.manifest)
|
122
130
|
else
|
@@ -156,7 +164,7 @@ If --name & --version are provided, they will be used for checking if release ex
|
|
156
164
|
report = 'Release uploaded'
|
157
165
|
end
|
158
166
|
|
159
|
-
status, task_id = director.upload_release(tarball_path,
|
167
|
+
status, task_id = director.upload_release(tarball_path, rebase: rebase, fix: fix)
|
160
168
|
task_report(status, task_id, report)
|
161
169
|
end
|
162
170
|
|
@@ -172,7 +180,8 @@ If --name & --version are provided, they will be used for checking if release ex
|
|
172
180
|
status, task_id = director.upload_remote_release(
|
173
181
|
release_location,
|
174
182
|
rebase: upload_options[:rebase],
|
175
|
-
sha1: upload_options[:sha1]
|
183
|
+
sha1: upload_options[:sha1],
|
184
|
+
fix: upload_options[:fix]
|
176
185
|
)
|
177
186
|
task_report(status, task_id, report)
|
178
187
|
end
|
data/lib/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bosh_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3123.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- VMware
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bosh_common
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.3123.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.
|
26
|
+
version: 1.3123.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bosh-template
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.3123.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.
|
40
|
+
version: 1.3123.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: cf-uaa-lib
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 1.
|
131
|
+
version: 1.3123.0
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 1.
|
138
|
+
version: 1.3123.0
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: net-ssh
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|