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