Method: Puppet::Configurer#convert_catalog
- Defined in:
- lib/puppet/configurer.rb
#convert_catalog(result, duration, facts, options = {}) ⇒ Object
Convert a plain resource catalog into our full host catalog.
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/puppet/configurer.rb', line 111 def convert_catalog(result, duration, facts, = {}) catalog = nil catalog_conversion_time = thinmark do # Will mutate the result and replace all Deferred values with resolved values if facts Puppet::Pops::Evaluator::DeferredResolver.resolve_and_replace(facts, result, Puppet.lookup(:current_environment), Puppet[:preprocess_deferred]) end catalog = result.to_ral catalog.finalize catalog.retrieval_duration = duration if Puppet[:write_catalog_summary] catalog.write_class_file catalog.write_resource_file end end [:report].add_times(:convert_catalog, catalog_conversion_time) if [:report] catalog end |