Sha256: 7cf831f619060a39d51cd9f6997e83938a9804d58e2ce6eedc146aed40dbf8f6

Contents?: true

Size: 536 Bytes

Versions: 348

Compression:

Stored size: 536 Bytes

Contents

class Hiera::Backend::Custom_backend
  def lookup(key, scope, order_override, resolution_type, context)
    case key
    when 'hash_c'
      { 'hash_ca' => { 'cad' => 'value hash_c.hash_ca.cad (from global custom)' }}
    when 'hash'
      { 'array' => [ 'x5,x6' ] }
    when 'array'
      [ 'x5,x6' ]
    when 'datasources'
      Hiera::Backend.datasources(scope, order_override) { |source| source }
    when 'dotted.key'
      'custom backend received request for dotted.key value'
    else
      throw :no_such_key
    end
  end
end

Version data entries

348 entries across 348 versions & 1 rubygems

Version Path
puppet-8.3.0 spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
puppet-8.3.0-x86-mingw32 spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
puppet-8.3.0-x64-mingw32 spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
puppet-8.3.0-universal-darwin spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
puppet-8.4.0 spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
puppet-8.4.0-x86-mingw32 spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
puppet-8.4.0-x64-mingw32 spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
puppet-8.4.0-universal-darwin spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
puppet-7.28.0 spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
puppet-7.28.0-x86-mingw32 spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
puppet-7.28.0-x64-mingw32 spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
puppet-7.28.0-universal-darwin spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
puppet-8.3.1 spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
puppet-8.3.1-x86-mingw32 spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
puppet-8.3.1-x64-mingw32 spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
puppet-8.3.1-universal-darwin spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
puppet-7.27.0 spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
puppet-7.27.0-x86-mingw32 spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
puppet-7.27.0-x64-mingw32 spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
puppet-7.27.0-universal-darwin spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb