Sha256: ee2038473b65b57b8dfd7fa276c57394536608700603f18b0d38dbac0a7410a3

Contents?: true

Size: 962 Bytes

Versions: 7

Compression:

Stored size: 962 Bytes

Contents

#!/usr/bin/env ruby
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
require "poolparty"

o = PoolParty::Optioner.new(ARGV) do |opts, optioner|
  opts.on('-n name', '--name name', 'Listing for cloud name')    { |c| optioner.cloudname c }
end

o.loaded_clouds.each do |cld|
  puts "\nFrom #{$pool_specfile}\n"
  print_with_nice_printer "Cloud: #{cld.name}", [
    "instances #{cld.minimum_instances}..#{cld.maximum_instances}",
    "keypair #{cld.keypair}",
    "remoter #{cld.remote_base.class.to_s.top_level_class}"
  ] do |printer|
    if cld.nodes(:status => "running").size > 0
      printer.empty
      printer.center("Active instances")
      printer << cld.nodes(:status => "running").map{|a| a.ip.strip }.join("\n")
    end
    if cld.nodes(:status => "pending").size > 0
      printer.empty
      printer.center "Pending instances"
      printer << cld.nodes(:status => "pending").map{|a| a.to_s}.join("\n")
    end
    printer.empty
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
auser-poolparty-1.1.6 bin/cloud-describe
auser-poolparty-1.1.7 bin/cloud-describe
auser-poolparty-1.2.0 bin/cloud-describe
auser-poolparty-1.2.1 bin/cloud-describe
auser-poolparty-1.2.2 bin/cloud-describe
fairchild-poolparty-1.1.5 bin/cloud-describe
poolparty-1.2.2 bin/cloud-describe