Sha256: 6e63d1e3818f9258c78b1f279e85472697ce9b8bfed00e8050b8215a7b0bf652

Contents?: true

Size: 739 Bytes

Versions: 38

Compression:

Stored size: 739 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}

  ssh into an instance of the cloud
EOS

  short_desc "ssh into an instance of the cloud"
  
  opt :instance_number, "Ssh into the instance number", :type => :integer, :default => 0
  
  run do |command|
    cloud = @loaded_clouds.first
    
    if !cloud.nodes.empty?
      inst = cloud.nodes[command[:instance_number]]
      inst ? inst.ssh : puts("Error: The instance number (#{command[:instance_number]}) is too high for the current number of instances")
    else
      puts "No running instances can be found"
    end
    
  end
end

Version data entries

38 entries across 38 versions & 3 rubygems

Version Path
poolparty-1.6.1 bin/cloud-ssh
poolparty-1.6.0 bin/cloud-ssh
poolparty-1.5.0 bin/cloud-ssh
poolparty-1.4.8 bin/cloud-ssh
poolparty-1.4.7 bin/cloud-ssh
poolparty-1.4.6 bin/cloud-ssh
poolparty-1.4.5 bin/cloud-ssh
poolparty-1.4.4 bin/cloud-ssh
poolparty-1.4.3 bin/cloud-ssh
poolparty-1.4.2 bin/cloud-ssh
poolparty-1.4.1 bin/cloud-ssh
poolparty-1.4.0 bin/cloud-ssh
poolparty-1.3.15 bin/cloud-ssh
poolparty-1.3.14 bin/cloud-ssh
poolparty-1.3.13 bin/cloud-ssh
poolparty-1.3.8 bin/cloud-ssh
poolparty-1.3.7 bin/cloud-ssh
poolparty-1.3.6 bin/cloud-ssh