X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fprotocol_plugins%2Fopenflow%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fprotocol_plugin%2Fopenflow%2Finternal%2FInventoryServiceShim.java;h=e2d77b5b73f1b1c3c73da363b2f40949319c0a0a;hb=c7388fec7184e926b4f6c446cedfbc6dd0bb6895;hp=f7210a333bd870d87216128b73cffb8a8402842f;hpb=2aa5c39bdd7c498a3b33db434d3943c130e05bc8;p=controller.git diff --git a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/InventoryServiceShim.java b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/InventoryServiceShim.java index f7210a333b..e2d77b5b73 100644 --- a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/InventoryServiceShim.java +++ b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/InventoryServiceShim.java @@ -236,6 +236,8 @@ public class InventoryServiceShim implements IContainerListener, @Override public void tagUpdated(String containerName, Node n, short oldTag, short newTag, UpdateType t) { + logger.debug("tagUpdated: {} type {} for container {}", new Object[] { + n, t, containerName }); } @Override @@ -246,6 +248,8 @@ public class InventoryServiceShim implements IContainerListener, @Override public void nodeConnectorUpdated(String containerName, NodeConnector p, UpdateType t) { + logger.debug("nodeConnectorUpdated: {} type {} for container {}", + new Object[] { p, t, containerName }); if (this.containerMap == null) { logger.error("containerMap is NULL"); return; @@ -283,6 +287,7 @@ public class InventoryServiceShim implements IContainerListener, // notify InventoryService notifyInventoryShimInternalListener(containerName, p, t, null); + notifyInventoryShimInternalListener(containerName, p.getNode(), t, null); } private void notifyInventoryShimExternalListener(Node node, @@ -308,7 +313,7 @@ public class InventoryServiceShim implements IContainerListener, type, props); logger.trace( "notifyInventoryShimInternalListener {} type {} for container {}", - nodeConnector, type, container); + new Object[] { nodeConnector, type, container }); } } @@ -373,6 +378,18 @@ public class InventoryServiceShim implements IContainerListener, notifyInventoryShimExternalListener(node, type, props); } + private void notifyInventoryShimInternalListener(String container, + Node node, UpdateType type, Set props) { + IInventoryShimInternalListener inventoryShimInternalListener = inventoryShimInternalListeners + .get(container); + if (inventoryShimInternalListener != null) { + inventoryShimInternalListener.updateNode(node, type, props); + logger.trace( + "notifyInventoryShimInternalListener {} type {} for container {}", + new Object[] { node, type, container }); + } + } + private void addNode(ISwitch sw) { Node node; try {