bin/cloud-start in auser-poolparty-0.2.44 vs bin/cloud-start in auser-poolparty-0.2.45

- old
+ new

@@ -1,24 +1,18 @@ #!/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('-c cloudname', '--cloud name', 'Start cloud by this name') { |c| optioner.cloudname c } + opts.on('-n cloudname', '--name name', 'Start cloud by this name') { |c| optioner.cloudname c } end -load_pool(o.spec || Binary.get_existing_spec_location) - -@testing = o.testing - -@clouds = o.cloudname ? {:cloud => cloud(o.cloudname.downcase.to_sym)} : clouds - -@clouds.each do |name, cloud| - - with_cloud(cloud, {:testing => @testing, :verbose => (o.verbose || false)}) do - puts header("Starting cloud") - puts "#{list_of_running_instances.size} running instances (#{minimum_instances} - #{maximum_instances})" +o.loaded_clouds.each do |cloud| + with_cloud(cloud) do + vputs header("Starting cloud") + vputs "#{list_of_running_instances.size} running instances (#{minimum_instances} - #{maximum_instances})" if list_of_running_instances.size <= 1 puts "Starting the master instance" if testing puts("\tNot launching while in testing mode") else @@ -26,10 +20,10 @@ vputs "Launching and configuring the master" launch_and_configure_master! provisioning_complete end end - puts open(::File.join(File.dirname(__FILE__), "..", "lib", "poolparty", "config", "postlaunchmessage.txt")).read ^ {:master_ip => master.ip.chomp} + vputs open(::File.join(File.dirname(__FILE__), "..", "lib", "poolparty", "config", "postlaunchmessage.txt")).read ^ {:master_ip => master.ip.chomp} clear_base_directory unless testing end end \ No newline at end of file