X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=networkmodel%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Fnetworkmodel%2Flisteners%2FLldpListener.java;h=e3b08e560980d1970cf82aac68f3f375a2352ae6;hb=HEAD;hp=90d8d80dbff3a56fdcdc78d76fc5f32be1d1a829;hpb=e9ff01802d87203416f6af280c0590c22ed75538;p=transportpce.git diff --git a/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/listeners/LldpListener.java b/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/listeners/LldpListener.java index 90d8d80db..e3b08e560 100644 --- a/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/listeners/LldpListener.java +++ b/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/listeners/LldpListener.java @@ -8,17 +8,16 @@ package org.opendaylight.transportpce.networkmodel.listeners; +import org.eclipse.jdt.annotation.NonNull; +import org.opendaylight.mdsal.binding.api.NotificationService.Listener; 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; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class LldpListener implements OrgOpenroadmLldpListener { +public class LldpListener implements Listener { private static final Logger LOG = LoggerFactory.getLogger(LldpListener.class); - //private final R2RLinkDiscovery linkDiscovery; private final NodeId nodeId; public LldpListener(final String nodeId) { @@ -30,16 +29,7 @@ public class LldpListener implements OrgOpenroadmLldpListener { * @param notification LldpNbrInfoChange object */ @Override - public void onLldpNbrInfoChange(LldpNbrInfoChange notification) { - LOG.info("Notification {} received {}", LldpNbrInfoChange.QNAME, notification); - if (notification.getNotificationType().equals(ResourceNotificationType.ResourceCreation)) { - /*linkDiscovery.createR2RLink(nodeId,notification.getResource(), - notification.getNbrInfo().getRemoteSysName(), - notification.getNbrInfo().getRemotePortId());*/ - } else if (notification.getNotificationType().equals(ResourceNotificationType.ResourceDeletion)) { - /*linkDiscovery.deleteR2RLink(nodeId,notification.getResource(), - notification.getNbrInfo().getRemoteSysName(), - notification.getNbrInfo().getRemotePortId());*/ - } + public void onNotification(@NonNull LldpNbrInfoChange notification) { + LOG.info("Notification {} received {} on node {}", LldpNbrInfoChange.QNAME, notification, nodeId); } }