Class Puppet::Parameter
In: lib/puppet/parameter.rb
Parent: Object

Methods

Included Modules

Puppet::Util Puppet::Util::Errors Puppet::Util::LogPaths Puppet::Util::Logging Puppet::Util::MethodHelper Puppet::Util::Cacher Puppet::Util Puppet::Util::Docs

Classes and Modules

Class Puppet::Parameter::ValueCollection

Attributes

default  [R] 
metaparam  [RW] 
munger  [R] 
name  [R] 
parent  [RW]  LAK 2007-05-09: Keep the @parent around for backward compatibility.
required_features  [R] 
resource  [RW] 
validater  [R] 
value_collection  [R] 

Public Class methods

Define the default value for a given parameter or parameter. This means that ‘nil’ is an invalid default value. This defines the ‘default’ instance method.

Store documentation for this parameter.

Return a documentation string. If there are valid values, then tack them onto the string.

Mark whether we‘re the namevar.

Is this parameter the namevar? Defaults to false.

This parameter is required.

This is how we munge the value. Basically, this is our opportunity to convert the value from one form into another.

Basic parameter initialization.

Define a new value for our parameter.

Just a simple method to proxy instance methods to class methods

Is this parameter required? Defaults to false.

Specify features that are required for this parameter to work.

Does the parameter supports reverse munge? This will be called when something wants to access the parameter in a canonical form different to what the storage form is.

Verify that we got a good value

Public Instance methods

Log a message using the resource‘s log level.

Is this parameter a metaparam?

A wrapper around our munging that makes sure we raise useful exceptions.

each parameter class must define the name() method, and parameter instances do not change that name this implicitly means that a given object can only have one parameter instance of a given parameter class

for testing whether we should actually do anything

return the full path to us, for logging and rollback; not currently used

Retrieve the resource‘s provider. Some types don‘t have providers, in which case we return the resource object itself.

The properties need to return tags so that logs correctly collect them.

If the specified value is allowed, then munge appropriately. If the developer uses a ‘munge’ hook, this method will get overridden.

Verify that the passed value is valid. If the developer uses a ‘validate’ hook, this method will get overridden.

A protected validation method that only ever raises useful exceptions.

Store the value provided. All of the checking should possibly be late-binding (e.g., users might not exist when the value is assigned but might when it is asked for).

[Validate]