Rename static final variable 'logger' to 'LOG' 19/17119/1
authorLorand Jakab <lojakab@cisco.com>
Wed, 25 Mar 2015 17:06:38 +0000 (19:06 +0200)
committerLorand Jakab <lojakab@cisco.com>
Wed, 25 Mar 2015 17:06:38 +0000 (19:06 +0200)
This commit makes Sonar happier.

Change-Id: I9be49fca7eaabe0f6ca876d0bb25773e7daedb20
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
30 files changed:
commons/unittest_tools/src/main/java/org/opendaylight/lispflowmapping/tools/junit/BaseExpectations.java
commons/unittest_tools/src/main/java/org/opendaylight/lispflowmapping/tools/junit/BaseTestCase.java
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/dao/MappingEntry.java
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/dao/MappingValueKey.java
mappingservice/clusterdao/src/main/java/org/opendaylight/lispflowmapping/clusterdao/ClusterDAOService.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/LispMappingService.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/authentication/ILispAuthentication.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/authentication/LispMACAuthentication.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/config/ConfigIni.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/lisp/MapResolver.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/lisp/MapServer.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/serializer/MapRequestSerializer.java
mappingservice/integrationtest/src/main/java/org/opendaylight/lispflowmapping/integrationtest/MappingServiceTestHelper.java
mappingservice/integrationtest/src/test/java/org/opendaylight/lispflowmapping/integrationtest/MappingServiceIntegrationTest.java
mappingservice/netconf/src/main/java/org/opendaylight/lispflowmapping/config/yang/netconf/impl/LfmNetconfConnectorProviderModule.java
mappingservice/netconf/src/main/java/org/opendaylight/lispflowmapping/netconf/impl/LispDeviceNetconfConnector.java
mappingservice/netconf/src/main/java/org/opendaylight/lispflowmapping/netconf/impl/LispNetconfConnector.java
mappingservice/neutron/src/main/java/org/opendaylight/lispflowmapping/neutron/Activator.java
mappingservice/neutron/src/main/java/org/opendaylight/lispflowmapping/neutron/LispNeutronNetworkHandler.java
mappingservice/neutron/src/main/java/org/opendaylight/lispflowmapping/neutron/LispNeutronPortHandler.java
mappingservice/neutron/src/main/java/org/opendaylight/lispflowmapping/neutron/LispNeutronService.java
mappingservice/neutron/src/main/java/org/opendaylight/lispflowmapping/neutron/LispNeutronSubnetHandler.java
mappingservice/northbound/src/main/java/org/opendaylight/lispflowmapping/northbound/AuthKeyNB.java
mappingservice/northbound/src/main/java/org/opendaylight/lispflowmapping/northbound/LispAddressConvertorNB.java
mappingservice/northbound/src/main/java/org/opendaylight/lispflowmapping/northbound/LispMappingNorthbound.java
mappingservice/northbound/src/main/java/org/opendaylight/lispflowmapping/northbound/MapRegisterNB.java
mappingservice/northbound/src/main/java/org/opendaylight/lispflowmapping/northbound/YangTransformerNB.java
mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/LispSouthboundPlugin.java
mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/lisp/LispSouthboundService.java
mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/lisp/LispXtrSouthboundService.java

index 26562a48fd0906ad5ca4c3d77b0bb664fb1af1bc..ecc09a8864b9b789998d78f2ec5df22e2ea3d49f 100644 (file)
@@ -40,7 +40,7 @@ public class BaseExpectations extends Expectations {
     protected Mockery context;
     protected boolean showAllExpectations;
     private final Synchroniser synchroniser = new Synchroniser();
-    protected static final Logger logger = LoggerFactory.getLogger(BaseExpectations.class);
+    protected static final Logger LOG = LoggerFactory.getLogger(BaseExpectations.class);
 
     @Before
     public void before() throws Exception {
@@ -235,7 +235,7 @@ public class BaseExpectations extends Expectations {
             values.add(lastValue);
             boolean match = match(lastValue);
             if (match && (logMatch != null)) {
-                logger.trace("Match: " + logMatch + " " + value);
+                LOG.trace("Match: " + logMatch + " " + value);
             }
             return match;
         }
@@ -261,7 +261,7 @@ public class BaseExpectations extends Expectations {
 
         public Object invoke(Invocation invocation) throws Throwable {
             if (logInvocation) {
-                logger.trace("Invoke: returning " + lastValue);
+                LOG.trace("Invoke: returning " + lastValue);
             }
             return lastValue;
         }
@@ -423,4 +423,4 @@ public class BaseExpectations extends Expectations {
         return ret;
     }
 
-}
\ No newline at end of file
+}
index f81d746fd3f8c6a1bfc14de496ffacdce981fe57..e14463d3dd09fa758c3570d8707b167aef6440b0 100644 (file)
@@ -150,4 +150,4 @@ public abstract class BaseTestCase extends BaseExpectations {
     protected static void assertHexEquals(byte expected, byte actual) {
         assertEquals(String.format("0x%02X", expected), String.format("0x%02X", actual));
     }
-}
\ No newline at end of file
+}
index f613b063e5fc366fa2da1ec581c16a25bd1e16e7..9761579eb50eb1e7baa620ca8f65d03e34f970c2 100644 (file)
@@ -65,4 +65,4 @@ public class MappingEntry<V> {
     public String toString() {
         return "MappingEntry: " + value.toString();
     }
-}
\ No newline at end of file
+}
index 76b436193f4e33f626700fa44797a0804ead150d..25231e357bbf28d010309b92acc54d2344da1665 100644 (file)
@@ -49,4 +49,4 @@ public class MappingValueKey<V> {
             return false;
         return true;
     }
-}
\ No newline at end of file
+}
index 8826f942368b575ff342ee86d5c5c4af23e0faee..2e4e5f20aba5eea6f85a61a0ba7c24d9e69fd5d3 100644 (file)
@@ -29,7 +29,7 @@ import org.slf4j.LoggerFactory;
 
 public class ClusterDAOService implements ILispDAO {
 
-    protected static final Logger logger = LoggerFactory.getLogger(ClusterDAOService.class);
+    protected static final Logger LOG = LoggerFactory.getLogger(ClusterDAOService.class);
     private IClusterContainerServices clusterContainerService = null;
     private ConcurrentMap<Object, ConcurrentMap<String, Object>> data;
     private final String CACHE_NAME = "mappingServiceCache";
@@ -52,7 +52,7 @@ public class ClusterDAOService implements ILispDAO {
     }
 
     void unsetClusterContainerService(IClusterContainerServices s) {
-        logger.trace("Cluster Service unset");
+        LOG.trace("Cluster Service unset");
         if (this.clusterContainerService == s) {
             this.clusterContainerService = null;
         }
@@ -61,32 +61,32 @@ public class ClusterDAOService implements ILispDAO {
 
     private void allocateCache() {
         if (this.clusterContainerService == null) {
-            logger.warn("un-initialized clusterContainerService, can't create cache");
+            LOG.warn("un-initialized clusterContainerService, can't create cache");
             return;
         }
-        logger.trace("Creating Cache for ClusterDAOService");
+        LOG.trace("Creating Cache for ClusterDAOService");
         try {
             this.clusterContainerService.createCache(CACHE_NAME, EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL));
         } catch (CacheConfigException cce) {
-            logger.warn("Cache couldn't be created for ClusterDAOService -  check cache mode");
+            LOG.warn("Cache couldn't be created for ClusterDAOService -  check cache mode");
         } catch (CacheExistException cce) {
-            logger.warn("Cache for ClusterDAOService already exists, destroy and recreate");
+            LOG.warn("Cache for ClusterDAOService already exists, destroy and recreate");
         }
-        logger.trace("Cache successfully created for ClusterDAOService");
+        LOG.trace("Cache successfully created for ClusterDAOService");
     }
 
     @SuppressWarnings({ "unchecked" })
     private void retrieveCache() {
         if (this.clusterContainerService == null) {
-            logger.warn("un-initialized clusterContainerService, can't retrieve cache");
+            LOG.warn("un-initialized clusterContainerService, can't retrieve cache");
             return;
         }
-        logger.trace("Retrieving cache for ClusterDAOService");
+        LOG.trace("Retrieving cache for ClusterDAOService");
         data = (ConcurrentMap<Object, ConcurrentMap<String, Object>>) this.clusterContainerService.getCache(CACHE_NAME);
         if (data == null) {
-            logger.warn("Cache couldn't be retrieved for ClusterDAOService");
+            LOG.warn("Cache couldn't be retrieved for ClusterDAOService");
         }
-        logger.trace("Cache was successfully retrieved for ClusterDAOService");
+        LOG.trace("Cache was successfully retrieved for ClusterDAOService");
     }
 
     public void getAll(IRowVisitor visitor) {
index 048d991d8e80534cc2e3383987f72bde9e92760a..9e20072c70a0d4af6a8a0f3f1b89e4b7658b16f4 100644 (file)
@@ -64,7 +64,7 @@ import org.slf4j.LoggerFactory;
 
 public class LispMappingService implements CommandProvider, IFlowMapping, BindingAwareConsumer, //
         IMapRequestResultHandler, IMapNotifyHandler {
-    protected static final Logger logger = LoggerFactory.getLogger(LispMappingService.class);
+    protected static final Logger LOG = LoggerFactory.getLogger(LispMappingService.class);
 
     private static final ConfigIni configIni = new ConfigIni();
     private ILispDAO lispDao = null;
@@ -96,13 +96,13 @@ public class LispMappingService implements CommandProvider, IFlowMapping, Bindin
     }
 
     void setBindingAwareBroker(BindingAwareBroker bindingAwareBroker) {
-        logger.trace("BindingAwareBroker set!");
+        LOG.trace("BindingAwareBroker set!");
         BundleContext bundleContext = FrameworkUtil.getBundle(this.getClass()).getBundleContext();
         bindingAwareBroker.registerConsumer(this, bundleContext);
     }
 
     void unsetBindingAwareBroker(BindingAwareBroker bindingAwareBroker) {
-        logger.debug("BindingAwareBroker was unset in LispMappingService");
+        LOG.debug("BindingAwareBroker was unset in LispMappingService");
     }
 
     public void basicInit(ILispDAO dao) {
@@ -112,12 +112,12 @@ public class LispMappingService implements CommandProvider, IFlowMapping, Bindin
     }
 
     void setLispDao(ILispDAO dao) {
-        logger.trace("LispDAO set in LispMappingService");
+        LOG.trace("LispDAO set in LispMappingService");
         basicInit(dao);
     }
 
     void unsetLispDao(ILispDAO dao) {
-        logger.trace("LispDAO was unset in LispMappingService");
+        LOG.trace("LispDAO was unset in LispMappingService");
         mapServer = null;
         mapResolver = null;
         lispDao = null;
@@ -126,9 +126,9 @@ public class LispMappingService implements CommandProvider, IFlowMapping, Bindin
     public void init() {
         try {
             registerWithOSGIConsole();
-            logger.info("LISP (RFC6830) Mapping Service init finished");
+            LOG.info("LISP (RFC6830) Mapping Service init finished");
         } catch (Exception e) {
-            logger.error(e.getStackTrace().toString());
+            LOG.error(e.getStackTrace().toString());
         }
     }
 
@@ -138,7 +138,7 @@ public class LispMappingService implements CommandProvider, IFlowMapping, Bindin
     }
 
     public void destroy() {
-        logger.info("LISP (RFC6830) Mapping Service is destroyed!");
+        LOG.info("LISP (RFC6830) Mapping Service is destroyed!");
         mapResolver = null;
         mapServer = null;
     }
@@ -269,7 +269,7 @@ public class LispMappingService implements CommandProvider, IFlowMapping, Bindin
     }
 
     public void onSessionInitialized(ConsumerContext session) {
-        logger.info("Lisp Consumer session initialized!");
+        LOG.info("Lisp Consumer session initialized!");
         notificationService = session.getSALService(NotificationService.class);
         registerNotificationListener(AddMapping.class, new MapRegisterNotificationHandler());
         registerNotificationListener(RequestMapping.class, new MapRequestNotificationHandler());
@@ -294,7 +294,7 @@ public class LispMappingService implements CommandProvider, IFlowMapping, Bindin
                 smnib.setTransportAddress(tab.build());
                 getLispSB().sendMapNotify(smnib.build());
             } else {
-                logger.warn("got null map notify");
+                LOG.warn("got null map notify");
             }
 
         }
@@ -311,7 +311,7 @@ public class LispMappingService implements CommandProvider, IFlowMapping, Bindin
                 smrib.setTransportAddress(mapRequestNotification.getTransportAddress());
                 getLispSB().sendMapReply(smrib.build());
             } else {
-                logger.warn("got null map reply");
+                LOG.warn("got null map reply");
             }
         }
     }
@@ -332,7 +332,7 @@ public class LispMappingService implements CommandProvider, IFlowMapping, Bindin
     }
 
     public void handleSMR(MapRequest smr, LispAddressContainer subscriber) {
-        logger.debug("Sending SMR to " + subscriber.toString());
+        LOG.debug("Sending SMR to " + subscriber.toString());
         SendMapRequestInputBuilder smrib = new SendMapRequestInputBuilder();
         smrib.setMapRequest(new MapRequestBuilder(smr).build());
         smrib.setTransportAddress(LispNotificationHelper.getTransportAddressFromContainer(subscriber));
index 1b929ae46e6541c6440250257dc0a8655eb655c0..19240fa4c53ef6d43bd07e1f3c2cead30dc174d1 100644 (file)
@@ -24,7 +24,7 @@ import org.slf4j.LoggerFactory;
 
 public class LispMACAuthentication implements ILispAuthentication {
 
-    protected static final Logger logger = LoggerFactory.getLogger(LispMACAuthentication.class);
+    protected static final Logger LOG = LoggerFactory.getLogger(LispMACAuthentication.class);
 
     protected String algorithm;
     private byte[] tempAuthenticationData;
@@ -36,7 +36,7 @@ public class LispMACAuthentication implements ILispAuthentication {
             authenticationLength = Mac.getInstance(algorithm).getMacLength();
             tempAuthenticationData = new byte[authenticationLength];
         } catch (NoSuchAlgorithmException e) {
-            logger.warn("No such MAC algorithm" + algorithm);
+            LOG.warn("No such MAC algorithm" + algorithm);
         }
     }
 
@@ -64,9 +64,9 @@ public class LispMACAuthentication implements ILispAuthentication {
 
             return mac.doFinal(data);
         } catch (InvalidKeyException e) {
-            logger.warn("Invalid password" + key);
+            LOG.warn("Invalid password" + key);
         } catch (NoSuchAlgorithmException e) {
-            logger.warn("No such MAC algorithm" + algorithm);
+            LOG.warn("No such MAC algorithm" + algorithm);
         }
         return null;
     }
index baccfcba89ec70d7de52d4e0aaee6cb707bc7407..dac82578a467377c846f9d3b15f3e527d810396b 100644 (file)
@@ -14,7 +14,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class ConfigIni {
-    protected static final Logger logger = LoggerFactory.getLogger(ConfigIni.class);
+    protected static final Logger LOG = LoggerFactory.getLogger(ConfigIni.class);
     private boolean mappingOverwrite;
     private boolean smr;
     private String elpPolicy;
@@ -47,16 +47,16 @@ public class ConfigIni {
         if (str == null) {
             str = System.getProperty(LISP_MAPPING_OVERWRITE);
             if (str == null) {
-                logger.debug("Configuration variable '{}' is unset. Setting to default value: 'true'", LISP_MAPPING_OVERWRITE);
+                LOG.debug("Configuration variable '{}' is unset. Setting to default value: 'true'", LISP_MAPPING_OVERWRITE);
                 return;
             }
         }
 
         if (str.trim().equalsIgnoreCase("false")) {
             this.mappingOverwrite = false;
-            logger.debug("Setting configuration variable '{}' to 'false'", LISP_MAPPING_OVERWRITE);
+            LOG.debug("Setting configuration variable '{}' to 'false'", LISP_MAPPING_OVERWRITE);
         } else {
-            logger.debug("Setting configuration variable '{}' to 'true'", LISP_MAPPING_OVERWRITE);
+            LOG.debug("Setting configuration variable '{}' to 'true'", LISP_MAPPING_OVERWRITE);
         }
     }
 
@@ -72,16 +72,16 @@ public class ConfigIni {
         if (str == null) {
             str = System.getProperty(LISP_SMR);
             if (str == null) {
-                logger.debug("Configuration variable '{}' is unset. Setting to default value: 'true'", LISP_SMR);
+                LOG.debug("Configuration variable '{}' is unset. Setting to default value: 'true'", LISP_SMR);
                 return;
             }
         }
 
         if (str.trim().equalsIgnoreCase("false")) {
             this.smr = false;
-            logger.debug("Setting configuration variable '{}' to 'false'", LISP_SMR);
+            LOG.debug("Setting configuration variable '{}' to 'false'", LISP_SMR);
         } else {
-            logger.debug("Setting configuration variable '{}' to 'true'", LISP_SMR);
+            LOG.debug("Setting configuration variable '{}' to 'true'", LISP_SMR);
         }
     }
 
@@ -97,7 +97,7 @@ public class ConfigIni {
         if (str == null) {
             str = System.getProperty(LISP_ELP_POLICY);
             if (str == null) {
-                logger.debug("Configuration variable '{}' is unset. Setting to default value: 'default' (ELP only)",
+                LOG.debug("Configuration variable '{}' is unset. Setting to default value: 'default' (ELP only)",
                         LISP_ELP_POLICY);
                 return;
             }
@@ -105,12 +105,12 @@ public class ConfigIni {
 
         if (str.trim().equalsIgnoreCase("both")) {
             this.elpPolicy = "both";
-            logger.debug("Setting configuration variable '{}' to 'both' (keep ELP, add next hop)", LISP_ELP_POLICY);
+            LOG.debug("Setting configuration variable '{}' to 'both' (keep ELP, add next hop)", LISP_ELP_POLICY);
         } else if (str.trim().equalsIgnoreCase("replace")) {
             this.elpPolicy = "replace";
-            logger.debug("Setting configuration variable '{}' to 'replace' (next hop only)", LISP_ELP_POLICY);
+            LOG.debug("Setting configuration variable '{}' to 'replace' (next hop only)", LISP_ELP_POLICY);
         } else {
-            logger.debug("Setting configuration variable '{}' to 'default' (ELP only)", LISP_ELP_POLICY);
+            LOG.debug("Setting configuration variable '{}' to 'default' (ELP only)", LISP_ELP_POLICY);
         }
     }
 
index bc035281c37d2ad18a5e4384ac3ffeafbfef51aa..c198ac2be1a80ecb2a795d12cb0626c4b4de6d39 100644 (file)
@@ -45,7 +45,7 @@ public class MapResolver extends AbstractLispComponent implements IMapResolverAs
 
     private static final int TTL_RLOC_TIMED_OUT = 1;
     private static final int TTL_NO_RLOC_KNOWN = 15;
-    protected static final Logger logger = LoggerFactory.getLogger(MapResolver.class);
+    protected static final Logger LOG = LoggerFactory.getLogger(MapResolver.class);
 
     private static final ConfigIni configIni = new ConfigIni();
     private static final String elpPolicy = configIni.getElpPolicy();
@@ -60,7 +60,7 @@ public class MapResolver extends AbstractLispComponent implements IMapResolverAs
 
     public void handleMapRequest(MapRequest request, boolean smr, IMapRequestResultHandler callback) {
         if (dao == null) {
-            logger.warn("handleMapRequest called while dao is uninitialized");
+            LOG.warn("handleMapRequest called while dao is uninitialized");
             return;
         }
         if (request.isPitr()) {
@@ -114,7 +114,7 @@ public class MapResolver extends AbstractLispComponent implements IMapResolverAs
                         if (smr) {
                             IMappingServiceKey key = MappingServiceKeyUtil.generateMappingServiceKey(mapping.getKey().getEID(),
                                     mapping.getKey().getMask());
-                            logger.trace("Adding new subscriber: " + subscriberRloc.toString());
+                            LOG.trace("Adding new subscriber: " + subscriberRloc.toString());
                             subscribers.add(subscriberRloc);
                             dao.put(key, new MappingEntry<HashSet<MappingServiceSubscriberRLOC>>(SUBSCRIBERS_SUBKEY, subscribers));
                         }
index e2bb4cb619fb12b19037214849d6681c864cb008..310b9f43e4ce1c8af7f2424e73facbc62a163e06 100644 (file)
@@ -51,7 +51,7 @@ import org.slf4j.LoggerFactory;
 
 public class MapServer extends AbstractLispComponent implements IMapServerAsync {
 
-    protected static final Logger logger = LoggerFactory.getLogger(MapServer.class);
+    protected static final Logger LOG = LoggerFactory.getLogger(MapServer.class);
 
     private static final ConfigIni configIni = new ConfigIni();
     private static final boolean overwriteConfig = configIni.mappingOverwriteIsSet();
@@ -79,7 +79,7 @@ public class MapServer extends AbstractLispComponent implements IMapServerAsync
             Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
             while (interfaces.hasMoreElements()) {
                 NetworkInterface current = interfaces.nextElement();
-                logger.debug("Interface " + current.toString());
+                LOG.debug("Interface " + current.toString());
                 if (!current.isUp() || current.isLoopback() || current.isVirtual())
                     continue;
                 Enumeration<InetAddress> addresses = current.getInetAddresses();
@@ -88,7 +88,7 @@ public class MapServer extends AbstractLispComponent implements IMapServerAsync
                     // Skip loopback and link local addresses
                     if (current_addr.isLoopbackAddress() || current_addr.isLinkLocalAddress())
                         continue;
-                    logger.debug(current_addr.getHostAddress());
+                    LOG.debug(current_addr.getHostAddress());
                     return current_addr;
                 }
             }
@@ -123,7 +123,7 @@ public class MapServer extends AbstractLispComponent implements IMapServerAsync
 
     public void handleMapRegister(MapRegister mapRegister, boolean smr, IMapNotifyHandler callback) {
         if (dao == null) {
-            logger.warn("handleMapRegister called while dao is uninitialized");
+            LOG.warn("handleMapRegister called while dao is uninitialized");
         } else {
             boolean failed = false;
             String password = null;
@@ -131,7 +131,7 @@ public class MapServer extends AbstractLispComponent implements IMapServerAsync
                 if (shouldAuthenticate()) {
                     password = getPassword(eidRecord.getLispAddressContainer(), eidRecord.getMaskLength());
                     if (!LispAuthenticationUtil.validate(mapRegister, password)) {
-                        logger.warn("Authentication failed");
+                        LOG.warn("Authentication failed");
                         failed = true;
                         break;
                     }
@@ -142,10 +142,10 @@ public class MapServer extends AbstractLispComponent implements IMapServerAsync
                     HashSet<MappingServiceSubscriberRLOC> subscribers = getSubscribers(eidRecord.getLispAddressContainer(), eidRecord.getMaskLength());
                     if (subscribers != null) {
                         MapRequest mapRequest = buildSMR(eidRecord);
-                        logger.trace("Built SMR packet: " + mapRequest.toString());
+                        LOG.trace("Built SMR packet: " + mapRequest.toString());
                         for (MappingServiceSubscriberRLOC rloc : subscribers) {
                             if (rloc.timedOut()) {
-                                logger.trace("Lazy removing expired subscriber entry " + rloc.toString());
+                                LOG.trace("Lazy removing expired subscriber entry " + rloc.toString());
                                 subscribers.remove(rloc);
                             } else {
                                 callback.handleSMR(mapRequest, rloc.getSrcRloc());
@@ -161,7 +161,7 @@ public class MapServer extends AbstractLispComponent implements IMapServerAsync
             if (!failed) {
                 MapNotifyBuilder builder = new MapNotifyBuilder();
                 if (BooleanUtils.isTrue(mapRegister.isWantMapNotify())) {
-                    logger.trace("MapRegister wants MapNotify");
+                    LOG.trace("MapRegister wants MapNotify");
                     MapNotifyBuilderHelper.setFromMapRegister(builder, mapRegister);
                     if (shouldAuthenticate()) {
                         builder.setAuthenticationData(LispAuthenticationUtil.createAuthenticationData(builder.build(), password));
index 025a780cdacf24ef89f139fefaa4522e5881cd07..5bdb840b14af431f5063b20221ad4b42a4942f1e 100644 (file)
@@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory;
 public class MapRequestSerializer {
 
     private static final MapRequestSerializer INSTANCE = new MapRequestSerializer();
-    protected static final Logger logger = LoggerFactory.getLogger(MapRequestSerializer.class);
+    protected static final Logger LOG = LoggerFactory.getLogger(MapRequestSerializer.class);
 
     // Private constructor prevents instantiation from other classes
     private MapRequestSerializer() {
@@ -158,7 +158,7 @@ public class MapRequestSerializer {
                     builder.setMapReply(new org.opendaylight.yang.gen.v1.lispflowmapping.rev131031.maprequest.MapReplyBuilder(
                             new EidToLocatorRecordBuilder(EidToLocatorRecordSerializer.getInstance().deserialize(requestBuffer)).build()).build());
                 } catch (RuntimeException re) {
-                    logger.warn("couldn't deserialize map reply encapsulated in map request. {}", re.getMessage());
+                    LOG.warn("couldn't deserialize map reply encapsulated in map request. {}", re.getMessage());
                 }
             }
             return builder.build();
index fee52352651d3f42e11e840dcef65c0afcb43313..a48b991d242be5a4ee1ceab6be0f0ac47ddf8c2f 100644 (file)
@@ -45,7 +45,7 @@ public class MappingServiceTestHelper {
                 mavenBundle("org.apache.commons", "commons-lang3").versionAsInProject(),
                 mavenBundle("org.apache.felix", "org.apache.felix.dependencymanager").versionAsInProject(),
 
-                // List logger bundles
+                // List LOG bundles
                 mavenBundle("org.slf4j", "jcl-over-slf4j").versionAsInProject(),
                 mavenBundle("org.slf4j", "slf4j-api").versionAsInProject(),
                 mavenBundle("org.slf4j", "log4j-over-slf4j").versionAsInProject(),
index 00c5904976127a68fe8919084d798a5d98aa6f58..f18b7207e59b35b0dd4f28747f31f3b1545834bc 100644 (file)
@@ -128,7 +128,7 @@ public class MappingServiceIntegrationTest {
 
     private IFlowMapping lms;
     private ClusterDAOService clusterService;
-    protected static final Logger logger = LoggerFactory.getLogger(MappingServiceIntegrationTest.class);
+    protected static final Logger LOG = LoggerFactory.getLogger(MappingServiceIntegrationTest.class);
     private byte[] mapRequestPacket;
     private byte[] mapRegisterPacketWithNotify;
     private byte[] mapRegisterPacketWithoutNotify;
@@ -805,8 +805,8 @@ public class MappingServiceIntegrationTest {
         Integer httpResponseCode = connection.getResponseCode();
 
         if (httpResponseCode > 299) {
-            logger.trace("HTTP Address: " + url);
-            logger.trace("HTTP Response Code: " + httpResponseCode);
+            LOG.trace("HTTP Address: " + url);
+            LOG.trace("HTTP Response Code: " + httpResponseCode);
             fail();
         }
 
@@ -922,8 +922,8 @@ public class MappingServiceIntegrationTest {
 
         String jsonAuthData = createAuthKeyJSON(pass, address, mask);
 
-        logger.trace("Sending this JSON to LISP server: \n" + jsonAuthData);
-        logger.trace("Address: " + address);
+        LOG.trace("Sending this JSON to LISP server: \n" + jsonAuthData);
+        LOG.trace("Address: " + address);
 
         byte[] expectedSha = new byte[] { (byte) 146, (byte) 234, (byte) 52, (byte) 247, (byte) 186, (byte) 232, (byte) 31, (byte) 249, (byte) 87,
                 (byte) 73, (byte) 234, (byte) 54, (byte) 225, (byte) 160, (byte) 129, (byte) 251, (byte) 73, (byte) 53, (byte) 196, (byte) 62 };
@@ -1466,7 +1466,7 @@ public class MappingServiceIntegrationTest {
                 assertEquals(((LispIpv4Address) mapRequest.getEidRecord().get(0).getLispAddressContainer().getAddress()).getIpv4Address().getValue(),
                         eid);
                 notificationCalled = true;
-                logger.warn("notification arrived");
+                LOG.warn("notification arrived");
             }
         });
         sendMapRequest(mapRequest, port);
@@ -1474,7 +1474,7 @@ public class MappingServiceIntegrationTest {
             if (notificationCalled) {
                 return;
             } else {
-                logger.warn("notification hasn't arrived, sleeping...");
+                LOG.warn("notification hasn't arrived, sleeping...");
                 Thread.sleep(500);
             }
         }
@@ -1546,7 +1546,7 @@ public class MappingServiceIntegrationTest {
         try {
             DatagramPacket packet = new DatagramPacket(bytesToSend, bytesToSend.length);
             initPacketAddress(packet, port);
-            logger.trace("Sending packet to LispPlugin on socket, port {}", port);
+            LOG.trace("Sending packet to LispPlugin on socket, port {}", port);
             socket.send(packet);
         } catch (Throwable t) {
             fail();
@@ -1565,10 +1565,10 @@ public class MappingServiceIntegrationTest {
         try {
             byte[] buffer = new byte[4096];
             DatagramPacket receivePacket = new DatagramPacket(buffer, buffer.length);
-            logger.trace("Waiting for packet from socket...");
+            LOG.trace("Waiting for packet from socket...");
             receivedSocket.setSoTimeout(timeout);
             receivedSocket.receive(receivePacket);
-            logger.trace("Recieved packet from socket!");
+            LOG.trace("Recieved packet from socket!");
             return receivePacket;
         } catch (SocketTimeoutException ste) {
             throw ste;
@@ -1633,23 +1633,23 @@ public class MappingServiceIntegrationTest {
         Bundle b[] = bc.getBundles();
         for (Bundle element : b) {
             int state = element.getState();
-            logger.trace("Bundle[" + element.getBundleId() + "]:" + element.getSymbolicName() + ",v" + element.getVersion() + ", state:"
+            LOG.trace("Bundle[" + element.getBundleId() + "]:" + element.getSymbolicName() + ",v" + element.getVersion() + ", state:"
                     + stateToString(state));
             if (state != Bundle.ACTIVE && state != Bundle.RESOLVED) {
-                logger.trace("Bundle:" + element.getSymbolicName() + " state:" + stateToString(state));
+                LOG.trace("Bundle:" + element.getSymbolicName() + " state:" + stateToString(state));
 
                 // try {
                 // String host = element.getHeaders().get("FRAGMENT-HOST");
                 // if (host != null) {
-                // logger.warn("Bundle " + element.getSymbolicName() +
+                // LOG.warn("Bundle " + element.getSymbolicName() +
                 // " is a fragment which is part of: " + host);
-                // logger.warn("Required imports are: " +
+                // LOG.warn("Required imports are: " +
                 // element.getHeaders().get("IMPORT-PACKAGE"));
                 // } else {
                 // element.start();
                 // }
                 // } catch (BundleException e) {
-                // logger.error("BundleException:", e);
+                // LOG.error("BundleException:", e);
                 // fail();
                 // }
 
@@ -1658,7 +1658,7 @@ public class MappingServiceIntegrationTest {
             }
         }
         if (debugit) {
-            logger.warn(("Do some debugging because some bundle is unresolved"));
+            LOG.warn(("Do some debugging because some bundle is unresolved"));
         }
         // assertNotNull(broker);
 
@@ -1699,8 +1699,8 @@ public class MappingServiceIntegrationTest {
         // BundleContext
         /*
          * for (ServiceReference sr : bc.getAllServiceReferences(null, null)) {
-         * logger.trace(sr.getBundle().getSymbolicName());
-         * logger.trace(sr.toString()); }
+         * LOG.trace(sr.getBundle().getSymbolicName());
+         * LOG.trace(sr.toString()); }
          */
         try {
             Thread.sleep(1000);
index 478f1a8b9e2142ee04e6de6e58d78a304fe26e19..9f6d0011c29c8b2e71376e98a9d8d65703aff9b4 100644 (file)
@@ -35,7 +35,7 @@ import com.google.common.util.concurrent.SettableFuture;
 
 public class LispDeviceNetconfConnector implements AutoCloseable, LfmNetconfConnectorService {
 
-       private static final Logger logger = LoggerFactory.getLogger(LispDeviceNetconfConnector.class);
+       private static final Logger LOG = LoggerFactory.getLogger(LispDeviceNetconfConnector.class);
 
        private final ExecutorService executor;
        private LispNetconfConnector nconfConnector;
@@ -47,7 +47,7 @@ public class LispDeviceNetconfConnector implements AutoCloseable, LfmNetconfConn
        public LispDeviceNetconfConnector(ExecutorService executor, LispNetconfConnector nconfConnector) {
            this.executor = executor;
            this.nconfConnector = nconfConnector;
-           logger.info( "LispDeviceNetconfConnector constructed" );
+           LOG.info( "LispDeviceNetconfConnector constructed" );
        }
 
        /**
@@ -66,7 +66,7 @@ public class LispDeviceNetconfConnector implements AutoCloseable, LfmNetconfConn
         public Future<RpcResult<Void>> buildConnector(final BuildConnectorInput input) {
             SettableFuture<RpcResult<Void>> futureResult = SettableFuture.create();
 
-            logger.trace("Received RPC to buildConnector: " + input);
+            LOG.trace("Received RPC to buildConnector: " + input);
 
             if (verifyBuildInput(input, futureResult) != true) {
                 return futureResult;
@@ -90,7 +90,7 @@ public class LispDeviceNetconfConnector implements AutoCloseable, LfmNetconfConn
 
         private boolean verifyBuildInput(final BuildConnectorInput req, SettableFuture<RpcResult<Void>> futureResult ) {
             if (req.getInstance() == null) {
-                logger.error("Instance name not initialized");
+                LOG.error("Instance name not initialized");
                 futureResult.set(RpcResultBuilder.<Void> failed()
                         .withError(ErrorType.APPLICATION, "exception", "Instance name not initialized")
                         .build());
@@ -98,7 +98,7 @@ public class LispDeviceNetconfConnector implements AutoCloseable, LfmNetconfConn
             }
 
             if (req.getAddress() == null) {
-                logger.error("IP address not initialized");
+                LOG.error("IP address not initialized");
                 futureResult.set(RpcResultBuilder.<Void> failed()
                         .withError(ErrorType.APPLICATION, "exception", "IP address not initialized")
                         .build());
@@ -106,7 +106,7 @@ public class LispDeviceNetconfConnector implements AutoCloseable, LfmNetconfConn
             }
 
             if (req.getPort() == null) {
-                logger.error("Port not initialized");
+                LOG.error("Port not initialized");
                 futureResult.set(RpcResultBuilder.<Void> failed()
                         .withError(ErrorType.APPLICATION, "exception", "Port not initialized")
                         .build());
@@ -114,7 +114,7 @@ public class LispDeviceNetconfConnector implements AutoCloseable, LfmNetconfConn
             }
 
             if (req.getUsername() == null) {
-                logger.error("Username not initialized");
+                LOG.error("Username not initialized");
                 futureResult.set(RpcResultBuilder.<Void> failed()
                         .withError(ErrorType.APPLICATION, "exception", "Username not initialized")
                         .build());
@@ -122,7 +122,7 @@ public class LispDeviceNetconfConnector implements AutoCloseable, LfmNetconfConn
             }
 
             if (req.getPassword() == null) {
-                logger.error("Password not initialized");
+                LOG.error("Password not initialized");
                 futureResult.set(RpcResultBuilder.<Void> failed()
                         .withError(ErrorType.APPLICATION, "exception", "Password not initialized")
                         .build());
@@ -134,7 +134,7 @@ public class LispDeviceNetconfConnector implements AutoCloseable, LfmNetconfConn
 
         private boolean verifyRemoveInput(final RemoveConnectorInput conn, SettableFuture<RpcResult<Void>> futureResult) {
             if (conn.getInstance() == null) {
-                logger.error("Instance name not initialized");
+                LOG.error("Instance name not initialized");
                 futureResult.set(RpcResultBuilder.<Void> failed()
                         .withError(ErrorType.APPLICATION, "exception", "Instance name not initialized")
                         .build());
@@ -159,20 +159,20 @@ public class LispDeviceNetconfConnector implements AutoCloseable, LfmNetconfConn
                 try {
                     nconfConnector.createNetconfConnector(buildConnectorInput.getInstance(), buildConnectorInput.getAddress(),
                             buildConnectorInput.getPort().getValue(), buildConnectorInput.getUsername(), buildConnectorInput.getPassword());
-                    logger.info("LispNetconfConnector {} built", buildConnectorInput.getInstance());
+                    LOG.info("LispNetconfConnector {} built", buildConnectorInput.getInstance());
                     return RpcResultBuilder.<Void>success().build();
                 } catch( InstanceAlreadyExistsException e ) {
-                    logger.error("LispNetconfConnector {} already exists!", buildConnectorInput.getInstance());
+                    LOG.error("LispNetconfConnector {} already exists!", buildConnectorInput.getInstance());
                     return RpcResultBuilder.<Void> failed()
                             .withError(ErrorType.APPLICATION, "exists", "LispNetconfConnector exists")
                             .build();
                 } catch (ConflictingVersionException ex) {
-                    logger.error("LispNetconfConnector {} version exception", buildConnectorInput.getInstance());
+                    LOG.error("LispNetconfConnector {} version exception", buildConnectorInput.getInstance());
                     return RpcResultBuilder.<Void> failed()
                             .withError(ErrorType.APPLICATION, "exception", "LispNetconfConnector version exception")
                             .build();
                 } catch ( ValidationException ex) {
-                    logger.error("LispNetconfConnector {} validation exception", buildConnectorInput.getInstance());
+                    LOG.error("LispNetconfConnector {} validation exception", buildConnectorInput.getInstance());
                     return RpcResultBuilder.<Void> failed()
                             .withError(ErrorType.APPLICATION, "exception", "LispNetconfConnector validation exception")
                             .build();
@@ -193,25 +193,25 @@ public class LispDeviceNetconfConnector implements AutoCloseable, LfmNetconfConn
             public RpcResult<Void> call() {
                 try {
                     nconfConnector.removeNetconfConnector(removeConnectorInput.getInstance());
-                    logger.info("LispNetconfConnector {} removed!", removeConnectorInput.getInstance());
+                    LOG.info("LispNetconfConnector {} removed!", removeConnectorInput.getInstance());
                     return RpcResultBuilder.<Void> success().build();
                 } catch( InstanceNotFoundException e ) {
-                    logger.info("LispNetconfConnector {} doesn't exists!", removeConnectorInput.getInstance());
+                    LOG.info("LispNetconfConnector {} doesn't exists!", removeConnectorInput.getInstance());
                     return RpcResultBuilder.<Void> failed()
                             .withError(ErrorType.APPLICATION, "no-exist", "LispNetconfConnector doesn't exist")
                             .build();
                 } catch( ValidationException e ) {
-                    logger.info("LispNetconfConnector {}: Could not validate remove transactions!", removeConnectorInput.getInstance());
+                    LOG.info("LispNetconfConnector {}: Could not validate remove transactions!", removeConnectorInput.getInstance());
                     return RpcResultBuilder.<Void> failed()
                             .withError(ErrorType.APPLICATION, "fail", "LispNetconfConnector doesn't exist")
                             .build();
                 } catch (ConflictingVersionException e) {
-                    logger.error("LispNetconfConnector {}: Cannot remove due to conflicting version", removeConnectorInput.getInstance() );
+                    LOG.error("LispNetconfConnector {}: Cannot remove due to conflicting version", removeConnectorInput.getInstance() );
                     return RpcResultBuilder.<Void> failed()
                             .withError(ErrorType.APPLICATION, "fail", "Conflicting version exception")
                             .build();
                 } catch (Exception e) {
-                    logger.error("LispNetconfConnector {} exception while removing: {}", removeConnectorInput.getInstance(), e.getClass());
+                    LOG.error("LispNetconfConnector {} exception while removing: {}", removeConnectorInput.getInstance(), e.getClass());
                     return RpcResultBuilder.<Void> failed()
                             .withError(ErrorType.APPLICATION, "fail", "Cannot remove LispNetconfConnector: " + removeConnectorInput.getInstance())
                             .build();
index 187354a1590e3d4036b3b1d25ed662a3ddb6370a..c1db7a5a93107b55dc70caa8ec6790318d97e23b 100644 (file)
@@ -35,7 +35,7 @@ import org.slf4j.LoggerFactory;
 public class LispNetconfConnector {
     private ConfigRegistryJMXClient configRegistryClient;
 
-    private static final Logger logger = LoggerFactory.getLogger(LispNetconfConnector.class);
+    private static final Logger LOG = LoggerFactory.getLogger(LispNetconfConnector.class);
 
     private MBeanServer platformMBeanServer;
 
@@ -66,7 +66,7 @@ public class LispNetconfConnector {
         ConfigTransactionJMXClient transaction = configRegistryClient.createTransaction();
 
         if (transaction == null) {
-            logger.error("Could not create transaction with ConfigRegistry! Cannot build NETCONF connector!");
+            LOG.error("Could not create transaction with ConfigRegistry! Cannot build NETCONF connector!");
             return;
         }
 
@@ -82,7 +82,7 @@ public class LispNetconfConnector {
         mxBean.setTcpOnly(false);
 
         if (solveDependencies(transaction, mxBean) != true) {
-            logger.error("Failed to solve dependencies! Aborting!");
+            LOG.error("Failed to solve dependencies! Aborting!");
             return;
         }
 
@@ -110,7 +110,7 @@ public class LispNetconfConnector {
         if (bindingBrokerRegistry != null ) {
             mxBean.setBindingRegistry(bindingBrokerRegistry);
         } else {
-            logger.debug("No BindingBroker instance found");
+            LOG.debug("No BindingBroker instance found");
             return false;
         }
 
@@ -118,7 +118,7 @@ public class LispNetconfConnector {
         if (domRegistry != null) {
             mxBean.setDomRegistry(domRegistry);
         } else {
-            logger.debug("No DomRegistryBroker instance found");
+            LOG.debug("No DomRegistryBroker instance found");
             return false;
         }
 
@@ -126,7 +126,7 @@ public class LispNetconfConnector {
         if (eventExecutor != null) {
             mxBean.setEventExecutor(eventExecutor);
         } else {
-            logger.debug("No EventExecutor instance found");
+            LOG.debug("No EventExecutor instance found");
             return false;
         }
 
@@ -134,7 +134,7 @@ public class LispNetconfConnector {
         if (threadpool != null) {
             mxBean.setProcessingExecutor(threadpool);
         } else {
-            logger.debug("No ThreadPool instance found");
+            LOG.debug("No ThreadPool instance found");
             return false;
         }
 
@@ -142,7 +142,7 @@ public class LispNetconfConnector {
         if (clientDispatcher != null) {
             mxBean.setClientDispatcher(clientDispatcher);
         } else {
-            logger.debug("No ClientDispatcher instance found");
+            LOG.debug("No ClientDispatcher instance found");
             return false;
         }
 
index 4c1648df4f2728c94fd48b2f6276fc4879297490..60db7b597c5f956b759ef137f4750707decf19a6 100644 (file)
@@ -30,7 +30,7 @@ import org.slf4j.LoggerFactory;
 
 public class Activator extends DependencyActivatorBase {
 
-    protected static final Logger logger = LoggerFactory.getLogger(Activator.class);
+    protected static final Logger LOG = LoggerFactory.getLogger(Activator.class);
 
     @Override
     public void init(BundleContext context, DependencyManager manager) throws Exception {
@@ -55,13 +55,13 @@ public class Activator extends DependencyActivatorBase {
                 .setInterface(new String[] { ILispNeutronService.class.getName(), INeutronPortAware.class.getName()}, props)
                 .setImplementation(LispNeutronPortHandler.class));
 
-        logger.debug("LISP Neutron Service is initialized!");
+        LOG.debug("LISP Neutron Service is initialized!");
 
     }
 
     @Override
     public void destroy(BundleContext context, DependencyManager manager) throws Exception {
-        logger.debug("LISP Neutron Service is destroyed!");
+        LOG.debug("LISP Neutron Service is destroyed!");
     }
 
 }
index 6a61014981ca2778c4a2deb16605e7e26428ac6e..35fa0cd1cec0d495cceec7a80c20ce43acb45e82 100644 (file)
@@ -22,46 +22,46 @@ public class LispNeutronNetworkHandler extends LispNeutronService implements INe
 
        @Override
        public int canCreateNetwork(NeutronNetwork network) {
-        logger.info("Neutron canCreateNetwork : Network name: " + network.getNetworkName());
-        logger.debug("Lisp Neutron Network: " + network.toString());
+        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) {
-        logger.info("Neutron Network Created : Network name: " + network.getNetworkName());
-        logger.debug("Lisp Neutron Network: " + network.toString());
+        LOG.info("Neutron Network Created : Network name: " + network.getNetworkName());
+        LOG.debug("Lisp Neutron Network: " + network.toString());
 
        }
 
        @Override
        public int canUpdateNetwork(NeutronNetwork delta, NeutronNetwork original) {
-        logger.info("Neutron canUpdateNetwork : Network name: " + original.getNetworkName());
-        logger.debug("Lisp Neutron Network: " + original.toString());
+        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) {
-        logger.info("Neutron Network Updated : Network name: " + network.getNetworkName());
-        logger.debug("Lisp Neutron Network: " + network.toString());
+        LOG.info("Neutron Network Updated : Network name: " + network.getNetworkName());
+        LOG.debug("Lisp Neutron Network: " + network.toString());
 
        }
 
        @Override
        public int canDeleteNetwork(NeutronNetwork network) {
-        logger.info("Neutron canDeleteNetwork : Network name: " + network.getNetworkName());
-        logger.debug("Lisp Neutron Network: " + network.toString());
+        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) {
-        logger.info("Neutron Network Deleted : Network name: " + network.getNetworkName());
-        logger.debug("Lisp Neutron Network: " + network.toString());
+        LOG.info("Neutron Network Deleted : Network name: " + network.getNetworkName());
+        LOG.debug("Lisp Neutron Network: " + network.toString());
 
         return;
        }
index 77d64e0717c7e6929170a898c33a4456306b4510..f6e37d72475f176861b492c2ffabb56abe4f73bd 100644 (file)
@@ -27,7 +27,7 @@ public class LispNeutronPortHandler extends LispNeutronService implements INeutr
 
        @Override
        public int canCreatePort(NeutronPort port) {
-        logger.info("Neutron canCreatePort : Port name: " + port.getName());
+        LOG.info("Neutron canCreatePort : Port name: " + port.getName());
 
         return HttpURLConnection.HTTP_OK;
        }
@@ -37,9 +37,9 @@ public class LispNeutronPortHandler extends LispNeutronService implements INeutr
                // TODO Consider adding Port MAC -> Port fixed IP in MS
                // TODO Add Port fixed ip -> host ip mapping in MS - Requires extension of Port object
 
-        logger.info("Neutron Port Created: Port name: " + port.getName() + " Port Fixed IP: " +
+        LOG.info("Neutron Port Created: Port name: " + port.getName() + " Port Fixed IP: " +
                        ( port.getFixedIPs() != null ? port.getFixedIPs().get(0) : "No Fixed IP assigned" ));
-        logger.debug("Neutron Port Created : " + port.toString());
+        LOG.debug("Neutron Port Created : " + port.toString());
 
        }
 
@@ -47,9 +47,9 @@ public class LispNeutronPortHandler extends LispNeutronService implements INeutr
        public int canUpdatePort(NeutronPort delta, NeutronPort original) {
                // TODO Port IP and port's host ip is stored by Lisp Neutron Service. If there is change to these fields, the update needs to be processed.
 
-               logger.info("Neutron canUpdatePort : Port name: " + original.getName() + " Port Fixed IP: " +
+               LOG.info("Neutron canUpdatePort : Port name: " + original.getName() + " Port Fixed IP: " +
                                ( original.getFixedIPs() != null ? original.getFixedIPs().get(0) : "No Fixed IP assigned" ));
-               logger.debug("Neutron canUpdatePort : original" + original.toString() + " delta : " + delta.toString());
+               LOG.debug("Neutron canUpdatePort : original" + original.toString() + " delta : " + delta.toString());
 
         return HttpURLConnection.HTTP_OK;
        }
@@ -58,9 +58,9 @@ public class LispNeutronPortHandler extends LispNeutronService implements INeutr
        public void neutronPortUpdated(NeutronPort port) {
                // TODO Port IP and port's host ip is stored by Lisp Neutron Service. If there is change to these fields, the update needs to be processed.
 
-               logger.info("Neutron Port updated: Port name: " + port.getName() + " Port Fixed IP: " +
+               LOG.info("Neutron Port updated: Port name: " + port.getName() + " Port Fixed IP: " +
                        ( port.getFixedIPs() != null ? port.getFixedIPs().get(0) : "No Fixed IP assigned" ));
-               logger.debug("Neutron Port Updated : " + port.toString());
+               LOG.debug("Neutron Port Updated : " + port.toString());
 
        }
 
@@ -68,9 +68,9 @@ public class LispNeutronPortHandler extends LispNeutronService implements INeutr
        public int canDeletePort(NeutronPort port) {
                // TODO Check if Port IPs are stored by Lisp Neutron Service. if not return error code.
 
-               logger.info("Neutron canDeletePort : Port name: " + port.getName() + " Port Fixed IP: " +
+               LOG.info("Neutron canDeletePort : Port name: " + port.getName() + " Port Fixed IP: " +
                        ( port.getFixedIPs() != null ? port.getFixedIPs().get(0) : "No Fixed IP assigned" ));
-               logger.debug("Neutron canDeltePort: " + port.toString());
+               LOG.debug("Neutron canDeltePort: " + port.toString());
 
                return HttpURLConnection.HTTP_OK;
        }
@@ -79,9 +79,9 @@ public class LispNeutronPortHandler extends LispNeutronService implements INeutr
        public void neutronPortDeleted(NeutronPort port) {
                // TODO if port ips existed in MapServer, delete them. Else, log error.
 
-               logger.info("Neutron Port Deleted: Port name: " + port.getName() + " Port Fixed IP: " +
+               LOG.info("Neutron Port Deleted: Port name: " + port.getName() + " Port Fixed IP: " +
                        ( port.getFixedIPs() != null ? port.getFixedIPs().get(0) : "No Fixed IP assigned" ));
-               logger.debug("Neutron Port Deleted : " + port.toString());
+               LOG.debug("Neutron Port Deleted : " + port.toString());
 
        }
 }
index 324c223d48ff9d1561ea0acc76956483fef85cbe..c8691e061e6c537e72f76312a33cf859cf376709 100644 (file)
@@ -17,7 +17,7 @@ import org.opendaylight.lispflowmapping.interfaces.lisp.IFlowMapping;
 
 public class LispNeutronService implements ILispNeutronService {
 
-       protected static final Logger logger = LoggerFactory.getLogger(LispNeutronService.class);
+       protected static final Logger LOG = LoggerFactory.getLogger(LispNeutronService.class);
     protected IFlowMapping mappingService;
 
     public IFlowMapping getMappingService() {
@@ -25,12 +25,12 @@ public class LispNeutronService implements ILispNeutronService {
     }
 
     public void setMappingService(IFlowMapping mappingService) {
-        logger.debug("MappingService set in Lisp Neutron");
+        LOG.debug("MappingService set in Lisp Neutron");
         this.mappingService = mappingService;
     }
 
     public void unsetMappingService(IFlowMapping mappingService) {
-        logger.debug("MappingService was unset in LISP Neutron");
+        LOG.debug("MappingService was unset in LISP Neutron");
         this.mappingService = null;
     }
 
@@ -51,11 +51,11 @@ public class LispNeutronService implements ILispNeutronService {
     }
 */
     public void stop() {
-        logger.info("LISP Neutron Service is down!");
+        LOG.info("LISP Neutron Service is down!");
     }
 
     public void destroy() {
-        logger.debug("LISP Neutron Service is destroyed!");
+        LOG.debug("LISP Neutron Service is destroyed!");
         mappingService = null;
     }
 
index 65bf902c6dec00e470b1f8ea617a442a22420f26..2256f869df24f8cc9068b64ab694bceb439e41fe 100644 (file)
@@ -37,9 +37,9 @@ public class LispNeutronSubnetHandler extends LispNeutronService implements INeu
 
        @Override
        public int canCreateSubnet(NeutronSubnet subnet) {
-               logger.info("Neutron canCreateSubnet : Subnet name: " + subnet.getName() + " Subnet Cidr: " +
+               LOG.info("Neutron canCreateSubnet : Subnet name: " + subnet.getName() + " Subnet Cidr: " +
                        subnet.getCidr());
-        logger.debug("Lisp Neutron Subnet: " + subnet.toString());
+        LOG.debug("Lisp Neutron Subnet: " + subnet.toString());
 
         return HttpURLConnection.HTTP_OK;
        }
@@ -54,9 +54,9 @@ public class LispNeutronSubnetHandler extends LispNeutronService implements INeu
        public void neutronSubnetCreated(NeutronSubnet subnet) {
                //TODO update for multi-tenancy
 
-               logger.info("Neutron Subnet Created request : Subnet name: " + subnet.getName() + " Subnet Cidr: " +
+               LOG.info("Neutron Subnet Created request : Subnet name: " + subnet.getName() + " Subnet Cidr: " +
                        subnet.getCidr());
-        logger.debug("Lisp Neutron Subnet: " + subnet.toString());
+        LOG.debug("Lisp Neutron Subnet: " + subnet.toString());
 
            int masklen = Integer.parseInt(subnet.getCidr().split("/")[1]);
            SubnetUtils util = new SubnetUtils(subnet.getCidr());
@@ -75,11 +75,11 @@ public class LispNeutronSubnetHandler extends LispNeutronService implements INeu
         try{
                lispNeutronService.getMappingService().addAuthenticationKey(addressContainer, masklen, subnet.getNetworkUUID());
 
-               logger.debug("Neutron Subnet Added to MapServer : Subnet name: " + subnet.getName() + " EID Prefix: " +
+               LOG.debug("Neutron Subnet Added to MapServer : Subnet name: " + subnet.getName() + " EID Prefix: " +
                        addressContainer.toString() + " Key: " + subnet.getNetworkUUID());
         }
         catch (Exception e){
-               logger.error("Adding new subnet to lisp service mapping service failed. Subnet : " + subnet.toString());
+               LOG.error("Adding new subnet to lisp service mapping service failed. Subnet : " + subnet.toString());
         }
 
        }
@@ -93,17 +93,17 @@ public class LispNeutronSubnetHandler extends LispNeutronService implements INeu
        @Override
        public int canUpdateSubnet(NeutronSubnet delta, NeutronSubnet original) {
                if (delta == null || original == null){
-               logger.error("Neutron canUpdateSubnet rejected: subnet objects were null");
+               LOG.error("Neutron canUpdateSubnet rejected: subnet objects were null");
                return HttpURLConnection.HTTP_BAD_REQUEST;
                }
-               logger.info("Neutron canUpdateSubnet : Subnet name: " + original.getName() + " Subnet Cidr: " +
+               LOG.info("Neutron canUpdateSubnet : Subnet name: " + original.getName() + " Subnet Cidr: " +
                        original.getCidr());
-        logger.debug("Lisp Neutron Subnet update: original : " + original.toString() + " delta : " + delta.toString());
+        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())) ){
-                       logger.error("Neutron canUpdateSubnet rejected: Subnet name: " + original.getName() + " Subnet Cidr: " +
+                       LOG.error("Neutron canUpdateSubnet rejected: Subnet name: " + original.getName() + " Subnet Cidr: " +
                                original.getCidr());
                        return HttpURLConnection.HTTP_CONFLICT;
                }
@@ -122,9 +122,9 @@ public class LispNeutronSubnetHandler extends LispNeutronService implements INeu
         */
        @Override
        public int canDeleteSubnet(NeutronSubnet subnet) {
-        logger.info("Neutron canDeleteSubnet : Subnet name: " + subnet.getName() + " Subnet Cidr: " +
+        LOG.info("Neutron canDeleteSubnet : Subnet name: " + subnet.getName() + " Subnet Cidr: " +
                        subnet.getCidr() + "Key: " + subnet.getNetworkUUID());
-        logger.debug("Lisp Neutron Subnet: " + subnet.toString());
+        LOG.debug("Lisp Neutron Subnet: " + subnet.toString());
 
         int result;
            int masklen = Integer.parseInt(subnet.getCidr().split("/")[1]);
@@ -144,7 +144,7 @@ public class LispNeutronSubnetHandler extends LispNeutronService implements INeu
         try{
                if (lispNeutronService.getMappingService().getAuthenticationKey(addressContainer, masklen) == null){
 
-                       logger.error("Neutron canDeleteSubnet rejected : Subnet does not exist: Subnet name: " +
+                       LOG.error("Neutron canDeleteSubnet rejected : Subnet does not exist: Subnet name: " +
                                        subnet.getName() +
                                        " Eid Prefix: " + addressContainer.toString() +
                                        " Key: " + subnet.getNetworkUUID());
@@ -153,7 +153,7 @@ public class LispNeutronSubnetHandler extends LispNeutronService implements INeu
                result =  HttpURLConnection.HTTP_OK;
         }
         catch (Exception e){
-               logger.error("canDeleteSubnet request rejected. Subnet : " + subnet.toString());
+               LOG.error("canDeleteSubnet request rejected. Subnet : " + subnet.toString());
                result =  HttpURLConnection.HTTP_BAD_REQUEST;
         }
         return result;
@@ -165,9 +165,9 @@ public class LispNeutronSubnetHandler extends LispNeutronService implements INeu
         */
        @Override
        public void neutronSubnetDeleted(NeutronSubnet subnet) {
-               logger.info("Neutron Subnet Deleted Request : Subnet name: " + subnet.getName() + " Subnet Cidr: " +
+               LOG.info("Neutron Subnet Deleted Request : Subnet name: " + subnet.getName() + " Subnet Cidr: " +
                        subnet.getCidr() + "Key: " + subnet.getNetworkUUID());
-        logger.debug("Lisp Neutron Subnet: " + subnet.toString());
+        LOG.debug("Lisp Neutron Subnet: " + subnet.toString());
 
         int masklen = Integer.parseInt(subnet.getCidr().split("/")[1]);
            SubnetUtils util = new SubnetUtils(subnet.getCidr());
@@ -186,19 +186,19 @@ public class LispNeutronSubnetHandler extends LispNeutronService implements INeu
         try{
                // if subnet does not exist in MapServer, return error
                if (lispNeutronService.getMappingService().getAuthenticationKey(addressContainer,masklen) == null){
-                   logger.error("Neutron Delete Subnet Failed: Subnet does not exist: Subnet name: " + subnet.getName() +
+                   LOG.error("Neutron Delete Subnet Failed: Subnet does not exist: Subnet name: " + subnet.getName() +
                                " Eid Prefix: " + addressContainer.toString() +
                                "Key: " + subnet.getNetworkUUID());
                    return;
                }
                lispNeutronService.getMappingService().removeAuthenticationKey(addressContainer, masklen);
 
-               logger.debug("Neutron Subnet Deleted from MapServer : Subnet name: " + subnet.getName() +
+               LOG.debug("Neutron Subnet Deleted from MapServer : Subnet name: " + subnet.getName() +
                                " Eid Prefix: " + addressContainer.toString() +
                                " Key: " + subnet.getNetworkUUID());
         }
         catch (Exception e){
-               logger.error("Deleting subnet's EID prefix from mapping service failed + Subnet: " + subnet.toString());
+               LOG.error("Deleting subnet's EID prefix from mapping service failed + Subnet: " + subnet.toString());
         }
        }
 
index 9dfb567a778487b8691bbc51ac1aba953446501c..9600c214f98f9ae83e6028e3995c36ebe15ed341 100644 (file)
@@ -34,13 +34,13 @@ import org.slf4j.LoggerFactory;
 
 public class LispAddressConvertorNB {
 
-       protected static final Logger logger = LoggerFactory.getLogger(LispAddressConvertorNB.class);
+       protected static final Logger LOG = LoggerFactory.getLogger(LispAddressConvertorNB.class);
 
 
 public static LispAddress convertToLispAddress(LispAddressGeneric generic){
 
        if (generic == null){
-               logger.warn("Couldn't convert address, generic address is null");
+               LOG.warn("Couldn't convert address, generic address is null");
                return null;
        }
 
@@ -161,7 +161,7 @@ public static void convertGenericToLispAddresses(MapRegister mapRegister){
        LispAddressGeneric RLOCGeneric;
 
        if (mapRegister == null){
-               logger.warn("Couldn't convert addresses, mapRegister is null");
+               LOG.warn("Couldn't convert addresses, mapRegister is null");
                return;
        }
 
@@ -194,7 +194,7 @@ public static void convertRecordToGenericAddress(EidToLocatorRecord record){
        LispAddress RLOC;
 
        if (record == null){
-               logger.warn("Couldn't convert addresses, record is null");
+               LOG.warn("Couldn't convert addresses, record is null");
                return;
        }
 
index 88d5702f8fe6e52818ca1e7b39d01db651bb0382..359373a96a260b0fee1c6ac02bd15d1823e1ef30 100644 (file)
@@ -51,7 +51,7 @@ import org.slf4j.LoggerFactory;
 
 @Path("/")
 public class LispMappingNorthbound implements ILispmappingNorthbound {
-    protected static final Logger logger = LoggerFactory.getLogger(LispMappingNorthbound.class);
+    protected static final Logger LOG = LoggerFactory.getLogger(LispMappingNorthbound.class);
     private IFlowMapping mappingService;
 
     private String userName;
@@ -73,29 +73,29 @@ public class LispMappingNorthbound implements ILispmappingNorthbound {
     }
 
     void setFlowMappingService(IFlowMapping mappingService) {
-        logger.trace("FlowMapping set in LispNorthbound");
+        LOG.trace("FlowMapping set in LispNorthbound");
         this.mappingService = mappingService;
     }
 
     void unsetFlowMappingService(IFlowMapping mappingService) {
-        logger.trace("LispDAO was unset in LISP Northbound");
+        LOG.trace("LispDAO was unset in LISP Northbound");
         this.mappingService = null;
     }
 
     public void init() {
-        logger.trace("LISP Northbound Service is initialized!");
+        LOG.trace("LISP Northbound Service is initialized!");
     }
 
     public void start() {
-        logger.info("LISP Northbound Service is up!");
+        LOG.info("LISP Northbound Service is up!");
     }
 
     public void stop() {
-        logger.info("LISP Northbound Service is down!");
+        LOG.info("LISP Northbound Service is down!");
     }
 
     public void destroy() {
-        logger.trace("LISP Northbound Service is destroyed!");
+        LOG.trace("LISP Northbound Service is destroyed!");
         mappingService = null;
     }
 
index 0a691479483c5d641c15346b5e91f8f8fca6ca2f..35a480e160437da6309a2595b748472ce6b3f121 100644 (file)
@@ -44,7 +44,7 @@ import org.slf4j.LoggerFactory;
 import com.google.common.net.InetAddresses;
 
 public class LispSouthboundPlugin extends AbstractBindingAwareProvider implements IConfigLispSouthboundPlugin, CommandProvider, LispflowmappingService {
-    protected static final Logger logger = LoggerFactory.getLogger(LispSouthboundPlugin.class);
+    protected static final Logger LOG = LoggerFactory.getLogger(LispSouthboundPlugin.class);
 
     private static Object startLock = new Object();
     private LispIoThread lispThread;
@@ -80,7 +80,7 @@ public class LispSouthboundPlugin extends AbstractBindingAwareProvider implement
         lispXtrSouthboundService = null;
         lispThread = null;
         xtrThread = null;
-        logger.info("LISP (RFC6830) Mapping Service is down!");
+        LOG.info("LISP (RFC6830) Mapping Service is down!");
         try {
             Thread.sleep(1100);
         } catch (InterruptedException e) {
@@ -110,13 +110,13 @@ public class LispSouthboundPlugin extends AbstractBindingAwareProvider implement
 
             int lispReceiveTimeout = 1000;
 
-            logger.info("LISP (RFC6830) Mapping Service is running and listening on address: " + bindingAddress + " port: "
+            LOG.info("LISP (RFC6830) Mapping Service is running and listening on address: " + bindingAddress + " port: "
                     + threadSocket.getLocalPort());
             try {
 
                 threadSocket.setSoTimeout(lispReceiveTimeout);
             } catch (SocketException e) {
-                logger.error("Cannot open socket on UDP port " + threadSocket.getLocalPort(), e);
+                LOG.error("Cannot open socket on UDP port " + threadSocket.getLocalPort(), e);
                 return;
             }
 
@@ -125,24 +125,24 @@ public class LispSouthboundPlugin extends AbstractBindingAwareProvider implement
                 DatagramPacket packet = new DatagramPacket(buffer, buffer.length);
                 try {
                     threadSocket.receive(packet);
-                    logger.trace("Received a packet!");
+                    LOG.trace("Received a packet!");
                 } catch (SocketTimeoutException ste) {
                     continue;
                 } catch (IOException e) {
-                    logger.warn("IO Exception while trying to recieve packet", e);
+                    LOG.warn("IO Exception while trying to recieve packet", e);
                 }
-                logger.trace(String.format("Handling packet from {%s}:{%d} (len={%d})", packet.getAddress().getHostAddress(), packet.getPort(),
+                LOG.trace(String.format("Handling packet from {%s}:{%d} (len={%d})", packet.getAddress().getHostAddress(), packet.getPort(),
                         packet.getLength()));
 
                 try {
                     this.service.handlePacket(packet);
                 } catch (Exception e) {
-                    logger.warn("Error while handling packet", e);
+                    LOG.warn("Error while handling packet", e);
                 }
             }
 
             threadSocket.close();
-            logger.trace("Socket closed");
+            LOG.trace("Socket closed");
             running = false;
         }
 
@@ -173,12 +173,12 @@ public class LispSouthboundPlugin extends AbstractBindingAwareProvider implement
             socket = new DatagramSocket(new InetSocketAddress(bindingAddress, LispMessage.PORT_NUM));
             lispThread = new LispIoThread(socket, lispSouthboundService);
             lispThread.start();
-            logger.info("LISP (RFC6830) Mapping Service Southbound Plugin is up!");
+            LOG.info("LISP (RFC6830) Mapping Service Southbound Plugin is up!");
             if (listenOnXtrPort) {
                 restartXtrThread();
             }
         } catch (SocketException e) {
-            logger.error("couldn't start socket {}", e.getMessage());
+            LOG.error("couldn't start socket {}", e.getMessage());
         }
     }
 
@@ -188,14 +188,14 @@ public class LispSouthboundPlugin extends AbstractBindingAwareProvider implement
             xtrSocket = new DatagramSocket(new InetSocketAddress(bindingAddress, xtrPort));
             xtrThread = new LispIoThread(xtrSocket, lispXtrSouthboundService);
             xtrThread.start();
-            logger.info("xTR Southbound Plugin is up!");
+            LOG.info("xTR Southbound Plugin is up!");
         } catch (SocketException e) {
-            logger.warn("failed to start xtr thread: {}", e.getMessage());
+            LOG.warn("failed to start xtr thread: {}", e.getMessage());
         }
     }
 
     public void onSessionInitiated(ProviderContext session) {
-        logger.info("LISP (RFC6830) Mapping Service is up!");
+        LOG.info("LISP (RFC6830) Mapping Service is up!");
         synchronized (startLock) {
             if (!alreadyInit) {
                 alreadyInit = true;
@@ -203,7 +203,7 @@ public class LispSouthboundPlugin extends AbstractBindingAwareProvider implement
                 lispXtrSouthboundService = new LispXtrSouthboundService();
                 registerWithOSGIConsole();
                 registerRPCs(session);
-                logger.trace("Provider Session initialized");
+                LOG.trace("Provider Session initialized");
                 if (bindingAddress == null) {
                     setLispAddress("0.0.0.0");
                 }
@@ -218,7 +218,7 @@ public class LispSouthboundPlugin extends AbstractBindingAwareProvider implement
             lispXtrSouthboundService.setNotificationProvider(session.getSALService(NotificationProviderService.class));
             session.addRpcImplementation(LispflowmappingService.class, this);
         } catch (Exception e) {
-            logger.error(e.getMessage(), e);
+            LOG.error(e.getMessage(), e);
         }
     }
 
@@ -228,22 +228,22 @@ public class LispSouthboundPlugin extends AbstractBindingAwareProvider implement
         InetAddress ip = InetAddresses.forString(address.getIpAddress().getIpv4Address().getValue());
         packet.setAddress(ip);
         try {
-            if (logger.isDebugEnabled()) {
-                logger.trace("Sending " + packetType + " on port " + address.getPort().getValue() + " to address: " + ip);
+            if (LOG.isDebugEnabled()) {
+                LOG.trace("Sending " + packetType + " on port " + address.getPort().getValue() + " to address: " + ip);
             }
             socket.send(packet);
         } catch (IOException e) {
-            logger.warn("Failed to send " + packetType, e);
+            LOG.warn("Failed to send " + packetType, e);
         }
     }
 
     public void setLispAddress(String address) {
         synchronized (startLock) {
             if (bindingAddress != null && bindingAddress.equals(address)) {
-                logger.trace("configured lisp binding address didn't change.");
+                LOG.trace("configured lisp binding address didn't change.");
             } else {
                 String action = (bindingAddress == null ? "Setting" : "Resetting");
-                logger.trace(action + " lisp binding address to: " + address);
+                LOG.trace(action + " lisp binding address to: " + address);
                 bindingAddress = address;
                 if (lispThread != null) {
                     lispThread.stopRunning();
@@ -274,36 +274,36 @@ public class LispSouthboundPlugin extends AbstractBindingAwareProvider implement
 
     @Override
     public Future<RpcResult<Void>> sendMapNotify(SendMapNotifyInput mapNotifyInput) {
-        logger.trace("sendMapNotify called!!");
+        LOG.trace("sendMapNotify called!!");
         if (mapNotifyInput != null) {
             ByteBuffer outBuffer = MapNotifySerializer.getInstance().serialize(mapNotifyInput.getMapNotify());
             handleSerializedLispBuffer(mapNotifyInput.getTransportAddress(), outBuffer, MAP_NOTIFY);
         } else {
-            logger.warn("MapNotify was null");
+            LOG.warn("MapNotify was null");
         }
         return null;
     }
 
     @Override
     public Future<RpcResult<Void>> sendMapReply(SendMapReplyInput mapReplyInput) {
-        logger.trace("sendMapReply called!!");
+        LOG.trace("sendMapReply called!!");
         if (mapReplyInput != null) {
             ByteBuffer outBuffer = MapReplySerializer.getInstance().serialize(mapReplyInput.getMapReply());
             handleSerializedLispBuffer(mapReplyInput.getTransportAddress(), outBuffer, MAP_REPlY);
         } else {
-            logger.warn("MapReply was null");
+            LOG.warn("MapReply was null");
         }
         return null;
     }
 
     @Override
     public Future<RpcResult<Void>> sendMapRequest(SendMapRequestInput mapRequestInput) {
-        logger.trace("sendMapRequest called!!");
+        LOG.trace("sendMapRequest called!!");
         if (mapRequestInput != null) {
             ByteBuffer outBuffer = MapRequestSerializer.getInstance().serialize(mapRequestInput.getMapRequest());
             handleSerializedLispBuffer(mapRequestInput.getTransportAddress(), outBuffer, MAP_REQUEST);
         } else {
-            logger.debug("MapRequest was null");
+            LOG.debug("MapRequest was null");
         }
         return null;
     }
@@ -312,10 +312,10 @@ public class LispSouthboundPlugin extends AbstractBindingAwareProvider implement
     public void shouldListenOnXtrPort(boolean shouldListenOnXtrPort) {
         listenOnXtrPort = shouldListenOnXtrPort;
         if (listenOnXtrPort) {
-            logger.debug("restarting xtr thread");
+            LOG.debug("restarting xtr thread");
             restartXtrThread();
         } else {
-            logger.debug("terminating thread");
+            LOG.debug("terminating thread");
             stopXtrThread();
         }
     }
index 3f48e451eff2e066cd945cdd0438073b4b2ece17..b396713b6aa066bc8a7bb5427e183301123eb997 100644 (file)
@@ -33,7 +33,7 @@ import org.slf4j.LoggerFactory;
 
 public class LispSouthboundService implements ILispSouthboundService {
     private NotificationProviderService notificationProvider;
-    protected static final Logger logger = LoggerFactory.getLogger(LispSouthboundService.class);
+    protected static final Logger LOG = LoggerFactory.getLogger(LispSouthboundService.class);
 
     public void setNotificationProvider(NotificationProviderService nps) {
         this.notificationProvider = nps;
@@ -44,17 +44,17 @@ public class LispSouthboundService implements ILispSouthboundService {
         int type = ByteUtil.getUnsignedByte(inBuffer, LispMessage.Pos.TYPE) >> 4;
         Object lispType = LispMessageEnum.valueOf((byte) (type));
         if (lispType == LispMessageEnum.EncapsulatedControlMessage) {
-            logger.trace("Received packet of type EncapsulatedControlMessage");
+            LOG.trace("Received packet of type EncapsulatedControlMessage");
             handleEncapsulatedControlMessage(inBuffer, packet.getAddress());
         } else if (lispType == LispMessageEnum.MapRequest) {
-            logger.trace("Received packet of type MapRequest");
+            LOG.trace("Received packet of type MapRequest");
             handleMapRequest(inBuffer, packet.getPort());
         } else if (lispType == LispMessageEnum.MapRegister) {
-            logger.trace("Received packet of type MapRegister");
+            LOG.trace("Received packet of type MapRegister");
             handleMapRegister(inBuffer, packet.getAddress(), packet.getPort());
         } else {
-            logger.warn("Received unknown LISP control packet (type " + ((lispType != null) ? lispType : type) + ")");
-            logger.trace("Buffer: " + ByteUtil.bytesToHex(packet.getData(), packet.getLength()));
+            LOG.warn("Received unknown LISP control packet (type " + ((lispType != null) ? lispType : type) + ")");
+            LOG.trace("Buffer: " + ByteUtil.bytesToHex(packet.getData(), packet.getLength()));
         }
     }
 
@@ -82,9 +82,9 @@ public class LispSouthboundService implements ILispSouthboundService {
             requestMappingBuilder.setTransportAddress(transportAddressBuilder.build());
             if (notificationProvider != null) {
                 notificationProvider.publish(requestMappingBuilder.build());
-                logger.trace("MapRequest was published!");
+                LOG.trace("MapRequest was published!");
             } else {
-                logger.warn("Notification Provider is null!");
+                LOG.warn("Notification Provider is null!");
             }
         } catch (RuntimeException re) {
             throw new LispMalformedPacketException("Couldn't deserialize Map-Request (len=" + inBuffer.capacity() + ")", re);
@@ -122,9 +122,9 @@ public class LispSouthboundService implements ILispSouthboundService {
             addMappingBuilder.setTransportAddress(transportAddressBuilder.build());
             if (notificationProvider != null) {
                 notificationProvider.publish(addMappingBuilder.build());
-                logger.trace("MapRegister was published!");
+                LOG.trace("MapRegister was published!");
             } else {
-                logger.warn("Notification Provider is null!");
+                LOG.warn("Notification Provider is null!");
             }
         } catch (RuntimeException re) {
             throw new LispMalformedPacketException("Couldn't deserialize Map-Register (len=" + inBuffer.capacity() + ")", re);
index 9e80bdbd27051fd1ca2508cdc10fb2f1bc1422cd..43392500fa4e006c846d01c120ed1487e3e17a54 100644 (file)
@@ -32,7 +32,7 @@ import org.slf4j.LoggerFactory;
 
 public class LispXtrSouthboundService implements ILispSouthboundService {
     private NotificationProviderService notificationProvider;
-    protected static final Logger logger = LoggerFactory.getLogger(LispXtrSouthboundService.class);
+    protected static final Logger LOG = LoggerFactory.getLogger(LispXtrSouthboundService.class);
 
     public void setNotificationProvider(NotificationProviderService nps) {
         this.notificationProvider = nps;
@@ -42,13 +42,13 @@ public class LispXtrSouthboundService implements ILispSouthboundService {
         ByteBuffer inBuffer = ByteBuffer.wrap(packet.getData(), 0, packet.getLength());
         Object lispType = LispMessageEnum.valueOf((byte) (ByteUtil.getUnsignedByte(inBuffer, LispMessage.Pos.TYPE) >> 4));
         if (lispType == LispMessageEnum.MapRequest) {
-            logger.trace("Received packet of type MapRequest for xTR");
+            LOG.trace("Received packet of type MapRequest for xTR");
             handleMapRequest(inBuffer);
         } else if (lispType ==  LispMessageEnum.MapReply){
-            logger.trace("Received packet of type MapReply for xTR");
+            LOG.trace("Received packet of type MapReply for xTR");
             handleMapReply(inBuffer);
         } else {
-            logger.warn("Received unknown packet type");
+            LOG.warn("Received unknown packet type");
         }
     }
 
@@ -68,9 +68,9 @@ public class LispXtrSouthboundService implements ILispSouthboundService {
             requestMappingBuilder.setTransportAddress(transportAddressBuilder.build());
             if (notificationProvider != null) {
                 notificationProvider.publish(requestMappingBuilder.build());
-                logger.trace("MapRequest was published!");
+                LOG.trace("MapRequest was published!");
             } else {
-                logger.warn("Notification Provider is null!");
+                LOG.warn("Notification Provider is null!");
             }
         } catch (RuntimeException re) {
             throw new LispMalformedPacketException("Couldn't deserialize Map-Request (len=" + inBuffer.capacity() + ")", re);
@@ -86,9 +86,9 @@ public class LispXtrSouthboundService implements ILispSouthboundService {
 
             if (notificationProvider != null) {
                 notificationProvider.publish(replyMappingBuilder.build());
-                logger.trace("MapReply was published!");
+                LOG.trace("MapReply was published!");
             } else {
-                logger.warn("Notification Provider is null!");
+                LOG.warn("Notification Provider is null!");
             }
         } catch (RuntimeException re) {
             throw new LispMalformedPacketException("Couldn't deserialize Map-Reply (len=" + buffer.capacity() + ")", re);