Class: Chef::Knife::Cloud::BootstrapCommand
- Inherits:
-
Bootstrap
- Object
- Bootstrap
- Chef::Knife::Cloud::BootstrapCommand
- Includes:
- Helpers
- Defined in:
- lib/chef/knife/cloud/command_bootstrap.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#custom_arguments ⇒ Object
Returns the value of attribute custom_arguments.
-
#service ⇒ Object
Returns the value of attribute service.
Instance Method Summary collapse
Methods included from Helpers
#after_exec_command, #before_exec_command, #create_service_instance, #execute_command, #locate_config_value, #msg_pair, #pretty_key, #set_default_config, #validate!, #validate_params!
Instance Attribute Details
#custom_arguments ⇒ Object
Returns the value of attribute custom_arguments.
29 30 31 |
# File 'lib/chef/knife/cloud/command_bootstrap.rb', line 29 def custom_arguments @custom_arguments end |
#service ⇒ Object
Returns the value of attribute service.
29 30 31 |
# File 'lib/chef/knife/cloud/command_bootstrap.rb', line 29 def service @service end |
Instance Method Details
#run ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/chef/knife/cloud/command_bootstrap.rb', line 31 def run # Set dafult config set_default_config # validate compulsory params validate! # validate command pre-requisites (cli options) validate_params! # setup the service @service = create_service_instance service.ui = ui # for interactive user prompts/messages # Perform any steps before handling the command before_exec_command # exec the actual cmd execute_command # Perform any steps after handling the command after_exec_command rescue CloudExceptions::KnifeCloudError => e Chef::Log.debug(e.) exit 1 end |