Class | Puppet::Property |
In: |
lib/puppet/property/keyvalue.rb
lib/puppet/property/list.rb lib/puppet/property/ordered_list.rb lib/puppet/property.rb lib/puppet/type/zpool.rb |
Parent: | Object |
name | [R] | |
noop | [W] | |
shadow | [R] | |
shouldorig | [R] | Because ‘should’ uses an array, we have a special method for handling it. We also want to keep copies of the original values, so that they can be retrieved and compared later when merging. |
unmanaged | [RW] |
Define a new valid value for a property. You must provide the value itself, usually as a symbol, or a regex to match the value.
The first argument to the method is either the value itself or a regex. The second argument is an option hash; valid options are:
Call the dynamically-created method associated with our value, if there is one.
Determine whether the property is in-sync or not. If @should is not defined or is set to a non-true value, then we do not have a valid value for it and thus consider the property to be in-sync since we cannot fix it. Otherwise, we expect our should value to be an array, and if @is matches any of those values, then we consider it to be in-sync.
If there‘s a shadowing metaparam, instantiate it now. This allows us to create a property or parameter with the same name as a metaparameter, and the metaparam will only be stored as a shadow.
Verify that the passed value is valid. If the developer uses a ‘validate’ hook, this method will get overridden.
Make sure that we‘ve got all of the required features for a given value.