Missing notification model. 84/95284/4
authorIaroslav <iaroslav.kholiavko@pantheon.tech>
Mon, 22 Feb 2021 16:33:17 +0000 (18:33 +0200)
committerTomas Cere <tomas.cere@pantheon.tech>
Mon, 15 Mar 2021 13:45:14 +0000 (13:45 +0000)
In case server provides schema it should check if notifications
supported by the remote session. According to this it should provide schema
with notifications or without.

JIRA: NETCONF-754
Change-Id: Ifc37ebded7051aabf9150f9f49ecadaf81746261
Signed-off-by: Iaroslav <iaroslav.kholiavko@pantheon.tech>
netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/NetconfDevice.java

index 42ce7987f2b9fef0f37f4da3fa135b64381009d5..f48d57812fc2cf40e47ba9d63aadcc8a8acb4a89 100644 (file)
@@ -182,7 +182,7 @@ public class NetconfDevice
             @Override
             public void onSuccess(final MountPointContext result) {
                 handleSalInitializationSuccess(result, remoteSessionCapabilities,
-                    getDeviceSpecificRpc(result, listener), listener);
+                        getDeviceSpecificRpc(result, listener, baseSchema), listener);
             }
 
             @Override
@@ -373,9 +373,9 @@ public class NetconfDevice
     }
 
     protected NetconfDeviceRpc getDeviceSpecificRpc(final MountPointContext result,
-            final RemoteDeviceCommunicator<NetconfMessage> listener) {
+            final RemoteDeviceCommunicator<NetconfMessage> listener, final BaseSchema schema) {
         return new NetconfDeviceRpc(result.getEffectiveModelContext(), listener,
-            new NetconfMessageTransformer(result, true, baseSchemas.getBaseSchema()));
+            new NetconfMessageTransformer(result, true, schema));
     }
 
     /**