[chef] Re: Re: Re: LWRP to extends another cookbook LWRP


Chronological Thread 
  • From: Ranjib Dey < >
  • To: " " < >
  • Subject: [chef] Re: Re: Re: LWRP to extends another cookbook LWRP
  • Date: Thu, 14 May 2015 18:01:06 -0700

for temporary workaround, you can write a helper method that takes a lwrp name, and returns the lwrp objects (resource and provider) and you use that to decorate/compose your new lwrp. in short use  LWRPBase.from_file in your library and pass it the file path (available from run context). 
let us know if you need some code samples,
cheers
ranjib 

On Thu, May 14, 2015 at 2:06 PM, Giovanni Toraldo < " target="_blank"> > wrote:
On Thu, May 14, 2015 at 10:50 PM, Noah Kantrowitz < "> > wrote:
> This is not possible with LWRPs for reasons that are both complicated and very boring. Short version? You need to copy-pasta at least some of the upstream LWRP and build a wrapper around it instead of subclassing.

UGH.

An alternative could be to send a PR to the upstream cookbook with a
bunch of new node attributes defined to be used as default values for
the LWRP attributes?

Other suggestions?

--
Giovanni Toraldo
http://gionn.net




Archive powered by MHonArc 2.6.16.

§