Merge "Enhance debug capabilities"
[controller.git] / opendaylight / switchmanager / implementation / src / main / java / org / opendaylight / controller / switchmanager / internal / SwitchManager.java
index 49cdabfeb3055a3f8a3a35237ec1e6168f84d09e..0581aa49ea574a214faf2c78acfbf9ecb449ceb1 100644 (file)
@@ -414,9 +414,8 @@ public class SwitchManager implements ISwitchManager, IConfigurationContainerAwa
         }
         for (InetAddress i : IPs) {
             Subnet existingSubnet = subnets.get(i);
-            if ((existingSubnet != null)
-                    && !existingSubnet.isMutualExclusive(newSubnet)) {
-                return new Status(StatusCode.CONFLICT);
+            if ((existingSubnet != null) && !existingSubnet.isMutualExclusive(newSubnet)) {
+                return new Status(StatusCode.CONFLICT, "This subnet conflicts with an existing one.");
             }
         }
         return new Status(StatusCode.SUCCESS);
@@ -434,7 +433,7 @@ public class SwitchManager implements ISwitchManager, IConfigurationContainerAwa
             // Presence check
             if (subnetsConfigList.containsKey(conf.getName())) {
                 return new Status(StatusCode.CONFLICT,
-                        "Subnet with the specified name already configured.");
+                        "Subnet with the specified name already exists.");
             }
             // Semantic check
             status = semanticCheck(conf);