Sha256: 9f41d5c674377d4a2bf837142b03d9b2f122292038182ac97cef77e2cce5662c

Contents?: true

Size: 426 Bytes

Versions: 5

Compression:

Stored size: 426 Bytes

Contents

class Host < CloudstackCli::Base

  desc 'host list', 'list hosts'
  option :zone
  def list
    hosts = client.list_hosts(options)
    if hosts.size < 1
      say "No hosts found."
    else
      table = [["Zone", "Type", "Cluster", "Name"]]
      hosts.each do |host|
        table << [
        	host['zonename'], host['type'], host['clustername'], host['name']
        ]
      end
      print_table table
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cloudstack-cli-0.4.3 lib/cloudstack-cli/commands/host.rb
cloudstack-cli-0.4.2 lib/cloudstack-cli/commands/host.rb
cloudstack-cli-0.4.1 lib/cloudstack-cli/commands/host.rb
cloudstack-cli-0.4.0 lib/cloudstack-cli/commands/host.rb
cloudstack-cli-0.3.11 lib/cloudstack-cli/commands/host.rb