ISSUE: After controller restart, proactive flows are not installed 32/132/2
authorAlessandro Boch <aboch@cisco.com>
Wed, 10 Apr 2013 23:30:35 +0000 (16:30 -0700)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 11 Apr 2013 18:29:21 +0000 (18:29 +0000)
This is because of an incongruence between Devices.web and SwitchManagerImpl code, where the
former only consider the Node.nodeID string form and the latter expects the full Node string form.
CHANGE:
Have Devices.web passing Node.toString() form to front-end

Change-Id: I04443178099f151b37b76d4f8a5e41cee64f5ecb
Signed-off-by: Alessandro Boch <aboch@cisco.com>
opendaylight/switchmanager/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManagerImpl.java
opendaylight/web/devices/src/main/java/org/opendaylight/controller/devices/web/Devices.java

index 54508de..c4f4b11 100755 (executable)
@@ -582,6 +582,7 @@ public class SwitchManagerImpl implements ISwitchManager,
         }
     }
 
+    @Override
     public void updateSwitchConfig(SwitchConfig cfgObject) {
         boolean modeChange = false;
 
@@ -736,7 +737,7 @@ public class SwitchManagerImpl implements ISwitchManager,
         // copy node properties from config
         boolean proactiveForwarding = false;
         if (nodeConfigList != null) {
-            String nodeId = node.getNodeIDString();
+            String nodeId = node.toString();
             for (SwitchConfig conf : nodeConfigList.values()) {
                 if (conf.getNodeId().equals(nodeId)) {
                     Property description = new Description(conf.getNodeDescription());
index 5371f70..ff6fc83 100644 (file)
@@ -95,7 +95,7 @@ public class Devices implements IDaylightWeb {
 
             nodeDatum.put("containerName", containerName);
             nodeDatum.put("nodeName", switchManager.getNodeDescription(node));
-            nodeDatum.put("nodeId", node.getNodeIDString());
+            nodeDatum.put("nodeId", node.toString());//.getNodeIDString());
             int tierNumber = (tier == null) ? TierHelper.unknownTierNumber
                     : tier.getValue();
             nodeDatum.put("tierName", TierHelper.getTierName(tierNumber)