On Wednesday, December 7, 2011 at 4:05 AM, Ilya Maltsev wrote: > Spice log on POST query: > > --- &id001 !str > str: "{\"error\":[\"undefined method `name' for nil:NilClass\"]}" Looks like you're missing quite a few fields in the JSON you post to the server. I'd consider it a bug that this doesn't return a 400 with a description of which fields are missing. Anyway, you can play with this stuff in `shef`: chef > new_role = Chef::Role.new => role[] chef > new_role.name("my-new-role") => "my-new-role" chef > new_role.to_json => "{\"name\":\"my-new-role\",\"description\":\"\",\"json_class\":\"Chef::Role\",\"default_attributes\":{},\"override_attributes\":{},\"chef_type\":\"role\",\"run_list\":[],\"env_run_lists\":{}}"
-- Best regards, Ilya Maltsev |
Archive powered by MHonArc 2.6.16.