Sha256: 4d6431eb614dd1d835138d36be521a55f40a4f61edbd7f0897bb110e11e012eb
Contents?: true
Size: 610 Bytes
Versions: 5
Compression:
Stored size: 610 Bytes
Contents
class Volume < CloudstackCli::Base desc "volume list", "list volumes" option :project def list projectid = find_project['id'] if options[:project] volumes = client.list_volumes(projectid) if volumes.size < 1 puts "No volumes found." else table = [["Name", "Type", "Size", "VM", "Storage", "Offeringname"]] volumes.each do |volume| table << [volume['name'], volume['type'], (volume['size'] / 1024**3).to_s + 'GB', volume['vmname'], volume['storage'], volume['diskofferingname']] end print_table(table) end end end
Version data entries
5 entries across 5 versions & 1 rubygems