Sha256: ce91c0b22de2903850f5b914cf429416bc82b6e77ee0dd8c6e441c0c4d4bf017

Contents?: true

Size: 421 Bytes

Versions: 10

Compression:

Stored size: 421 Bytes

Contents

class Host < CloudstackCli::Base

  desc '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

10 entries across 10 versions & 1 rubygems

Version Path
cloudstack-cli-0.5.8 lib/cloudstack-cli/commands/host.rb
cloudstack-cli-0.5.5 lib/cloudstack-cli/commands/host.rb
cloudstack-cli-0.5.4 lib/cloudstack-cli/commands/host.rb
cloudstack-cli-0.5.3 lib/cloudstack-cli/commands/host.rb
cloudstack-cli-0.5.2 lib/cloudstack-cli/commands/host.rb
cloudstack-cli-0.5.1 lib/cloudstack-cli/commands/host.rb
cloudstack-cli-0.5.0 lib/cloudstack-cli/commands/host.rb
cloudstack-cli-0.3.10 lib/cloudstack-cli/commands/host.rb
cloudstack-cli-0.3.9 lib/cloudstack-cli/commands/host.rb
cloudstack-cli-0.3.8 lib/cloudstack-cli/commands/host.rb