Class | Puppet::Type |
In: |
lib/puppet/type.rb
|
Parent: | Object |
catalog | [RW] | The catalog that this resource is stored in. |
defaultprovider | [W] | |
exported | [RW] | is the resource exported |
name | [R] | |
noop | [W] | |
original_parameters | [R] | instance methods related to instance intrinsics e.g., initialize() and name() |
parenttype | [RW] | |
properties | [R] | |
provider | [R] | |
providerloader | [RW] | |
self_refresh | [RW] | |
title | [W] | In naming methods, I have tried to consistently name the method so that it is clear whether it operates on all attributes (thus has ‘attr’ in the method name, or whether it operates on a specific type of attributes. |
virtual | [RW] | is the resource virtual (it should not :-)) |
Create an alias. We keep these in a separate hash so that we don‘t encounter the objects multiple times when iterating over them.
All parameters, in the appropriate order. The namevar comes first, then the provider, then the properties, and finally the params and metaparams in the order they were specified in the files.
What type of parameter are we dealing with? Cache the results, because this method gets called so many times.
Specify a block for generating a list of objects to autorequire. This makes it so that you don‘t have to manually specify things that you clearly require.
this is a retarded hack method to get around the difference between component children and file children
Create the ‘ensure’ class. This is a separate method so other types can easily call it and create their own ‘ensure’ values.
Convert a simple hash into a Resource instance. This is a convenience method, so people can create RAL resources with a hash and get the same behaviour as we get internally when we use Resource instances.
This should only be used directly from Ruby -- it's not used when going through
normal Puppet usage.
Create a new metaparam. Requires a block and a name, stores it in the @parameters array, and does some basic checking on it.
Create a new parameter. Requires a block and a name, stores it in the @parameters array, and does some basic checking on it.
Create an alias to an existing attribute. This will cause the aliased attribute to be valid when setting and retrieving values on the instance.
Create a block to validate that our object is set up entirely. This will be run before the object is operated on.
Abstract setting parameters and properties, and normalize access to always be symbols, not strings. This sets the ‘should’ value on properties, and otherwise just sets the appropriate parameter.
if all contained objects are in sync, then we‘re in sync FIXME I don‘t think this is used on the type instances any more, it‘s really only used for testing
is the instance a managed instance? A ‘yes’ here means that the instance was created from the language, vs. being created in order resolve other questions, such as finding a package in a list
Create the actual attribute instance. Requires either the attribute name or class as the first argument, then an optional hash of attributes to set during initialization.
For any parameters or properties that have defaults and have not yet been set, set them now. This method can be handed a list of attributes, and if so it will only set defaults for those attributes.