lib/cloudstack-cli/commands/volume.rb in cloudstack-cli-1.0.0.rc4 vs lib/cloudstack-cli/commands/volume.rb in cloudstack-cli-1.0.0
- old
+ new
@@ -14,19 +14,21 @@
volumes = client.list_volumes(options)
if volumes.size < 1
say "No volumes found."
else
table = [%w(Name Type Size VM Storage Offeringname Zone Status)]
+ table.first << 'Project' if options[:project]
volumes.each do |volume|
table << [
volume['name'], volume['type'],
(volume['size'] / 1024**3).to_s + 'GB',
volume['vmname'],
volume['storage'],
volume['diskofferingname'],
volume['zonename'],
volume['state']
]
+ table.last << volume['project'] if options[:project]
end
print_table(table)
say "Total number of volumes: #{volumes.size}"
end
end