BUG-335 Fix For Bug #335 03/6403/1
authorMoiz Raja <moraja@cisco.com>
Tue, 28 Jan 2014 10:54:31 +0000 (16:24 +0530)
committerMoiz Raja <moraja@cisco.com>
Fri, 25 Apr 2014 21:31:52 +0000 (14:31 -0700)
Bug Description : Remove SW2 property "description" to a node - not working for both OF13 and OF10 mininet.

Change-Id: I8d5145e4137696b3592e06a21c55e04b3c8b7122
Signed-off-by: goyal <sheena.goyal@tcs.com>
Signed-off-by: Moiz Raja <moraja@cisco.com>
opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java

index ca6987ad6cf23cb3fa142b8d6747da0cc3fa0a8e..19f45e63c591dbde396e0929141c5c042a55adf5 100644 (file)
@@ -839,9 +839,14 @@ public class SwitchManager implements ISwitchManager, IConfigurationContainerAwa
             String prop = entry.getKey();
             if (!updateProperties.containsKey(prop)) {
                 if (prop.equals(Description.propertyName)) {
-                    if (!advertisedDesc.isEmpty()) {
-                        Property desc = new Description(advertisedDesc);
-                        propMap.put(Description.propertyName, desc);
+                    if (advertisedDesc != null) {
+                        if (!advertisedDesc.isEmpty()) {
+                            Property desc = new Description(advertisedDesc);
+                            propMap.put(Description.propertyName, desc);
+                        }
+                    }
+                    else {
+                        propMap.remove(prop);
                     }
                     continue;
                 } else if (prop.equals(ForwardingMode.name)) {