When I use netconf-console to send above xml as RPC request to Confd server, it will return ok response.
By get-config operation, it will return below message:
As an edit-config is applied as one transaction (not per operation), a NETCONF server will process that transaction and after that processing, if any node’s “when” expression becomes false, then the node in the data tree with the “when” expression is deleted by the server.
Hi @mnovak,
In the issue link: A question about the "when" merge usage, the db has contained the node’s configuration data and when another XML modifies the data, then the node with the when is deleted
In this example, the node’s configuration data isn’t stored in the db, so I think the error-message in when should be reported, not sure whether the understanding is right?
If a request modifies a configuration data node such that any
node’s “when” expression becomes false, then the node in the data
tree with the “when” expression is deleted by the server.
Hi,
This is a known issue that was corrected in ConfD 7.
Premium users got ConfD 7.1 on April 24 2019 (and maintenance releases such as 6.7.4 etc). I don’t know what the status is regarding making ConfD 7.1 available for basic users.
Using MAAPI (in the same way as with NETCONF) the correct behaviour, here using ConfD 7.1.1, would be something like this:
$ confd_cmd -dd -c 'mctrans; mset /testA/node "DEF"; mcreate /testA/testB/routing{week="Monday"}; mcommit; ccommit;'
mctrans ; mset "/testA/node" "DEF" ; mcreate "/testA/testB/routing{week="Monday"}" ; mcommit ; ccommit
TRACE Connected (maapi) to ConfD
TRACE MAAPI_START_USER_SESSION --> CONFD_OK
TRACE MAAPI_START_TRANS --> CONFD_OK
TRACE MAAPI_SET_ELEM2 /testA/node --> CONFD_OK
TRACE MAAPI_CREATE /testA/testB/routing{week="Monday"}DEBUG item does not exist - /wf:testA/testB/routing{"week=\"Monday\""}: the 'when' expression "../node = 'ABC'" failed
--> CONFD_ERR
FAILED: maapi_create(ms, mtid, argv[0]), Error: item does not exist (1): /wf:testA/testB/routing{"week=\"Monday\""}: the 'when' expression "../node = 'ABC'" failed, in function do_maapi_create, line 1451