Checkstyle: enforce spaces vs TABs 94/36494/1
authorLorand Jakab <lojakab@cisco.com>
Mon, 21 Mar 2016 12:50:36 +0000 (14:50 +0200)
committerLorand Jakab <lojakab@cisco.com>
Mon, 21 Mar 2016 12:50:36 +0000 (14:50 +0200)
Change-Id: I8e33680ae5c75ca544a77f863e78b8466ce12e3f
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
commons/build_tools/src/main/resources/checkstyle/java_rules.xml
mappingservice/neutron/src/main/java/org/opendaylight/lispflowmapping/neutron/LispNeutronNetworkHandler.java
mappingservice/neutron/src/main/java/org/opendaylight/lispflowmapping/neutron/LispNeutronService.java
mappingservice/neutron/src/main/java/org/opendaylight/lispflowmapping/neutron/LispNeutronSubnetHandler.java

index b4b6efcc9292146c8f6da7a632627d1942040d12..7054836723fc231c12038c49ac8a9de277ba4fc3 100644 (file)
@@ -5,11 +5,9 @@
 
 <module name="Checker">
 
-    <!--
     <module name="FileTabCharacter">
         <property name="eachLine" value="true"/>
     </module>
-    -->
 
     <module name="RegexpSingleline">
         <!-- \s matches whitespace character, $ matches end of line. -->
index 35fa0cd1cec0d495cceec7a80c20ce43acb45e82..07020e201adedae95fab004403c26bd2e69c937a 100644 (file)
@@ -20,50 +20,50 @@ import org.opendaylight.neutron.spi.NeutronNetwork;
 public class LispNeutronNetworkHandler extends LispNeutronService implements INeutronNetworkAware {
 
 
-       @Override
-       public int canCreateNetwork(NeutronNetwork network) {
+    @Override
+    public int canCreateNetwork(NeutronNetwork network) {
         LOG.info("Neutron canCreateNetwork : Network name: " + network.getNetworkName());
         LOG.debug("Lisp Neutron Network: " + network.toString());
 
         return HttpURLConnection.HTTP_OK;
-       }
+    }
 
-       @Override
-       public void neutronNetworkCreated(NeutronNetwork network) {
+    @Override
+    public void neutronNetworkCreated(NeutronNetwork network) {
         LOG.info("Neutron Network Created : Network name: " + network.getNetworkName());
         LOG.debug("Lisp Neutron Network: " + network.toString());
 
-       }
+    }
 
-       @Override
-       public int canUpdateNetwork(NeutronNetwork delta, NeutronNetwork original) {
+    @Override
+    public int canUpdateNetwork(NeutronNetwork delta, NeutronNetwork original) {
         LOG.info("Neutron canUpdateNetwork : Network name: " + original.getNetworkName());
         LOG.debug("Lisp Neutron Network: " + original.toString());
 
         return HttpURLConnection.HTTP_OK;
-       }
+    }
 
-       @Override
-       public void neutronNetworkUpdated(NeutronNetwork network) {
+    @Override
+    public void neutronNetworkUpdated(NeutronNetwork network) {
         LOG.info("Neutron Network Updated : Network name: " + network.getNetworkName());
         LOG.debug("Lisp Neutron Network: " + network.toString());
 
-       }
+    }
 
-       @Override
-       public int canDeleteNetwork(NeutronNetwork network) {
+    @Override
+    public int canDeleteNetwork(NeutronNetwork network) {
         LOG.info("Neutron canDeleteNetwork : Network name: " + network.getNetworkName());
         LOG.debug("Lisp Neutron Network: " + network.toString());
 
         return HttpURLConnection.HTTP_OK;
-       }
+    }
 
-       @Override
-       public void neutronNetworkDeleted(NeutronNetwork network) {
+    @Override
+    public void neutronNetworkDeleted(NeutronNetwork network) {
         LOG.info("Neutron Network Deleted : Network name: " + network.getNetworkName());
         LOG.debug("Lisp Neutron Network: " + network.toString());
 
         return;
-       }
+    }
 
 }
index 599cbc1dfe2e1e4fa3fc0ee4667e42ab20e1274b..bbaf7f61884dce4878db4416c556249db2f1e84d 100644 (file)
@@ -21,7 +21,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev15090
 
 public class LispNeutronService implements ILispNeutronService, BindingAwareProvider  {
 
-       protected static final Logger LOG = LoggerFactory.getLogger(LispNeutronService.class);
+    protected static final Logger LOG = LoggerFactory.getLogger(LispNeutronService.class);
     private IFlowMapping mappingService;
     private OdlMappingserviceService lfmDbService;
     private static ILispNeutronService neutronService;
index 191fa3b4e739dcce47db13771cd6693994030226..80def3894ead5a46de0a06f0a549659a2ae845c6 100644 (file)
@@ -26,136 +26,136 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.ei
  *
  */
 public class LispNeutronSubnetHandler extends LispNeutronService implements
-               INeutronSubnetAware {
-       private static final Integer SIX = Integer.valueOf(6);
-
-       // The implementation for each of these services is resolved by the OSGi
-       // Service Manager
-       private volatile ILispNeutronService lispNeutronService;
-
-       @Override
-       public int canCreateSubnet(NeutronSubnet subnet) {
-               LOG.info("Neutron canCreateSubnet : Subnet name: " + subnet.getName()
-                               + " Subnet Cidr: " + subnet.getCidr());
-               LOG.debug("Lisp Neutron Subnet: " + subnet.toString());
-               if (SIX.equals(subnet.getIpVersion())) {
-                       return HttpURLConnection.HTTP_PARTIAL;
-               }
-               return HttpURLConnection.HTTP_OK;
-       }
-
-       /**
-        * Method adds the newly created subnet as an EID prefix to the
-        * MappingService. The subnet's network UUID is used as the key for this EID
-        * prefix.
-        *
-        */
-       @Override
-       public void neutronSubnetCreated(NeutronSubnet subnet) {
-               // TODO update for multi-tenancy
-
-               LOG.info("Neutron Subnet Created request : Subnet name: "
-                               + subnet.getName() + " Subnet Cidr: " + subnet.getCidr());
-               LOG.debug("Lisp Neutron Subnet: " + subnet.toString());
-
-               // Determine the IANA code for the subnet IP version
-               // Default is set to IPv4 for neutron subnets
-
-               Eid eid = LispAddressUtil.asIpv4PrefixEid(subnet.getCidr());
-
-               try {
-
-                   lispNeutronService.getMappingDbService().addKey(LispUtil.buildAddKeyInput(eid, subnet.getNetworkUUID()));
-
-                       LOG.debug("Neutron Subnet Added to MapServer : Subnet name: "
-                                       + subnet.getName() + " EID Prefix: "
-                                       + subnet.getCidr() + " Key: "
-                                       + subnet.getNetworkUUID());
-               } catch (Exception e) {
-                       LOG.error("Adding new subnet to lisp service mapping service failed. Subnet : "
-                                       + subnet.toString() + "Error: " + ExceptionUtils.getStackTrace(e));
-               }
+        INeutronSubnetAware {
+    private static final Integer SIX = Integer.valueOf(6);
+
+    // The implementation for each of these services is resolved by the OSGi
+    // Service Manager
+    private volatile ILispNeutronService lispNeutronService;
+
+    @Override
+    public int canCreateSubnet(NeutronSubnet subnet) {
+        LOG.info("Neutron canCreateSubnet : Subnet name: " + subnet.getName()
+                + " Subnet Cidr: " + subnet.getCidr());
+        LOG.debug("Lisp Neutron Subnet: " + subnet.toString());
+        if (SIX.equals(subnet.getIpVersion())) {
+            return HttpURLConnection.HTTP_PARTIAL;
+        }
+        return HttpURLConnection.HTTP_OK;
+    }
+
+    /**
+     * Method adds the newly created subnet as an EID prefix to the
+     * MappingService. The subnet's network UUID is used as the key for this EID
+     * prefix.
+     *
+     */
+    @Override
+    public void neutronSubnetCreated(NeutronSubnet subnet) {
+        // TODO update for multi-tenancy
+
+        LOG.info("Neutron Subnet Created request : Subnet name: "
+                + subnet.getName() + " Subnet Cidr: " + subnet.getCidr());
+        LOG.debug("Lisp Neutron Subnet: " + subnet.toString());
+
+        // Determine the IANA code for the subnet IP version
+        // Default is set to IPv4 for neutron subnets
+
+        Eid eid = LispAddressUtil.asIpv4PrefixEid(subnet.getCidr());
+
+        try {
+
+            lispNeutronService.getMappingDbService().addKey(LispUtil.buildAddKeyInput(eid, subnet.getNetworkUUID()));
+
+            LOG.debug("Neutron Subnet Added to MapServer : Subnet name: "
+                    + subnet.getName() + " EID Prefix: "
+                    + subnet.getCidr() + " Key: "
+                    + subnet.getNetworkUUID());
+        } catch (Exception e) {
+            LOG.error("Adding new subnet to lisp service mapping service failed. Subnet : "
+                    + subnet.toString() + "Error: " + ExceptionUtils.getStackTrace(e));
+        }
         LOG.info("Neutron Subnet Created request : Subnet name: "
                 + subnet.getName() + " Subnet Cidr: " + subnet.getCidr());
 
-       }
-
-       /**
-        * Method to check whether new Subnet can be created by LISP implementation
-        * of Neutron service API. Since we store the Cidr part of the subnet as the
-        * main key to the Lisp mapping service, we do not support updates to
-        * subnets that change it's cidr.
-        */
-       @Override
-       public int canUpdateSubnet(NeutronSubnet delta, NeutronSubnet original) {
-               if (delta == null || original == null) {
-                       LOG.error("Neutron canUpdateSubnet rejected: subnet objects were null");
-                       return HttpURLConnection.HTTP_BAD_REQUEST;
-               }
-               LOG.info("Neutron canUpdateSubnet : Subnet name: " + original.getName()
-                               + " Subnet Cidr: " + original.getCidr());
-               LOG.debug("Lisp Neutron Subnet update: original : "
-                               + original.toString() + " delta : " + delta.toString());
-
-               // We do not accept a Subnet update that changes the cidr. If cider or
-               // network UUID is changed, return error.
-               if (!(original.getCidr().equals(delta.getCidr()))) {
-                       LOG.error("Neutron canUpdateSubnet rejected: Subnet name: "
-                                       + original.getName() + " Subnet Cidr: "
-                                       + original.getCidr());
-                       return HttpURLConnection.HTTP_CONFLICT;
-               }
-               return HttpURLConnection.HTTP_OK;
-       }
-
-       @Override
-       public void neutronSubnetUpdated(NeutronSubnet subnet) {
-               // Nothing to do here.
-       }
-
-       /**
-        * Method to check if subnet can be deleted. Returns error only if subnet
-        * does not exist in the lisp mapping service.
-        */
-       @Override
-       public int canDeleteSubnet(NeutronSubnet subnet) {
-               LOG.info("Neutron canDeleteSubnet : Subnet name: " + subnet.getName()
-                               + " Subnet Cidr: " + subnet.getCidr() + "Key: "
-                               + subnet.getNetworkUUID());
-               LOG.debug("Lisp Neutron Subnet: " + subnet.toString());
-
-
-                       return HttpURLConnection.HTTP_OK;
-       }
-
-       /**
-        * Method removes the EID prefix and key associated with the deleted subnet
-        * from Lisp mapping service.
-        */
-       @Override
-       public void neutronSubnetDeleted(NeutronSubnet subnet) {
-               LOG.info("Neutron Subnet Deleted Request : Subnet name: "
-                               + subnet.getName() + " Subnet Cidr: " + subnet.getCidr()
-                               + "Key: " + subnet.getNetworkUUID());
-               LOG.debug("Lisp Neutron Subnet: " + subnet.toString());
-
-               // Determine the IANA code for the subnet IP version
-               // Default is set to IPv4 for neutron subnets
-
-               Eid eid = LispAddressUtil.asIpv4PrefixEid(subnet.getCidr());
+    }
+
+    /**
+     * Method to check whether new Subnet can be created by LISP implementation
+     * of Neutron service API. Since we store the Cidr part of the subnet as the
+     * main key to the Lisp mapping service, we do not support updates to
+     * subnets that change it's cidr.
+     */
+    @Override
+    public int canUpdateSubnet(NeutronSubnet delta, NeutronSubnet original) {
+        if (delta == null || original == null) {
+            LOG.error("Neutron canUpdateSubnet rejected: subnet objects were null");
+            return HttpURLConnection.HTTP_BAD_REQUEST;
+        }
+        LOG.info("Neutron canUpdateSubnet : Subnet name: " + original.getName()
+                + " Subnet Cidr: " + original.getCidr());
+        LOG.debug("Lisp Neutron Subnet update: original : "
+                + original.toString() + " delta : " + delta.toString());
+
+        // We do not accept a Subnet update that changes the cidr. If cider or
+        // network UUID is changed, return error.
+        if (!(original.getCidr().equals(delta.getCidr()))) {
+            LOG.error("Neutron canUpdateSubnet rejected: Subnet name: "
+                    + original.getName() + " Subnet Cidr: "
+                    + original.getCidr());
+            return HttpURLConnection.HTTP_CONFLICT;
+        }
+        return HttpURLConnection.HTTP_OK;
+    }
+
+    @Override
+    public void neutronSubnetUpdated(NeutronSubnet subnet) {
+        // Nothing to do here.
+    }
+
+    /**
+     * Method to check if subnet can be deleted. Returns error only if subnet
+     * does not exist in the lisp mapping service.
+     */
+    @Override
+    public int canDeleteSubnet(NeutronSubnet subnet) {
+        LOG.info("Neutron canDeleteSubnet : Subnet name: " + subnet.getName()
+                + " Subnet Cidr: " + subnet.getCidr() + "Key: "
+                + subnet.getNetworkUUID());
+        LOG.debug("Lisp Neutron Subnet: " + subnet.toString());
+
+
+            return HttpURLConnection.HTTP_OK;
+    }
+
+    /**
+     * Method removes the EID prefix and key associated with the deleted subnet
+     * from Lisp mapping service.
+     */
+    @Override
+    public void neutronSubnetDeleted(NeutronSubnet subnet) {
+        LOG.info("Neutron Subnet Deleted Request : Subnet name: "
+                + subnet.getName() + " Subnet Cidr: " + subnet.getCidr()
+                + "Key: " + subnet.getNetworkUUID());
+        LOG.debug("Lisp Neutron Subnet: " + subnet.toString());
+
+        // Determine the IANA code for the subnet IP version
+        // Default is set to IPv4 for neutron subnets
+
+        Eid eid = LispAddressUtil.asIpv4PrefixEid(subnet.getCidr());
 
         try {
 
             lispNeutronService.getMappingDbService().removeKey(LispUtil.buildRemoveKeyInput(eid));
 
-                       LOG.debug("Neutron Subnet Deleted from MapServer : Subnet name: "
-                                       + subnet.getName() + " Eid Prefix: "
-                                       + subnet.getCidr() + " Key: "
-                                       + subnet.getNetworkUUID());
-               } catch (Exception e) {
-                       LOG.error("Deleting subnet's EID prefix from mapping service failed + Subnet: "
-                                       + subnet.toString() + "Error: " + ExceptionUtils.getStackTrace(e));
-               }
-       }
+            LOG.debug("Neutron Subnet Deleted from MapServer : Subnet name: "
+                    + subnet.getName() + " Eid Prefix: "
+                    + subnet.getCidr() + " Key: "
+                    + subnet.getNetworkUUID());
+        } catch (Exception e) {
+            LOG.error("Deleting subnet's EID prefix from mapping service failed + Subnet: "
+                    + subnet.toString() + "Error: " + ExceptionUtils.getStackTrace(e));
+        }
+    }
 
 }