Class: Chef::Util::DSC::LocalConfigurationManager
- Inherits:
-
Object
- Object
- Chef::Util::DSC::LocalConfigurationManager
- Defined in:
- lib/chef/util/dsc/lcm_output_parser.rb,
lib/chef/util/dsc/local_configuration_manager.rb
Defined Under Namespace
Modules: Parser
Instance Method Summary collapse
-
#initialize(node, configuration_path) ⇒ LocalConfigurationManager
constructor
A new instance of LocalConfigurationManager.
- #last_operation_execution_time_seconds ⇒ Object
- #set_configuration(configuration_document, shellout_flags) ⇒ Object
- #test_configuration(configuration_document, shellout_flags) ⇒ Object
Constructor Details
#initialize(node, configuration_path) ⇒ LocalConfigurationManager
Returns a new instance of LocalConfigurationManager.
24 25 26 27 28 |
# File 'lib/chef/util/dsc/local_configuration_manager.rb', line 24 def initialize(node, configuration_path) @node = node @configuration_path = configuration_path clear_execution_time end |
Instance Method Details
#last_operation_execution_time_seconds ⇒ Object
40 41 42 43 44 |
# File 'lib/chef/util/dsc/local_configuration_manager.rb', line 40 def last_operation_execution_time_seconds if @operation_start_time && @operation_end_time @operation_end_time - @operation_start_time end end |
#set_configuration(configuration_document, shellout_flags) ⇒ Object
36 37 38 |
# File 'lib/chef/util/dsc/local_configuration_manager.rb', line 36 def set_configuration(configuration_document, shellout_flags) run_configuration_cmdlet(configuration_document, true, shellout_flags) end |
#test_configuration(configuration_document, shellout_flags) ⇒ Object
30 31 32 33 34 |
# File 'lib/chef/util/dsc/local_configuration_manager.rb', line 30 def test_configuration(configuration_document, shellout_flags) status = run_configuration_cmdlet(configuration_document, false, shellout_flags) log_dsc_exception(status.stderr) unless status.succeeded? configuration_update_required?(status.return_value) end |