bosh_cli 1.2915.0 → 1.2922.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: f02ca6ddc4de5ea51002e19c5314b45f662f3e2e
4
- data.tar.gz: f3530d1248685f5a1bfb405fb54f1e13bcf83d6b
3
+ metadata.gz: 62513440b2e79662bfbfe378fcfef67745286395
4
+ data.tar.gz: e79260a21cf9148c16bd853cca410bbb7cf70f94
5
5
  SHA512:
6
- metadata.gz: 27e826747db64b638d5b1d1552ee50b03673de1d26caf411c628bc5d2b38b72f98538965e9e6003ac76215bfc721e995aa9de26a073124577a674a12d1dd2b14
7
- data.tar.gz: 31c09e5037914052a47a58b472e4b4005c9d982c165f1122a413b4108e0ffc78d361ab61dbf718888b9a1dc20899e52fcf6df24226eff4cd1b50b62d752921f9
6
+ metadata.gz: 2e323e28b40de0026f479ac5d2dd11fc09a31dbe89d91bbb18efb5300ebb85937b8c14afbb0220a9186a42f11935813b754b78bf37b729012c7e8647309026c5
7
+ data.tar.gz: 378e6e027bc3a0179aed2ff390ef8e72876be39e873c4923a39ecc69d50999887441ae1a71edc5459242c6a14821ac429e2e86ee6c9716658d2388830b867775
@@ -1,4 +1,3 @@
1
- # Copyright (c) 2009-2012 VMware, Inc.
2
1
 
3
2
  module Bosh::Cli::Command
4
3
  class Deployment < Base
@@ -126,9 +125,12 @@ module Bosh::Cli::Command
126
125
  return
127
126
  end
128
127
 
129
- status, task_id = director.delete_deployment(name, :force => force)
130
-
131
- task_report(status, task_id, "Deleted deployment `#{name}'")
128
+ begin
129
+ status, result = director.delete_deployment(name, :force => force)
130
+ task_report(status, result, "Deleted deployment `#{name}'")
131
+ rescue Bosh::Cli::ResourceNotFound
132
+ task_report(:done, nil, "Skipped delete of missing deployment `#{name}'")
133
+ end
132
134
  end
133
135
 
134
136
  # bosh validate jobs
@@ -204,17 +206,9 @@ module Bosh::Cli::Command
204
206
  err("No deployments") if deployments.empty?
205
207
 
206
208
  deployments_table = table do |t|
207
- t.headings = %w(Name Release(s) Stemcell(s))
209
+ t.headings = ['Name', 'Release(s)', 'Stemcell(s)', 'Cloud Config']
208
210
  deployments.each do |d|
209
- row = if (d.has_key?("releases") && d.has_key?("stemcells"))
210
- row_for_deployments_table(d)
211
- else
212
- # backwards compatible but slow: pull down each deployment
213
- # manifest to get releases and stemcells in use
214
- row_for_deployments_table_by_manifest(d["name"])
215
- end
216
-
217
- t.add_row(row)
211
+ t.add_row(row_for_deployments_table(d))
218
212
  t.add_separator unless d == deployments.last
219
213
  end
220
214
  end
@@ -265,27 +259,9 @@ module Bosh::Cli::Command
265
259
  stemcells = names_and_versions_from(deployment["stemcells"])
266
260
  releases = names_and_versions_from(deployment["releases"])
267
261
 
268
- [deployment["name"], releases.join("\n"), stemcells.join("\n")]
269
- end
270
-
271
- def row_for_deployments_table_by_manifest(deployment_name)
272
- raw_manifest = director.get_deployment(deployment_name)
273
- if (raw_manifest.has_key?("manifest"))
274
- manifest = Psych.load(raw_manifest["manifest"])
275
-
276
- stemcells = manifest["resource_pools"].map { |rp|
277
- rp["stemcell"].values_at("name", "version").join("/")
278
- }.sort.uniq
279
-
280
- releases = manifest["releases"] || [manifest["release"]]
281
- releases = names_and_versions_from(releases)
282
-
283
- [manifest["name"], releases.join("\n"), stemcells.join("\n")]
284
- else
285
- [deployment_name, "n/a", "n/a"]
286
- end
262
+ [deployment["name"], releases.join("\n"), stemcells.join("\n"), deployment.fetch("cloud_config", "none")]
287
263
  end
288
-
264
+
289
265
  def names_and_versions_from(arr)
290
266
  arr.map { |hash|
291
267
  hash.values_at("name", "version").join("/")
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Cli
3
- VERSION = '1.2915.0'
3
+ VERSION = '1.2922.0'
4
4
  end
5
5
  end
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.2915.0
4
+ version: 1.2922.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-04-07 00:00:00.000000000 Z
11
+ date: 2015-04-10 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.2915.0
19
+ version: 1.2922.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.2915.0
26
+ version: 1.2922.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.2915.0
33
+ version: 1.2922.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.2915.0
40
+ version: 1.2922.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.2915.0
131
+ version: 1.2922.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.2915.0
138
+ version: 1.2922.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: net-ssh
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -306,7 +306,7 @@ dependencies:
306
306
  version: '0'
307
307
  description: |-
308
308
  BOSH CLI
309
- 5653ce
309
+ 3778c5
310
310
  email: support@cloudfoundry.com
311
311
  executables:
312
312
  - bosh