Prepare NetworkModel to support ordm 2.2.x devices
[transportpce.git] / networkmodel / src / main / java / org / opendaylight / transportpce / networkmodel / listeners / LldpListener.java
index 276ca0e727440dc91b2cf751d6e4543d4e68a507..e76ad29959af10e2b34d8b93637a1e1d92d823f5 100644 (file)
@@ -8,7 +8,6 @@
 
 package org.opendaylight.transportpce.networkmodel.listeners;
 
-import org.opendaylight.transportpce.networkmodel.R2RLinkDiscovery;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.lldp.rev161014.LldpNbrInfoChange;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.lldp.rev161014.OrgOpenroadmLldpListener;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.types.rev161014.ResourceNotificationType;
@@ -19,11 +18,10 @@ import org.slf4j.LoggerFactory;
 public class LldpListener implements OrgOpenroadmLldpListener {
 
     private static final Logger LOG = LoggerFactory.getLogger(LldpListener.class);
-    private final R2RLinkDiscovery linkDiscovery;
+    //private final R2RLinkDiscovery linkDiscovery;
     private final NodeId nodeId;
 
-    public LldpListener(final R2RLinkDiscovery linkDiscovery, final String nodeId) {
-        this.linkDiscovery = linkDiscovery;
+    public LldpListener(final String nodeId) {
         this.nodeId = new NodeId(nodeId);
     }
 
@@ -35,13 +33,13 @@ public class LldpListener implements OrgOpenroadmLldpListener {
     public void onLldpNbrInfoChange(LldpNbrInfoChange notification) {
         LOG.info("Notification {} received {}", LldpNbrInfoChange.QNAME, notification);
         if (notification.getNotificationType().equals(ResourceNotificationType.ResourceCreation)) {
-            linkDiscovery.createR2RLink(nodeId,notification.getResource(),
+            /*linkDiscovery.createR2RLink(nodeId,notification.getResource(),
                                                 notification.getNbrInfo().getRemoteSysName(),
-                                                notification.getNbrInfo().getRemotePortId());
+                                                notification.getNbrInfo().getRemotePortId());*/
         } else if (notification.getNotificationType().equals(ResourceNotificationType.ResourceDeletion)) {
-            linkDiscovery.deleteR2RLink(nodeId,notification.getResource(),
+            /*linkDiscovery.deleteR2RLink(nodeId,notification.getResource(),
                                                 notification.getNbrInfo().getRemoteSysName(),
-                                                notification.getNbrInfo().getRemotePortId());
+                                                notification.getNbrInfo().getRemotePortId());*/
         }
     }
 }