diff options
author | Thomas Wiest <twiest@redhat.com> | 2014-10-22 11:12:46 -0400 |
---|---|---|
committer | Thomas Wiest <twiest@redhat.com> | 2014-10-23 12:51:52 -0400 |
commit | 5f9c7eb2d2ad44776d33197857dcd0afe693b5f5 (patch) | |
tree | 22a39c5589aa3f6a2a01f185041258e4fd69dea6 /lib/gce_command.rb | |
parent | 1057c69acdaf47e2bcd4b395069e3bc1bd9eec88 (diff) | |
download | openshift-5f9c7eb2d2ad44776d33197857dcd0afe693b5f5.tar.gz openshift-5f9c7eb2d2ad44776d33197857dcd0afe693b5f5.tar.bz2 openshift-5f9c7eb2d2ad44776d33197857dcd0afe693b5f5.tar.xz openshift-5f9c7eb2d2ad44776d33197857dcd0afe693b5f5.zip |
Added atomic aws host to cloud.rb
Diffstat (limited to 'lib/gce_command.rb')
-rw-r--r--[-rwxr-xr-x] | lib/gce_command.rb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/gce_command.rb b/lib/gce_command.rb index 6a6b46228..ce3737a19 100755..100644 --- a/lib/gce_command.rb +++ b/lib/gce_command.rb @@ -125,17 +125,12 @@ module OpenShift desc "list", "Lists instances." def list() - hosts = GceHelper.list_hosts() - - data = {} - hosts.each do |key,value| - value.each { |h| (data[h] ||= []) << key } - end + hosts = GceHelper.get_hosts() puts puts "Instances" puts "---------" - data.keys.sort.each { |k| puts " #{k}" } + hosts.each { |k| puts " #{k.name}" } puts end @@ -177,13 +172,10 @@ module OpenShift desc "ssh", "Ssh to an instance" def ssh(*ssh_ops, host) - puts host if host =~ /^([\w\d_.-]+)@([\w\d-_.]+)/ user = $1 host = $2 end - puts "user=#{user}" - puts "host=#{host}" details = GceHelper.get_host_details(host) abort "\nError: Instance [#{host}] is not RUNNING\n\n" unless details['gce_status'] == 'RUNNING' |