Sha256: ba01069dd5700dd625c221763393ef618dbc4829c13d521e39bc04f24bde6519

Contents?: true

Size: 880 Bytes

Versions: 16

Compression:

Stored size: 880 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 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}")
      out = location == "remote" ? cloud.list_from_remote({:cache => true}).map{|a| a.to_s} : cloud.list_from_local.map{|a| a.to_s}
      puts out
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

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