-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
API/ABI break: Change how pushed ops data work
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
- Loading branch information
Showing
6 changed files
with
128 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters