Module: Jerakia::Lookup::Plugin::Hiera

Defined in:
lib/jerakia/lookup/plugin/hiera.rb

Instance Method Summary collapse

Instance Method Details

#calling_moduleObject



16
17
18
19
20
21
22
# File 'lib/jerakia/lookup/plugin/hiera.rb', line 16

def calling_module
  if request.namespace.length > 0
    request.namespace[0]
  else
    Jerakia.log.error("hiera_compat plugin tried to use calling_module but there is no namespace declared.  Ensure that calling_module is called before hiera_compat in the policy")
  end
end

#rewrite_lookupObject



11
12
13
14
# File 'lib/jerakia/lookup/plugin/hiera.rb', line 11

def rewrite_lookup
  request.key.prepend("#{request.namespace.join('::')}::")
  request.namespace=[]
end