On Oct 8, 2009, at 6:49 PM, Matt Delves wrote:

>
>
>
>>>> On 8/10/2009 at 3:01 pm, in message
> <[email protected]>, Luke Kanies
> <[email protected]> wrote:
>
>> Well, they're clearly loading and they exist, so they're configured
>> correctly from Puppet's perspective.
>>
>> If you try them in a Puppet manifest, do they work?  I think your
>> tests have too many requires for them to work ('require' fights with
>> Puppet's autoloading system right now), but you should be able to try
>> them in a manifest, if the above irb is working.
>
> Okay, I placed it into a module and it seems to be working (the  
> tests I will return to later).
>
> What I'm seeing is that the provider can't call the new method of  
> the type. The error returned is:
>
> private method 'new' called for Puppet::Type::Firewall:Class

Yeah, until 0.25, you have to use 'create' instead of 'new' to create  
instances of these classes, because we do funny things at instantiation.

>
> On the good side, it is calling the provider correctly. The line in  
> the provider that is causing the issue is:
>
> rulen = Puppet::Type.type(:firewall).new(:name => rule.to_s)
>
> So, my question is now one of "How do I correctly create a new  
> variable of the Puppet::Type::Firewall class)
>
> Thanks for you help so far in tracking this down.


rulen = Puppet::Type.type(:firewall).create(:name => rule.to_s)

-- 
The Chico, California, City Council enacted a ban on nuclear weapons,
setting a $500 fine for anyone detonating one within city limits.
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
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