Sha256: 87ecfc55b927746cf52748e361924db4f319dfaf6062b2764ee80e4541a8d84c

Contents?: true

Size: 937 Bytes

Versions: 47

Compression:

Stored size: 937 Bytes

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 cloud name')    { |c| optioner.cloudname c }
end

o.loaded_clouds.each do |cloud|
  
  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

Version data entries

47 entries across 47 versions & 2 rubygems

Version Path
auser-poolparty-0.2.45 bin/cloud-list
auser-poolparty-0.2.46 bin/cloud-list
auser-poolparty-0.2.47 bin/cloud-list
auser-poolparty-0.2.48 bin/cloud-list
auser-poolparty-0.2.49 bin/cloud-list
auser-poolparty-0.2.50 bin/cloud-list
auser-poolparty-0.2.51 bin/cloud-list
auser-poolparty-0.2.52 bin/cloud-list
auser-poolparty-0.2.53 bin/cloud-list
auser-poolparty-0.2.54 bin/cloud-list
auser-poolparty-0.2.55 bin/cloud-list
auser-poolparty-0.2.56 bin/cloud-list
auser-poolparty-0.2.57 bin/cloud-list
auser-poolparty-0.2.58 bin/cloud-list
auser-poolparty-0.2.59 bin/cloud-list
auser-poolparty-0.2.60 bin/cloud-list
auser-poolparty-0.2.61 bin/cloud-list
auser-poolparty-0.2.62 bin/cloud-list
auser-poolparty-0.2.63 bin/cloud-list
auser-poolparty-0.2.64 bin/cloud-list