Permalink
Browse files

Merge pull request #25 from CloudStack/hypervisor-in-server-list

Add 'Hypervisor' to server list output
  • Loading branch information...
2 parents 586fa55 + ae28ab8 commit 802494827dec91b7f41c7c63eb73ca49885bd0f2 @michaeljsmalley michaeljsmalley committed Aug 8, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/chef/knife/cs_server_list.rb
View
6 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 8024948

Please sign in to comment.