Sha256: 98cf5a694e606cde1207e547c6c7ff64ab3873de6d69a65143e0509454b89cc2

Contents?: true

Size: 505 Bytes

Versions: 27

Compression:

Stored size: 505 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 = [%w(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

27 entries across 27 versions & 1 rubygems

Version Path
cloudstack-cli-0.15.1 lib/cloudstack-cli/commands/cluster.rb
cloudstack-cli-0.15.0 lib/cloudstack-cli/commands/cluster.rb
cloudstack-cli-0.14.1 lib/cloudstack-cli/commands/cluster.rb
cloudstack-cli-0.14.0 lib/cloudstack-cli/commands/cluster.rb
cloudstack-cli-0.13.1 lib/cloudstack-cli/commands/cluster.rb
cloudstack-cli-0.13.0 lib/cloudstack-cli/commands/cluster.rb
cloudstack-cli-0.12.3 lib/cloudstack-cli/commands/cluster.rb
cloudstack-cli-0.12.2 lib/cloudstack-cli/commands/cluster.rb
cloudstack-cli-0.12.1 lib/cloudstack-cli/commands/cluster.rb
cloudstack-cli-0.12.0 lib/cloudstack-cli/commands/cluster.rb
cloudstack-cli-0.11.2 lib/cloudstack-cli/commands/cluster.rb
cloudstack-cli-0.11.1 lib/cloudstack-cli/commands/cluster.rb
cloudstack-cli-0.11.0 lib/cloudstack-cli/commands/cluster.rb
cloudstack-cli-0.10.2 lib/cloudstack-cli/commands/cluster.rb
cloudstack-cli-0.10.1 lib/cloudstack-cli/commands/cluster.rb
cloudstack-cli-0.10.0 lib/cloudstack-cli/commands/cluster.rb
cloudstack-cli-0.9.1 lib/cloudstack-cli/commands/cluster.rb
cloudstack-cli-0.9.0 lib/cloudstack-cli/commands/cluster.rb
cloudstack-cli-0.8.3 lib/cloudstack-cli/commands/cluster.rb
cloudstack-cli-0.8.2 lib/cloudstack-cli/commands/cluster.rb