Class: Puppet::DataBinding::Jerakia
- Inherits:
-
Indirector::Code
- Object
- Indirector::Code
- Puppet::DataBinding::Jerakia
- Defined in:
- lib/puppet/indirector/data_binding/jerakia.rb
Instance Attribute Summary collapse
-
#jerakia ⇒ Object
readonly
Returns the value of attribute jerakia.
-
#policy ⇒ Object
readonly
Returns the value of attribute policy.
Instance Method Summary collapse
- #find(request) ⇒ Object
-
#initialize(*args) ⇒ Jerakia
constructor
A new instance of Jerakia.
Constructor Details
Instance Attribute Details
#jerakia ⇒ Object (readonly)
Returns the value of attribute jerakia.
8 9 10 |
# File 'lib/puppet/indirector/data_binding/jerakia.rb', line 8 def jerakia @jerakia end |
#policy ⇒ Object (readonly)
Returns the value of attribute policy.
9 10 11 |
# File 'lib/puppet/indirector/data_binding/jerakia.rb', line 9 def policy @policy end |
Instance Method Details
#find(request) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/puppet/indirector/data_binding/jerakia.rb', line 17 def find(request) lookupdata=request.key.split(/::/) key=lookupdata.pop namespace=lookupdata = request.[:variables].to_hash policy=["jerakia_policy"] || @default_policy jacreq = Jerakia::Request.new( :key => key, :namespace => namespace, :policy => policy, :lookup_type => :first, :metadata => , ) answer = jerakia.lookup(jacreq) answer.payload end |