rightscale-cli 0.5.4 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b57966cd4128f7803b0c6307384b75150be9de7
4
- data.tar.gz: 46842aa6fa84ff9696e6cde6989173c7dd8a3297
3
+ metadata.gz: a3a62715238e21f2f66762d5bd335f8a89ee08c1
4
+ data.tar.gz: 3996b804f297cf31d93a810f4d625dcdb22ae682
5
5
  SHA512:
6
- metadata.gz: 48b7b87f5cb087f131188d9e845d3643cbb00c822513c7285eb0454ccb63628eeaecc4b25c2ff3e152810a89b1c3956c6198e743dd2b7da1ced6286ec5964d4a
7
- data.tar.gz: 00657d512c4ce386b381b10c78b50079717d687ae45f544449f86e837dd04f2cab4f9d775cb4dfe51b104f4e54bcb3c537619a96a5369c2cd06faa19e7f98b4b
6
+ metadata.gz: 36e172f28dc9ddc0017151043ab40bd601e257627da0c73aa2342e794d6366cb8c583694d74eb4601884bf32591dfda5b52641e73fe388d9f22e965adcb1a685
7
+ data.tar.gz: 8fc544749a7b3a7c302ff9e84a145d957eb45174da950b909c4161a7deb4cccb01b67cc65288fc51b28a82dc44a31b302375b0931398ac5fea7dd900b53a8f2f
@@ -32,8 +32,23 @@ class RightScaleCLI
32
32
  eval(IO.read("#{File.dirname(File.expand_path(__FILE__))}/render_options.rb"), binding)
33
33
 
34
34
  desc "list", "Lists all clouds."
35
+ option :basic, :type => :boolean, :required => false
35
36
  def list()
36
- @client.render(@client.get('clouds'), 'clouds')
37
+ clouds = @client.get('clouds')
38
+
39
+ if options[:basic]
40
+ basic_fields = [ 'display_name', 'cloud_type', 'name' ]
41
+ basic_clouds = []
42
+ @client.get('clouds').each { |cloud|
43
+ cloud_id = cloud['links'].select { |link| link['rel'] == 'instances' }.first['href'].split('/')[3]
44
+ c = cloud.select{|x| basic_fields.include?(x)}
45
+ c['cloud_id'] = cloud_id
46
+ basic_clouds.push(c)
47
+ }
48
+ clouds = basic_clouds
49
+ end
50
+
51
+ @client.render(clouds, 'clouds')
37
52
  end
38
53
 
39
54
  desc "show", "Shows a cloud."
@@ -15,5 +15,5 @@
15
15
  # limitations under the License.
16
16
 
17
17
  class RightScaleCLI
18
- VERSION = '0.5.3'
18
+ VERSION = '0.5.5'
19
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rightscale-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Fordham