From 771dfd2173c134df392458eb51037cb3920cb4c9 Mon Sep 17 00:00:00 2001 From: Alessandro Boch Date: Wed, 10 Apr 2013 16:30:35 -0700 Subject: [PATCH] ISSUE: After controller restart, proactive flows are not installed 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 --- .../controller/switchmanager/internal/SwitchManagerImpl.java | 3 ++- .../java/org/opendaylight/controller/devices/web/Devices.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/opendaylight/switchmanager/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManagerImpl.java b/opendaylight/switchmanager/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManagerImpl.java index 54508de6d2..c4f4b111e3 100755 --- a/opendaylight/switchmanager/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManagerImpl.java +++ b/opendaylight/switchmanager/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManagerImpl.java @@ -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()); diff --git a/opendaylight/web/devices/src/main/java/org/opendaylight/controller/devices/web/Devices.java b/opendaylight/web/devices/src/main/java/org/opendaylight/controller/devices/web/Devices.java index 5371f708de..ff6fc835f9 100644 --- a/opendaylight/web/devices/src/main/java/org/opendaylight/controller/devices/web/Devices.java +++ b/opendaylight/web/devices/src/main/java/org/opendaylight/controller/devices/web/Devices.java @@ -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) -- 2.36.6