lib/cloudstack-cli/commands/cluster.rb in cloudstack-cli-0.15.1 vs lib/cloudstack-cli/commands/cluster.rb in cloudstack-cli-1.0.0.rc1

- old
+ new

@@ -1,21 +1,24 @@ class Cluster < CloudstackCli::Base desc 'list', 'list clusters' + option :zone, desc: "lists clusters by zone" def list + resolve_zone if options[:zone] clusters = client.list_clusters(options) if clusters.size < 1 say "No clusters found." else - table = [%w(Name Pod_Name Type Zone)] + table = [%w(Name Pod_Name Type Zone State)] clusters.each do |cluster| table << [ cluster['name'], cluster['podname'], - cluster['hypervisortype'], cluster['zonename'] + cluster['hypervisortype'], cluster['zonename'], + cluster['managedstate'] ] end print_table table say "Total number of clusters: #{clusters.size}" end end -end \ No newline at end of file +end