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