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 69 def initialize(name, parent_data_provider, function_name, options, locations) 70 @datadir = options.delete(HieraConfig::KEY_DATADIR) 71 super 72 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 74 def unchecked_key_lookup(key, lookup_invocation, merge) 75 extra_paths = lookup_invocation.hiera_v3_location_overrides 76 if extra_paths.nil? || extra_paths.empty? 77 super 78 else 79 # Extra paths provided. Must be resolved and placed in front of known paths 80 paths = parent_data_provider.config(lookup_invocation).resolve_paths(@datadir, extra_paths, lookup_invocation, false, ".#{@name}") 81 all_locations = paths + locations 82 root_key = key.root_key 83 lookup_invocation.with(:data_provider, self) do 84 MergeStrategy.strategy(merge).lookup(all_locations, lookup_invocation) do |location| 85 invoke_with_location(lookup_invocation, location, root_key, merge) 86 end 87 end 88 end 89 end