Sha256: d3f7bbf11bca3c21f7e80002c94270e4164e6ba12006e7dc213aaa9baa8804d6
Contents?: true
Size: 859 Bytes
Versions: 6
Compression:
Stored size: 859 Bytes
Contents
#!/usr/bin/env ruby $:.unshift(File.dirname(__FILE__) + "/../lib") require "poolparty" require 'git-style-binary/command' GitStyleBinary.command do banner <<-EOS Usage: #{$0} #{all_options_string} contracts the cloud by a single instance EOS short_desc "contracts the cloud by a single instance" run do |command| @loaded_clouds.each do |cld| node_to_terminate = cld.nodes.last # node_to_terminate.cloud = cld msg = [ "Contracting cloud #{cld.name} (#{cld.keypair}) by 1", "#{cld.nodes.size} running instances (#{cld.minimum_instances} - #{cld.maximum_instances})", " node: #{node_to_terminate.public_ip}" ] puts msg.join("\n") node_to_terminate.terminate! puts "#{node_to_terminate.public_ip} has been terminated" end end end
Version data entries
6 entries across 6 versions & 1 rubygems