- From: Seth Falcon <
>
- To: Noorul Islam Kamal Malmiyoda <
>
- Cc:
- Subject: [chef-dev] Re: Re: Documentation differ from actual behavior
- Date: Tue, 08 Oct 2013 12:00:12 -0700
Hi Noorul,
Sorry for the delay in response.
writes:
>
On Fri, Oct 4, 2013 at 9:34 AM, Noorul Islam Kamal Malmiyoda
>
<
>
>
wrote:
>
> Forgot to copy dev mailing list.
>
>
>
> ---------- Forwarded message ----------
>
> From: Noorul Islam K M
>
> <
>
>
> Date: Fri, Oct 4, 2013 at 9:32 AM
>
> Subject: Documentation differ from actual behavior
>
> To:
>
>
>
>
>
>
>
>
>
> I am using Open Source Chef Server 11.
>
>
>
> As per http://docs.opscode.com/api_chef_server.html#id11
>
>
>
> for the following command
>
>
>
> knife raw --method DELETE /data/test/config
>
>
>
> I expected to get following response
>
>
>
> {"id":"config", "foo":"bar"}
>
>
>
> But I get
>
>
>
> {"name":"data_bag_item_test_config","json_class":"Chef::DataBagItem","chef_type":"data_bag_item","data_bag":"test","raw_data":{"id":"config",
>
> "foo":"bar"}}
>
>
>
>
If someone can confirm that this is a documentation issue, then I will
>
fix it.
Yes, we should update the docs. In putting Chef Server 11 together, we
attempted to clean up some edge cases of the API, but had to make
compromises to keep the server backwards compatible with Chef 10 client
code.
You can create data bag items using the "simple" body like:
{"id":"config", "foo":"bar"}
But when you use knife to create a data bag item, it will send what we
lovingly refer to as the "encrufted item" format to the server. Knife
expects the encrufted form for processing the DELETE and so at the last
minute we put that back. Certainly something to clean up for Chef Server
12.
Hope that helps in terms of providing some context/history. We'll see
that the docs get updated (or would welcome a patch if you'd like).
Best,
+ seth
--
Seth Falcon | Development Lead | Opscode | @sfalcon
Attachment:
pgpf_UKFCmbaI.pgp
Description: PGP signature
Archive powered by MHonArc 2.6.16.