Permalink
Browse files

Add 'Hypervisor' to server list output

Add an additional column to display which hypervisor an instance is
running on.
  • Loading branch information...
1 parent 586fa55 commit ae28ab806c84e5ff4b25e1ee97700c6f3f7a92cb Benjamin Krein committed Jul 26, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/chef/knife/cs_server_list.rb
@@ -60,7 +60,8 @@ def run
ui.color('Public IP', :bold),
ui.color('Service', :bold),
ui.color('Template', :bold),
- ui.color('State', :bold)
+ ui.color('State', :bold),
+ ui.color('Hypervisor', :bold)
]
servers = connection.list_servers
@@ -78,8 +79,9 @@ def run
server_list << server['serviceofferingname']
server_list << server['templatename']
server_list << server['state']
+ server_list << (server['hostname'] || 'N/A')
end
- puts ui.list(server_list, :columns_across, 5)
+ puts ui.list(server_list, :columns_across, 6)
end

0 comments on commit ae28ab8

Please sign in to comment.