Sha256: a1b6f7e2ab801eeae33dcf433cf217d4a096fb82dc967bad671acbc12306a636

Contents?: true

Size: 522 Bytes

Versions: 7

Compression:

Stored size: 522 Bytes

Contents

class DiskOffer < CloudstackCli::Base

  desc 'list', 'list disk offerings'
  option :domain
  def list
    offerings = client.list_disk_offerings(options[:domain])
    if offerings.size < 1
      puts "No offerings found."
    else
      table = [["Name", "Displaytext", "Domain", "ID"]]
      offerings.each do |offering|
        table << [
          offering["name"],
          offering["displaytext"],
          offering["domain"],
          offering["id"]
        ]
      end
      print_table table
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
cloudstack-cli-0.5.8 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-0.5.5 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-0.5.4 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-0.5.3 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-0.5.2 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-0.5.1 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-0.5.0 lib/cloudstack-cli/commands/disk_offer.rb