Added logging on sender side of topology notifications
Change-Id: I556d7893375e5de3b00e8fcc0ec7724441b25768
diff --git a/src/main/java/net/onrc/onos/core/topology/TopologyManager.java b/src/main/java/net/onrc/onos/core/topology/TopologyManager.java
index 178bd00..0dac65f 100644
--- a/src/main/java/net/onrc/onos/core/topology/TopologyManager.java
+++ b/src/main/java/net/onrc/onos/core/topology/TopologyManager.java
@@ -513,12 +513,14 @@
public void putSwitchDiscoveryEvent(SwitchEvent switchEvent,
Collection<PortEvent> portEvents) {
if (datastore.addSwitch(switchEvent, portEvents)) {
+ log.debug("Sending add switch: {}", switchEvent);
// Send out notification
TopologyEvent topologyEvent = new TopologyEvent(switchEvent);
eventChannel.addEntry(topologyEvent.getID(), topologyEvent);
// Send out notification for each port
for (PortEvent portEvent : portEvents) {
+ log.debug("Sending add port: {}", portEvent);
topologyEvent = new TopologyEvent(portEvent);
eventChannel.addEntry(topologyEvent.getID(), topologyEvent);
}
@@ -576,6 +578,7 @@
}
if (datastore.deactivateSwitch(switchEvent, oldPortEvents.values())) {
+ log.debug("Sending remove switch: {}", switchEvent);
// Send out notification
eventChannel.removeEntry(switchEvent.getID());
@@ -587,6 +590,7 @@
// and the deactiveSwitch() call above already removed all ports.
//
for (PortEvent portEvent : oldPortEvents.values()) {
+ log.debug("Sending remove port:", portEvent);
eventChannel.removeEntry(portEvent.getID());
}
discoveredAddedPortEvents.remove(switchEvent.getDpid());
@@ -621,6 +625,7 @@
@Override
public void putPortDiscoveryEvent(PortEvent portEvent) {
if (datastore.addPort(portEvent)) {
+ log.debug("Sending add port: {}", portEvent);
// Send out notification
TopologyEvent topologyEvent = new TopologyEvent(portEvent);
eventChannel.addEntry(topologyEvent.getID(), topologyEvent);
@@ -646,6 +651,7 @@
@Override
public void removePortDiscoveryEvent(PortEvent portEvent) {
if (datastore.deactivatePort(portEvent)) {
+ log.debug("Sending remove port: {}", portEvent);
// Send out notification
eventChannel.removeEntry(portEvent.getID());
@@ -699,6 +705,7 @@
@Override
public void putLinkDiscoveryEvent(LinkEvent linkEvent) {
if (datastore.addLink(linkEvent)) {
+ log.debug("Sending add link: {}", linkEvent);
// Send out notification
TopologyEvent topologyEvent = new TopologyEvent(linkEvent);
eventChannel.addEntry(topologyEvent.getID(), topologyEvent);
@@ -724,6 +731,7 @@
@Override
public void removeLinkDiscoveryEvent(LinkEvent linkEvent) {
if (datastore.removeLink(linkEvent)) {
+ log.debug("Sending remove link: {}", linkEvent);
// Send out notification
eventChannel.removeEntry(linkEvent.getID());