[[chef-dev]] Re: [[chef-dev]] Default Actions for LWRP Resources [CHEF-1789]


Chronological Thread 
  • From: Chris Walters < >
  • To: Chef Dev < >
  • Subject: [[chef-dev]] Re: [[chef-dev]] Default Actions for LWRP Resources [CHEF-1789]
  • Date: Tue, 24 May 2011 12:11:34 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=dYmuZsLUN92om5s4XiG0yDd1vxI1cPr2FPxzRkrol6Yd4P1RhSOjl/iEaJ4fyWoOSp sNuRgsoT44pgxPJh6FmgCao8lPTlS7r4xMzisjXhRoU+NM2LIlTFonsOpexMbdlRjTYB vwXkNbidEc+TFxjqnkFnnfzN7L1g35fEZbDy0=

My preference is away from black magic and toward explicitly setting the default.

-chris

On Tue, May 24, 2011 at 11:24 AM, Daniel DeLeo < "> > wrote:
Hello Chefs,
As many of you know, setting the default action on LWRP resources is pretty tricky right now since it is not exposed by the DSL. Avishai Ish-Shalom has kindly provided a patch for this issue[1][2]. Avishai's patch allows you to specify the default action by adding `:default => _DEFAULT_` to the list of actions on the resource, like so:

actions :pass_buck, :prepare_thumbs, :twiddle_thumbs, :default => :pass_buck
An alternative implementation that has been proposed is to simply use the first action in the list as the default. Please chime in if you have a strong preference for one or the other.


--
Dan DeLeo

1. http://tickets.opscode.com/browse/CHEF-1789
2. https://github.com/avishai-ish-shalom/chef/tree/CHEF-1789






Archive powered by MHonArc 2.6.16.

§