From 3f566e5d24c17abd9643dd854b11d4345231a2e1 Mon Sep 17 00:00:00 2001 From: Sangwook Ha Date: Thu, 15 Dec 2022 17:06:05 -0800 Subject: [PATCH] Do not send 'commit' to the devices without candidate The 'commit' RPC should not be sent to the devices only with 'writable-running' and without 'candidate' capability. Override the commit method for the 'Running' NetconfDataTreeService to immediately return a DomRpcResult without any errors. JIRA: NETCONF-933 Change-Id: Ic0e51135e3ae347213d8ef8dbc03deb282d47af3 Signed-off-by: Sangwook Ha --- .../connect/netconf/sal/AbstractNetconfDataTreeService.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/sal/AbstractNetconfDataTreeService.java b/netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/sal/AbstractNetconfDataTreeService.java index 22c2f27684..694b81365b 100644 --- a/netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/sal/AbstractNetconfDataTreeService.java +++ b/netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/sal/AbstractNetconfDataTreeService.java @@ -84,6 +84,12 @@ public abstract class AbstractNetconfDataTreeService implements NetconfDataTreeS return RPC_SUCCESS; } + @Override + public ListenableFuture commit() { + // No candidate, hence we commit immediately + return RPC_SUCCESS; + } + @Override ListenableFuture lockSingle() { return netconfOps.lockRunning(new NetconfRpcFutureCallback("Lock running", id)); -- 2.36.6