class Puppet::Pops::Lookup::V3DataHashFunctionProvider
@api private
Constants
- TAG
Public Class Methods
new(name, parent_data_provider, function_name, options, locations)
click to toggle source
Calls superclass method
# File lib/puppet/pops/lookup/data_hash_function_provider.rb 85 def initialize(name, parent_data_provider, function_name, options, locations) 86 @datadir = options.delete(HieraConfig::KEY_DATADIR) 87 super 88 end
Public Instance Methods
unchecked_key_lookup(key, lookup_invocation, merge)
click to toggle source
Calls superclass method
Puppet::Pops::Lookup::DataHashFunctionProvider#unchecked_key_lookup
# File lib/puppet/pops/lookup/data_hash_function_provider.rb 90 def unchecked_key_lookup(key, lookup_invocation, merge) 91 extra_paths = lookup_invocation.hiera_v3_location_overrides 92 if extra_paths.nil? || extra_paths.empty? 93 super 94 else 95 # Extra paths provided. Must be resolved and placed in front of known paths 96 paths = parent_data_provider.config(lookup_invocation).resolve_paths(@datadir, extra_paths, lookup_invocation, false, ".#{@name}") 97 all_locations = paths + locations 98 root_key = key.root_key 99 lookup_invocation.with(:data_provider, self) do 100 MergeStrategy.strategy(merge).lookup(all_locations, lookup_invocation) do |location| 101 invoke_with_location(lookup_invocation, location, root_key) 102 end 103 end 104 end 105 end