You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upstream has changed the way how pushed operational data are stored and
managed. From now on, each session has a separate edit, these edits are
applied on top of each other using a given priority (priority setting is
not implemented in the C++ wrapper at this time, patches welcome). Each
session can retrieve and manipulate the stored edit.
The key difference is that these edits are now per-session. This has a
wide-ranging impact, and the way how previously set nodes are "undone"
has changed. Unfortunately, upstream refused to rename the relevant
functions due to "API stability concerns", so we're taking care of
avoiding the possible confusion at the C++ layer:
- `Session::dropForeignOperationalContent` (aka `sr_discard_items`),
which is now used to ensure that matching content from "previous
sources" is discarded. These "previous sources" are either content of
`running`, or stuff that was stored/pushed by other sessions with
lower priority. It *cannot* be used to remove stuff that was
previously pushed by the current session.
- `Session::discardOperationalChanges` (aka `sr_discard_oper_changes`)
discards previously pushed content from *this session*.
- It is now possible to fully manage the edit (which incrementally
builds the `operational` DS) of the current session. Use
`Session::operationalChanges()` to retrieve a full libyang::DataNode
forest, modify it in whichever ways are needed, and store it back via
`Session::editBatch(..., sysrepo::DefaultOperation::Replace)` followed
by `Session::applyChanges()`.
Change-Id: Iba05a88411fd4c47c03d8c2b48cb7aadfd5dcd2a
0 commit comments