Class: Chef::Knife::BmcsVcnList
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- Chef::Knife::BmcsVcnList
- Includes:
- BmcsCommonOptions, BmcsHelper
- Defined in:
- lib/chef/knife/bmcs_vcn_list.rb
Overview
List BMCS VCNs. Note that this lists all VCNs in a compartment, not just those that are set up as Chef nodes.
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
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/chef/knife/bmcs_vcn_list.rb', line 24 def run = {} [:limit] = config[:limit] if config[:limit] response = network_client.list_vcns(compartment_id, ) display_list(response, ['Display Name', 'ID', 'CIDR Block', 'State']) do |item| [item.display_name, item.id, item.cidr_block, item.lifecycle_state] end end |