Add fixme to NetconfNodeUtils 95/104295/3
authorIvan Hrasko <ivan.hrasko@pantheon.tech>
Tue, 7 Feb 2023 13:41:00 +0000 (14:41 +0100)
committerRobert Varga <nite@hq.sk>
Wed, 8 Feb 2023 09:46:22 +0000 (09:46 +0000)
NetconfNodeUtils#extractUserCapabilities method is creating
UserPreferences from NetconfSessionPreferences.

Here the purpose is unclear because NetconfSessionPreferences
are (re)created in NetconfDeviceCommunicator#onSessionUp.

Change-Id: I78ae38ffbd327b29dd29753b8b61d1e9c07bf55b
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
apps/netconf-topology/src/main/java/org/opendaylight/netconf/topology/spi/NetconfNodeUtils.java

index 657a66d3b9ea15f4ff826186f790e4ac63083a8b..ce6b1132c0997d54d920d0bdceb6e905fb8fb7fa 100644 (file)
@@ -118,6 +118,9 @@ public final class NetconfNodeUtils {
             overrideNonModuleCaps = false;
         }
 
+        // FIXME: UserPreferences is constructor parameter of NetconfDeviceCommunicator and NetconfSessionPreferences
+        // are created in NetconfDeviceCommunicator#onSessionUp from session. What are we doing here?
+        // IMO we should rework UserPreferences and NetconfSessionPreferences and this method.
         return new UserPreferences(NetconfSessionPreferences.fromStrings(capabilities, CapabilityOrigin.UserDefined),
             overrideYangModuleCaps, overrideNonModuleCaps);
     }