On 7 December 2015 at 19:30, Peter Berghold <[email protected]> wrote: > Nevermind... figured out what was going on.. and fixed that problem and > now a more bugs to squash... > > How do I raise a failed exception in a provider (this before I start > googleing) :-) >
You can use the fail method as seen here. https://github.com/garethr/garethr-digitalocean/blob/master/lib/puppet/provider/droplet/v2.rb#L96 Gareth > On Mon, Dec 7, 2015 at 9:53 AM Peter Berghold <[email protected]> > wrote: >> >> This email has two parts: >> >> First part >> >> Looking at "Sh*t Gary Says" seems to imply I may be going about creating >> custom types/providers. I am currently creating a type under >> lib/puppet/type/{typename}.rb without that logic doing anything with the >> actual logic being in lib/puppet/provider/{typename}/ruby.rb which has >> worked fine for me in the past. >> >> Someone confirm/deny. >> >> Second part >> >> I've created a pair of custom types/providers, one to set parameters and >> the other to set state. The issue I'm running into is the state provider >> is trying to work and the parameter provider doesn't even seem to be loading >> in Puppet at all without any sort of error showing up. >> >> Here is how they are being invoked in a manifest: >> >> myparmtype { 'instance': >> parm1=>'value1', >> parm2=>'value2' >> } >> -> >> mystatetype{'instance': >> state =>'mystate' >> } >> >> Sorry for the obfuscation, but what I'm working on is largely company >> proprietary. >> >> Thoughts anybody? >> >> Is there a limit to the number of types/providers a module can have? >> > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/CAArvnv20aBVzYQyU5ifFJQcuVQPEaCp63VntLMMXBBmP9%3D5SRw%40mail.gmail.com. > > For more options, visit https://groups.google.com/d/optout. -- Gareth Rushgrove @garethr devopsweekly.com morethanseven.net garethrushgrove.com -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAFi_6y%2BGg3K4-%3DnDTxjfrYrhk8d9EA-CxrWS20TBXfmvdWq1uw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
