Sha256: a4c330e875ba2bbd0e4e9ded92ded00ea62cd3f4e54a8e770a45b4c8d8fcacb6

Contents?: true

Size: 1.23 KB

Versions: 38

Compression:

Stored size: 1.23 KB

Contents

module Puppet::DataProviders

  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

  # @deprecated use `lookup_adapter(lookup_invocation).lookup` instead
  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

  MODULE_NAME = 'module_name'.freeze

  # @deprecated use `adapter(lookup_invocation).lookup` instead
  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

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

Version data entries

38 entries across 38 versions & 2 rubygems

Version Path
puppet-retrospec-1.5.0 vendor/gems/puppet-4.5.2/lib/puppet/data_providers.rb
puppet-retrospec-1.4.1 vendor/gems/puppet-4.5.2/lib/puppet/data_providers.rb
puppet-retrospec-1.4.0 vendor/gems/puppet-4.5.2/lib/puppet/data_providers.rb
puppet-retrospec-1.3.2 vendor/gems/puppet-4.5.2/lib/puppet/data_providers.rb
puppet-retrospec-1.3.1 vendor/gems/puppet-4.5.2/lib/puppet/data_providers.rb
puppet-retrospec-1.3.0 vendor/gems/puppet-4.5.2/lib/puppet/data_providers.rb
puppet-4.7.1 lib/puppet/data_providers.rb
puppet-4.7.1-x86-mingw32 lib/puppet/data_providers.rb
puppet-4.7.1-x64-mingw32 lib/puppet/data_providers.rb
puppet-4.7.1-universal-darwin lib/puppet/data_providers.rb
puppet-retrospec-1.2.1 vendor/gems/puppet-4.5.2/lib/puppet/data_providers.rb
puppet-retrospec-1.2.0 vendor/gems/puppet-4.5.2/lib/puppet/data_providers.rb
puppet-4.7.0 lib/puppet/data_providers.rb
puppet-4.7.0-x86-mingw32 lib/puppet/data_providers.rb
puppet-4.7.0-x64-mingw32 lib/puppet/data_providers.rb
puppet-4.7.0-universal-darwin lib/puppet/data_providers.rb
puppet-4.6.2 lib/puppet/data_providers.rb
puppet-4.6.2-x86-mingw32 lib/puppet/data_providers.rb
puppet-4.6.2-x64-mingw32 lib/puppet/data_providers.rb
puppet-4.6.2-universal-darwin lib/puppet/data_providers.rb