makes renderer ignore controller-config 55/62455/2
authorCédric Ollivier <cedric.ollivier@orange.com>
Wed, 30 Aug 2017 16:02:18 +0000 (18:02 +0200)
committerguillaume.lambert <guillaume.lambert@orange.com>
Thu, 31 Aug 2017 15:45:01 +0000 (17:45 +0200)
The ODL controller exposes a northbound netconf connector automatically
loaded at karaf start-up under the node-id 'controller-config'.
This connector advertises supported (openroadm) southbound capabilities
but, strictly spoken, it is not an openroadm device.
The renderer should not interact with it.

Change-Id: I366065360b9ba0d90073a9f8739a749eb78315da
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
renderer/src/main/java/org/opendaylight/transportpce/renderer/RendererNotificationsImpl.java

index 6c1388840d7daaa2def67faea716388995068068..86700bc86828fc16667f5e7d5bdd4836eb7522bb 100644 (file)
@@ -182,6 +182,11 @@ public class RendererNotificationsImpl implements DataTreeChangeListener<Node> {
                 nodeId = rootNode.getDataAfter().getKey().getNodeId().getValue();
             }
             if (nnode != null) {
+                if (nodeId.equals("controller-config")) {
+                    // We shouldn't process controller-config as an OpenROAM device
+                    LOG.info("{} ignored: org-openroadm-device advertised but not a real ROADM device", nodeId);
+                    return;
+                }
                 if (rootNode.getModificationType() == ModificationType.WRITE) {
                     LOG.info("Node added " + nodeId);
 
@@ -224,4 +229,4 @@ public class RendererNotificationsImpl implements DataTreeChangeListener<Node> {
             }
         }
     }
-}
\ No newline at end of file
+}