Sha256: 52c7ef7cec8d8c0c1f4bcb19402ca9e9b593ddd52a85370552cadd3f3af7a232
Contents?: true
Size: 877 Bytes
Versions: 6
Compression:
Stored size: 877 Bytes
Contents
#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), "..", "lib")) require "poolparty" 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 |cld| puts header("Listing cloud #{cld.name}") puts subheader("Active instances") puts cld.list_of_running_instances.map{|a| a.to_s}.join("\n") if cld.list_of_pending_instances.size > 0 puts subheader("Pending instances") puts cld.list_of_pending_instances.map{|a| a.to_s}.join("\n") end end
Version data entries
6 entries across 6 versions & 2 rubygems