Sha256: dcdc2bc5b4ff960367d6e89fa0f10fa294ea1f38a14f6d01ccbc317d161813d6

Contents?: true

Size: 631 Bytes

Versions: 27

Compression:

Stored size: 631 Bytes

Contents

class DiskOffer < CloudstackCli::Base

  desc 'list', 'list disk offerings'
  option :domain, desc: "the domain of the disk offering"
  def list
    resolve_domain
    offerings = client.list_disk_offerings(options)
    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
      say "Total number of offerings: #{offerings.size}"
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
cloudstack-cli-1.4.1 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-1.4.0 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-1.3.3 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-1.3.2 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-1.3.1 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-1.3.0 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-1.2.7 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-1.2.6 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-1.2.5 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-1.2.4 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-1.2.3 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-1.2.1 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-1.2.0 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-1.1.0 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-1.0.8 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-1.0.7 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-1.0.6 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-1.0.5 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-1.0.4 lib/cloudstack-cli/commands/disk_offer.rb
cloudstack-cli-1.0.3 lib/cloudstack-cli/commands/disk_offer.rb