Sha256: b80da89fded6256e00ee1e8e55677413faa6bfc326964b62a96dec883a4ec10b

Contents?: true

Size: 392 Bytes

Versions: 3

Compression:

Stored size: 392 Bytes

Contents

class Domain < CloudstackCli::Base

  desc 'list', 'list domains'
  def list
    domains = client.list_domains
    if domains.size < 1
      puts "No domains found."
    else
      table = [%w(Name Path)]
      domains.each do |domain|
        table << [domain['name'], domain['path']]
      end
      print_table table
      say "Total number of domains: #{domains.size}"
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cloudstack-cli-1.0.0.rc3 lib/cloudstack-cli/commands/domain.rb
cloudstack-cli-1.0.0.rc2 lib/cloudstack-cli/commands/domain.rb
cloudstack-cli-1.0.0.rc1 lib/cloudstack-cli/commands/domain.rb