Class: Puppet::Pops::Lookup::V3BackendFunctionProvider Private

Inherits:
DataDigFunctionProvider show all
Defined in:
lib/puppet/pops/lookup/data_dig_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.

'hiera3_backend'

Instance Attribute Summary

Attributes inherited from FunctionProvider

#function_name, #locations, #parent_data_provider

Instance Method Summary collapse

Methods inherited from DataDigFunctionProvider

#invoke_with_location, #label, #unchecked_key_lookup, #validated_data_dig

Methods inherited from FunctionProvider

#create_function_context, #function_context, #initialize, #module_name, #name, #options, #to_s, trusted_return_type

Methods included from DataProvider

#key_lookup, #key_lookup_in_default, key_type, #lookup, #module_name, #name, register_types, #unchecked_key_lookup, #validate_data_hash, #validate_data_value, value_type

Constructor Details

This class inherits a constructor from Puppet::Pops::Lookup::FunctionProvider

Instance Method Details

#data_dig(key, lookup_invocation, location, 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.



70
71
72
73
74
75
76
77
# File 'lib/puppet/pops/lookup/data_dig_function_provider.rb', line 70

def data_dig(key, lookup_invocation, location, merge)
  @backend ||= instantiate_backend(lookup_invocation)

  # A merge_behavior retrieved from hiera.yaml must not be converted here. Instead, passing the symbol :hash
  # tells the V3 backend to pick it up from the config.
  resolution_type = lookup_invocation.hiera_v3_merge_behavior? ? :hash : convert_merge(merge)
  @backend.lookup(key.to_s, lookup_invocation.scope, lookup_invocation.hiera_v3_location_overrides, resolution_type, { :recurse_guard => nil })
end

#full_nameObject

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
# File 'lib/puppet/pops/lookup/data_dig_function_provider.rb', line 79

def full_name
  "hiera version 3 backend '#{options[HieraConfig::KEY_BACKEND]}'"
end

#value_is_validated?Boolean

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:

  • (Boolean)


83
84
85
# File 'lib/puppet/pops/lookup/data_dig_function_provider.rb', line 83

def value_is_validated?
  false
end