Revert "Allow to disable default gw feature" 53/6953/2
authorEd Warnicke <eaw@cisco.com>
Tue, 13 May 2014 15:55:50 +0000 (10:55 -0500)
committerEd Warnicke <eaw@cisco.com>
Thu, 15 May 2014 00:44:15 +0000 (19:44 -0500)
This reverts commit b10374443562bed1960c06bb85767d8c270436dd.

Change-Id: Ib3f84575277e57e4d1afe4226fc1898fece9e9e8
Signed-off-by: Ed Warnicke <eaw@cisco.com>
opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java

index e95ab8095d08c8b3fcf80094fc958d0053b4d256..07252b06f78dfb2a80a4c88d112f6b3f41fd5422 100644 (file)
@@ -115,9 +115,6 @@ public class SwitchManager implements ISwitchManager, IConfigurationContainerAwa
      * only subnet returned. As soon as a user-configured subnet is created this one will
      * vanish.
      */
-    private static final String DISABLE_DEFAULT_SUBNET_PROP = "switchmanager.disableDefaultSubnetGateway";
-    private static final String DISABLE_DEFAULT_SUBNET_PROP_VAL = System.getProperty(DISABLE_DEFAULT_SUBNET_PROP);
-    private static final boolean USE_DEFAULT_SUBNET_GW = !Boolean.valueOf(DISABLE_DEFAULT_SUBNET_PROP_VAL);
     protected static final SubnetConfig DEFAULT_SUBNETCONFIG;
     protected static final Subnet DEFAULT_SUBNET;
     protected static final String DEFAULT_SUBNET_NAME = "default (cannot be modifed)";
@@ -291,9 +288,9 @@ public class SwitchManager implements ISwitchManager, IConfigurationContainerAwa
     @Override
     public List<SubnetConfig> getSubnetsConfigList() {
         // if there are no subnets, return the default subnet
-        if (USE_DEFAULT_SUBNET_GW && subnetsConfigList.isEmpty()) {
+        if(subnetsConfigList.size() == 0){
             return Collections.singletonList(DEFAULT_SUBNETCONFIG);
-        } else {
+        }else{
             return new ArrayList<SubnetConfig>(subnetsConfigList.values());
         }
     }
@@ -301,9 +298,9 @@ public class SwitchManager implements ISwitchManager, IConfigurationContainerAwa
     @Override
     public SubnetConfig getSubnetConfig(String subnet) {
         // if there are no subnets, return the default subnet
-        if (USE_DEFAULT_SUBNET_GW && subnetsConfigList.isEmpty() && subnet.equalsIgnoreCase(DEFAULT_SUBNET_NAME)) {
+        if(subnetsConfigList.isEmpty() && subnet.equalsIgnoreCase(DEFAULT_SUBNET_NAME)){
             return DEFAULT_SUBNETCONFIG;
-        } else {
+        }else{
             return subnetsConfigList.get(subnet);
         }
     }