Hi Arul, In Chef, attributes are associated to nodes, roles and environments, but not to cookbooks. Cookbooks contain a set of "attribute files" with default values for some attributes, but don't "define" them nor set a "complete attribute set".
If you have a look at the Chef server API [1] you'll see that a cookbook version does not return any attribute; just a reference to each attribute file. Having said this, what are you trying to do? You might want to change your code to read the attributes from a node. Also, looking at the jclouds code, we'll have to change the cookbook version "attributes" variable [2] to return a set of Resource (just as the recipes do) instead of Attributes. This may have caused confusion. I'll open a JIRA to fix this on our side. HTH! Ignasi [1] http://docs.opscode.com/api_chef_server.html#id5 [2] https://github.com/jclouds/jclouds-chef/blob/master/core/src/main/java/org/jclouds/chef/domain/CookbookVersion.java#L171 El 23/06/2014 20:14, "Arulanand Dayalan" <[email protected]> escribió: > > Hi, > > I am trying to get list of attributes for a cookbook version and its > returning empty. I had checked it in Chef server console and there are > attributes available under attribute folder in default.rb file in that > cookbook.I am using jclouds version 1.7.3, can you please let me know if > this feature is supported currently. Also, can you please let me know if > there is a way to get hold of json from rest calls to chef server, so that > i can parse it and consume in client. > > Regards, > Arul. > > >
