Class: Chef::Knife::BmcsShapeList
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- Chef::Knife::BmcsShapeList
- Includes:
- BmcsCommonOptions, BmcsHelper
- Defined in:
- lib/chef/knife/bmcs_shape_list.rb
Overview
List available shapes
Instance Method Summary collapse
Methods included from BmcsCommonOptions
Methods included from BmcsHelper
#bmcs_config, #check_can_access_instance, #compartment_id, #compute_client, #confirm, #display_list, #display_server_info, #error_and_exit, #identity_client, #network_client, #show_value, #validate_required_params, #warn_if_page_is_truncated
Instance Method Details
#run ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/chef/knife/bmcs_shape_list.rb', line 32 def run = {} [:availability_domain] = config[:availability_domain] if config[:availability_domain] [:image_id] = config[:image_id] if config[:image_id] [:limit] = config[:limit] if config[:limit] response = compute_client.list_shapes(compartment_id, ) display_list(response, []) do |item, list| [item.shape] unless list.include? item.shape end end |