class Puppet::Pops::Lookup::V3LookupKeyFunctionProvider
@api private
Constants
- TAG
Public Class Methods
new(name, parent_data_provider, function_name, options, locations)
click to toggle source
Calls superclass method
Puppet::Pops::Lookup::FunctionProvider::new
# File lib/puppet/pops/lookup/lookup_key_function_provider.rb 70 def initialize(name, parent_data_provider, function_name, options, locations) 71 @datadir = options.delete(HieraConfig::KEY_DATADIR) 72 super 73 end
Public Instance Methods
unchecked_key_lookup(key, lookup_invocation, merge)
click to toggle source
Calls superclass method
Puppet::Pops::Lookup::LookupKeyFunctionProvider#unchecked_key_lookup
# File lib/puppet/pops/lookup/lookup_key_function_provider.rb 75 def unchecked_key_lookup(key, lookup_invocation, merge) 76 extra_paths = lookup_invocation.hiera_v3_location_overrides 77 if extra_paths.nil? || extra_paths.empty? 78 super 79 else 80 # Extra paths provided. Must be resolved and placed in front of known paths 81 paths = parent_data_provider.config(lookup_invocation).resolve_paths(@datadir, extra_paths, lookup_invocation, false, ".#{@name}") 82 all_locations = paths + locations 83 root_key = key.root_key 84 lookup_invocation.with(:data_provider, self) do 85 MergeStrategy.strategy(merge).lookup(all_locations, lookup_invocation) do |location| 86 invoke_with_location(lookup_invocation, location, root_key, merge) 87 end 88 end 89 end 90 end