Sha256: 31b5baba1e24643e1d8e9c3d6169eeb9b18efbd9e35b085d8eef93f932fa7c53
Contents?: true
Size: 470 Bytes
Versions: 29
Compression:
Stored size: 470 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 say "Total number of hosts: #{hosts.size}" end end end
Version data entries
29 entries across 29 versions & 1 rubygems