Sha256: 94ab785760c023a8c2bd0ab7367cf9a15757710fedb820a75bb8235ce1a73b9f

Contents?: true

Size: 1.49 KB

Versions: 10

Compression:

Stored size: 1.49 KB

Contents

#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + "/../lib")
require "poolparty"

require 'git-style-binary/command'

GitStyleBinary.command do
  @theme = :short
  
  version "PoolParty #{$0} command"  
  banner <<-EOS
Usage: #{$0} #{all_options_string}

shows output about the clouds.rb

EOS

  short_desc "shows output about the clouds.rb"

  run do |command|

    @loaded_clouds.each do |cld|
        
      msg = [
        "Cloud: #{cld.name}",
        "----------------------------",
        "Running Instances:   #{cld.nodes.size}",
        "Minimum instances:   #{cld.minimum_instances}",
        "Maximum instances:   #{cld.maximum_instances}",
        "Running on:          #{cld.cloud_provider.name}",
        "Keypair:             #{cld.keypair.basename}",
        "Security group:      #{cld.cloud_provider.security_group_names}",
        "Availability zones:  #{cld.cloud_provider.availability_zones}",
        "User:  #{cld.user}"
      ]
      
      if cld.load_balancers.size > 0
        load_balancers = cld.cloud_provider.load_balancers.first.running_load_balancers.map {|a| a[:dns_name]}
        msg << "Load balancers:      #{load_balancers.join("\n\t\t\t")}"
      end

      if cld.rds_instances.size > 0
        available = cld.cloud_provider.available_rds_instances.map{|r| "#{r.instance_id}\t#{r.current_status.Endpoint.Address}" }
        available.unshift 'RDS Instances:'

        msg << available.join("\n\t\t\t")
      end
            
      puts msg.flatten
      
    end
    
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
poolparty-1.6.8 bin/cloud-show
poolparty-1.6.7 bin/cloud-show
poolparty-1.6.6 bin/cloud-show
poolparty-1.6.5 bin/cloud-show
poolparty-1.6.4 bin/cloud-show
poolparty-1.6.3 bin/cloud-show
poolparty-1.6.2 bin/cloud-show
poolparty-1.6.1 bin/cloud-show
poolparty-1.6.0 bin/cloud-show
poolparty-1.5.0 bin/cloud-show