Class: Puppet::Pops::Lookup::V3DataHashFunctionProvider Private
- Inherits:
-
DataHashFunctionProvider
- Object
- FunctionProvider
- DataHashFunctionProvider
- Puppet::Pops::Lookup::V3DataHashFunctionProvider
- Defined in:
- lib/puppet/pops/lookup/data_hash_function_provider.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- TAG =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'v3_data_hash'.freeze
Constants included from SubLookup
Instance Attribute Summary
Attributes inherited from FunctionProvider
#function_name, #locations, #parent_data_provider
Instance Method Summary collapse
-
#initialize(name, parent_data_provider, function_name, options, locations) ⇒ V3DataHashFunctionProvider
constructor
private
A new instance of V3DataHashFunctionProvider.
- #unchecked_key_lookup(key, lookup_invocation, merge) ⇒ Object private
Methods included from Interpolation
Methods included from SubLookup
Methods inherited from FunctionProvider
#create_function_context, #function_context, #module_name, #name, #options, #to_s
Methods included from DataProvider
ensure_types_initialized, #key_lookup, key_type, #lookup, #module_name, #name, #validate_data_hash, #validate_data_value, value_type
Constructor Details
#initialize(name, parent_data_provider, function_name, options, locations) ⇒ V3DataHashFunctionProvider
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of V3DataHashFunctionProvider.
74 75 76 77 |
# File 'lib/puppet/pops/lookup/data_hash_function_provider.rb', line 74 def initialize(name, parent_data_provider, function_name, , locations) @datadir = .delete(HieraConfig::KEY_DATADIR) super end |
Instance Method Details
#unchecked_key_lookup(key, lookup_invocation, merge) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/puppet/pops/lookup/data_hash_function_provider.rb', line 79 def unchecked_key_lookup(key, lookup_invocation, merge) extra_paths = lookup_invocation.hiera_v3_location_overrides if extra_paths.nil? || extra_paths.empty? super else # Extra paths provided. Must be resolved and placed in front of known paths paths = parent_data_provider.config(lookup_invocation).resolve_paths(@datadir, extra_paths, lookup_invocation, false, ".#{@name}") all_locations = paths + locations root_key = key.root_key lookup_invocation.with(:data_provider, self) do MergeStrategy.strategy(merge).lookup(all_locations, lookup_invocation) do |location| invoke_with_location(lookup_invocation, location, root_key) end end end end |