Module: Chef::Knife::BmcsCommonOptions
- Included in:
- BmcsAdList, BmcsCompartmentList, BmcsImageList, BmcsServerCreate, BmcsServerDelete, BmcsServerList, BmcsServerShow, BmcsShapeList, BmcsSubnetList, BmcsVcnList
- Defined in:
- lib/chef/knife/bmcs_common_options.rb
Overview
Options that should be included in all BMCS 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/bmcs_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 :bmcs_config_file, long: '--bmcs-config-file FILE', description: 'The path to the Oracle BMCS config file. Default: ~/.oraclebmc/config' option :bmcs_profile, long: '--bmcs-profile PROFILE', description: 'The profile to load from the Oracle BMCS config file. Default: DEFAULT' end # all commands except compartment list get a compartment-id option return if includer.to_s == 'Chef::Knife::BmcsCompartmentList' includer.class_eval do option :compartment_id, long: '--compartment-id COMPARTMENT', description: 'The OCID of the compartment.' end end |