Lock datastore for call-home devices 80/104080/3
authorIvan Hrasko <ivan.hrasko@pantheon.tech>
Thu, 19 Jan 2023 09:07:51 +0000 (10:07 +0100)
committerRobert Varga <nite@hq.sk>
Tue, 24 Jan 2023 10:29:53 +0000 (10:29 +0000)
Netconf callhome does not obey default datastore values as defined
in odl-netconf-device.yang model.

We have to set datastore lock to true manually when creating
configuration node.

This way we can prevent error when we are unable to connect callhome
device because of already closed session.

JIRA: NETCONF-942
Change-Id: I98bc0e01d8d5bd3c2fdd3f4c57546656db61569c
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallHomeMountSessionContext.java

index 68d8961d8985e032475c02374e8713562d3accb2..c13b070e473df8773f6568fb52b0003cc699e43a 100644 (file)
@@ -99,6 +99,7 @@ class CallHomeMountSessionContext {
                                 .setUsername("omitted")
                                 .setPassword("omitted")
                                 .build())
+                        .setLockDatastore(true)
                     .build())
                 .build();
     }