cloudstack-cli 0.3.8 → 0.3.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,14 +3,17 @@ class Volume < CloudstackCli::Base
3
3
  desc "list", "list networks"
4
4
  option :project
5
5
  def list
6
- project = find_project if options[:project]
7
- networks = client.list_networks(project_id: project ? project['id'] : nil)
8
- if networks.size < 1
9
- puts "No networks found"
6
+ projectid = find_project['id'] if options[:project]
7
+ volumes = client.list_volumes(projectid)
8
+ if volumes.size < 1
9
+ puts "No volumes found."
10
10
  else
11
- table = [["Name", "Displaytext", "Default?"]]
12
- networks.each do |network|
13
- table << [network['name'], network['displaytext'], network['isdefault']]
11
+ table = [["Name", "Type", "Size", "VM", "Storage", "Offeringname"]]
12
+ volumes.each do |volume|
13
+ table << [volume['name'], volume['type'],
14
+ (volume['size'] / 1024**3).to_s + 'GB',
15
+ volume['vmname'],
16
+ volume['storage'], volume['diskofferingname']]
14
17
  end
15
18
  print_table(table)
16
19
  end
@@ -1,3 +1,3 @@
1
1
  module CloudstackCli
2
- VERSION = "0.3.8"
2
+ VERSION = "0.3.9"
3
3
  end
@@ -12,7 +12,7 @@ module CloudstackClient
12
12
  }
13
13
  params['projectid'] = project_id if project_id
14
14
  json = send_request(params)
15
- json['network'] || []
15
+ json['volume'] || []
16
16
  end
17
17
 
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudstack-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
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: 2013-10-17 00:00:00.000000000 Z
12
+ date: 2013-10-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdoc