From 1cfe1b71317b32fa85a5dcdbdf8c48a6a50557e3 Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Fri, 16 Oct 2015 15:35:40 -0700 Subject: [PATCH] Properly store and show domain key for get requests --- lib/vmfloaty/format.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/vmfloaty/format.rb b/lib/vmfloaty/format.rb index 42ec5c2..fb263a4 100644 --- a/lib/vmfloaty/format.rb +++ b/lib/vmfloaty/format.rb @@ -7,7 +7,11 @@ class Format hostname_hash.delete("ok") hostname_hash.each do |type, hosts| - host_hash[type] = hosts["hostname"] + if type == "domain" + host_hash[type] = hosts + else + host_hash[type] = hosts["hostname"] + end end puts host_hash.to_json