Class: Chef::Util::DSC::LocalConfigurationManager
- Inherits:
-
Object
- Object
- Chef::Util::DSC::LocalConfigurationManager
- Includes:
- Mixin::PowershellExec
- 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) ⇒ Object
- #test_configuration(configuration_document) ⇒ Object
Constructor Details
#initialize(node, configuration_path) ⇒ LocalConfigurationManager
Returns a new instance of LocalConfigurationManager.
26 27 28 29 30 |
# File 'lib/chef/util/dsc/local_configuration_manager.rb', line 26 def initialize(node, configuration_path) @node = node @configuration_path = configuration_path clear_execution_time end |
Instance Method Details
#last_operation_execution_time_seconds ⇒ Object
42 43 44 45 46 |
# File 'lib/chef/util/dsc/local_configuration_manager.rb', line 42 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) ⇒ Object
38 39 40 |
# File 'lib/chef/util/dsc/local_configuration_manager.rb', line 38 def set_configuration(configuration_document) run_configuration_cmdlet(configuration_document, true) end |
#test_configuration(configuration_document) ⇒ Object
32 33 34 35 36 |
# File 'lib/chef/util/dsc/local_configuration_manager.rb', line 32 def test_configuration(configuration_document) status = run_configuration_cmdlet(configuration_document, false) log_dsc_exception(status.errors.join("\n")) if status.error? configuration_update_required?(status.result) end |