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