Module: Chef::Knife::OciCommonOptions
- Included in:
- OciAdList, OciCompartmentList, OciImageList, OciServerCreate, OciServerDelete, OciServerList, OciServerShow, OciShapeList, OciSubnetList, OciVcnList
- Defined in:
- lib/chef/knife/oci_common_options.rb
Overview
Options that should be included in all OCI commands
Class Method Summary collapse
Class Method Details
.included(includer) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/chef/knife/oci_common_options.rb', line 10 def self.included(includer) includer.class_eval do option :region, long: '--region REGION', description: 'The region to make calls against. (e.g., `us-ashburn-1`)' option :oci_config_file, long: '--oci-config-file FILE', description: 'The path to the OCI config file. Default: ~/.oci/config' option :oci_profile, long: '--oci-profile PROFILE', description: 'The profile to load from the OCI config file. Default: DEFAULT' end # all commands except compartment list get a compartment-id option return if includer.to_s == 'Chef::Knife::OciCompartmentList' includer.class_eval do option :compartment_id, long: '--compartment-id COMPARTMENT', description: 'The OCID of the compartment.' end end |