Accessing internal read-only parameters

28 views
Skip to first unread message

Dmitry Musatov

unread,
Dec 6, 2013, 5:08:42 AM12/6/13
to puppet...@googlegroups.com, Lior Goikhburg
Hi,

I'd like to access read-only parameter package::status in my manifest.  The only reference about RO-parameters usage I found is some irrelevant post in puppet-dev group (https://groups.google.com/d/msg/puppet-dev/XiEexgGGwHc/P1_s7OQo59kJ) from Y2008:
<citate>
And as "definition attributes" they would provide a nice way of accessing internal read-only parameters (e.g. "package::platform") which is not possible today  AFAIK.
</citate>

So, is it possible to use them at all nowdays?  If so, then how?

Thank you.

-- 
Dmitry Musatov

jcbollinger

unread,
Dec 9, 2013, 12:51:13 PM12/9/13
to puppet...@googlegroups.com


On Friday, December 6, 2013 4:08:42 AM UTC-6, Dmitry Musatov wrote:
Hi,

I'd like to access read-only parameter package::status in my manifest.  The only reference about RO-parameters usage I found is some irrelevant post in puppet-dev group (https://groups.google.com/d/msg/puppet-dev/XiEexgGGwHc/P1_s7OQo59kJ) from Y2008:
<citate>
And as "definition attributes" they would provide a nice way of accessing internal read-only parameters (e.g. "package::platform") which is not possible today  AFAIK.
</citate>



As far as I can tell, that was a discussion of a hypothetical feature.  Some of the concepts covered by the discussion were incorporated into the implementation of parameterized classes, which did not yet exist at the time.

 
So, is it possible to use them at all nowdays?  If so, then how?



No, your manifests cannot introspect resources to determine the values of their parameters.  Moreover, even if your manifests could do such a thing, "internal" attributes are typically set by the package provider, which is involved only on the agent side, long after the catalog has already been compiled.  I presume that these things appear in the public documentation at all only because it is automatically generated.

In any case, the "internal" designation should be taken to mean "do not look at, touch, listen to, smell, or taste this".


John

Reply all
Reply to author
Forward
0 new messages