New annotation client
Adam Collard
adam.collard at canonical.com
Mon Jan 12 09:31:05 UTC 2015
Hi Anastasia,
Could you give some clues as to what API changes (if any) will come with
this change?
Our current usage looks something like:
Client SetAnnotations Tag=$entityType-$entityId Pairs=[($key1, $value1),
($key2, $value2)...]
Thanks,
Adam
On 12 January 2015 at 00:41, Anastasia Macmood <
anastasia.macmood at canonical.com> wrote:
> A new annotations client is available from 1.22 effectively deprecating
> annotations in old client.
>
> New annotations client provides functionality to annotate charms as well
> as environment, machine, service and unit previously done through our old
> client.
> New annotations client also supports bulk calls.
>
> For the SET annotations call that looks similar to this:
>
> ......{
> "Type": "Annotations",
> "Request": "Set",
> "Params": {
> "Annotations": {{
> "Entity": a, "Annotations": pairs1
> },{
> "Entity": b, "Annotations": pairs2
> }}
> }}......
>
> corresponding GET annotations call may look like:
>
> ......{
> "Type": "Annotations",
> "Request": "Get",
> "Params": {
> "Entities": {{
> "Tag": a},{
> "Tag": b}}
> }}......
>
> Returning
>
> {
> "Results": {
> {"Entity": a, "Annotations": pairs1, "Error": nil},
> {"Entity": b, "Annotations": pairs2, "Error": nil},
>
> }
>
> }
>
> Note that where SET call returns an error, Error in GET call return is
> params.ErrorResult.
>
>
>
>
>
> --
> Juju-dev mailing list
> Juju-dev at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20150112/1409448a/attachment.html>
More information about the Juju-dev
mailing list