summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wiest <twiest@gmail.com>2014-10-23 16:46:05 -0400
committerThomas Wiest <twiest@gmail.com>2014-10-23 16:46:05 -0400
commite7fc0e8536bc31fc52875274dd62fb2d978aa409 (patch)
tree58fe44bae964a79d0de7a249af1e485f1e783125
parentd8a336f0e86dbe2a933c805c75b8bcc11b67cf8a (diff)
parent1017adbe786f5aa8434ec7e34a0650a1575bf652 (diff)
downloadopenshift-e7fc0e8536bc31fc52875274dd62fb2d978aa409.tar.gz
openshift-e7fc0e8536bc31fc52875274dd62fb2d978aa409.tar.bz2
openshift-e7fc0e8536bc31fc52875274dd62fb2d978aa409.tar.xz
openshift-e7fc0e8536bc31fc52875274dd62fb2d978aa409.zip
Merge pull request #13 from twiest/pull
minor cleanup
-rw-r--r--lib/aws_command.rb4
-rw-r--r--lib/aws_helper.rb3
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/aws_command.rb b/lib/aws_command.rb
index bc353ae64..b8ecb89ac 100644
--- a/lib/aws_command.rb
+++ b/lib/aws_command.rb
@@ -108,8 +108,8 @@ module OpenShift
fmt_str = "%34s %5s %8s %17s %7s"
puts
- puts fmt_str % ['Name','Env', 'State', 'IP', 'Created By']
- puts fmt_str % ['----','---', '-----', '--', '----------']
+ puts fmt_str % ['Name','Env', 'State', 'IP Address', 'Created By']
+ puts fmt_str % ['----','---', '-----', '----------', '----------']
hosts.each { |h| puts fmt_str % [h.name, h.env, h.state, h.public_ip, h.created_by ] }
puts
end
diff --git a/lib/aws_helper.rb b/lib/aws_helper.rb
index 053f5267e..8af39c834 100644
--- a/lib/aws_helper.rb
+++ b/lib/aws_helper.rb
@@ -37,7 +37,8 @@ module OpenShift
hosts = get_list()
dns_names = hosts["tag_Name_#{host}"]
- raise "Error: host not found [#{host}]" if dns_names.nil?
+ raise "Host not found [#{host}]" if dns_names.nil?
+ raise "Multiple entries found for [#{host}]" if dns_names.size > 1
return hosts['_meta']['hostvars'][dns_names.first]
end