class Chef::Knife::SoftlayerServerList
Public Instance Methods
run()
click to toggle source
Run the procedure to list all of the Softlayer VM's @return [nil]
# File lib/chef/knife/softlayer_server_list.rb, line 16 def run $stdout.sync = true fmt = "%-20s %-8s %-15s %-15s %-10s" puts ui.color(sprintf(fmt, "Name", "Location", "Public IP", "Private IP", "Status"), :green) connection.servers.each do |server| puts sprintf fmt, server.name, server.datacenter, server.public_ip_address, server.private_ip_address, server.created_at ? 'Running' : 'Starting' end end