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
auser-poolparty-1.3.10 bin/cloud-ssh
auser-poolparty-1.3.11 bin/cloud-ssh
auser-poolparty-1.3.12 bin/cloud-ssh
auser-poolparty-1.3.13 bin/cloud-ssh
auser-poolparty-1.3.14 bin/cloud-ssh
auser-poolparty-1.3.15 bin/cloud-ssh
auser-poolparty-1.3.16 bin/cloud-ssh
auser-poolparty-1.3.17 bin/cloud-ssh
auser-poolparty-1.3.6 bin/cloud-ssh
auser-poolparty-1.3.7 bin/cloud-ssh
auser-poolparty-1.3.8 bin/cloud-ssh
fairchild-poolparty-1.3.17 bin/cloud-ssh
poolparty-1.6.9 bin/cloud-ssh
poolparty-1.6.8 bin/cloud-ssh
poolparty-1.6.7 bin/cloud-ssh
poolparty-1.6.6 bin/cloud-ssh
poolparty-1.6.5 bin/cloud-ssh
poolparty-1.6.4 bin/cloud-ssh
poolparty-1.6.3 bin/cloud-ssh
poolparty-1.6.2 bin/cloud-ssh