Module: Puppet::DataProviders Private

Defined in:
lib/puppet/data_providers.rb,
lib/puppet/data_providers/hiera_config.rb,
lib/puppet/data_providers/hiera_env_data_provider.rb,
lib/puppet/data_providers/function_env_data_provider.rb,
lib/puppet/data_providers/hiera_module_data_provider.rb,
lib/puppet/data_providers/json_data_provider_factory.rb,
lib/puppet/data_providers/yaml_data_provider_factory.rb,
lib/puppet/data_providers/function_module_data_provider.rb

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.

Defined Under Namespace

Modules: DataFunctionSupport, HieraInterpolate, HieraSupport Classes: DataAdapter, FunctionEnvDataProvider, FunctionModuleDataProvider, HieraConfig, HieraEnvDataProvider, HieraModuleDataProvider, JsonDataProvider, JsonDataProviderFactory, LookupAdapter, YamlDataProvider, YamlDataProviderFactory

Constant Summary collapse

MODULE_NAME =

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.

'module_name'.freeze

Class Method Summary collapse

Class Method Details

.assert_loadedObject

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.



4
5
6
7
8
9
10
11
# File 'lib/puppet/data_providers.rb', line 4

def self.assert_loaded
  unless @loaded
    require 'puppet/pops'
    require 'puppet/data_providers/data_adapter'
    require 'puppet/data_providers/lookup_adapter'
  end
  @loaded = true
end

.lookup_adapter(lookup_invocation) ⇒ 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.



27
28
29
30
# File 'lib/puppet/data_providers.rb', line 27

def self.lookup_adapter(lookup_invocation)
  assert_loaded()
  LookupAdapter.adapt(lookup_invocation.scope.compiler)
end

.lookup_in_environment(name, 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.

Deprecated.

use ‘lookup_adapter(lookup_invocation).lookup` instead



14
15
16
17
# File 'lib/puppet/data_providers.rb', line 14

def self.lookup_in_environment(name, lookup_invocation, merge)
  Puppet.deprecation_warning('The method Puppet::DataProviders.lookup_in_environment is deprecated and will be removed in the next major release of Puppet.')
  lookup_adapter(lookup_invocation).lookup_in_environment(name, lookup_invocation, Puppet::Pops::MergeStrategy.strategy(merge))
end

.lookup_in_module(name, 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.

Deprecated.

use ‘adapter(lookup_invocation).lookup` instead



22
23
24
25
# File 'lib/puppet/data_providers.rb', line 22

def self.lookup_in_module(name, lookup_invocation, merge)
  Puppet.deprecation_warning('The method Puppet::DataProviders.lookup_in_module is deprecated and will be removed in the next major release of Puppet.')
  lookup_adapter(lookup_invocation).lookup_in_module(name, lookup_invocation, Puppet::Pops::MergeStrategy.strategy(merge))
end