Class: Cluster
- Inherits:
-
CloudstackCli::Base
- Object
- Thor
- CloudstackCli::Base
- Cluster
- Defined in:
- lib/cloudstack-cli/commands/cluster.rb
Instance Attribute Summary
Attributes inherited from CloudstackCli::Base
Instance Method Summary collapse
Methods inherited from CloudstackCli::Base
Methods included from CloudstackCli::Helper
#ask_number, #bootstrap_server, #bootstrap_server_interactive, #get_async_job_status, #print_options, #watch_jobs
Instance Method Details
#list ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/cloudstack-cli/commands/cluster.rb', line 4 def list clusters = client.list_clusters() if clusters.size < 1 say "No clusters found." else table = [["Name", "Pod-Name", "Type", "Zone"]] clusters.each do |cluster| table << [ cluster['name'], cluster['podname'], cluster['hypervisortype'], cluster['zonename'] ] end print_table table end end |