-
Bug
-
Resolution: Done
-
Medium
-
None
The full list deletion could be invoked on processing new item insertion into ordered list.
See NETCONF-1177
When netconf edit-config message is constructed for remove operation using yang instance identifier pointing to list the message like below occurs
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-19"> <edit-config> <target> <candidate/> </target> <config> <root xmlns="http://example.com/user-ordered-list" xmlns:op="urn:ietf:params:xml:ns:netconf:base:1.0" op:operation="remove"> <items/> </root> </config> </edit-config> </rpc>
According to https://datatracker.ietf.org/doc/html/rfc6241#section-7.2 the operation expected to be defined on element the operation being applied to.
The message above instructs to remove parent container (instead of list elements within), and empty <items/> causes parse error, because the key is mandatory.
In order to remove all the elements belonging to requested list all the elements require to be listed like below
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-19"> <edit-config> <target> <candidate/> </target> <config> <root xmlns="http://example.com/user-ordered-list" xmlns:op="urn:ietf:params:xml:ns:netconf:base:1.0"> <items op:operation="remove"> <id>0</id> </items> <items op:operation="remove"> <id>1</id> </items> </root> </config> </edit-config> </rpc>
- blocks
-
NETCONF-1177 PUT requests failing with "insert" query parameter on testool models
- Confirmed