Sha256: 55dfc07a9673c9bb51870a0610bab320d0aad4b22f05f9e7103eb4ec9dd4993d

Contents?: true

Size: 734 Bytes

Versions: 6

Compression:

Stored size: 734 Bytes

Contents

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

o = PoolParty::Optioner.new(ARGV) do |opts, optioner|
  optioner.options( :num => 0 )
  opts.on('-n name', '--name name', 'Listing for cloud name')    { |c| optioner.cloudname c }
  opts.on('-i num', '--id num', 'Instance num to ssh (default: 0)')    { |i| optioner.inst_num i.to_i }
end
load_pool(o.spec? ? o.spec : Binary.get_existing_spec_location)

@cloud = o.loaded_clouds.first
nodes = @cloud.list_of_running_instances

puts nodes.map {|a| a.to_s}.join("\n")

if !nodes.empty?
  n = o.inst_num? ? o.inst_num : 0
  @cloud.ssh_into( nodes[n].ip ) if @cloud
else
  puts "No running instances can be found"
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
auser-poolparty-1.1.1 bin/cloud-ssh
auser-poolparty-1.1.3 bin/cloud-ssh
auser-poolparty-1.1.4 bin/cloud-ssh
auser-poolparty-1.1.5 bin/cloud-ssh
fairchild-poolparty-1.1.3 bin/cloud-ssh
fairchild-poolparty-1.1.4 bin/cloud-ssh