...
When performing update operation with xPath set as rooton the list data node
curl --location --request PATCH 'http://localhost:8080/cps/api/v1/dataspaces/testDataspace/anchors/sample/nodes?xpath=%2Finterface-A' --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=' --header 'Cookie: JSESSIONID=node01ejoiyh1brii5zx8z9mk2r39l1.node0' \
--data '{
"int:interface-A" : {
"interface" : [
{
"name" : "Interface-A" ,
"address" : "10.10.10.0" ,
"enabled" : false ,
"subnet-mask" : "255.255.255.0"
},
{
"name" : "Interface-B" ,
"address" : "1.1.1.1" , //value to be updated
"enabled" : false , //value to be updated
"subnet-mask" : "255.255.255.0"
}
]
}
}'
|
|
Status 200 OK is returned, but on performing the Get operation it is noticed only the leaf nodes get updated and list node the first item in the list node gets updated and second one remains as it is.
{
"int:interface-A" : {
"interface" : [
{
"name" : "Interface-A" ,
"address" : "10.10.10.0" ,
"enabled" : false ,
"subnet-mask" : "255.255.255.0"
},
{
"name" : "Interface-B" ,
"address" : "10.10.10.200" , //unchanged value
"enabled" : true , //unchanged value
"subnet-mask" : "255.255.255.0"
}
]
}
}
|
|
...