restconf patch API is not updating the list node instead it create a new entry.: restconf 'patch' API is not updating the list node instead it create a new entry.
Hi Demeke,Patch restconf is for updating existing service. Please double check the service name is matching with an existing service. Otherwise, it would create a new service name. Thanks,LinhHi Linh, Yes patch restconf is for updating existing service. But the question is inside the service data if user want to update the value of a single entry from the list it will create new entry in the list. And that seems an issue.Thanks,Demeke. Hi Demeke,Can you share the patch update payload?Thanks,Linh{"cisco-sr-te-cfp:sr-te": {"cisco-sr-te-cfp-sr-policies:policies": {"sid-list": [{"name": "sid1","sid": [{"index": 2,"mpls": {"label": 11}}]}]}}}Above is the patch payload and the update was the index value from 1 to 2.After the update below is the result { "cisco-sr-te-cfp:sr-te": { "cisco-sr-te-cfp-sr-policies:policies": { "sid-list": [{ "name": "sid1", "sid": [{ "index": 1, "mpls": { "label": 11 } }, { "index": 2, "mpls": { "label": 11 } }] }] } } }Expectation was to update the index value but the patch creates a new entry in the list.{  "index": 2,  "mpls": { "label": 11   } }Hi Demeke,This is how sid-list defined yang model.  list sid {   key index;   leaf index {    tailf:info "<1-65535> - Sid Index";    description "<1-65535> - Sid Index";    type uint32 {     range "1..65535";    }    tailf:cli-allow-range;   }   min-elements 1;Since index is defined as key, you can not update it but deleting the whole index and then recreate with different key in your case is index 2.Thanks,LinhHi Linh,Yes it is the key and currently when user update the key values it creates new entry. The request is to enhance the restconf patch API to handle this scenario to be able to update key values? expectation is instead of forcing user to delete this key value and then create new, can we handle this internally in the API implementation and modify key values?Thanks,Demeke. 