Sha256: dfeed36013b866387cf4f4552e9e9bbba03ec9c6e3356dba92d5c5eaf569b6ba
Contents?: true
Size: 717 Bytes
Versions: 7
Compression:
Stored size: 717 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('-n name', '--name name', 'Listing for cloud name') { |c| optioner.cloudname c } end o.loaded_clouds.each do |cld| puts header("Contracting cloud #{cld.name}") puts "#{cld.nodes(:status => "running").size} running instances (#{cld.minimum_instances} minimum instances)" puts testing ? "Not contracting (test mode)" : "Contracting the cloud if possible" last_instance_id = cld.nodes(:status => "running").last[:instance_id] cld.remote_base.terminate_instance! cld.options.merge(:instance_id => last_instance_id) end
Version data entries
7 entries across 7 versions & 3 rubygems