NetworkModelListener implementation (interface D)
[transportpce.git] / networkmodel / src / main / java / org / opendaylight / transportpce / networkmodel / NetConfTopologyListener.java
index 88382548d6a355dc78b365f93015415a2e68c3ec..b2c5001d4aa484983a4a9f58c36fe63f192fd1b3 100644 (file)
@@ -7,8 +7,7 @@
  */
 package org.opendaylight.transportpce.networkmodel;
 
-//import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-//even with @SuppressFBwarnings generate a checkstyles error...
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
@@ -72,10 +71,11 @@ public class NetConfTopologyListener implements DataTreeChangeListener<Node> {
         this.registrations22 = new ConcurrentHashMap<>();
     }
 
+    @SuppressFBWarnings(
+        value = "RV_RETURN_VALUE_IGNORED",
+        justification = "nothing to verify once rpc has been sent")
     private void onDeviceConnected(final String nodeId, String openRoadmVersion) {
         LOG.info("onDeviceConnected: {}", nodeId);
-        LOG.info(StringConstants.OPENROADM_DEVICE_VERSION_1_2_1);
-        LOG.info(openRoadmVersion);
         Optional<MountPoint> mountPointOpt = this.deviceTransactionManager.getDeviceMountPoint(nodeId);
         MountPoint mountPoint;
         if (mountPointOpt.isPresent()) {
@@ -105,7 +105,8 @@ public class NetConfTopologyListener implements DataTreeChangeListener<Node> {
                 accessDeOperationasNotificationListenerRegistration =
                 notificationService.get().registerNotificationListener(deOperationsListener);
 
-            final OrgOpenroadmDeviceListener deviceListener = new DeviceListener();
+            final OrgOpenroadmDeviceListener deviceListener = new DeviceListener(this.deviceTransactionManager,
+                    nodeId, this.networkModelService);
             LOG.info("Registering notification listener on OrgOpenroadmDeviceListener for node: {}", nodeId);
             final ListenerRegistration<OrgOpenroadmDeviceListener> accessDeviceNotificationListenerRegistration =
                 notificationService.get().registerNotificationListener(deviceListener);
@@ -213,7 +214,9 @@ public class NetConfTopologyListener implements DataTreeChangeListener<Node> {
     }
 
     @Override
-    //@SuppressFBwarnings("SF_SWITCH_FALLTHROUGH")
+    @SuppressFBWarnings(
+        value = "SF_SWITCH_FALLTHROUGH",
+        justification = "intentional fallthrough")
     public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<Node>> changes) {
         LOG.info("onDataTreeChanged");
         for (DataTreeModification<Node> change : changes) {