[YANGTOOLS-1531] Add DataTreeModification.netconfDelete() Created: 25/Jul/23 Updated: 09/Jan/24 |
|
| Status: | Confirmed |
| Project: | yangtools |
| Component/s: | data-api, data-impl |
| Affects Version/s: | None |
| Fix Version/s: | 14.0.0 |
| Type: | New Feature | Priority: | Highest |
| Reporter: | Robert Varga | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Epic Link: | MD-SAL patch |
| Description |
|
One significant difference between DataTree and NETCONF WG semantics are delete operations. DataTreeModification has a delete() operation which is significantly different from NETCONF/RESTCONF delete operation. The NETCONF WG model defines two operations:
This is a rather sticky situation, as at some point we want delete() do the same thing as NETCONF delete does to keep things organized. Update DataTreeModification with:
The first two parts are trivial, the third is not. It requires a new LogicalOperation.DELETE_EXISTING, which has different semantics from LogicalOperation.DELETE: the operation requires that the targeted node has the same version (and, by extension, subtree version) as observed by the underlying DataTreeSnapshot. The check for existence in DataTreeModification needs to be eager, i.e. fail immediately if the node is node present. Commit-time rebase needs to fail if the node has been removed, i.e. even when it exists but has a different version, i.e. commit validation needs to fail with a ModifiedNodeDoesNotExistException. |