[chef] Re: Re: Re: Re: Re: Re: Delete node and client when destroying Vagrant VM


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Re: Re: Delete node and client when destroying Vagrant VM
  • Date: Fri, 7 Dec 2012 12:24:23 -0800


On Friday, December 7, 2012 at 11:29 AM, Adam Jacob wrote:

Use the REST api like a boss, man. That's what it is there for.

Adam


On 12/7/12 10:17 AM, "Cassiano Leal" < "> > wrote:

It would be nice to know the reasoning behind not using the REST client.


The higher up the chain you go, the more places we have to hide changes from you. For example, we'd like to some day remove the json_class stuff from the API, which means that the data you get back from Chef::REST will probably be a Hash instead of a Chef::Node (or whatever you asked for). If (continuing the example) you use the methods on Chef::Node, you wouldn't be impacted by this. Contrarily, the higher up the chain you go, there's more things that could be changed. As a concrete example, the #save method is defined on all of the model classes to try to update and then fall back to create (or vice versa, it's not 100% consistent). We'd like to change this at some point so there are separate create and update methods since 99% of the time you know which one you need.

Either way, changes to the API or to core model class functionality are generally only going to be shipped with major releases (e.g., 10.x -> 11.x) and we'll do our best to document them and announce them ahead of time on this mailing list (upcoming changes in Chef 11, for example: http://wiki.opscode.com/display/chef/Breaking+Changes+in+Chef+11 ).

In conclusion, there are trade-offs either way, but both ways are valid.

-- 
Daniel DeLeo



Archive powered by MHonArc 2.6.16.

§