summaryrefslogtreecommitdiffstats
path: root/lib/gce_command.rb
diff options
context:
space:
mode:
authorThomas Wiest <twiest@redhat.com>2014-10-22 11:12:46 -0400
committerThomas Wiest <twiest@redhat.com>2014-10-23 12:51:52 -0400
commit5f9c7eb2d2ad44776d33197857dcd0afe693b5f5 (patch)
tree22a39c5589aa3f6a2a01f185041258e4fd69dea6 /lib/gce_command.rb
parent1057c69acdaf47e2bcd4b395069e3bc1bd9eec88 (diff)
downloadopenshift-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.rb12
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'