mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
package/klish-plugin-sysrepo: refactor nacm after sysrepo change
Upstream sysrepo commit 90ce1f7 modified sr_nacm_init() to explicitly switch the session to SR_DS_RUNNING before initializing NACM. This broke our klish workflow which started sessions on SR_DS_CANDIDATE. This commit drops the sysrepo patch that reverts that behavior in favor of explicitly starting sessions on SR_DS_RUNNING for NACM initialization, then switch to SR_DS_CANDIDATE for editing operations. This works with sysrepo's behavior: NACM reads rules from running datastore while our editing workflow operates on candidate datastore. Also, add prompt path shortening for deep configuration hierarchies. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 9d9d33b873917ca5d0bdcc47a36d2fd385971ab0c045d1472fcadf95ee5bcf5b LICENCE
|
||||
sha256 db6317f2dbe68fea22e83b32fa1a7b05b13257f6e750233f3d40de2240ae191b klish-plugin-sysrepo-a1156954447ac663409b143dc67da7c15cf649ff-git4.tar.gz
|
||||
sha256 57af0fd9eb59bcabc1ced229dab85b69cde36301e4a66f91c127f2aff73ebb07 klish-plugin-sysrepo-a0f348a2716df805c85f3b5403180fcc7c1b9e8d-git4.tar.gz
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
KLISH_PLUGIN_SYSREPO_VERSION = a1156954447ac663409b143dc67da7c15cf649ff
|
||||
KLISH_PLUGIN_SYSREPO_VERSION = a0f348a2716df805c85f3b5403180fcc7c1b9e8d
|
||||
KLISH_PLUGIN_SYSREPO_SITE = https://github.com/kernelkit/klish-plugin-sysrepo.git
|
||||
#KLISH_PLUGIN_SYSREPO_VERSION = cdd3eb51a7f7ee0ed5bd925fa636061d3b1b85fb
|
||||
#KLISH_PLUGIN_SYSREPO_SITE = https://src.libcode.org/pkun/klish-plugin-sysrepo.git
|
||||
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
From 8b2f7f3b952b768a44d491258aba9f343686d546 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= <lazzer@gmail.com>
|
||||
Date: Sun, 21 Dec 2025 10:44:28 +0100
|
||||
Subject: [PATCH 9/9] Problem runnning from candidate datastore and init nacm
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Organization: Wires
|
||||
|
||||
In this case the datastore will be switched and the caller
|
||||
will operate on runnning datastore.
|
||||
|
||||
Revert "nacm BUGFIX always use the correct DS"
|
||||
|
||||
This reverts commit 90ce1f7fbc444309f41a19e4c9fafe8a771c8a66.
|
||||
|
||||
Signed-off-by: Mattias Walström <lazzer@gmail.com>
|
||||
---
|
||||
src/utils/nacm.c | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/src/utils/nacm.c b/src/utils/nacm.c
|
||||
index 3183cec1..138405e5 100644
|
||||
--- a/src/utils/nacm.c
|
||||
+++ b/src/utils/nacm.c
|
||||
@@ -1021,8 +1021,6 @@ sr_nacm_init(sr_session_ctx_t *session, uint32_t opts, sr_subscription_ctx_t **s
|
||||
pthread_mutex_init(&nacm.lock, NULL);
|
||||
|
||||
/* subscribe to all the relevant config data */
|
||||
- sr_session_switch_ds(session, SR_DS_RUNNING);
|
||||
-
|
||||
mod_name = "ietf-netconf-acm";
|
||||
xpath = "/ietf-netconf-acm:nacm";
|
||||
SR_CONFIG_SUBSCR(session, sub, mod_name, xpath, opts, sr_nacm_nacm_params_cb);
|
||||
--
|
||||
2.43.0
|
||||
|
||||
Reference in New Issue
Block a user