class Chef::Knife::OciShapeList
List available shapes
Public Instance Methods
run()
click to toggle source
# File lib/chef/knife/oci_shape_list.rb, line 32 def run options = {} options[:availability_domain] = config[:availability_domain] if config[:availability_domain] options[:image_id] = config[:image_id] if config[:image_id] options[:limit] = config[:limit] if config[:limit] columns = [] list_for_display, last_response = get_display_results(options) do |client_options| response = compute_client.list_shapes(compartment_id, client_options) items = response_to_list(response) do |item| [item.shape] end [response, items] end list_for_display.uniq! display_list_from_array(list_for_display, columns.length) warn_if_page_is_truncated(last_response) end