Class: Chef::Knife::SoftlayerImageList

Inherits:
Chef::Knife show all
Includes:
SoftlayerBase
Defined in:
lib/chef/knife/softlayer_image_list.rb

Constant Summary

Constants included from SoftlayerBase

Chef::Knife::SoftlayerBase::USER_AGENT

Instance Method Summary collapse

Methods included from SoftlayerBase

#compute, #connection, included, #locate_config_value, #msg_pair, #network

Instance Method Details

#runObject



18
19
20
21
22
# File 'lib/chef/knife/softlayer_image_list.rb', line 18

def run
  $stdout.sync = true
  table_data = connection(:compute).images.map { |i| {:id => i.id, :name => i.name, :access => i.public? ? 'PUBLIC' : 'PRIVATE', :account => i. } }
  puts Formatador.display_table(table_data, [:id, :access, :name, :account])
end