I was trying to track down why a manifest that looks like this for my type:

macauthorization {"system.device.dvd.setregion.initial":
  ensure => present,
  shared => true,
}

kept telling me:

notice: //Macauthorization[system.device.dvd.setregion.initial]/shared:
shared changed 'true' to 'true'

and some debugging in the property class showed that the current value
class is a TrueClass while the new value class is a Symbol.

Should I need to do munging like this in the property definition, or
is this an indication something else is up with my type? like I'm not
symbolizing somewhere that I should be?

    newproperty(:shared) do
        desc "shared"
        newvalue(:true)
        newvalue(:false)

        munge do |value|
            case value
            when true, "true", :true:
                true
            else
                value
            end
        end
    end

The current value will always come out as a boolean from the backing store.

-- 
Nigel Kersten
Systems Administrator
Tech Lead - MacOps

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to