Dmitry Musatov
2013-Dec-06 10:08 UTC
[Puppet Users] Accessing internal read-only parameters
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 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/943aabb1-4a43-4913-9067-440928e5a716%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
jcbollinger
2013-Dec-09 17:51 UTC
[Puppet Users] Re: Accessing internal read-only parameters
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 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/240d6463-a414-4f2e-87f8-74df3ba7a034%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.