53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# File 'lib/chef/knife/terremark_server_list.rb', line 53
def run
server_name = @name_args[0]
= Fog::Terremark.new(
:terremark_username => Chef::Config[:knife][:terremark_username],
:terremark_password => Chef::Config[:knife][:terremark_password],
:terremark_service => Chef::Config[:knife][:terremark_service] || :vcloud
)
$stdout.sync = true
server_list = [ h.color('ID', :bold), h.color('Name', :bold) ]
.servers.all.each do |server|
server_list << server.id.to_s
server_list << server.name
end
puts h.list(server_list, :columns_across, 2)
end
|