bin/cloud-show in fairchild-poolparty-1.2.12 vs bin/cloud-show in fairchild-poolparty-1.3.5

- old
+ new

@@ -1,9 +1,9 @@ #!/usr/bin/env ruby $:.unshift(File.dirname(__FILE__) + "/../lib") require "poolparty" -# require "poolpartycl" + require 'git-style-binary/command' GitStyleBinary.command do @theme = :short @@ -19,28 +19,19 @@ run do |command| @loaded_clouds.each do |cld| - dputs "Showing #{cld.name}" - puts "\nFrom #{$pool_specfile}\n" - print_with_nice_printer "Cloud: #{cld.name}", [ - "instances #{cld.minimum_instances}..#{cld.maximum_instances}", - "keypair #{cld.keypair}", - "using #{cld.remote_base.class.to_s.top_level_class}" - ] do |printer| - if cld.nodes(:status => "running").size > 0 - printer.empty - printer.center("Active instances") - printer << cld.nodes(:status => "running").map{|a| a.ip.strip rescue nil }.compact.join("\n") - end - if cld.nodes(:status => "pending").size > 0 - printer.empty - printer.center "Pending instances" - printer << cld.nodes(:status => "pending").map{|a| a.ip.strip rescue nil }.join("\n") - end - printer.empty - end + msg = [ + "Cloud: #{cld.name}", + "----------------------------", + "Instances: #{cld.nodes(:status => "running").size}", + "Minimum instances: #{cld.minimum_instances}", + "Maximum instances: #{cld.maximum_instances}", + "Running on: #{cld.cloud_provider_name}" + ] + + print_msg(msg) end end end \ No newline at end of file