openBackhaul / MicroWaveDeviceInventory

Physical and logical inventory of the MW SDN Domain
Apache License 2.0
5 stars 1 forks source link

Clarification regarding inclusion of key attributes in responses from cache #917

Open IswaryaaS opened 5 months ago

IswaryaaS commented 5 months ago

While retrieving responses from live using "fields" filter, it is expected that the response shall contain the "key attributes" of the object if exists , even if the filter(example, "uuid" or "local-id") is not included in request url.

Kindly requesting you to clarify that if the same behavior of retrieving response along with presence of "key attribute" of respective object even if the key is not included in request url is expected.

Example scenario: For the fields filter equipment(contained-holder(occupying-fru;equipment-augment-1-0:holder-pac(vendor-label))), the responses from live and cache are as follows:

Sample response from live: Here, even if uuid(key attribute of equipment object) and local-id (key attribute of contained-holder object) is not included in request url, but is retrieved from response.

"equipment":[
     {"uuid":"1921274879"},
     {
       "uuid":"1921269759",
       "contained-holder" : [
           { 
            "local-id":"1921266687",
            "equipment-augment-1-0:holder-pac" : {
               "vendor-label":"Sub-slot 1/3.3"
             },
            "occupying-fru":"1921266687"
           }, .....
       ]
   }
]

Sample response from cache: : key attributes not included in response by default

"equipment":[
     {},
     {}, 
     {
       "contained-holder" : [
           { 
            "equipment-augment-1-0:holder-pac" : {
               "vendor-label":"Sub-slot 1/3.3"
             },
            "occupying-fru":"1921266687"
           }, .....
       ]
   }
]

Kindly let us know, the response retrieved from cache is as expected or it shall be modified to contain the key attributes for objects inside list.