Sha256: 5c6918eaa9815ca1b8ea0ca64740ac2231db5449ebbab998b82f7c0432b0149a

Contents?: true

Size: 1.1 KB

Versions: 34

Compression:

Stored size: 1.1 KB

Contents

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

o = PoolParty::Optioner.new(ARGV) do |opts, optioner|
  opts.on('-f [remote|local]', '--from [remote|local]', 'Remote or local (default: local)')    { |o| optioner.location o }
  opts.on('-r', '--remote', 'Remote listing')    { optioner.location "remote" }
  opts.on('-l', '--local', 'Local listing')    { optioner.location "local" }
  opts.on('-n name', '--name name', 'Listing for pool name')    { |p| optioner.poolname p }
end

o.loaded_pools.each do |pool|
  with_pool(pool) do
    puts header("Listing pool #{name}")
    clouds.each do |name, cloud|
      puts subheader("Cloud: #{name} (#{cloud.keypair})")
      with_cloud(cloud) do
        puts header("Listing cloud #{name}")
        puts subheader("Active instances")
        puts list_of_running_instances.map{|a| a.to_s}.join("\n")
        puts ""
        if list_of_pending_instances.size > 0
          puts subheader("Pending instances")
          puts list_of_pending_instances.map{|a| a.to_s}.join("\n")
        end
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 3 rubygems

Version Path
auser-poolparty-0.2.64 bin/pool-list
auser-poolparty-0.2.65 bin/pool-list
auser-poolparty-0.2.66 bin/pool-list
auser-poolparty-0.2.67 bin/pool-list
auser-poolparty-0.2.68 bin/pool-list
auser-poolparty-0.2.69 bin/pool-list
auser-poolparty-0.2.70 bin/pool-list
auser-poolparty-0.2.71 bin/pool-list
auser-poolparty-0.2.72 bin/pool-list
auser-poolparty-0.2.74 bin/pool-list
auser-poolparty-0.2.76 bin/pool-list
auser-poolparty-0.2.77 bin/pool-list
auser-poolparty-0.2.78 bin/pool-list
auser-poolparty-0.2.79 bin/pool-list
auser-poolparty-0.2.80 bin/pool-list
auser-poolparty-0.2.81 bin/pool-list
auser-poolparty-0.2.84 bin/pool-list
auser-poolparty-0.2.85 bin/pool-list
auser-poolparty-0.2.88 bin/pool-list
auser-poolparty-0.2.89 bin/pool-list