Class: Chef::Knife::ProfitbricksLocationList
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- Chef::Knife::ProfitbricksLocationList
- Includes:
- ProfitbricksBase
- Defined in:
- lib/chef/knife/profitbricks_location_list.rb
Instance Method Summary collapse
Methods included from ProfitbricksBase
#connection, #error_and_exit, #get_image, included, #msg_pair, #validate_required_params
Instance Method Details
#run ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/chef/knife/profitbricks_location_list.rb', line 10 def run $stdout.sync = true location_list = [ ui.color('ID', :bold), ui.color('Name', :bold) ] connection ProfitBricks::Location.list.each do |location| location_list << location.id location_list << location.properties['name'] end puts ui.list(location_list, :uneven_columns_across, 2) end |