Module: Puppet::DataProviders::HieraSupport Deprecated Private
- Included in:
- HieraEnvDataProvider, HieraModuleDataProvider
- Defined in:
- lib/puppet/data_providers/hiera_support.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
TODO: API 5.0, remove this module
Instance Method Summary collapse
- #config_path ⇒ Object private
- #name ⇒ Object private
-
#unchecked_lookup(key, lookup_invocation, merge) ⇒ Object
private
Performs a lookup by searching all given paths for the given key.
Instance Method Details
#config_path ⇒ 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.
7 8 9 |
# File 'lib/puppet/data_providers/hiera_support.rb', line 7 def config_path @hiera_config.nil? ? 'not yet configured' : @hiera_config.config_path end |
#name ⇒ 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.
11 12 13 |
# File 'lib/puppet/data_providers/hiera_support.rb', line 11 def name 'Hiera Data Provider' + (@hiera_config.nil? ? '' : ", version #{@hiera_config.version}") end |
#unchecked_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.
Performs a lookup by searching all given paths for the given key. A merge will be performed if the value is found in more than one location and merge is not nil.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/puppet/data_providers/hiera_support.rb', line 21 def unchecked_lookup(key, lookup_invocation, merge) unless Puppet[:strict] == :off Puppet.warn_once(:deprecation, 'Puppet::DataProviders::HieraSupport', 'Puppet::DataProviders::HieraSupport is deprecated and will be removed in the next major version of Puppet') end lookup_invocation.with(:data_provider, self) do merge_strategy = Puppet::Pops::MergeStrategy.strategy(merge) lookup_invocation.with(:merge, merge_strategy) do merged_result = merge_strategy.merge_lookup(data_providers(data_key(key, lookup_invocation), lookup_invocation)) do |data_provider| data_provider.unchecked_lookup(key, lookup_invocation, merge_strategy) end lookup_invocation.report_result(merged_result) end end end |