Sha256: 013770f15c724ff0911240719fbfcb3ee2f5f32d9205514140c38ec004b30f02
Contents?: true
Size: 824 Bytes
Versions: 18
Compression:
Stored size: 824 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 load_pool(o.spec || Binary.get_existing_spec_location) @testing = o.testing include Remote begin @cloud = cloud(o.cloudname.downcase.to_sym) rescue puts "Cloud name required. Please specify it with -n name" exit(0) end with_cloud(@cloud, {:testing => @testing}) do puts header("Contracting cloud #{name}") puts "#{list_of_running_instances.size} running instances (#{minimum_instances} minimum instances)" puts testing ? "Not contracting (test mode)" : "Contracting the cloud if possible" contract_cloud_if_necessary( !testing ) end
Version data entries
18 entries across 18 versions & 2 rubygems