Sha256: d04e4e6258b753a7c784e9695a2d3723bf892208a43600ab23592ca7e03aef27

Contents?: true

Size: 514 Bytes

Versions: 2

Compression:

Stored size: 514 Bytes

Contents

class Cluster < CloudstackCli::Base

  desc 'list', 'list clusters'
  def list
    clusters = client.list_clusters(options)
    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
      say "Total number of clusters: #{clusters.size}"
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cloudstack-cli-0.6.1 lib/cloudstack-cli/commands/cluster.rb
cloudstack-cli-0.6.0 lib/cloudstack-cli/commands/cluster.rb