Comment 1 for bug 1313016

Revision history for this message
Anastasia (anastasia-macmood) wrote :

New annotation client has been added deprecating the old one.
This client still annotates entities that could be annotated before - environment, machine, service, unit. However, it also annotates charms.
New calls are capable of handling bulk inputs where bulk inputs mean:
1. For getting annotations:
Provide a list of entities of interest and get a list containing either entity annotations or retrieval error for each entity requested.
2. For setting annotations:
Note that this is a current assumption as it cateers for a lot of scenarios but complicates the call... FUrther clarification from Kapil or other interested parties may change that. Take a list of list of entities and its corresponding pairs, thus setting different annotations on a list of entities.
.......{
            "Type": "Annotations",
            "Request": "Set",
            "Params": {
                 "Annotations": {{
                   "Entities": {a, b, c},
                           "Annotations": pairs1
                  },{
     "Entities": {d,e,a},
                          "Annotations": pairs2
                  }}
}}......
Here, entities a,b,c will be annotated with pairs1 whereas entities d,e,a with pairs2. Note that at the end of this call, entity a would have both pairs1 and pairs2 applied.

To keep track of clarifications, the other side of the coin is to list environment charms meeting the following requirements:
1. list of charm versioned urls present in the environment as simple array of strings;
2. provide parameter to filter charm list filter by charm name.