Clean up logging
authorStephen Kitt <skitt@redhat.com>
Fri, 24 Jul 2015 13:58:09 +0000 (15:58 +0200)
committerStephen Kitt <skitt@redhat.com>
Fri, 24 Jul 2015 15:01:37 +0000 (17:01 +0200)
Clean up logger declarations as per
https://wiki.opendaylight.org/view/Logging_Best_Practices: always
specify
    private static final Logger LOG = LoggerFactory.getLogger(...)
and use parameterised logging.

Change-Id: Ia6eb26588c631a52483b059d10d752b00daf5a98
Signed-off-by: Stephen Kitt <skitt@redhat.com>
47 files changed:
integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/library/OvsdbLibraryIT.java
integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/ovsdbclient/OvsdbClientTestIT.java
integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/ovsdbclient/OvsdbClientTestITTyped.java
integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/plugin/OvsdbPluginIT.java
integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/plugin/OvsdbPluginV3IT.java
northbound/src/main/java/org/opendaylight/ovsdb/northbound/OvsdbNorthboundV2.java
northbound/src/test/java/org/opendaylight/ovsdb/northbound/NodeResourceTest.java
openstack/net-virt-providers/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/AbstractServiceInstance.java
openstack/net-virt-providers/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/OF13Provider.java
openstack/net-virt-providers/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/PipelineOrchestratorImpl.java
openstack/net-virt-providers/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/services/ClassifierService.java
openstack/net-virt-providers/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/services/EgressAclService.java
openstack/net-virt-providers/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/services/IngressAclService.java
openstack/net-virt-providers/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/services/L2ForwardingService.java
openstack/net-virt-providers/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/services/LoadBalancerService.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/AbstractHandler.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/FWaasHandler.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/FloatingIPHandler.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSHandler.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSPoolHandler.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSPoolMemberHandler.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/NetworkHandler.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/PortHandler.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/PortSecurityHandler.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/RouterHandler.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/SouthboundHandler.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/SubnetHandler.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/api/UuidUtils.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/BridgeConfigurationManagerImpl.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/ConfigurationServiceImpl.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/EventDispatcherImpl.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/NeutronL3Adapter.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/NodeCacheManagerImpl.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/ProviderNetworkManagerImpl.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/SecurityServicesImpl.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/TenantNetworkManagerImpl.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/VlanConfigurationCacheImpl.java
ovsdb-plugin-compatibility-layer/src/main/java/org/opendaylight/ovsdb/compatibility/plugin/api/NodeUtils.java
ovsdb-plugin-compatibility-layer/src/main/java/org/opendaylight/ovsdb/compatibility/plugin/impl/ConnectionServiceImpl.java
ovsdb-plugin-compatibility-layer/src/main/java/org/opendaylight/ovsdb/compatibility/plugin/internal/Activator.java
plugin/src/main/java/org/opendaylight/ovsdb/plugin/api/Connection.java
plugin/src/main/java/org/opendaylight/ovsdb/plugin/impl/ConfigurationServiceImpl.java
plugin/src/main/java/org/opendaylight/ovsdb/plugin/impl/ConnectionServiceImpl.java
plugin/src/main/java/org/opendaylight/ovsdb/plugin/impl/InventoryServiceImpl.java
utils/mdsal-node/src/main/java/org/opendaylight/ovsdb/utils/mdsal/node/NodeUtils.java
utils/mdsal-openflow/src/main/java/org/opendaylight/ovsdb/utils/mdsal/openflow/InstructionUtils.java
utils/mdsal-openflow/src/main/java/org/opendaylight/ovsdb/utils/mdsal/openflow/MatchUtils.java

index 3df31d0f5a3ef2095d8002a591ce65759f7a72b6..a134e812ebd7ba0a082c5a6e9fcc5bb3fb949b4b 100644 (file)
@@ -55,7 +55,7 @@ import com.google.common.util.concurrent.ListenableFuture;
 
 @RunWith(PaxExam.class)
 public class OvsdbLibraryIT extends OvsdbIntegrationTestBase {
-    private Logger log = LoggerFactory.getLogger(OvsdbLibraryIT.class);
+    private static final Logger LOG = LoggerFactory.getLogger(OvsdbLibraryIT.class);
     @Inject
     private BundleContext bc;
     private OvsdbClient client = null;
@@ -89,13 +89,12 @@ public class OvsdbLibraryIT extends OvsdbIntegrationTestBase {
         for (Bundle element : b) {
             int state = element.getState();
             if (state != Bundle.ACTIVE && state != Bundle.RESOLVED) {
-                log.info("Bundle:" + element.getSymbolicName() + " state:"
-                          + stateToString(state));
+                LOG.info("Bundle: {} state: {}", element.getSymbolicName(), stateToString(state));
                 debugit = true;
             }
         }
         if (debugit) {
-            log.debug("Do some debugging because some bundle is unresolved");
+            LOG.debug("Do some debugging because some bundle is unresolved");
             Thread.sleep(600000);
         }
 
index 5a31fe2afb7f4aad4405ebd661d8c39340eebb4b..6009e440ffd7500a664f5f5cc17c562b05863069 100644 (file)
@@ -42,8 +42,6 @@ import org.opendaylight.ovsdb.lib.schema.ColumnSchema;
 import org.opendaylight.ovsdb.lib.schema.DatabaseSchema;
 import org.opendaylight.ovsdb.lib.schema.GenericTableSchema;
 import org.opendaylight.ovsdb.lib.schema.TableSchema;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Lists;
@@ -52,7 +50,6 @@ import com.google.common.util.concurrent.ListenableFuture;
 
 
 public class OvsdbClientTestIT extends OvsdbTestBase {
-    Logger logger = LoggerFactory.getLogger(OvsdbClientTestIT.class);
 
     OvsdbClient ovs;
     DatabaseSchema dbSchema = null;
index c3cc354e7d4bc93f5b56d59f98493517e901a511..a39af76894102af017bafb303df84261a3d85a9f 100644 (file)
@@ -35,8 +35,6 @@ import org.opendaylight.ovsdb.lib.schema.ColumnSchema;
 import org.opendaylight.ovsdb.lib.schema.DatabaseSchema;
 import org.opendaylight.ovsdb.lib.schema.GenericTableSchema;
 import org.opendaylight.ovsdb.lib.schema.TableSchema;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Sets;
@@ -44,7 +42,6 @@ import com.google.common.util.concurrent.ListenableFuture;
 
 public class OvsdbClientTestITTyped extends OvsdbTestBase {
 
-    Logger logger = LoggerFactory.getLogger(OvsdbClientTestITTyped.class);
     OvsdbClient ovs;
     DatabaseSchema dbSchema = null;
     static String testBridgeName = "br_test";
index bbdc1385cdf67f7e92f439960739c0da547c9278..f15f26fbf853915b159e1d2d12394a01ad184a56 100644 (file)
@@ -68,7 +68,7 @@ import javax.inject.Inject;
 
 @RunWith(PaxExam.class)
 public class OvsdbPluginIT extends OvsdbIntegrationTestBase {
-    private Logger log = LoggerFactory.getLogger(OvsdbPluginIT.class);
+    private static final Logger LOG = LoggerFactory.getLogger(OvsdbPluginIT.class);
     @Inject
     private BundleContext bc;
     private OvsdbConfigurationService ovsdbConfigurationService = null;
@@ -110,13 +110,12 @@ public class OvsdbPluginIT extends OvsdbIntegrationTestBase {
         for (Bundle element : b) {
             int state = element.getState();
             if (state != Bundle.ACTIVE && state != Bundle.RESOLVED) {
-                log.info("Bundle:" + element.getSymbolicName() + " state:"
-                          + stateToString(state));
+                LOG.info("Bundle: {} state: {}", element.getSymbolicName(), stateToString(state));
                 debugit = true;
             }
         }
         if (debugit) {
-            log.debug("Do some debugging because some bundle is unresolved");
+            LOG.debug("Do some debugging because some bundle is unresolved");
         }
 
         assertFalse(debugit);
@@ -235,7 +234,7 @@ public class OvsdbPluginIT extends OvsdbIntegrationTestBase {
 
         final int currControllersSize = bridge.getControllerColumn().getData().size();
 
-        log.debug("Bridge has " + bridge.getControllerColumn().getData().size() + " controllers");
+        LOG.debug("Bridge has {} controllers", currControllersSize);
 
         // ** Note: we assert against 2 or less -- instead of 1 -- to account for the _real_ controller's connection
         assertTrue( "Too few controllers added to bridge object. Is this bug 960?", currControllersSize >= 1 );
@@ -265,7 +264,7 @@ public class OvsdbPluginIT extends OvsdbIntegrationTestBase {
             }
             for (Row bridgeRow : bridgeRows.values()) {
                 Bridge bridge = ovsdbConfigurationService.getTypedRow(node, Bridge.class, bridgeRow);
-                log.trace("Test clean up removing Bridge " + bridge.getUuid());
+                LOG.trace("Test clean up removing Bridge {}", bridge.getUuid());
                 Status delStatus = ovsdbConfigurationService.deleteRow(node,
                                                                 bridge.getSchema().getName(),
                                                                 bridge.getUuid().toString());
@@ -275,7 +274,7 @@ public class OvsdbPluginIT extends OvsdbIntegrationTestBase {
         }
 
         if (bridgesRemoved > 0) {
-            log.debug("Test clean up removed " + bridgesRemoved + " bridges");
+            LOG.debug("Test clean up removed {} bridges", bridgesRemoved);
             Thread.sleep(2000); // TODO : Remove this Sleep once the Select operation is resolved.
         }
     }
index 555485eb4bf7038d128f4945c2319e7d9be7d9c1..c330f3273545e5360a5b892bc8beb4d4061a0aac 100644 (file)
@@ -70,7 +70,7 @@ import com.google.common.collect.Sets;
 @RunWith(PaxExam.class)
 @ExamReactorStrategy(PerSuite.class)
 public class OvsdbPluginV3IT extends OvsdbIntegrationTestBase {
-    private Logger log = LoggerFactory.getLogger(OvsdbPluginV3IT.class);
+    private static final Logger LOG = LoggerFactory.getLogger(OvsdbPluginV3IT.class);
     @Inject
     private BundleContext bc;
     private OvsdbConfigurationService ovsdbConfigurationService = null;
@@ -140,7 +140,7 @@ public class OvsdbPluginV3IT extends OvsdbIntegrationTestBase {
             identifier = connectionInfo.getRemoteAddress().getHostAddress()+":"+connectionInfo.getRemotePort();
         }
         assertEquals(node, connectionService.getNode("OVS|" + identifier));
-        log.info("Nodes = "+ connectionService.getNodes());
+        LOG.info("Nodes = {}", connectionService.getNodes());
         /*
          * Test sequence :
          * 1. Print Cache and Assert to make sure the bridge is not created yet.
@@ -204,7 +204,7 @@ public class OvsdbPluginV3IT extends OvsdbIntegrationTestBase {
         Row bridgeRow = ovsdbConfigurationService.getRow(node, databaseName, bridge.getSchema().getName(), status.getUuid());
         assertNotNull(bridgeRow);
         bridge = connection.getClient().getTypedRowWrapper(Bridge.class, bridgeRow);
-        log.info("Bridge UUID "+bridge.getUuid()+" Status Uuid "+status.getUuid());
+        LOG.info("Bridge UUID {} Status Uuid {}", bridge.getUuid(), status.getUuid());
         assertEquals(bridge.getUuid(), status.getUuid());
 
         bridge = connection.getClient().createTypedRowWrapper(Bridge.class);
@@ -252,12 +252,12 @@ public class OvsdbPluginV3IT extends OvsdbIntegrationTestBase {
 
     public void printCache() throws Exception {
         List<String> tables = ovsdbConfigurationService.getTables(node, databaseName);
-        log.info("Tables = "+tables);
+        LOG.info("Tables = {}", tables);
         assertNotNull(tables);
         for (String table : tables) {
-            log.info("Table "+table);
+            LOG.info("Table {}", table);
             ConcurrentMap<UUID, Row<GenericTableSchema>> rows = ovsdbConfigurationService.getRows(node, databaseName, table);
-            log.info(rows.toString());
+            LOG.info(rows.toString());
         }
     }
 
index a9f6200199847b7458d5efd24951a6dcc3221974..ec7b7b1708cb97d8cffd0cb7572cd98cb184965a 100644 (file)
@@ -48,8 +48,6 @@ import org.opendaylight.ovsdb.plugin.api.OvsdbConnectionService;
 import org.opendaylight.ovsdb.plugin.api.StatusWithUuid;
 import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import com.fasterxml.jackson.databind.JsonNode;
 
@@ -72,7 +70,6 @@ import com.fasterxml.jackson.databind.JsonNode;
 @Path("/v2/")
 @Deprecated
 public class OvsdbNorthboundV2 {
-    protected static final Logger logger = LoggerFactory.getLogger(OvsdbNorthboundV2.class);
 
     @Context
     private UriInfo _uriInfo;
index e2e0f896da2565c0ca880dff9ad06d300300065a..c9b032f3d377ff3f4cd008b099a41149d613cfb7 100644 (file)
@@ -33,13 +33,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.N
 import org.powermock.api.mockito.PowerMockito;
 import org.powermock.core.classloader.annotations.PrepareForTest;
 import org.powermock.modules.junit4.PowerMockRunner;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 @RunWith(PowerMockRunner.class)
 @PrepareForTest(ServiceHelper.class)
 public class NodeResourceTest {
-    static final Logger LOG = LoggerFactory.getLogger(NodeResourceTest.class);
     private static final String OVS = "OVS";
     private static final String IDENTIFIER = "192.168.120.31:45001";
     private static final String IDENTIFIER2 = "192.168.120.31:45002";
index 5b9573fd4c094f9cab6262fba7c8e66fc3b251d8..48f5d5cf3874325ebcd2edb2b56c142c14080a2f 100644 (file)
@@ -59,7 +59,7 @@ import org.slf4j.LoggerFactory;
  */
 public abstract class AbstractServiceInstance {
     public static final String SERVICE_PROPERTY ="serviceProperty";
-    private static final Logger logger = LoggerFactory.getLogger(AbstractServiceInstance.class);
+    private static final Logger LOG = LoggerFactory.getLogger(AbstractServiceInstance.class);
     public static final String OPENFLOW = "openflow:";
     private DataBroker dataBroker = null;
     // OSGi Services that we are dependent on.
@@ -144,7 +144,7 @@ public abstract class AbstractServiceInstance {
     }
 
     protected void writeFlow(FlowBuilder flowBuilder, NodeBuilder nodeBuilder) {
-        logger.debug("writeFlow: flowBuilder: {}, nodeBuilder: {}",
+        LOG.debug("writeFlow: flowBuilder: {}, nodeBuilder: {}",
                 flowBuilder.build(), nodeBuilder.build());
         WriteTransaction modification = dataBroker.newWriteOnlyTransaction();
         modification.put(LogicalDatastoreType.CONFIGURATION, createNodePath(nodeBuilder),
@@ -155,9 +155,9 @@ public abstract class AbstractServiceInstance {
         CheckedFuture<Void, TransactionCommitFailedException> commitFuture = modification.submit();
         try {
             commitFuture.get();  // TODO: Make it async (See bug 1362)
-            logger.debug("Transaction success for write of Flow "+flowBuilder.getFlowName());
+            LOG.debug("Transaction success for write of Flow {}", flowBuilder.getFlowName());
         } catch (Exception e) {
-            logger.error(e.getMessage(), e);
+            LOG.error(e.getMessage(), e);
             modification.cancel();
         }
     }
@@ -169,9 +169,9 @@ public abstract class AbstractServiceInstance {
         CheckedFuture<Void, TransactionCommitFailedException> commitFuture = modification.submit();
         try {
             commitFuture.get();  // TODO: Make it async (See bug 1362)
-            logger.debug("Transaction success for deletion of Flow " + flowBuilder.getFlowName());
+            LOG.debug("Transaction success for deletion of Flow {}", flowBuilder.getFlowName());
         } catch (Exception e) {
-            logger.error(e.getMessage(), e);
+            LOG.error(e.getMessage(), e);
             modification.cancel();
         }
     }
@@ -185,10 +185,10 @@ public abstract class AbstractServiceInstance {
                 return data.get();
             }
         } catch (InterruptedException|ExecutionException e) {
-            logger.error(e.getMessage(), e);
+            LOG.error(e.getMessage(), e);
         }
 
-        logger.debug("Cannot find data for Flow " + flowBuilder.getFlowName());
+        LOG.debug("Cannot find data for Flow {}", flowBuilder.getFlowName());
         return null;
     }
 
@@ -203,10 +203,10 @@ public abstract class AbstractServiceInstance {
                 return data.get();
             }
         } catch (InterruptedException|ExecutionException e) {
-            logger.error(e.getMessage(), e);
+            LOG.error(e.getMessage(), e);
         }
 
-        logger.debug("Cannot find data for Node " + nodeId);
+        LOG.debug("Cannot find data for Node {}", nodeId);
         return null;
     }
 
@@ -214,7 +214,7 @@ public abstract class AbstractServiceInstance {
         Long dpid = 0L;
         dpid = southbound.getDataPathId(node);
         if (dpid == 0) {
-            logger.warn("getDpid: dpid not found: {}", node);
+            LOG.warn("getDpid: dpid not found: {}", node);
         }
         return dpid;
     }
@@ -226,14 +226,14 @@ public abstract class AbstractServiceInstance {
      */
     protected void programDefaultPipelineRule(Node node) {
         if (!isBridgeInPipeline(node)) {
-            //logger.trace("Bridge is not in pipeline {} ", node);
+            //LOG.trace("Bridge is not in pipeline {} ", node);
             return;
         }
         MatchBuilder matchBuilder = new MatchBuilder();
         FlowBuilder flowBuilder = new FlowBuilder();
         Long dpid = getDpid(node);
         if (dpid == 0L) {
-            logger.info("could not find dpid: {}", node.getNodeId());
+            LOG.info("could not find dpid: {}", node.getNodeId());
             return;
         }
         String nodeName = OPENFLOW + getDpid(node);
index 389aef1d1733dcdaa1547e1df2486c0a6e88b885..2c8f0a1ee7889794c64399c65cea0b759305be5b 100644 (file)
@@ -110,7 +110,7 @@ import java.util.concurrent.ExecutionException;
 // The patterns need to be preserved even though not all parameters are used in all methods
 @SuppressWarnings("UnusedParameters")
 public class OF13Provider implements ConfigInterface, NetworkingProvider {
-    private static final Logger logger = LoggerFactory.getLogger(OF13Provider.class);
+    private static final Logger LOG = LoggerFactory.getLogger(OF13Provider.class);
     private static final short TABLE_0_DEFAULT_INGRESS = 0;
     private static final short TABLE_1_ISOLATE_TENANT = 10;
     private static final short TABLE_2_LOCAL_FORWARD = 20;
@@ -155,17 +155,17 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
     private Status getTunnelReadinessStatus (Node node, String tunnelKey) {
         InetAddress srcTunnelEndPoint = configurationService.getTunnelEndPoint(node);
         if (srcTunnelEndPoint == null) {
-            logger.error("Tunnel Endpoint not configured for Node {}", node);
+            LOG.error("Tunnel Endpoint not configured for Node {}", node);
             return new Status(StatusCode.NOTFOUND, "Tunnel Endpoint not configured for "+ node);
         }
 
         if (!bridgeConfigurationManager.isNodeNeutronReady(node)) {
-            logger.error(node+" is not Overlay ready");
+            LOG.error("{} is not Overlay ready", node);
             return new Status(StatusCode.NOTACCEPTABLE, node+" is not Overlay ready");
         }
 
         if (!tenantNetworkManager.isTenantNetworkPresentInNode(node, tunnelKey)) {
-            logger.debug(node + " has no VM corresponding to segment " + tunnelKey);
+            LOG.debug("{} has no VM corresponding to segment {}", node, tunnelKey);
             return new Status(StatusCode.NOTACCEPTABLE, node+" has no VM corresponding to segment "+ tunnelKey);
         }
         return new Status(StatusCode.SUCCESS);
@@ -178,10 +178,10 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
     private boolean addTunnelPort (Node node, String tunnelType, InetAddress src, InetAddress dst) {
         String tunnelBridgeName = configurationService.getIntegrationBridgeName();
         String portName = getTunnelName(tunnelType, dst);
-        logger.info("addTunnelPort enter: portName: {}", portName);
+        LOG.info("addTunnelPort enter: portName: {}", portName);
         if (southbound.extractTerminationPointAugmentation(node, portName) != null
                 || southbound.isTunnelTerminationPointExist(node, tunnelBridgeName, portName)) {
-            logger.info("Tunnel {} is present in {} of {}", portName, tunnelBridgeName, node.getNodeId().getValue());
+            LOG.info("Tunnel {} is present in {} of {}", portName, tunnelBridgeName, node.getNodeId().getValue());
             return true;
         }
 
@@ -191,11 +191,11 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
         options.put("remote_ip", dst.getHostAddress());
 
         if (!southbound.addTunnelTerminationPoint(node, tunnelBridgeName, portName, tunnelType, options)) {
-            logger.error("Failed to insert Tunnel port {} in {}", portName, tunnelBridgeName);
+            LOG.error("Failed to insert Tunnel port {} in {}", portName, tunnelBridgeName);
             return false;
         }
 
-            logger.info("addTunnelPort exit: portName: {}", portName);
+            LOG.info("addTunnelPort exit: portName: {}", portName);
         return true;
     }
 
@@ -693,7 +693,7 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
     private long getDpid(Node node) {
         long dpid = southbound.getDataPathId(node);
         if (dpid == 0) {
-            logger.warn("getDpid: dpid not found: {}", node);
+            LOG.warn("getDpid: dpid not found: {}", node);
         }
         return dpid;
     }
@@ -731,35 +731,35 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
 
     private void programLocalRules (String networkType, String segmentationId, Node node,
                                     OvsdbTerminationPointAugmentation intf) {
-        logger.debug("programLocalRules: node: {}, intf: {}, networkType: {}, segmentationId: {}",
+        LOG.debug("programLocalRules: node: {}, intf: {}, networkType: {}, segmentationId: {}",
                 node.getNodeId(), intf.getName(), networkType, segmentationId);
         try {
             long dpid = getIntegrationBridgeOFDPID(node);
             if (dpid == 0L) {
-                logger.debug("programLocalRules: Openflow Datapath-ID not set for the integration bridge in {}",
+                LOG.debug("programLocalRules: Openflow Datapath-ID not set for the integration bridge in {}",
                         node);
                 return;
             }
 
             long localPort = southbound.getOFPort(intf);
             if (localPort == 0) {
-                logger.info("programLocalRules: could not find ofPort for Port {} on Node {}",intf.getName(), node.getNodeId());
+                LOG.info("programLocalRules: could not find ofPort for Port {} on Node {}", intf.getName(), node.getNodeId());
                 return;
             }
 
             String attachedMac = southbound.getInterfaceExternalIdsValue(intf, Constants.EXTERNAL_ID_VM_MAC);
             if (attachedMac == null) {
-                logger.warn("No AttachedMac seen in {}", intf);
+                LOG.warn("No AttachedMac seen in {}", intf);
                 return;
             }
 
             /* Program local rules based on network type */
             if (isVlan(networkType)) {
-                logger.debug("Program local vlan rules for interface {}", intf.getName());
+                LOG.debug("Program local vlan rules for interface {}", intf.getName());
                 programLocalVlanRules(node, dpid, segmentationId, attachedMac, localPort);
             }
             if ((isTunnel(networkType)|| isVlan(networkType))) {
-                logger.debug("programLocalRules: Program fixed security group rules for interface {}", intf.getName());
+                LOG.debug("programLocalRules: Program fixed security group rules for interface {}", intf.getName());
                 // Get the DHCP port for the subnet to which  the interface belongs to.
                 NeutronPort dhcpPort = securityServicesManager.getDHCPServerPort(intf);
                 if (null != dhcpPort) {
@@ -771,7 +771,7 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
                         isLastPortinSubnet = securityServicesManager.isLastPortinSubnet(node, intf);
                         srcAddressList = securityServicesManager.getIpAddress(node, intf);
                         if (null == srcAddressList) {
-                            logger.warn("programLocalRules: No Ip address assigned {}", intf);
+                            LOG.warn("programLocalRules: No Ip address assigned {}", intf);
                             return;
                         }
                     }
@@ -780,17 +780,17 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
                     egressAclProvider.programFixedSecurityACL(dpid, segmentationId, attachedMac, localPort,
                                                               srcAddressList, isLastPortinBridge, isComputePort,true);
                 } else {
-                    logger.warn("programLocalRules: No DCHP port seen in  network of {}", intf);
+                    LOG.warn("programLocalRules: No DCHP port seen in  network of {}", intf);
                 }
             }
             /* If the network type is tunnel based (VXLAN/GRRE/etc) with Neutron Port Security ACLs */
             /* TODO SB_MIGRATION */
             /*if ((networkType.equalsIgnoreCase(NetworkHandler.NETWORK_TYPE_GRE) || networkType.equalsIgnoreCase
                     (NetworkHandler.NETWORK_TYPE_VXLAN)) && securityServicesManager.isPortSecurityReady(intf)) {
-                logger.debug("Neutron port has a Port Security Group");
+                LOG.debug("Neutron port has a Port Security Group");
                 // Retrieve the security group UUID from the Neutron Port
                 NeutronSecurityGroup securityGroupInPort = securityServicesManager.getSecurityGroupInPort(intf);
-                logger.debug("Program Local rules for networkType: {} does contain a Port Security Group: {} " +
+                LOG.debug("Program Local rules for networkType: {} does contain a Port Security Group: {} " +
                         "to be installed on DPID: {}", networkType, securityGroupInPort, dpid);
                 ingressAclProvider.programPortSecurityACL(dpid, segmentationId, attachedMac, localPort,
                         securityGroupInPort);
@@ -798,54 +798,54 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
                         securityGroupInPort);
             }*/
             if (isTunnel(networkType)) {
-                logger.debug("Program local bridge rules for interface {}, "
-                        + "dpid: {}, segmentationId: {}, attachedMac: {}, localPort: {}",
+                LOG.debug("Program local bridge rules for interface {}, "
+                                + "dpid: {}, segmentationId: {}, attachedMac: {}, localPort: {}",
                         intf.getName(), dpid, segmentationId, attachedMac, localPort);
                 programLocalBridgeRules(node, dpid, segmentationId, attachedMac, localPort);
             }
         } catch (Exception e) {
-            logger.error("Exception in programming Local Rules for "+intf+" on "+node, e);
+            LOG.error("Exception in programming Local Rules for " + intf + " on " + node, e);
         }
     }
 
     private void removeLocalRules (String networkType, String segmentationId, Node node,
                                    OvsdbTerminationPointAugmentation intf) {
-        logger.debug("removeLocalRules: node: {}, intf: {}, networkType: {}, segmentationId: {}",
+        LOG.debug("removeLocalRules: node: {}, intf: {}, networkType: {}, segmentationId: {}",
                 node.getNodeId(), intf.getName(), networkType, segmentationId);
         try {
             long dpid = getIntegrationBridgeOFDPID(node);
             if (dpid == 0L) {
-                logger.debug("removeLocalRules: Openflow Datapath-ID not set for the integration bridge in {}", node);
+                LOG.debug("removeLocalRules: Openflow Datapath-ID not set for the integration bridge in {}", node);
                 return;
             }
 
             long localPort = southbound.getOFPort(intf);
             if (localPort == 0) {
-                logger.info("removeLocalRules: could not find ofPort");
+                LOG.info("removeLocalRules: could not find ofPort");
                 return;
             }
 
             String attachedMac = southbound.getInterfaceExternalIdsValue(intf, Constants.EXTERNAL_ID_VM_MAC);
             if (attachedMac == null) {
-                logger.warn("No AttachedMac seen in {}", intf);
+                LOG.warn("No AttachedMac seen in {}", intf);
                 return;
             }
 
             /* Program local rules based on network type */
             if (isVlan(networkType)) {
-                logger.debug("Remove local vlan rules for interface {}", intf.getName());
+                LOG.debug("Remove local vlan rules for interface {}", intf.getName());
                 removeLocalVlanRules(node, dpid, segmentationId, attachedMac, localPort);
             } else if (isTunnel(networkType)) {
-                logger.debug("Remove local bridge rules for interface {}", intf.getName());
+                LOG.debug("Remove local bridge rules for interface {}", intf.getName());
                 removeLocalBridgeRules(node, dpid, segmentationId, attachedMac, localPort);
             }
             if (isTunnel(networkType)|| isVlan(networkType)) {
-                logger.debug("removeLocalRules: Remove fixed security group rules for interface {}", intf.getName());
+                LOG.debug("removeLocalRules: Remove fixed security group rules for interface {}", intf.getName());
                 NeutronPort dhcpPort = securityServicesManager.getDHCPServerPort(intf);
                 if (null != dhcpPort) {
                     List<Neutron_IPs> srcAddressList = securityServicesManager.getIpAddress(node, intf);
                     if (null == srcAddressList) {
-                        logger.warn("removeLocalRules: No Ip address assigned {}", intf);
+                        LOG.warn("removeLocalRules: No Ip address assigned {}", intf);
                         return;
                     }
                     boolean isLastPortinBridge = securityServicesManager.isLastPortinBridge(node, intf);
@@ -860,11 +860,11 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
                     egressAclProvider.programFixedSecurityACL(dpid, segmentationId,    attachedMac, localPort,
                                                               srcAddressList, isLastPortinBridge, isComputePort, false);
                 }else{
-                    logger.warn("removeLocalRules: No DCHP port seen in  network of {}", intf);
+                    LOG.warn("removeLocalRules: No DCHP port seen in  network of {}", intf);
                 }
             }
         } catch (Exception e) {
-            logger.error("Exception in removing Local Rules for "+intf+" on "+node, e);
+            LOG.error("Exception in removing Local Rules for " + intf + " on " + node, e);
         }
     }
 
@@ -874,25 +874,25 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
     // so we don't see those updates in this case - we only see the new nodes interface updates.
     private void programTunnelRules (String tunnelType, String segmentationId, InetAddress dst, Node node,
                                      OvsdbTerminationPointAugmentation intf, boolean local) {
-        logger.debug("programTunnelRules: node: {}, intf: {}, local: {}, tunnelType: {}, "
-                + "segmentationId: {}, dstAddr: {}",
+        LOG.debug("programTunnelRules: node: {}, intf: {}, local: {}, tunnelType: {}, "
+                        + "segmentationId: {}, dstAddr: {}",
                 node.getNodeId(), intf.getName(), local, tunnelType, segmentationId, dst.getHostAddress());
         try {
             long dpid = getIntegrationBridgeOFDPID(node);
             if (dpid == 0L) {
-                logger.debug("programTunnelRules: Openflow Datapath-ID not set for the integration bridge in {}", node);
+                LOG.debug("programTunnelRules: Openflow Datapath-ID not set for the integration bridge in {}", node);
                 return;
             }
 
             long localPort = southbound.getOFPort(intf);
             if (localPort == 0) {
-                logger.info("programTunnelRules: could not find ofPort for Port {} on Node{}",intf.getName(),node.getNodeId());
+                LOG.info("programTunnelRules: could not find ofPort for Port {} on Node{}", intf.getName(), node.getNodeId());
                 return;
             }
 
             String attachedMac = southbound.getInterfaceExternalIdsValue(intf, Constants.EXTERNAL_ID_VM_MAC);
             if (attachedMac == null) {
-                logger.warn("programTunnelRules: No AttachedMac seen in {}", intf);
+                LOG.warn("programTunnelRules: No AttachedMac seen in {}", intf);
                 return;
             }
 
@@ -900,52 +900,52 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
             if(tunnelPort != null){
                 long tunnelOFPort = southbound.getOFPort(tunnelPort);
                 if (tunnelOFPort == 0) {
-                    logger.error("programTunnelRules: Could not Identify Tunnel port {} -> OF ({}) on {}",
+                    LOG.error("programTunnelRules: Could not Identify Tunnel port {} -> OF ({}) on {}",
                             tunnelPort.getName(), tunnelOFPort, node);
                     return;
                 }
-                logger.debug("programTunnelRules: Identified Tunnel port {} -> OF ({}) on {}",
+                LOG.debug("programTunnelRules: Identified Tunnel port {} -> OF ({}) on {}",
                         tunnelPort.getName(), tunnelOFPort, node);
 
                 if (!local) {
-                    logger.trace("programTunnelRules: program remote egress tunnel rules: node {}, intf {}",
-                        node.getNodeId().getValue(), intf.getName());
+                    LOG.trace("programTunnelRules: program remote egress tunnel rules: node {}, intf {}",
+                            node.getNodeId().getValue(), intf.getName());
                     programRemoteEgressTunnelBridgeRules(node, dpid, segmentationId, attachedMac,
                             tunnelOFPort, localPort);
                 } else {
-                    logger.trace("programTunnelRules: program local ingress tunnel rules: node {}, intf {}",
+                    LOG.trace("programTunnelRules: program local ingress tunnel rules: node {}, intf {}",
                             node.getNodeId().getValue(), intf.getName());
                     programLocalIngressTunnelBridgeRules(node, dpid, segmentationId, attachedMac,
                             tunnelOFPort, localPort);
                 }
             }
         } catch (Exception e) {
-            logger.trace("", e);
+            LOG.trace("", e);
         }
     }
 
     private void removeTunnelRules (String tunnelType, String segmentationId, InetAddress dst, Node node,
                                     OvsdbTerminationPointAugmentation intf,
                                     boolean local, boolean isLastInstanceOnNode) {
-        logger.debug("removeTunnelRules: node: {}, intf: {}, local: {}, tunnelType: {}, "
+        LOG.debug("removeTunnelRules: node: {}, intf: {}, local: {}, tunnelType: {}, "
                         + "segmentationId: {}, dstAddr: {}, isLastinstanceOnNode: {}",
                 node.getNodeId(), intf.getName(), local, tunnelType, segmentationId, dst, isLastInstanceOnNode);
         try {
             long dpid = getIntegrationBridgeOFDPID(node);
             if (dpid == 0L) {
-                logger.debug("removeTunnelRules: Openflow Datapath-ID not set for the integration bridge in {}", node);
+                LOG.debug("removeTunnelRules: Openflow Datapath-ID not set for the integration bridge in {}", node);
                 return;
             }
 
             long localPort = southbound.getOFPort(intf);
             if (localPort == 0) {
-                logger.info("removeTunnelRules: could not find ofPort");
+                LOG.info("removeTunnelRules: could not find ofPort");
                 return;
             }
 
             String attachedMac = southbound.getInterfaceExternalIdsValue(intf, Constants.EXTERNAL_ID_VM_MAC);
             if (attachedMac == null) {
-                logger.error("removeTunnelRules: No AttachedMac seen in {}", intf);
+                LOG.error("removeTunnelRules: No AttachedMac seen in {}", intf);
                 return;
             }
 
@@ -954,11 +954,11 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
                 if (tunIntf.getName().equals(getTunnelName(tunnelType, dst))) {
                     long tunnelOFPort = southbound.getOFPort(tunIntf);
                     if (tunnelOFPort == 0) {
-                        logger.error("Could not Identify Tunnel port {} -> OF ({}) on {}",
+                        LOG.error("Could not Identify Tunnel port {} -> OF ({}) on {}",
                                 tunIntf.getName(), tunnelOFPort, node);
                         return;
                     }
-                    logger.debug("Identified Tunnel port {} -> OF ({}) on {}",
+                    LOG.debug("Identified Tunnel port {} -> OF ({}) on {}",
                             tunIntf.getName(), tunnelOFPort, node);
 
                     if (!local) {
@@ -972,28 +972,28 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
                 }
             }
         } catch (Exception e) {
-            logger.error("", e);
+            LOG.error("", e);
         }
     }
 
     private void programVlanRules (NeutronNetwork network, Node node, OvsdbTerminationPointAugmentation intf) {
-        logger.debug("programVlanRules: node: {}, network: {}, intf: {}",
+        LOG.debug("programVlanRules: node: {}, network: {}, intf: {}",
                 node.getNodeId(), network.getNetworkUUID(), intf.getName());
         long dpid = getIntegrationBridgeOFDPID(node);
         if (dpid == 0L) {
-            logger.debug("programVlanRules: Openflow Datapath-ID not set for the integration bridge in {}", node);
+            LOG.debug("programVlanRules: Openflow Datapath-ID not set for the integration bridge in {}", node);
             return;
         }
 
         long localPort = southbound.getOFPort(intf);
         if (localPort == 0) {
-            logger.debug("programVlanRules: could not find ofPort for {}", intf.getName());
+            LOG.debug("programVlanRules: could not find ofPort for {}", intf.getName());
             return;
         }
 
         String attachedMac = southbound.getInterfaceExternalIdsValue(intf, Constants.EXTERNAL_ID_VM_MAC);
         if (attachedMac == null) {
-            logger.debug("programVlanRules: No AttachedMac seen in {}", intf);
+            LOG.debug("programVlanRules: No AttachedMac seen in {}", intf);
             return;
         }
 
@@ -1001,10 +1001,10 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
                 bridgeConfigurationManager.getPhysicalInterfaceName(node, network.getProviderPhysicalNetwork());
         long ethOFPort = southbound.getOFPort(node, phyIfName);
         if (ethOFPort == 0) {
-            logger.warn("programVlanRules: could not find ofPort for physical port {}", phyIfName);
+            LOG.warn("programVlanRules: could not find ofPort for physical port {}", phyIfName);
             return;
         }
-        logger.debug("programVlanRules: Identified eth port {} -> ofPort ({}) on {}",
+        LOG.debug("programVlanRules: Identified eth port {} -> ofPort ({}) on {}",
                 phyIfName, ethOFPort, node);
         // TODO: add logic to only add rule on remote nodes
         programRemoteEgressVlanRules(node, dpid, network.getProviderSegmentationID(),
@@ -1015,23 +1015,23 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
 
     private void removeVlanRules (NeutronNetwork network, Node node, OvsdbTerminationPointAugmentation intf,
                                   boolean isLastInstanceOnNode) {
-        logger.debug("removeVlanRules: node: {}, network: {}, intf: {}, isLastInstanceOnNode",
+        LOG.debug("removeVlanRules: node: {}, network: {}, intf: {}, isLastInstanceOnNode",
                 node.getNodeId(), network.getNetworkUUID(), intf.getName(), isLastInstanceOnNode);
         long dpid = getIntegrationBridgeOFDPID(node);
         if (dpid == 0L) {
-            logger.debug("removeVlanRules: Openflow Datapath-ID not set for the integration bridge in {}", node);
+            LOG.debug("removeVlanRules: Openflow Datapath-ID not set for the integration bridge in {}", node);
             return;
         }
 
         long localPort = southbound.getOFPort(intf);
         if (localPort == 0) {
-            logger.debug("removeVlanRules: programVlanRules: could not find ofPort for {}", intf.getName());
+            LOG.debug("removeVlanRules: programVlanRules: could not find ofPort for {}", intf.getName());
             return;
         }
 
         String attachedMac = southbound.getInterfaceExternalIdsValue(intf, Constants.EXTERNAL_ID_VM_MAC);
         if (attachedMac == null) {
-            logger.debug("removeVlanRules: No AttachedMac seen in {}", intf);
+            LOG.debug("removeVlanRules: No AttachedMac seen in {}", intf);
             return;
         }
 
@@ -1039,10 +1039,10 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
                 bridgeConfigurationManager.getPhysicalInterfaceName(node, network.getProviderPhysicalNetwork());
         long ethOFPort = southbound.getOFPort(node, phyIfName);
         if (ethOFPort == 0) {
-            logger.warn("removeVlanRules: could not find ofPort for physical port {}", phyIfName);
+            LOG.warn("removeVlanRules: could not find ofPort for physical port {}", phyIfName);
             return;
         }
-        logger.debug("removeVlanRules: Identified eth port {} -> ofPort ({}) on {}",
+        LOG.debug("removeVlanRules: Identified eth port {} -> ofPort ({}) on {}",
                 phyIfName, ethOFPort, node);
 
         removeRemoteEgressVlanRules(node, dpid, network.getProviderSegmentationID(),
@@ -1090,7 +1090,7 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
                         programTunnelRules(networkType, segmentationId, src, dstBridgeNode, intf, false);
                     }
                 } else {
-                    logger.warn("Tunnel end-point configuration missing. Please configure it in OpenVSwitch Table. "
+                    LOG.warn("Tunnel end-point configuration missing. Please configure it in OpenVSwitch Table. "
                                     + "Check source {} or destination {}",
                             src != null ? src.getHostAddress() : "null",
                             dst != null ? dst.getHostAddress() : "null");
@@ -1102,20 +1102,20 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
     }
 
     private void triggerInterfaceUpdates(Node node) {
-        logger.debug("enter triggerInterfaceUpdates for {}", node.getNodeId());
+        LOG.debug("enter triggerInterfaceUpdates for {}", node.getNodeId());
         List<OvsdbTerminationPointAugmentation> ports = southbound.extractTerminationPointAugmentations(node);
         if (ports != null && !ports.isEmpty()) {
             for (OvsdbTerminationPointAugmentation port : ports) {
                 NeutronNetwork neutronNetwork = tenantNetworkManager.getTenantNetwork(port);
                 if (neutronNetwork != null) {
-                    logger.warn("Trigger Interface update for {}", port);
+                    LOG.warn("Trigger Interface update for {}", port);
                     handleInterfaceUpdate(neutronNetwork, node, port);
                 }
             }
         } else {
-            logger.warn("triggerInterfaceUpdates: tps are null");
+            LOG.warn("triggerInterfaceUpdates: tps are null");
         }
-        logger.debug("exit triggerInterfaceUpdates for {}", node.getNodeId());
+        LOG.debug("exit triggerInterfaceUpdates for {}", node.getNodeId());
     }
 
     @Override
@@ -1125,7 +1125,7 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
                 nodeCacheManager.getOvsdbNodes();
         nodes.remove(southbound.extractBridgeOvsdbNodeId(srcNode));
 
-        logger.info("Delete intf " + intf.getName() + " isLastInstanceOnNode " + isLastInstanceOnNode);
+        LOG.info("Delete intf " + intf.getName() + " isLastInstanceOnNode " + isLastInstanceOnNode);
         List<String> phyIfName = bridgeConfigurationManager.getAllPhysicalInterfaceNames(srcNode);
         if (southbound.isTunnel(intf)) {
             // Delete tunnel port
@@ -1138,7 +1138,7 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
                         MdsalHelper.createOvsdbInterfaceType(intf.getInterfaceType()),
                         src, dst);
             } catch (Exception e) {
-                logger.error(e.getMessage(), e);
+                LOG.error(e.getMessage(), e);
             }
         } else if (phyIfName.contains(intf.getName())) {
             deletePhysicalPort(srcNode, intf.getName());
@@ -1155,21 +1155,21 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
                     InetAddress src = configurationService.getTunnelEndPoint(srcNode);
                     InetAddress dst = configurationService.getTunnelEndPoint(dstNode);
                     if ((src != null) && (dst != null)) {
-                        logger.info("Remove tunnel rules for interface "
+                        LOG.info("Remove tunnel rules for interface "
                                 + intf.getName() + " on srcNode " + srcNode.getNodeId().getValue());
                         removeTunnelRules(tunnelType, network.getProviderSegmentationID(),
                                 dst, srcNode, intf, true, isLastInstanceOnNode);
                         Node dstBridgeNode = southbound.getBridgeNode(dstNode, Constants.INTEGRATION_BRIDGE);
                         if(dstBridgeNode != null){
-                            logger.info("Remove tunnel rules for interface "
+                            LOG.info("Remove tunnel rules for interface "
                                     + intf.getName() + " on dstNode " + dstNode.getNodeId().getValue());
                             removeTunnelRules(tunnelType, network.getProviderSegmentationID(),
                                     src, dstBridgeNode, intf, false, isLastInstanceOnNode);
                         }
                     } else {
-                        logger.warn("Tunnel end-point configuration missing. Please configure it in "
-                                + "OpenVSwitch Table. "
-                                + "Check source {} or destination {}",
+                        LOG.warn("Tunnel end-point configuration missing. Please configure it in "
+                                        + "OpenVSwitch Table. "
+                                        + "Check source {} or destination {}",
                                 src != null ? src.getHostAddress() : "null",
                                 dst != null ? dst.getHostAddress() : "null");
                     }
@@ -1189,11 +1189,11 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
     private void initializeFlowRules(Node node, String bridgeName) {
         Long dpid = southbound.getDataPathId(node);
         String datapathId = southbound.getDatapathId(node);
-        logger.info("initializeFlowRules: bridgeName: {}, dpid: {} - {}",
+        LOG.info("initializeFlowRules: bridgeName: {}, dpid: {} - {}",
                 bridgeName, dpid, datapathId);
 
         if (dpid == 0L) {
-            logger.debug("Openflow Datapath-ID not set for the integration bridge in {}", node);
+            LOG.debug("Openflow Datapath-ID not set for the integration bridge in {}", node);
             return;
         }
 
@@ -1510,10 +1510,10 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
                 return data.get();
             }
         } catch (InterruptedException|ExecutionException e) {
-            logger.error(e.getMessage(), e);
+            LOG.error(e.getMessage(), e);
         }
 
-        logger.debug("Cannot find data for Group " + groupBuilder.getGroupName());
+        LOG.debug("Cannot find data for Group " + groupBuilder.getGroupName());
         return null;
     }
 
@@ -1527,9 +1527,9 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
         CheckedFuture<Void, TransactionCommitFailedException> commitFuture = modification.submit();
         try {
             commitFuture.get();  // TODO: Make it async (See bug 1362)
-            logger.debug("Transaction success for write of Group "+groupBuilder.getGroupName());
+            LOG.debug("Transaction success for write of Group " + groupBuilder.getGroupName());
         } catch (InterruptedException|ExecutionException e) {
-            logger.error(e.getMessage(), e);
+            LOG.error(e.getMessage(), e);
         }
     }
 
@@ -1543,9 +1543,9 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
 
         try {
             commitFuture.get();  // TODO: Make it async (See bug 1362)
-            logger.debug("Transaction success for deletion of Group "+groupBuilder.getGroupName());
+            LOG.debug("Transaction success for deletion of Group " + groupBuilder.getGroupName());
         } catch (InterruptedException|ExecutionException e) {
-            logger.error(e.getMessage(), e);
+            LOG.error(e.getMessage(), e);
         }
     }
 
@@ -1565,9 +1565,9 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
         CheckedFuture<Void, TransactionCommitFailedException> commitFuture = modification.submit();
         try {
             commitFuture.get();  // TODO: Make it async (See bug 1362)
-            logger.debug("Transaction success for write of Flow "+flowBuilder.getFlowName());
+            LOG.debug("Transaction success for write of Flow " + flowBuilder.getFlowName());
         } catch (InterruptedException|ExecutionException e) {
-            logger.error(e.getMessage(), e);
+            LOG.error(e.getMessage(), e);
         }
     }
 
@@ -1586,7 +1586,7 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
             Long dpidLong, Long port ,
             List<Instruction> instructions) {
         NodeConnectorId ncid = new NodeConnectorId(Constants.OPENFLOW_NODE_PREFIX + dpidLong + ":" + port);
-        logger.debug("createOutputGroupInstructions() Node Connector ID is - Type=openflow: DPID={} port={} existingInstructions={}", dpidLong, port, instructions);
+        LOG.debug("createOutputGroupInstructions() Node Connector ID is - Type=openflow: DPID={} port={} existingInstructions={}", dpidLong, port, instructions);
 
         List<Action> actionList = Lists.newArrayList();
         ActionBuilder ab = new ActionBuilder();
@@ -1608,7 +1608,7 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
         OutputActionBuilder oab = new OutputActionBuilder();
         oab.setOutputNodeConnector(ncid);
         ab.setAction(new OutputActionCaseBuilder().setOutputAction(oab.build()).build());
-        logger.debug("createOutputGroupInstructions(): output action {}", ab.build());
+        LOG.debug("createOutputGroupInstructions(): output action {}", ab.build());
         boolean addNew = true;
         boolean groupActionAdded = false;
 
@@ -1626,19 +1626,19 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
                 groupBuilder.setGroupType(GroupTypes.GroupAll);
                 groupBuilder.setKey(key);
                 group = getGroup(groupBuilder, nodeBuilder);
-                logger.debug("createOutputGroupInstructions: group {}", group);
+                LOG.debug("createOutputGroupInstructions: group {}", group);
                 break;
             }
         }
 
-        logger.debug("createOutputGroupInstructions: groupActionAdded {}", groupActionAdded);
+        LOG.debug("createOutputGroupInstructions: groupActionAdded {}", groupActionAdded);
         if (groupActionAdded) {
             /* modify the action bucket in group */
             groupBuilder = new GroupBuilder(group);
             Buckets buckets = groupBuilder.getBuckets();
             for (Bucket bucket : buckets.getBucket()) {
                 List<Action> bucketActions = bucket.getAction();
-                logger.debug("createOutputGroupInstructions: bucketActions {}", bucketActions);
+                LOG.debug("createOutputGroupInstructions: bucketActions {}", bucketActions);
                 for (Action action : bucketActions) {
                     if (action.getAction() instanceof OutputActionCase) {
                         OutputActionCase opAction = (OutputActionCase)action.getAction();
@@ -1650,7 +1650,7 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
                     }
                 }
             }
-            logger.debug("createOutputGroupInstructions: addNew {}", addNew);
+            LOG.debug("createOutputGroupInstructions: addNew {}", addNew);
             if (addNew) {
                 /* the new output action is not in the bucket, add to bucket */
                 if (!buckets.getBucket().isEmpty()) {
@@ -1672,7 +1672,7 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
                     bucketList.add(bucketBuilder.build());
                     bucketsBuilder.setBucket(bucketList);
                     groupBuilder.setBuckets(bucketsBuilder.build());
-                    logger.debug("createOutputGroupInstructions: bucketList {}", bucketList);
+                    LOG.debug("createOutputGroupInstructions: bucketList {}", bucketList);
                 }
             }
         } else {
@@ -1714,8 +1714,8 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
 
             groupId++;
         }
-        logger.debug("createOutputGroupInstructions: group {}", groupBuilder.build());
-        logger.debug("createOutputGroupInstructions: actionList {}", actionList);
+        LOG.debug("createOutputGroupInstructions: group {}", groupBuilder.build());
+        LOG.debug("createOutputGroupInstructions: actionList {}", actionList);
 
         if (addNew) {
             /* rewrite the group to group table */
@@ -1744,7 +1744,7 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
             Long dpidLong, Long port , List<Instruction> instructions) {
 
         NodeConnectorId ncid = new NodeConnectorId(Constants.OPENFLOW_NODE_PREFIX + dpidLong + ":" + port);
-        logger.debug("removeOutputPortFromGroup() Node Connector ID is - Type=openflow: DPID={} port={} existingInstructions={}", dpidLong, port, instructions);
+        LOG.debug("removeOutputPortFromGroup() Node Connector ID is - Type=openflow: DPID={} port={} existingInstructions={}", dpidLong, port, instructions);
 
         List<Action> actionList = Lists.newArrayList();
         ActionBuilder ab;
@@ -1835,7 +1835,7 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
                 bucketList.add(bucketBuilder.build());
                 bucketsBuilder.setBucket(bucketList);
                 groupBuilder.setBuckets(bucketsBuilder.build());
-                logger.debug("removeOutputPortFromGroup: bucketList {}", bucketList);
+                LOG.debug("removeOutputPortFromGroup: bucketList {}", bucketList);
 
                 writeGroup(groupBuilder, nodeBuilder);
                 ApplyActionsBuilder aab = new ApplyActionsBuilder();
@@ -1856,15 +1856,15 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
     @Override
     public void initializeOFFlowRules(Node openflowNode) {
         String bridgeName = southbound.getBridgeName(openflowNode);
-        logger.info("initializeOFFlowRules: bridgeName: {}", bridgeName);
+        LOG.info("initializeOFFlowRules: bridgeName: {}", bridgeName);
         if (bridgeName.equals(configurationService.getIntegrationBridgeName())) {
             initializeFlowRules(openflowNode, configurationService.getIntegrationBridgeName());
             triggerInterfaceUpdates(openflowNode);
         } else if (bridgeName.equals(configurationService.getExternalBridgeName())) {
             initializeFlowRules(openflowNode, configurationService.getExternalBridgeName());
-            logger.info("initializeOFFlowRules after writeFlow: bridgeName: {}", bridgeName);
+            LOG.info("initializeOFFlowRules after writeFlow: bridgeName: {}", bridgeName);
             triggerInterfaceUpdates(openflowNode);
-            logger.info("initializeOFFlowRules after triggerUpdates: bridgeName: {}", bridgeName);
+            LOG.info("initializeOFFlowRules after triggerUpdates: bridgeName: {}", bridgeName);
         }
     }
 
index b7d48671039b22649d1edc07e95bdae776f08d8c..1ced2a5f1bb64f292b4b33f7802a63deb88242af 100644 (file)
@@ -31,7 +31,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class PipelineOrchestratorImpl implements ConfigInterface, NodeCacheListener, PipelineOrchestrator {
-    private static final Logger logger = LoggerFactory.getLogger(PipelineOrchestratorImpl.class);
+    private static final Logger LOG = LoggerFactory.getLogger(PipelineOrchestratorImpl.class);
     private List<Service> staticPipeline = Lists.newArrayList(
             Service.CLASSIFIER,
             Service.ARP_RESPONDER,
@@ -53,13 +53,13 @@ public class PipelineOrchestratorImpl implements ConfigInterface, NodeCacheListe
     public PipelineOrchestratorImpl() {
         eventHandler = Executors.newSingleThreadExecutor();
         this.queue = new LinkedBlockingQueue<Node>();
-        logger.info("PipelineOrchestratorImpl constructor");
+        LOG.info("PipelineOrchestratorImpl constructor");
         start();
     }
 
     public void registerService(final ServiceReference ref, AbstractServiceInstance serviceInstance){
         Service service = (Service)ref.getProperty(AbstractServiceInstance.SERVICE_PROPERTY);
-        logger.info("registerService {} - {}", serviceInstance, service);
+        LOG.info("registerService {} - {}", serviceInstance, service);
         serviceRegistry.put(service, serviceInstance);
     }
 
@@ -96,11 +96,11 @@ public class PipelineOrchestratorImpl implements ConfigInterface, NodeCacheListe
                          * causes programming issues. Hence delaying the programming by a second to
                          * avoid the clash. This hack/workaround should be removed once Bug 1997 is resolved.
                          */
-                        logger.info(">>>>> dequeue: {}", node);
+                        LOG.info(">>>>> dequeue: {}", node);
                         Thread.sleep(1000);
                         for (Service service : staticPipeline) {
                             AbstractServiceInstance serviceInstance = getServiceInstance(service);
-                            //logger.info("pipeline: {} - {}", service, serviceInstance);
+                            //LOG.info("pipeline: {} - {}", service, serviceInstance);
                             if (serviceInstance != null) {
                                 if (southbound.getBridge(node) != null) {
                                     serviceInstance.programDefaultPipelineRule(node);
@@ -109,7 +109,7 @@ public class PipelineOrchestratorImpl implements ConfigInterface, NodeCacheListe
                         }
                     }
                 } catch (Exception e) {
-                    logger.warn("Processing interrupted, terminating ", e);
+                    LOG.warn("Processing interrupted, terminating ", e);
                 }
 
                 while (!queue.isEmpty()) {
@@ -127,11 +127,11 @@ public class PipelineOrchestratorImpl implements ConfigInterface, NodeCacheListe
 
     @Override
     public void enqueue(Node node) {
-        logger.info(">>>>> enqueue: {}", node);
+        LOG.info(">>>>> enqueue: {}", node);
         try {
             queue.put(node);
         } catch (InterruptedException e) {
-            logger.warn("Failed to enqueue operation {}", node, e);
+            LOG.warn("Failed to enqueue operation {}", node, e);
         }
     }
 
@@ -140,7 +140,7 @@ public class PipelineOrchestratorImpl implements ConfigInterface, NodeCacheListe
         if (action == Action.ADD) {
             enqueue(node);
         } else {
-            logger.info("update ignored: {}", node);
+            LOG.info("update ignored: {}", node);
         }
     }
 
index 1eb2f1257b3d0c60100c3a9abb7d0aa679194aa1..0fe2d306c1ae6dde86c4f740b1e1f97a0563505a 100644 (file)
@@ -44,8 +44,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.ni
 import com.google.common.collect.Lists;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 public class ClassifierService extends AbstractServiceInstance implements ClassifierProvider, ConfigInterface {
     public final static long REG_VALUE_FROM_LOCAL = 0x1L;
@@ -60,8 +58,6 @@ public class ClassifierService extends AbstractServiceInstance implements Classi
         super(service);
     }
 
-    private static final Logger logger = LoggerFactory.getLogger(ClassifierService.class);
-
     /*
      * (Table:Classifier) Egress VM Traffic Towards TEP
      * Match: Destination Ethernet Addr and OpenFlow InPort
index 94cd2c372f700762ab75d41330f3288ad45b009d..b270afbe3d6a44ffc6304d0f9900d187a3e0970c 100644 (file)
@@ -45,7 +45,7 @@ import com.google.common.collect.Lists;
 
 public class EgressAclService extends AbstractServiceInstance implements EgressAclProvider, ConfigInterface {
 
-    static final Logger logger = LoggerFactory.getLogger(EgressAclService.class);
+    private static final Logger LOG = LoggerFactory.getLogger(EgressAclService.class);
     final int DHCP_SOURCE_PORT = 67;
     final int DHCP_DESTINATION_PORT = 68;
     final String HOST_MASK = "/32";
@@ -62,7 +62,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
     public void programPortSecurityACL(Long dpid, String segmentationId, String attachedMac, long localPort,
                                        NeutronSecurityGroup securityGroup) {
 
-        logger.trace("programLocalBridgeRulesWithSec neutronSecurityGroup: {} ", securityGroup);
+        LOG.trace("programLocalBridgeRulesWithSec neutronSecurityGroup: {} ", securityGroup);
         List<NeutronSecurityRule> portSecurityList = securityGroup.getSecurityRules();
         /* Iterate over the Port Security Rules in the Port Security Group bound to the port*/
         for (NeutronSecurityRule portSecurityRule : portSecurityList) {
@@ -77,7 +77,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
              */
             if (portSecurityRule.getSecurityRuleEthertype().equalsIgnoreCase("IPv4") &&
                 portSecurityRule.getSecurityRuleDirection().equalsIgnoreCase("egress")) {
-                logger.debug("Egress IPV4 ACL  Port Security Rule: {} ", portSecurityRule);
+                LOG.debug("Egress IPV4 ACL  Port Security Rule: {} ", portSecurityRule);
                 // ToDo: Implement Port Range
 
                 /**
@@ -89,7 +89,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
                     (!String.valueOf(portSecurityRule.getSecurityRuleRemoteIpPrefix()).equalsIgnoreCase("null") &&
                      !String.valueOf(portSecurityRule.getSecurityRuleRemoteIpPrefix())
                              .equalsIgnoreCase("0.0.0.0/0"))) {
-                    logger.debug(
+                    LOG.debug(
                             "Rule #1 egress PortSec Rule Matches -> TCP Protocol: {}, TCP Port Min: {}, TCP Port Max: {}, IP Prefix: {}",
                             portSecurityRule.getSecurityRuleProtocol(), portSecurityRule.getSecurityRulePortMin(),
                             portSecurityRule.getSecurityRulePortMax(),
@@ -112,7 +112,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
                     (!String.valueOf(portSecurityRule.getSecurityRuleRemoteIpPrefix()).equalsIgnoreCase("null") &&
                      !String.valueOf(portSecurityRule.getSecurityRuleRemoteIpPrefix())
                              .equalsIgnoreCase("0.0.0.0/0"))) {
-                    logger.debug(
+                    LOG.debug(
                             "Rule #2 egress PortSec Rule Matches -> TCP Protocol: {}, TCP Port Min: {}, TCP Port Max: {}, IP Prefix: {}",
                             portSecurityRule.getSecurityRuleProtocol(), portSecurityRule.getSecurityRulePortMin(),
                             portSecurityRule.getSecurityRulePortMax(),
@@ -133,7 +133,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
                     String.valueOf(portSecurityRule.getSecurityRulePortMin()).equalsIgnoreCase("null") &&
                     String.valueOf(portSecurityRule.getSecurityRulePortMax()).equalsIgnoreCase("null") &&
                     !String.valueOf(portSecurityRule.getSecurityRuleRemoteIpPrefix()).equalsIgnoreCase("null")) {
-                    logger.debug(
+                    LOG.debug(
                             "Rule #3 egress PortSec Rule Matches -> TCP Protocol: {}, TCP Port Min: {}, TCP Port Max: {}, IP Prefix: {}",
                             portSecurityRule.getSecurityRuleProtocol(), portSecurityRule.getSecurityRulePortMin(),
                             portSecurityRule.getSecurityRulePortMax(),
@@ -153,7 +153,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
                     (!String.valueOf(portSecurityRule.getSecurityRuleRemoteIpPrefix()).equalsIgnoreCase("null") &&
                      !String.valueOf(portSecurityRule.getSecurityRuleRemoteIpPrefix())
                              .equalsIgnoreCase("0.0.0.0/0"))) {
-                    logger.debug(
+                    LOG.debug(
                             "Rule #4 egress PortSec Rule Matches -> TCP Protocol: {}, TCP Port Min: {}, TCP Port Max: {}, IP Prefix: {}",
                             portSecurityRule.getSecurityRuleProtocol(), portSecurityRule.getSecurityRulePortMin(),
                             portSecurityRule.getSecurityRulePortMax(),
@@ -170,7 +170,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
                     !String.valueOf(portSecurityRule.getSecurityRulePortMin()).equalsIgnoreCase("null") &&
                     !String.valueOf(portSecurityRule.getSecurityRulePortMax()).equalsIgnoreCase("null") &&
                     String.valueOf(portSecurityRule.getSecurityRuleRemoteIpPrefix()).equalsIgnoreCase("null")) {
-                    logger.debug(
+                    LOG.debug(
                             "Rule #5 egress PortSec Rule Matches -> TCP Protocol: {}, TCP Port Min: {}, TCP Port Max: {}, IP Prefix: {}",
                             portSecurityRule.getSecurityRuleProtocol(), portSecurityRule.getSecurityRulePortMin(),
                             portSecurityRule.getSecurityRulePortMax(),
@@ -189,7 +189,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
                     !String.valueOf(portSecurityRule.getSecurityRulePortMin()).equalsIgnoreCase("null") &&
                     String.valueOf(portSecurityRule.getSecurityRulePortMax()).equalsIgnoreCase("null") &&
                     String.valueOf(portSecurityRule.getSecurityRuleRemoteIpPrefix()).equalsIgnoreCase("null")) {
-                    logger.debug(
+                    LOG.debug(
                             "Rule #6 egress PortSec Rule Matches -> TCP Protocol: {}, TCP Port Min: {}, TCP Port Max: {}, IP Prefix: {}",
                             portSecurityRule.getSecurityRuleProtocol(), portSecurityRule.getSecurityRulePortMin(),
                             portSecurityRule.getSecurityRulePortMax(),
@@ -209,7 +209,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
                     ((String.valueOf(portSecurityRule.getSecurityRuleRemoteIpPrefix()).equalsIgnoreCase("null")) ||
                      String.valueOf(portSecurityRule.getSecurityRuleRemoteIpPrefix())
                              .equalsIgnoreCase("0.0.0.0/0"))) {
-                    logger.debug(
+                    LOG.debug(
                             "Rule #7 egress PortSec Rule Matches -> TCP Protocol: {}, TCP Port Min: {}, TCP Port Max: {}, IP Prefix: {}",
                             portSecurityRule.getSecurityRuleProtocol(), portSecurityRule.getSecurityRulePortMin(),
                             portSecurityRule.getSecurityRulePortMax(),
@@ -220,7 +220,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
                                      portSecurityRule.getSecurityRuleProtocol(), Constants.PROTO_MATCH_PRIORITY);
                     continue;
                 }
-                logger.debug("ACL Match combination not found for rule: {}", portSecurityRule);
+                LOG.debug("ACL Match combination not found for rule: {}", portSecurityRule);
             }
         }
     }
@@ -253,7 +253,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
 
         flowBuilder.setMatch(MatchUtils.createSmacTcpPortWithFlagMatch(matchBuilder,
                                                                        attachedMac, Constants.TCP_SYN, segmentationId).build());
-        logger.debug("MatchBuilder contains: {}", flowBuilder.getMatch());
+        LOG.debug("MatchBuilder contains: {}", flowBuilder.getMatch());
 
         String flowId = "TCP_Syn_Egress_Default_Drop_" + segmentationId + "_" + attachedMac;
         flowBuilder.setId(new FlowId(flowId));
@@ -280,7 +280,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
             // Add InstructionBuilder to the Instruction(s)Builder List
             isb.setInstruction(instructions);
 
-            logger.debug("Instructions contain: {}", ib.getInstruction());
+            LOG.debug("Instructions contain: {}", ib.getInstruction());
             // Add InstructionsBuilder to FlowBuilder
             flowBuilder.setInstructions(isb.build());
             writeFlow(flowBuilder, nodeBuilder);
@@ -303,7 +303,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
                                      .createSmacTcpSynDstIpPrefixTcpPort(matchBuilder, new MacAddress(attachedMac),
                                                                          tcpPort, Constants.TCP_SYN, segmentationId, srcIpPrefix).build());
 
-        logger.debug(" MatchBuilder contains:  {}", flowBuilder.getMatch());
+        LOG.debug(" MatchBuilder contains:  {}", flowBuilder.getMatch());
         String flowId = "UcastEgress_" + segmentationId + "_" + attachedMac +
                         securityRulePortMin + securityRuleIpPrefix;
         // Add Flow Attributes
@@ -330,7 +330,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
             instructionsList.add(ib.build());
             isb.setInstruction(instructionsList);
 
-            logger.debug("Instructions contain: {}", ib.getInstruction());
+            LOG.debug("Instructions contain: {}", ib.getInstruction());
             // Add InstructionsBuilder to FlowBuilder
             flowBuilder.setInstructions(isb.build());
             writeFlow(flowBuilder, nodeBuilder);
@@ -354,7 +354,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
         flowBuilder.setMatch(MatchUtils
                                      .createTunnelIDMatch(matchBuilder, new BigInteger(segmentationId)).build());
 
-        logger.debug("MatchBuilder contains:  {}", flowBuilder.getMatch());
+        LOG.debug("MatchBuilder contains:  {}", flowBuilder.getMatch());
         String flowId = "EgressAllProto_" + segmentationId + "_" +
                         attachedMac + "_AllowEgressTCPSyn_" + securityRuleProtcol;
         // Add Flow Attributes
@@ -381,7 +381,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
             instructionsList.add(ib.build());
             isb.setInstruction(instructionsList);
 
-            logger.debug("Instructions contain: {}", ib.getInstruction());
+            LOG.debug("Instructions contain: {}", ib.getInstruction());
             // Add InstructionsBuilder to FlowBuilder
             flowBuilder.setInstructions(isb.build());
             writeFlow(flowBuilder, nodeBuilder);
@@ -410,7 +410,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
                                          .createSmacIpTcpSynMatch(matchBuilder, new MacAddress(attachedMac), null, null)
                                          .build());
         }
-        logger.debug("MatchBuilder contains: {}", flowBuilder.getMatch());
+        LOG.debug("MatchBuilder contains: {}", flowBuilder.getMatch());
         String flowId = "Egress_Proto_ACL" + segmentationId + "_" +
                         attachedMac + "_Permit_" + securityRuleIpPrefix;
         // Add Flow Attributes
@@ -437,7 +437,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
             instructionsList.add(ib.build());
             isb.setInstruction(instructionsList);
 
-            logger.debug("Instructions contain: {}", ib.getInstruction());
+            LOG.debug("Instructions contain: {}", ib.getInstruction());
             // Add InstructionsBuilder to FlowBuilder
             flowBuilder.setInstructions(isb.build());
             writeFlow(flowBuilder, nodeBuilder);
@@ -459,7 +459,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
         flowBuilder.setMatch(MatchUtils.createSmacTcpSyn(matchBuilder, attachedMac, tcpPort,
                                                          Constants.TCP_SYN, segmentationId).build());
 
-        logger.debug("MatchBuilder contains: {}", flowBuilder.getMatch());
+        LOG.debug("MatchBuilder contains: {}", flowBuilder.getMatch());
         String flowId = "Ucast_this.getTable()" + segmentationId + "_" + attachedMac + securityRulePortMin;
         // Add Flow Attributes
         flowBuilder.setId(new FlowId(flowId));
@@ -485,7 +485,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
             instructionsList.add(ib.build());
             isb.setInstruction(instructionsList);
 
-            logger.debug("Instructions contain: {}", ib.getInstruction());
+            LOG.debug("Instructions contain: {}", ib.getInstruction());
             // Add InstructionsBuilder to FlowBuilder
             flowBuilder.setInstructions(isb.build());
             writeFlow(flowBuilder, nodeBuilder);
@@ -510,7 +510,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
         FlowBuilder flowBuilder = new FlowBuilder();
 
         flowBuilder.setMatch(MatchUtils.createDHCPMatch(matchBuilder, DHCP_DESTINATION_PORT, DHCP_SOURCE_PORT).build());
-        logger.debug("egressACLDHCPAllowClientTrafficFromVm: MatchBuilder contains: {}", flowBuilder.getMatch());
+        LOG.debug("egressACLDHCPAllowClientTrafficFromVm: MatchBuilder contains: {}", flowBuilder.getMatch());
         String flowId = "Egress_DHCP_Client"  + "_Permit_";
         // Add Flow Attributes
         flowBuilder.setId(new FlowId(flowId));
@@ -536,7 +536,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
             instructionsList.add(ib.build());
             isb.setInstruction(instructionsList);
 
-            logger.debug("egressACLDHCPAllowClientTrafficFromVm: Instructions contain: {}", ib.getInstruction());
+            LOG.debug("egressACLDHCPAllowClientTrafficFromVm: Instructions contain: {}", ib.getInstruction());
             // Add InstructionsBuilder to FlowBuilder
             flowBuilder.setInstructions(isb.build());
             writeFlow(flowBuilder, nodeBuilder);
@@ -563,7 +563,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
         MatchUtils.createInPortMatch(matchBuilder, dpidLong, localPort);
         flowBuilder.setMatch(MatchUtils.createDHCPMatch(matchBuilder, DHCP_SOURCE_PORT, DHCP_DESTINATION_PORT).build());
 
-        logger.debug("egressACLDHCPDropServerTrafficfromVM: MatchBuilder contains: {}", flowBuilder.getMatch());
+        LOG.debug("egressACLDHCPDropServerTrafficfromVM: MatchBuilder contains: {}", flowBuilder.getMatch());
         String flowId = "Egress_DHCP_Server" + "_" + localPort + "_DROP_";
         // Add Flow Attributes
         flowBuilder.setId(new FlowId(flowId));
@@ -589,7 +589,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
             instructionsList.add(ib.build());
             isb.setInstruction(instructionsList);
 
-            logger.debug("egressACLDHCPDropServerTrafficfromVM: Instructions contain: {}", ib.getInstruction());
+            LOG.debug("egressACLDHCPDropServerTrafficfromVM: Instructions contain: {}", ib.getInstruction());
             // Add InstructionsBuilder to FlowBuilder
             flowBuilder.setInstructions(isb.build());
             writeFlow(flowBuilder, nodeBuilder);
@@ -619,7 +619,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
         MatchUtils.createInPortMatch(matchBuilder, dpidLong, localPort);
         flowBuilder.setMatch(matchBuilder.build());
 
-        logger.debug("egressACLAllowTrafficFromVmIpMacPair: MatchBuilder contains: {}", flowBuilder.getMatch());
+        LOG.debug("egressACLAllowTrafficFromVmIpMacPair: MatchBuilder contains: {}", flowBuilder.getMatch());
         String flowId = "Egress_Allow_VM_IP_MAC" + "_" + localPort + attachedMac + "_Permit_";
         // Add Flow Attributes
         flowBuilder.setId(new FlowId(flowId));
@@ -645,7 +645,7 @@ public class EgressAclService extends AbstractServiceInstance implements EgressA
             instructionsList.add(ib.build());
             isb.setInstruction(instructionsList);
 
-            logger.debug("egressACLAllowTrafficFromVmIpMacPair: Instructions contain: {}", ib.getInstruction());
+            LOG.debug("egressACLAllowTrafficFromVmIpMacPair: Instructions contain: {}", ib.getInstruction());
             // Add InstructionsBuilder to FlowBuilder
             flowBuilder.setInstructions(isb.build());
             writeFlow(flowBuilder, nodeBuilder);
index 9828a27fe6aeed9e70aaf0b7926f53cb14fc17ee..b70754843cd2084c42ea5c6ac302c56a698b0ef3 100644 (file)
@@ -42,7 +42,7 @@ import com.google.common.collect.Lists;
 
 public class IngressAclService extends AbstractServiceInstance implements IngressAclProvider, ConfigInterface {
 
-    static final Logger logger = LoggerFactory.getLogger(IngressAclService.class);
+    static final Logger LOG = LoggerFactory.getLogger(IngressAclService.class);
 
     public IngressAclService() {
         super(Service.INGRESS_ACL);
@@ -56,7 +56,7 @@ public class IngressAclService extends AbstractServiceInstance implements Ingres
     public void programPortSecurityACL(Long dpid, String segmentationId, String attachedMac,
             long localPort, NeutronSecurityGroup securityGroup) {
 
-        logger.trace("programLocalBridgeRulesWithSec neutronSecurityGroup: {} ", securityGroup);
+        LOG.trace("programLocalBridgeRulesWithSec neutronSecurityGroup: {} ", securityGroup);
         List<NeutronSecurityRule> portSecurityList = securityGroup.getSecurityRules();
         /* Iterate over the Port Security Rules in the Port Security Group bound to the port*/
         for (NeutronSecurityRule portSecurityRule : portSecurityList) {
@@ -71,7 +71,7 @@ public class IngressAclService extends AbstractServiceInstance implements Ingres
              */
             if (portSecurityRule.getSecurityRuleEthertype().equalsIgnoreCase("IPv4") &&
                     portSecurityRule.getSecurityRuleDirection().equalsIgnoreCase("ingress")) {
-                logger.debug("ACL Rule matching IPv4 and ingress is: {} ", portSecurityRule);
+                LOG.debug("ACL Rule matching IPv4 and ingress is: {} ", portSecurityRule);
                 /**
                  * TCP Proto (True), TCP Port Minimum (True), TCP Port Max (True), IP Prefix (True)
                  */
@@ -81,7 +81,7 @@ public class IngressAclService extends AbstractServiceInstance implements Ingres
                         (!String.valueOf(portSecurityRule.getSecurityRuleRemoteIpPrefix()).equalsIgnoreCase("null") &&
                                 !String.valueOf(portSecurityRule.getSecurityRuleRemoteIpPrefix())
                                         .equalsIgnoreCase("0.0.0.0/0"))) {
-                    logger.debug("Rule #1 ingress PortSec Rule Matches -> TCP Protocol: {}, TCP Port Min: {}, TCP Port Max: {}, IP Prefix: {}",
+                    LOG.debug("Rule #1 ingress PortSec Rule Matches -> TCP Protocol: {}, TCP Port Min: {}, TCP Port Max: {}, IP Prefix: {}",
                             portSecurityRule.getSecurityRuleProtocol(), portSecurityRule.getSecurityRulePortMin(),
                             portSecurityRule.getSecurityRulePortMax(),
                             portSecurityRule.getSecurityRuleRemoteIpPrefix());
@@ -102,7 +102,7 @@ public class IngressAclService extends AbstractServiceInstance implements Ingres
                         (!String.valueOf(portSecurityRule.getSecurityRuleRemoteIpPrefix()).equalsIgnoreCase("null") &&
                                 !String.valueOf(portSecurityRule.getSecurityRuleRemoteIpPrefix())
                                         .equalsIgnoreCase("0.0.0.0/0"))) {
-                    logger.debug("Rule #2 ingress PortSec Rule Matches -> TCP Protocol: {}, TCP Port Min: {}, TCP Port Max: {}, IP Prefix: {}",
+                    LOG.debug("Rule #2 ingress PortSec Rule Matches -> TCP Protocol: {}, TCP Port Min: {}, TCP Port Max: {}, IP Prefix: {}",
                             portSecurityRule.getSecurityRuleProtocol(), portSecurityRule.getSecurityRulePortMin(),
                             portSecurityRule.getSecurityRulePortMax(),
                             portSecurityRule.getSecurityRuleRemoteIpPrefix());
@@ -121,7 +121,7 @@ public class IngressAclService extends AbstractServiceInstance implements Ingres
                         String.valueOf(portSecurityRule.getSecurityRulePortMin()).equalsIgnoreCase("null") &&
                         String.valueOf(portSecurityRule.getSecurityRulePortMax()).equalsIgnoreCase("null") &&
                         !String.valueOf(portSecurityRule.getSecurityRuleRemoteIpPrefix()).equalsIgnoreCase("null")) {
-                    logger.debug("Rule #3 ingress PortSec Rule Matches -> TCP Protocol: {}, TCP Port Min: {}, TCP Port Max: {}, IP Prefix: {}",
+                    LOG.debug("Rule #3 ingress PortSec Rule Matches -> TCP Protocol: {}, TCP Port Min: {}, TCP Port Max: {}, IP Prefix: {}",
                             portSecurityRule.getSecurityRuleProtocol(), portSecurityRule.getSecurityRulePortMin(),
                             portSecurityRule.getSecurityRulePortMax(),
                             portSecurityRule.getSecurityRuleRemoteIpPrefix());
@@ -140,7 +140,7 @@ public class IngressAclService extends AbstractServiceInstance implements Ingres
                         (!String.valueOf(portSecurityRule.getSecurityRuleRemoteIpPrefix()).equalsIgnoreCase("null") &&
                                 !String.valueOf(portSecurityRule.getSecurityRuleRemoteIpPrefix())
                                         .equalsIgnoreCase("0.0.0.0/0"))) {
-                    logger.debug("Rule #4 ingress PortSec Rule Matches -> TCP Protocol: {}, TCP Port Min: {}, TCP Port Max: {}, IP Prefix: {}",
+                    LOG.debug("Rule #4 ingress PortSec Rule Matches -> TCP Protocol: {}, TCP Port Min: {}, TCP Port Max: {}, IP Prefix: {}",
                             portSecurityRule.getSecurityRuleProtocol(), portSecurityRule.getSecurityRulePortMin(),
                             portSecurityRule.getSecurityRulePortMax(),
                             portSecurityRule.getSecurityRuleRemoteIpPrefix());
@@ -156,7 +156,7 @@ public class IngressAclService extends AbstractServiceInstance implements Ingres
                         !String.valueOf(portSecurityRule.getSecurityRulePortMin()).equalsIgnoreCase("null") &&
                         !String.valueOf(portSecurityRule.getSecurityRulePortMax()).equalsIgnoreCase("null") &&
                         String.valueOf(portSecurityRule.getSecurityRuleRemoteIpPrefix()).equalsIgnoreCase("null")) {
-                    logger.debug("Rule #5 ingress PortSec Rule Matches -> TCP Protocol: {}, TCP Port Min: {}, TCP Port Max: {}, IP Prefix: {}",
+                    LOG.debug("Rule #5 ingress PortSec Rule Matches -> TCP Protocol: {}, TCP Port Min: {}, TCP Port Max: {}, IP Prefix: {}",
                             portSecurityRule.getSecurityRuleProtocol(), portSecurityRule.getSecurityRulePortMin(),
                             portSecurityRule.getSecurityRulePortMax(),
                             portSecurityRule.getSecurityRuleRemoteIpPrefix());
@@ -174,7 +174,7 @@ public class IngressAclService extends AbstractServiceInstance implements Ingres
                         !String.valueOf(portSecurityRule.getSecurityRulePortMin()).equalsIgnoreCase("null") &&
                         String.valueOf(portSecurityRule.getSecurityRulePortMax()).equalsIgnoreCase("null") &&
                         String.valueOf(portSecurityRule.getSecurityRuleRemoteIpPrefix()).equalsIgnoreCase("null")) {
-                    logger.debug("Rule #6 ingress PortSec Rule Matches -> TCP Protocol: {}, TCP Port Min: {}, TCP Port Max: {}, IP Prefix: {}",
+                    LOG.debug("Rule #6 ingress PortSec Rule Matches -> TCP Protocol: {}, TCP Port Min: {}, TCP Port Max: {}, IP Prefix: {}",
                             portSecurityRule.getSecurityRuleProtocol(), portSecurityRule.getSecurityRulePortMin(),
                             portSecurityRule.getSecurityRulePortMax(),
                             portSecurityRule.getSecurityRuleRemoteIpPrefix());
@@ -193,7 +193,7 @@ public class IngressAclService extends AbstractServiceInstance implements Ingres
                         ((String.valueOf(portSecurityRule.getSecurityRuleRemoteIpPrefix()).equalsIgnoreCase("null")) ||
                                 String.valueOf(portSecurityRule.getSecurityRuleRemoteIpPrefix())
                                         .equalsIgnoreCase("0.0.0.0/0"))) {
-                    logger.debug("Rule #7 ingress PortSec Rule Matches -> TCP Protocol: {}, TCP Port Min: {}, TCP Port Max: {}, IP Prefix: {}",
+                    LOG.debug("Rule #7 ingress PortSec Rule Matches -> TCP Protocol: {}, TCP Port Min: {}, TCP Port Max: {}, IP Prefix: {}",
                             portSecurityRule.getSecurityRuleProtocol(), portSecurityRule.getSecurityRulePortMin(),
                             portSecurityRule.getSecurityRulePortMax(),
                             portSecurityRule.getSecurityRuleRemoteIpPrefix());
@@ -203,7 +203,7 @@ public class IngressAclService extends AbstractServiceInstance implements Ingres
                             portSecurityRule.getSecurityRuleProtocol(), Constants.PROTO_MATCH_PRIORITY);
                     continue;
                 }
-                logger.debug("Ingress ACL Match combination not found for rule: {}", portSecurityRule);
+                LOG.debug("Ingress ACL Match combination not found for rule: {}", portSecurityRule);
             }
         }
     }
@@ -229,7 +229,7 @@ public class IngressAclService extends AbstractServiceInstance implements Ingres
         flowBuilder.setMatch(MatchUtils.createDmacTcpSynMatch(matchBuilder, attachedMac, tcpPort,
                                                               Constants.TCP_SYN, segmentationId).build());
 
-        logger.debug("ingressACLTcpSyn MatchBuilder contains:  {}", flowBuilder.getMatch());
+        LOG.debug("ingressACLTcpSyn MatchBuilder contains:  {}", flowBuilder.getMatch());
         String flowId = "UcastOut_ACL2_" + segmentationId + "_" + attachedMac + securityRulePortMin;
         // Add Flow Attributes
         flowBuilder.setId(new FlowId(flowId));
@@ -255,7 +255,7 @@ public class IngressAclService extends AbstractServiceInstance implements Ingres
             instructionsList.add(ib.build());
             isb.setInstruction(instructionsList);
 
-            logger.debug("Instructions are: {}", ib.getInstruction());
+            LOG.debug("Instructions are: {}", ib.getInstruction());
             // Add InstructionsBuilder to FlowBuilder
             flowBuilder.setInstructions(isb.build());
             writeFlow(flowBuilder, nodeBuilder);
@@ -280,7 +280,7 @@ public class IngressAclService extends AbstractServiceInstance implements Ingres
                 .createDmacTcpSynDstIpPrefixTcpPort(matchBuilder, new MacAddress(attachedMac),
                         tcpPort, Constants.TCP_SYN, segmentationId, srcIpPrefix).build());
 
-        logger.debug(" MatchBuilder contains:  {}", flowBuilder.getMatch());
+        LOG.debug(" MatchBuilder contains:  {}", flowBuilder.getMatch());
         String flowId = "UcastOut2_" + segmentationId + "_" + attachedMac +
                 securityRulePortMin + securityRuleIpPrefix;
         // Add Flow Attributes
@@ -307,7 +307,7 @@ public class IngressAclService extends AbstractServiceInstance implements Ingres
             instructionsList.add(ib.build());
             isb.setInstruction(instructionsList);
 
-            logger.debug("Instructions contain: {}", ib.getInstruction());
+            LOG.debug("Instructions contain: {}", ib.getInstruction());
             // Add InstructionsBuilder to FlowBuilder
             flowBuilder.setInstructions(isb.build());
             writeFlow(flowBuilder, nodeBuilder);
@@ -329,7 +329,7 @@ public class IngressAclService extends AbstractServiceInstance implements Ingres
                 .createDmacIpTcpSynMatch(matchBuilder, new MacAddress(attachedMac), null, null).build());
         flowBuilder.setMatch(MatchUtils
                 .createTunnelIDMatch(matchBuilder, new BigInteger(segmentationId)).build());
-        logger.debug("MatchBuilder contains: {}", flowBuilder.getMatch());
+        LOG.debug("MatchBuilder contains: {}", flowBuilder.getMatch());
 
         String flowId = "UcastOut_" + segmentationId + "_" +
                 attachedMac + "_AllowTCPSynPrefix_" + securityRuleProtcol;
@@ -356,7 +356,7 @@ public class IngressAclService extends AbstractServiceInstance implements Ingres
             ib.setKey(new InstructionKey(1));
             instructionsList.add(ib.build());
             isb.setInstruction(instructionsList);
-            logger.debug("Instructions contain: {}", ib.getInstruction());
+            LOG.debug("Instructions contain: {}", ib.getInstruction());
 
             // Add InstructionsBuilder to FlowBuilder
             flowBuilder.setInstructions(isb.build());
@@ -378,7 +378,7 @@ public class IngressAclService extends AbstractServiceInstance implements Ingres
         flowBuilder.setMatch(MatchUtils.createDmacTcpPortWithFlagMatch(matchBuilder,
                 attachedMac, Constants.TCP_SYN, segmentationId).build());
 
-        logger.debug("MatchBuilder contains: {}", flowBuilder.getMatch());
+        LOG.debug("MatchBuilder contains: {}", flowBuilder.getMatch());
         String flowId = "PortSec_TCP_Syn_Default_Drop_" + segmentationId + "_" + attachedMac;
         flowBuilder.setId(new FlowId(flowId));
         FlowKey key = new FlowKey(new FlowId(flowId));
@@ -407,7 +407,7 @@ public class IngressAclService extends AbstractServiceInstance implements Ingres
 
             // Add InstructionBuilder to the Instruction(s)Builder List
             isb.setInstruction(instructions);
-            logger.debug("Instructions contain: {}", ib.getInstruction());
+            LOG.debug("Instructions contain: {}", ib.getInstruction());
             // Add InstructionsBuilder to FlowBuilder
             flowBuilder.setInstructions(isb.build());
             writeFlow(flowBuilder, nodeBuilder);
@@ -437,7 +437,7 @@ public class IngressAclService extends AbstractServiceInstance implements Ingres
                     .build());
         }
 
-        logger.debug("MatchBuilder contains: {}", flowBuilder.getMatch());
+        LOG.debug("MatchBuilder contains: {}", flowBuilder.getMatch());
         String flowId = "IngressProto_ACL_" + segmentationId + "_" +
                 attachedMac + "_Permit_" + securityRuleIpPrefix;
         // Add Flow Attributes
@@ -464,7 +464,7 @@ public class IngressAclService extends AbstractServiceInstance implements Ingres
             instructionsList.add(ib.build());
             isb.setInstruction(instructionsList);
 
-            logger.debug("Instructions contain: {}", ib.getInstruction());
+            LOG.debug("Instructions contain: {}", ib.getInstruction());
             // Add InstructionsBuilder to FlowBuilder
             flowBuilder.setInstructions(isb.build());
             writeFlow(flowBuilder, nodeBuilder);
@@ -491,7 +491,7 @@ public class IngressAclService extends AbstractServiceInstance implements Ingres
         FlowBuilder flowBuilder = new FlowBuilder();
 
         flowBuilder.setMatch(MatchUtils.createDHCPServerMatch(matchBuilder, dhcpMacAddress, 67, 68).build());
-        logger.debug("ingressACLDHCPAllowServerTraffic: MatchBuilder contains: {}", flowBuilder.getMatch());
+        LOG.debug("ingressACLDHCPAllowServerTraffic: MatchBuilder contains: {}", flowBuilder.getMatch());
         String flowId = "Ingress_DHCP_Server" + segmentationId + "_" + dhcpMacAddress + "_Permit_";
         // Add Flow Attributes
         flowBuilder.setId(new FlowId(flowId));
@@ -517,7 +517,7 @@ public class IngressAclService extends AbstractServiceInstance implements Ingres
             instructionsList.add(ib.build());
             isb.setInstruction(instructionsList);
 
-            logger.debug("Instructions contain: {}", ib.getInstruction());
+            LOG.debug("Instructions contain: {}", ib.getInstruction());
             // Add InstructionsBuilder to FlowBuilder
             flowBuilder.setInstructions(isb.build());
             writeFlow(flowBuilder, nodeBuilder);
index 253be535cd0c8f56e438d31aa3f2aebd419a94b9..0703c6527a0d756dd9fdafb4441406e7966af2e5 100644 (file)
@@ -52,7 +52,7 @@ import org.slf4j.LoggerFactory;
 import com.google.common.collect.Lists;
 
 public class L2ForwardingService extends AbstractServiceInstance implements ConfigInterface, L2ForwardingProvider {
-    private static final Logger logger = LoggerFactory.getLogger(L2ForwardingService.class);
+    private static final Logger LOG = LoggerFactory.getLogger(L2ForwardingService.class);
     public L2ForwardingService() {
         super(Service.L2_FORWARDING);
     }
@@ -1009,7 +1009,7 @@ public class L2ForwardingService extends AbstractServiceInstance implements Conf
             Long dpidLong, Long port ,
             List<Instruction> instructions) {
         NodeConnectorId ncid = new NodeConnectorId(OPENFLOW + dpidLong + ":" + port);
-        logger.debug("createOutputPortInstructions() Node Connector ID is - Type=openflow: DPID={} port={} existingInstructions={}", dpidLong, port, instructions);
+        LOG.debug("createOutputPortInstructions() Node Connector ID is - Type=openflow: DPID={} port={} existingInstructions={}", dpidLong, port, instructions);
 
         List<Action> actionList = Lists.newArrayList();
         ActionBuilder ab = new ActionBuilder();
@@ -1055,7 +1055,7 @@ public class L2ForwardingService extends AbstractServiceInstance implements Conf
         ApplyActionsBuilder aab = new ApplyActionsBuilder();
         aab.setAction(actionList);
         ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
-        logger.debug("createOutputPortInstructions() : applyAction {}", aab.build());
+        LOG.debug("createOutputPortInstructions() : applyAction {}", aab.build());
         return ib;
     }
 
index 3b91ff500d1dbc0ef81c4030a0df8fc77afc2f91..83656793f277fa7ecef5056c11af84d14c941a33 100644 (file)
@@ -61,7 +61,7 @@ import com.google.common.collect.Lists;
 
 public class LoadBalancerService extends AbstractServiceInstance implements LoadBalancerProvider, ConfigInterface {
 
-    private static final Logger logger = LoggerFactory.getLogger(LoadBalancerProvider.class);
+    private static final Logger LOG = LoggerFactory.getLogger(LoadBalancerProvider.class);
     private static final int DEFAULT_FLOW_PRIORITY = 32768;
     private static final Long FIRST_PASS_REGA_MATCH_VALUE = 0L;
     private static final Long SECOND_PASS_REGA_MATCH_VALUE = 1L;
@@ -88,14 +88,14 @@ public class LoadBalancerService extends AbstractServiceInstance implements Load
                                                      LoadBalancerConfiguration lbConfig, LoadBalancerPoolMember member,
                                                      org.opendaylight.ovsdb.openstack.netvirt.api.Action action) {
         if (lbConfig == null || member == null) {
-            logger.error("Null value for LB config {} or Member {}", lbConfig, member);
+            LOG.error("Null value for LB config {} or Member {}", lbConfig, member);
             return new Status(StatusCode.BADREQUEST);
         }
         if (!lbConfig.isValid()) {
-            logger.error("LB config is invalid: {}", lbConfig);
+            LOG.error("LB config is invalid: {}", lbConfig);
             return new Status(StatusCode.BADREQUEST);
         }
-        logger.debug("Performing {} rules for member {} with index {} on LB with VIP {} and total members {}",
+        LOG.debug("Performing {} rules for member {} with index {} on LB with VIP {} and total members {}",
                 action, member.getIP(), member.getIndex(), lbConfig.getVip(), lbConfig.getMembers().size());
 
         NodeBuilder nodeBuilder = new NodeBuilder();
@@ -125,15 +125,11 @@ public class LoadBalancerService extends AbstractServiceInstance implements Load
     @Override
     public Status programLoadBalancerRules(Node node, LoadBalancerConfiguration lbConfig,
                                            org.opendaylight.ovsdb.openstack.netvirt.api.Action action) {
-        if (lbConfig == null) {
-            logger.error("LB config is invalid: {}", lbConfig);
+        if (lbConfig == null || !lbConfig.isValid()) {
+            LOG.error("LB config is invalid: {}", lbConfig);
             return new Status(StatusCode.BADREQUEST);
         }
-        if (!lbConfig.isValid()) {
-            logger.error("LB config is invalid: {}", lbConfig);
-            return new Status(StatusCode.BADREQUEST);
-        }
-        logger.debug("Performing {} rules for VIP {} and {} members", action, lbConfig.getVip(), lbConfig.getMembers().size());
+        LOG.debug("Performing {} rules for VIP {} and {} members", action, lbConfig.getVip(), lbConfig.getMembers().size());
 
         NodeBuilder nodeBuilder = new NodeBuilder();
         nodeBuilder.setId(new NodeId(Constants.OPENFLOW_NODE_PREFIX + node.getNodeId().getValue()));
index 4d611c832c0a696366bd2b5c0563b45a7891f884..80ebc43b9101509fd781a6aa2d2b33199ddd965c 100644 (file)
@@ -25,19 +25,11 @@ import java.net.HttpURLConnection;
  * handlers.
  */
 public abstract class AbstractHandler {
-    static final Logger logger = LoggerFactory.getLogger(AbstractHandler.class);
-
-    /*public AbstractHandler() {
-        logger.info(">>>>> init {}", this.getClass());
-    }*/
+    private static final Logger LOG = LoggerFactory.getLogger(AbstractHandler.class);
 
     // The implementation for each of these services is resolved by the OSGi Service Manager
     protected volatile EventDispatcher eventDispatcher;
 
-    /*void init() {
-        logger.info(">>>>> init {}", this.getClass());
-    }*/
-
     /**
      * Convert failure status returned by the  manager into
      * neutron API service errors.
@@ -51,7 +43,7 @@ public abstract class AbstractHandler {
         assert !status.isSuccess();
 
         StatusCode code = status.getCode();
-        logger.debug(" Exception code - {}, description - {}",
+        LOG.debug(" Exception code - {}, description - {}",
                 code, status.getDescription());
 
         if (code == StatusCode.BADREQUEST) {
@@ -76,7 +68,7 @@ public abstract class AbstractHandler {
      * @see org.opendaylight.ovsdb.openstack.netvirt.api.EventDispatcher
      */
     protected void enqueueEvent(AbstractEvent abstractEvent) {
-        logger.info("enqueueEvent: evenDispatcher: {} - {}", eventDispatcher, abstractEvent);
+        LOG.info("enqueueEvent: evenDispatcher: {} - {}", eventDispatcher, abstractEvent);
         Preconditions.checkNotNull(eventDispatcher);
         eventDispatcher.enqueueEvent(abstractEvent);
     }
index 668410199497ef7c5b7b9567fdf4eb5a7a760017..ed2c004d5079b4c45d2f2c2fd8eaa6bf8c5ec6c8 100644 (file)
@@ -31,7 +31,7 @@ public class FWaasHandler extends AbstractHandler
         implements INeutronFirewallAware, INeutronFirewallRuleAware,
         INeutronFirewallPolicyAware, ConfigInterface {
 
-    static final Logger logger = LoggerFactory.getLogger(FWaasHandler.class);
+    private static final Logger LOG = LoggerFactory.getLogger(FWaasHandler.class);
 
     /**
      * Invoked when a Firewall Rules creation is requested
@@ -47,12 +47,12 @@ public class FWaasHandler extends AbstractHandler
 
     @Override
     public void neutronFirewallCreated(NeutronFirewall neutronFirewall) {
-        logger.debug("Neutron Firewall created by Neutron: {}", neutronFirewall);
+        LOG.debug("Neutron Firewall created by Neutron: {}", neutronFirewall);
         int result = HttpURLConnection.HTTP_BAD_REQUEST;
 
         result = canCreateNeutronFirewall(neutronFirewall);
         if (result != HttpURLConnection.HTTP_CREATED) {
-            logger.error("Neutron Firewall creation failed: {} ", result);
+            LOG.error("Neutron Firewall creation failed: {} ", result);
             return;
         }
     }
@@ -64,7 +64,7 @@ public class FWaasHandler extends AbstractHandler
 
     @Override
     public void neutronFirewallUpdated(NeutronFirewall neutronFirewall) {
-        logger.debug("NeutronFirewall updated from Neutron: {}", neutronFirewall);
+        LOG.debug("NeutronFirewall updated from Neutron: {}", neutronFirewall);
         return;
     }
 
@@ -78,7 +78,7 @@ public class FWaasHandler extends AbstractHandler
         //TODO: Trigger flowmod removals
         int result = canDeleteNeutronFirewall(neutronFirewall);
         if  (result != HttpURLConnection.HTTP_OK) {
-            logger.error(" delete Neutron Firewall validation failed for result - {} ", result);
+            LOG.error(" delete Neutron Firewall validation failed for result - {} ", result);
             return;
         }
     }
@@ -97,13 +97,13 @@ public class FWaasHandler extends AbstractHandler
 
     @Override
     public void neutronFirewallRuleCreated(NeutronFirewallRule neutronFirewallRule) {
-        logger.debug("NeutronFirewallRule created by Neutron: {}", neutronFirewallRule);
+        LOG.debug("NeutronFirewallRule created by Neutron: {}", neutronFirewallRule);
 
         int result = HttpURLConnection.HTTP_BAD_REQUEST;
 
         result = canCreateNeutronFirewallRule(neutronFirewallRule);
         if (result != HttpURLConnection.HTTP_CREATED) {
-            logger.error("Neutron Firewall Rule creation failed {} ", result);
+            LOG.error("Neutron Firewall Rule creation failed {} ", result);
             return;
         }
     }
@@ -115,7 +115,7 @@ public class FWaasHandler extends AbstractHandler
 
     @Override
     public void neutronFirewallRuleUpdated(NeutronFirewallRule neutronFirewallRule) {
-        logger.debug("Neutron Firewall Rule updated from Neutron: {}", neutronFirewallRule);
+        LOG.debug("Neutron Firewall Rule updated from Neutron: {}", neutronFirewallRule);
         return;
     }
 
@@ -128,7 +128,7 @@ public class FWaasHandler extends AbstractHandler
     public void neutronFirewallRuleDeleted(NeutronFirewallRule neutronFirewallRule) {
         int result = canDeleteNeutronFirewallRule(neutronFirewallRule);
         if  (result != HttpURLConnection.HTTP_OK) {
-            logger.error(" delete Neutron Firewall Rule validation failed for result - {} ", result);
+            LOG.error(" delete Neutron Firewall Rule validation failed for result - {} ", result);
             return;
         }
     }
@@ -147,13 +147,13 @@ public class FWaasHandler extends AbstractHandler
 
     @Override
     public void neutronFirewallPolicyCreated(NeutronFirewallPolicy neutronFirewallPolicy) {
-        logger.debug("Neutron Firewall Policy created by Neutron: {}", neutronFirewallPolicy);
+        LOG.debug("Neutron Firewall Policy created by Neutron: {}", neutronFirewallPolicy);
 
         int result = HttpURLConnection.HTTP_BAD_REQUEST;
 
         result = canCreateNeutronFirewallPolicy(neutronFirewallPolicy);
         if (result != HttpURLConnection.HTTP_CREATED) {
-            logger.debug("Neutron Firewall Policy creation failed: {} ", result);
+            LOG.debug("Neutron Firewall Policy creation failed: {} ", result);
             return;
         }
     }
@@ -165,7 +165,7 @@ public class FWaasHandler extends AbstractHandler
 
     @Override
     public void neutronFirewallPolicyUpdated(NeutronFirewallPolicy neutronFirewallPolicy) {
-        logger.debug("Neutron Firewall Policy updated from Neutron: {}", neutronFirewallPolicy);
+        LOG.debug("Neutron Firewall Policy updated from Neutron: {}", neutronFirewallPolicy);
         return;
     }
 
@@ -178,7 +178,7 @@ public class FWaasHandler extends AbstractHandler
     public void neutronFirewallPolicyDeleted(NeutronFirewallPolicy neutronFirewallPolicy) {
         int result = canDeleteNeutronFirewallPolicy(neutronFirewallPolicy);
         if  (result != HttpURLConnection.HTTP_OK) {
-            logger.error(" delete Neutron Firewall Policy validation failed for result - {} ", result);
+            LOG.error(" delete Neutron Firewall Policy validation failed for result - {} ", result);
             return;
         }
     }
@@ -191,7 +191,7 @@ public class FWaasHandler extends AbstractHandler
     @Override
     public void processEvent(AbstractEvent abstractEvent) {
         if (!(abstractEvent instanceof NorthboundEvent)) {
-            logger.error("Unable to process abstract event " + abstractEvent);
+            LOG.error("Unable to process abstract event {}", abstractEvent);
             return;
         }
         NorthboundEvent ev = (NorthboundEvent) abstractEvent;
@@ -199,7 +199,7 @@ public class FWaasHandler extends AbstractHandler
             // TODO: add handling of events here, once callbacks do something
             //       other than logging.
             default:
-                logger.warn("Unable to process event action " + ev.getAction());
+                LOG.warn("Unable to process event action {}", ev.getAction());
                 break;
         }
     }
index 7aaaa2857b47213ddd1af1badcd7c5f22c20475a..da785a03e3a2c113f20957bf69a08aa36b56a017 100644 (file)
@@ -28,7 +28,7 @@ import org.slf4j.LoggerFactory;
 public class FloatingIPHandler extends AbstractHandler
         implements INeutronFloatingIPAware, ConfigInterface {
 
-    static final Logger logger = LoggerFactory.getLogger(FloatingIPHandler.class);
+    private static final Logger LOG = LoggerFactory.getLogger(FloatingIPHandler.class);
 
     // The implementation for each of these services is resolved by the OSGi Service Manager
     private volatile NeutronL3Adapter neutronL3Adapter;
@@ -124,7 +124,7 @@ public class FloatingIPHandler extends AbstractHandler
     @Override
     public void processEvent(AbstractEvent abstractEvent) {
         if (!(abstractEvent instanceof NorthboundEvent)) {
-            logger.error("Unable to process abstract event " + abstractEvent);
+            LOG.error("Unable to process abstract event {}", abstractEvent);
             return;
         }
         NorthboundEvent ev = (NorthboundEvent) abstractEvent;
@@ -137,7 +137,7 @@ public class FloatingIPHandler extends AbstractHandler
                 neutronL3Adapter.handleNeutronFloatingIPEvent(ev.getNeutronFloatingIP(), ev.getAction());
                 break;
             default:
-                logger.warn("Unable to process event action " + ev.getAction());
+                LOG.warn("Unable to process event action {}", ev.getAction());
                 break;
         }
     }
index d3c74ba9f4886519c264943ea12e7a7868a0b7f3..f77d6f88b359ae2a8036383bb15eff0db90bdfb5 100644 (file)
@@ -46,7 +46,7 @@ import com.google.common.base.Preconditions;
 
 public class LBaaSHandler extends AbstractHandler
         implements INeutronLoadBalancerAware, ConfigInterface, NodeCacheListener {
-    private static final Logger logger = LoggerFactory.getLogger(LBaaSHandler.class);
+    private static final Logger LOG = LoggerFactory.getLogger(LBaaSHandler.class);
 
     // The implementation for each of these services is resolved by the OSGi Service Manager
     private volatile INeutronLoadBalancerCRUD neutronLBCache;
@@ -65,7 +65,7 @@ public class LBaaSHandler extends AbstractHandler
 
     @Override
     public void neutronLoadBalancerCreated(NeutronLoadBalancer neutronLB) {
-        logger.debug("Neutron LB Creation : {}", neutronLB.toString());
+        LOG.debug("Neutron LB Creation : {}", neutronLB.toString());
         enqueueEvent(new NorthboundEvent(neutronLB, Action.ADD));
     }
 
@@ -80,9 +80,9 @@ public class LBaaSHandler extends AbstractHandler
         final List<Node> nodes = nodeCacheManager.getBridgeNodes();
 
         if (!lbConfig.isValid()) {
-            logger.debug("Neutron LB pool configuration invalid for {} ", lbConfig.getName());
+            LOG.debug("Neutron LB pool configuration invalid for {} ", lbConfig.getName());
         } else if (nodes.isEmpty()) {
-            logger.debug("Noop with LB {} creation because no nodes available.", lbConfig.getName());
+            LOG.debug("Noop with LB {} creation because no nodes available.", lbConfig.getName());
         } else {
             for (Node node : nodes) {
                 loadBalancerProvider.programLoadBalancerRules(node, lbConfig, Action.ADD);
@@ -98,7 +98,7 @@ public class LBaaSHandler extends AbstractHandler
 
     @Override
     public void neutronLoadBalancerUpdated(NeutronLoadBalancer neutronLB) {
-        logger.debug("Neutron LB Update : {}", neutronLB.toString());
+        LOG.debug("Neutron LB Update : {}", neutronLB.toString());
         enqueueEvent(new NorthboundEvent(neutronLB, Action.UPDATE));
     }
 
@@ -110,7 +110,7 @@ public class LBaaSHandler extends AbstractHandler
 
     @Override
     public void neutronLoadBalancerDeleted(NeutronLoadBalancer neutronLB) {
-        logger.debug("Neutron LB Deletion : {}", neutronLB.toString());
+        LOG.debug("Neutron LB Deletion : {}", neutronLB.toString());
         enqueueEvent(new NorthboundEvent(neutronLB, Action.DELETE));
     }
 
@@ -120,9 +120,9 @@ public class LBaaSHandler extends AbstractHandler
         final List<Node> nodes = nodeCacheManager.getBridgeNodes();
 
         if (!lbConfig.isValid()) {
-            logger.debug("Neutron LB pool configuration invalid for {} ", lbConfig.getName());
+            LOG.debug("Neutron LB pool configuration invalid for {} ", lbConfig.getName());
         } else if (nodes.isEmpty()) {
-            logger.debug("Noop with LB {} deletion because no nodes available.", lbConfig.getName());
+            LOG.debug("Noop with LB {} deletion because no nodes available.", lbConfig.getName());
         } else {
             for (Node node : nodes) {
                 loadBalancerProvider.programLoadBalancerRules(node, lbConfig, Action.DELETE);
@@ -138,9 +138,9 @@ public class LBaaSHandler extends AbstractHandler
      */
     @Override
     public void processEvent(AbstractEvent abstractEvent) {
-        logger.debug("Processing Loadbalancer event " + abstractEvent);
+        LOG.debug("Processing Loadbalancer event {}", abstractEvent);
         if (!(abstractEvent instanceof NorthboundEvent)) {
-            logger.error("Unable to process abstract event " + abstractEvent);
+            LOG.error("Unable to process abstract event {}", abstractEvent);
             return;
         }
         NorthboundEvent ev = (NorthboundEvent) abstractEvent;
@@ -160,7 +160,7 @@ public class LBaaSHandler extends AbstractHandler
                 doNeutronLoadBalancerCreate(ev.getLoadBalancer());
                 break;
             default:
-                logger.warn("Unable to process event action " + ev.getAction());
+                LOG.warn("Unable to process event action {}", ev.getAction());
                 break;
         }
     }
@@ -210,7 +210,7 @@ public class LBaaSHandler extends AbstractHandler
                     memberIP = neutronLBPoolMember.getPoolMemberAddress();
                     memberPort = neutronLBPoolMember.getPoolMemberProtoPort();
                     if (memberSubnetID == null || memberID == null || memberIP == null || memberPort == null) {
-                        logger.debug("Neutron LB pool member details incomplete: {}", neutronLBPoolMember);
+                        LOG.debug("Neutron LB pool member details incomplete: {}", neutronLBPoolMember);
                         continue;
                     }
                     memberMAC = NeutronCacheUtils.getMacAddress(neutronPortCache, memberSubnetID, memberIP);
@@ -231,13 +231,13 @@ public class LBaaSHandler extends AbstractHandler
      */
     @Override
     public void notifyNode(Node node, Action type) {
-        logger.debug("notifyNode: Node {} update {} from Controller's inventory Service", node, type);
+        LOG.debug("notifyNode: Node {} update {} from Controller's inventory Service", node, type);
         Preconditions.checkNotNull(loadBalancerProvider);
 
         for (NeutronLoadBalancer neutronLB: neutronLBCache.getAllNeutronLoadBalancers()) {
             LoadBalancerConfiguration lbConfig = extractLBConfiguration(neutronLB);
             if (!lbConfig.isValid()) {
-                logger.debug("Neutron LB configuration invalid for {} ", lbConfig.getName());
+                LOG.debug("Neutron LB configuration invalid for {} ", lbConfig.getName());
             } else {
                if (type.equals(Action.ADD)) {
                    loadBalancerProvider.programLoadBalancerRules(node, lbConfig, Action.ADD);
index 0d1cd37bc4aaa03b7ccd7f7bf0001d6901f6cba9..9f8c70647919a5fb1cb04e71dc1cacfe33996506 100755 (executable)
@@ -46,7 +46,7 @@ import com.google.common.collect.Lists;
 public class LBaaSPoolHandler extends AbstractHandler
         implements INeutronLoadBalancerPoolAware, ConfigInterface {
 
-    private static final Logger logger = LoggerFactory.getLogger(LBaaSPoolHandler.class);
+    private static final Logger LOG = LoggerFactory.getLogger(LBaaSPoolHandler.class);
 
     // The implementation for each of these services is resolved by the OSGi Service Manager
     private volatile INeutronLoadBalancerCRUD neutronLBCache;
@@ -72,7 +72,7 @@ public class LBaaSPoolHandler extends AbstractHandler
 
     @Override
     public void neutronLoadBalancerPoolCreated(NeutronLoadBalancerPool neutronLBPool) {
-        logger.debug("Neutron LB Pool Creation : {}", neutronLBPool.toString());
+        LOG.debug("Neutron LB Pool Creation : {}", neutronLBPool.toString());
         enqueueEvent(new NorthboundEvent(neutronLBPool, Action.ADD));
     }
 
@@ -86,16 +86,15 @@ public class LBaaSPoolHandler extends AbstractHandler
         List<LoadBalancerConfiguration> lbConfigList = extractLBConfiguration(neutronLBPool);
         final List<Node> nodes = nodeCacheManager.getBridgeNodes();
         if (lbConfigList == null) {
-            logger.debug("Neutron LB configuration invalid for pool {} ", neutronLBPool.getLoadBalancerPoolID());
+            LOG.debug("Neutron LB configuration invalid for pool {} ", neutronLBPool.getLoadBalancerPoolID());
         } else if (lbConfigList.size() == 0) {
-            logger.debug("No Neutron LB VIP not created yet for pool {} ", neutronLBPool.getLoadBalancerPoolID());
+            LOG.debug("No Neutron LB VIP not created yet for pool {} ", neutronLBPool.getLoadBalancerPoolID());
         } else if (nodes.isEmpty()) {
-            logger.debug("Noop with LB pool {} creation because no nodes available.", neutronLBPool.getLoadBalancerPoolID());
+            LOG.debug("Noop with LB pool {} creation because no nodes available.", neutronLBPool.getLoadBalancerPoolID());
         } else {
             for (LoadBalancerConfiguration lbConfig: lbConfigList) {
                 if (!lbConfig.isValid()) {
-                    logger.debug("Neutron LB pool configuration invalid for {} ", lbConfig.getName());
-                    continue;
+                    LOG.debug("Neutron LB pool configuration invalid for {} ", lbConfig.getName());
                 } else {
                     for (Node node : nodes) {
                         loadBalancerProvider.programLoadBalancerRules(node, lbConfig, Action.ADD);
@@ -112,7 +111,7 @@ public class LBaaSPoolHandler extends AbstractHandler
 
     @Override
     public void neutronLoadBalancerPoolUpdated(NeutronLoadBalancerPool neutronLBPool) {
-        logger.debug("Neutron LB Pool Update : {}", neutronLBPool.toString());
+        LOG.debug("Neutron LB Pool Update : {}", neutronLBPool.toString());
         enqueueEvent(new NorthboundEvent(neutronLBPool, Action.UPDATE));
     }
 
@@ -132,7 +131,7 @@ public class LBaaSPoolHandler extends AbstractHandler
 
     @Override
     public void neutronLoadBalancerPoolDeleted(NeutronLoadBalancerPool neutronLBPool) {
-        logger.debug("Neutron LB Pool Deletion : {}", neutronLBPool.toString());
+        LOG.debug("Neutron LB Pool Deletion : {}", neutronLBPool.toString());
         enqueueEvent(new NorthboundEvent(neutronLBPool, Action.DELETE));
     }
 
@@ -142,16 +141,15 @@ public class LBaaSPoolHandler extends AbstractHandler
         List<LoadBalancerConfiguration> lbConfigList = extractLBConfiguration(neutronLBPool);
         final List<Node> nodes = nodeCacheManager.getBridgeNodes();
         if (lbConfigList == null) {
-            logger.debug("Neutron LB configuration invalid for pool {} ", neutronLBPool.getLoadBalancerPoolID());
+            LOG.debug("Neutron LB configuration invalid for pool {} ", neutronLBPool.getLoadBalancerPoolID());
         } else if (lbConfigList.size() == 0) {
-            logger.debug("No Neutron LB VIP not created yet for pool {} ", neutronLBPool.getLoadBalancerPoolID());
+            LOG.debug("No Neutron LB VIP not created yet for pool {} ", neutronLBPool.getLoadBalancerPoolID());
         } else if (nodes.isEmpty()) {
-            logger.debug("Noop with LB pool {} deletion because no nodes available.", neutronLBPool.getLoadBalancerPoolID());
+            LOG.debug("Noop with LB pool {} deletion because no nodes available.", neutronLBPool.getLoadBalancerPoolID());
         } else {
             for (LoadBalancerConfiguration lbConfig: lbConfigList) {
                 if (!lbConfig.isValid()) {
-                    logger.debug("Neutron LB pool configuration invalid for {} ", lbConfig.getName());
-                    continue;
+                    LOG.debug("Neutron LB pool configuration invalid for {} ", lbConfig.getName());
                 } else {
                     for (Node node : nodes) {
                         loadBalancerProvider.programLoadBalancerRules(node, lbConfig, Action.DELETE);
@@ -169,9 +167,9 @@ public class LBaaSPoolHandler extends AbstractHandler
      */
     @Override
     public void processEvent(AbstractEvent abstractEvent) {
-        logger.debug("Processing Loadbalancer Pool event " + abstractEvent);
+        LOG.debug("Processing Loadbalancer Pool event {}", abstractEvent);
         if (!(abstractEvent instanceof NorthboundEvent)) {
-            logger.error("Unable to process abstract event " + abstractEvent);
+            LOG.error("Unable to process abstract event {}", abstractEvent);
             return;
         }
         NorthboundEvent ev = (NorthboundEvent) abstractEvent;
@@ -187,10 +185,10 @@ public class LBaaSPoolHandler extends AbstractHandler
                  * Typical upgrade involves changing algorithm. Right now
                  * we do not support this flexibility. TODO
                  */
-                logger.warn("Load balancer pool update is not supported");
+                LOG.warn("Load balancer pool update is not supported");
                 break;
             default:
-                logger.warn("Unable to process event action " + ev.getAction());
+                LOG.warn("Unable to process event action {}", ev.getAction());
                 break;
         }
     }
@@ -211,7 +209,7 @@ public class LBaaSPoolHandler extends AbstractHandler
 
         List<NeutronLoadBalancerPoolMember> poolMembers = neutronLBPool.getLoadBalancerPoolMembers();
         if (poolMembers.size() == 0) {
-            logger.debug("Neutron LB pool is empty: {}", neutronLBPool);
+            LOG.debug("Neutron LB pool is empty: {}", neutronLBPool);
             return null;
         }
 
@@ -249,7 +247,7 @@ public class LBaaSPoolHandler extends AbstractHandler
                     memberIP = neutronLBPoolMember.getPoolMemberAddress();
                     memberPort = neutronLBPoolMember.getPoolMemberProtoPort();
                     if (memberSubnetID == null || memberID == null || memberIP == null || memberPort == null) {
-                        logger.debug("Neutron LB pool member details incomplete: {}", neutronLBPoolMember);
+                        LOG.debug("Neutron LB pool member details incomplete: {}", neutronLBPoolMember);
                         continue;
                     }
                     memberMAC = NeutronCacheUtils.getMacAddress(neutronPortCache, memberSubnetID, memberIP);
index 4b577c0f6a1e13bf6e4c07c09dbbdaa196744caf..8b8752bbed07d82835638e67b918ccb1e758d0a5 100755 (executable)
@@ -43,7 +43,7 @@ import com.google.common.base.Preconditions;
 
 public class LBaaSPoolMemberHandler extends AbstractHandler
         implements INeutronLoadBalancerPoolMemberAware, ConfigInterface {
-    private static final Logger logger = LoggerFactory.getLogger(LBaaSPoolMemberHandler.class);
+    private static final Logger LOG = LoggerFactory.getLogger(LBaaSPoolMemberHandler.class);
 
     // The implementation for each of these services is resolved by the OSGi Service Manager
     private volatile INeutronLoadBalancerPoolCRUD neutronLBPoolCache;
@@ -68,7 +68,7 @@ public class LBaaSPoolMemberHandler extends AbstractHandler
 
     @Override
     public void neutronLoadBalancerPoolMemberCreated(NeutronLoadBalancerPoolMember neutronLBPoolMember) {
-        logger.debug("Neutron LB Pool Member Creation : {}", neutronLBPoolMember.toString());
+        LOG.debug("Neutron LB Pool Member Creation : {}", neutronLBPoolMember.toString());
         enqueueEvent(new NorthboundEvent(neutronLBPoolMember, Action.ADD));
     }
 
@@ -83,13 +83,13 @@ public class LBaaSPoolMemberHandler extends AbstractHandler
         final List<Node> nodes =
                 nodeCacheManager.getBridgeNodes();
         if (lbConfig == null) {
-            logger.debug("Neutron LB configuration invalid for member {} ", neutronLBPoolMember.getPoolMemberAddress());
+            LOG.debug("Neutron LB configuration invalid for member {} ", neutronLBPoolMember.getPoolMemberAddress());
         } else if (lbConfig.getVip() == null) {
-            logger.debug("Neutron LB VIP not created yet for member {} ", neutronLBPoolMember.getPoolMemberID());
+            LOG.debug("Neutron LB VIP not created yet for member {} ", neutronLBPoolMember.getPoolMemberID());
         } else if (!lbConfig.isValid()) {
-            logger.debug("Neutron LB pool configuration invalid for {} ", lbConfig.getName());
+            LOG.debug("Neutron LB pool configuration invalid for {} ", lbConfig.getName());
         } else if (nodes.isEmpty()) {
-            logger.debug("Noop with LB pool member {} creation because no nodes available.", neutronLBPoolMember.getPoolMemberID());
+            LOG.debug("Noop with LB pool member {} creation because no nodes available.", neutronLBPoolMember.getPoolMemberID());
         } else {
             for (Node node : nodes) {
                 loadBalancerProvider.programLoadBalancerPoolMemberRules(node,
@@ -106,7 +106,7 @@ public class LBaaSPoolMemberHandler extends AbstractHandler
 
     @Override
     public void neutronLoadBalancerPoolMemberUpdated(NeutronLoadBalancerPoolMember neutronLBPoolMember) {
-        logger.debug("Neutron LB Pool Member Update : {}", neutronLBPoolMember.toString());
+        LOG.debug("Neutron LB Pool Member Update : {}", neutronLBPoolMember.toString());
         enqueueEvent(new NorthboundEvent(neutronLBPoolMember, Action.UPDATE));
     }
 
@@ -124,7 +124,7 @@ public class LBaaSPoolMemberHandler extends AbstractHandler
 
     @Override
     public void neutronLoadBalancerPoolMemberDeleted(NeutronLoadBalancerPoolMember neutronLBPoolMember) {
-        logger.debug("Neutron LB Pool Member Deletion : {}", neutronLBPoolMember.toString());
+        LOG.debug("Neutron LB Pool Member Deletion : {}", neutronLBPoolMember.toString());
         enqueueEvent(new NorthboundEvent(neutronLBPoolMember, Action.DELETE));
     }
 
@@ -134,13 +134,13 @@ public class LBaaSPoolMemberHandler extends AbstractHandler
         LoadBalancerConfiguration lbConfig = extractLBConfiguration(neutronLBPoolMember);
         final List<Node> nodes = nodeCacheManager.getBridgeNodes();
         if (lbConfig == null) {
-            logger.debug("Neutron LB configuration invalid for member {} ", neutronLBPoolMember.getPoolMemberAddress());
+            LOG.debug("Neutron LB configuration invalid for member {} ", neutronLBPoolMember.getPoolMemberAddress());
         } else if (lbConfig.getVip() == null) {
-            logger.debug("Neutron LB VIP not created yet for member {} ", neutronLBPoolMember.getPoolMemberID());
+            LOG.debug("Neutron LB VIP not created yet for member {} ", neutronLBPoolMember.getPoolMemberID());
         } else if (!lbConfig.isValid()) {
-            logger.debug("Neutron LB pool configuration invalid for {} ", lbConfig.getName());
+            LOG.debug("Neutron LB pool configuration invalid for {} ", lbConfig.getName());
         } else if (nodes.isEmpty()) {
-            logger.debug("Noop with LB pool member {} deletion because no nodes available.", neutronLBPoolMember.getPoolMemberID());
+            LOG.debug("Noop with LB pool member {} deletion because no nodes available.", neutronLBPoolMember.getPoolMemberID());
         } else {
             /* As of now, deleting a member involves recomputing member indices.
              * This is best done through a complete update of the load balancer instance.
@@ -163,9 +163,9 @@ public class LBaaSPoolMemberHandler extends AbstractHandler
      */
     @Override
     public void processEvent(AbstractEvent abstractEvent) {
-        logger.debug("Processing Loadbalancer member event " + abstractEvent);
+        LOG.debug("Processing Loadbalancer member event {}", abstractEvent);
         if (!(abstractEvent instanceof NorthboundEvent)) {
-            logger.error("Unable to process abstract event " + abstractEvent);
+            LOG.error("Unable to process abstract event {}", abstractEvent);
             return;
         }
         NorthboundEvent ev = (NorthboundEvent) abstractEvent;
@@ -181,10 +181,10 @@ public class LBaaSPoolMemberHandler extends AbstractHandler
                  * Typical upgrade involves changing weights. Since weights are not
                  * supported yet, updates are not supported either. TODO
                  */
-                logger.warn("Load balancer pool member update is not supported");
+                LOG.warn("Load balancer pool member update is not supported");
                 break;
             default:
-                logger.warn("Unable to process event action " + ev.getAction());
+                LOG.warn("Unable to process event action {}", ev.getAction());
                 break;
         }
     }
@@ -202,13 +202,13 @@ public class LBaaSPoolMemberHandler extends AbstractHandler
         String memberProtocol = null;
 
         if (memberSubnetID == null || memberID == null || memberPoolID == null) {
-            logger.debug("Neutron LB pool member details incomplete [id={}, pool_id={},subnet_id={}",
+            LOG.debug("Neutron LB pool member details incomplete [id={}, pool_id={},subnet_id={}",
                     memberID, memberPoolID, memberSubnetID);
             return null;
         }
         String memberMAC = NeutronCacheUtils.getMacAddress(neutronPortCache, memberSubnetID, memberIP);
         if (memberMAC == null) {
-            logger.debug("Neutron LB pool member {} MAC address unavailable", memberID);
+            LOG.debug("Neutron LB pool member {} MAC address unavailable", memberID);
             return null;
         }
         NeutronLoadBalancerPool neutronLBPool = neutronLBPoolCache.getNeutronLoadBalancerPool(memberPoolID);
index 43150c4da5b52fe3e9ecde8eae8142c998fe52b8..595ea4d9d88a404ce1147f8cc89212cebb9a3c27 100644 (file)
@@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory;
  * Handle requests for Neutron Network.
  */
 public class NetworkHandler extends AbstractHandler implements INeutronNetworkAware, ConfigInterface {
-    private static final Logger logger = LoggerFactory.getLogger(NetworkHandler.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NetworkHandler.class);
     public static final String NETWORK_TYPE_VXLAN = "vxlan";
     public static final String NETWORK_TYPE_GRE = "gre";
     public static final String NETWORK_TYPE_VLAN = "vlan";
@@ -57,7 +57,7 @@ public class NetworkHandler extends AbstractHandler implements INeutronNetworkAw
     @Override
     public int canCreateNetwork(NeutronNetwork network) {
         if (network.isShared()) {
-            logger.error(" Network shared attribute not supported ");
+            LOG.error(" Network shared attribute not supported ");
             return HttpURLConnection.HTTP_NOT_ACCEPTABLE;
         }
 
@@ -91,7 +91,7 @@ public class NetworkHandler extends AbstractHandler implements INeutronNetworkAw
     public int canUpdateNetwork(NeutronNetwork delta,
                                 NeutronNetwork original) {
         if (delta.isShared()) {
-            logger.error(" Network shared attribute not supported ");
+            LOG.error(" Network shared attribute not supported ");
             return HttpURLConnection.HTTP_NOT_ACCEPTABLE;
         }
 
@@ -140,7 +140,7 @@ public class NetworkHandler extends AbstractHandler implements INeutronNetworkAw
         if (neutronNetworkCache != null) {
             networks = neutronNetworkCache.getAllNetworks();
             if (networks.isEmpty()) {
-                logger.trace("neutronNetworkDeleted: last tenant network, delete tunnel ports...");
+                LOG.trace("neutronNetworkDeleted: last tenant network, delete tunnel ports...");
                 List<Node> nodes = nodeCacheManager.getNodes();
 
                 for (Node node : nodes) {
@@ -149,15 +149,15 @@ public class NetworkHandler extends AbstractHandler implements INeutronNetworkAw
                         List<OvsdbTerminationPointAugmentation> ports = southbound.getTerminationPointsOfBridge(node);
                         for (OvsdbTerminationPointAugmentation port : ports) {
                             if (southbound.isTunnel(port)) {
-                                logger.trace("Delete tunnel interface {}", port.getName());
+                                LOG.trace("Delete tunnel interface {}", port.getName());
                                 southbound.deleteTerminationPoint(node, port.getName());
                             } else if (!phyIfName.isEmpty() && phyIfName.contains(port.getName())) {
-                                logger.trace("Delete physical interface {}", port.getName());
+                                LOG.trace("Delete physical interface {}", port.getName());
                                 southbound.deleteTerminationPoint(node, port.getName());
                             }
                         }
                     } catch (Exception e) {
-                        logger.error("Exception during handlingNeutron network delete", e);
+                        LOG.error("Exception during handlingNeutron network delete", e);
                     }
                 }
             }
@@ -174,7 +174,7 @@ public class NetworkHandler extends AbstractHandler implements INeutronNetworkAw
     @Override
     public void processEvent(AbstractEvent abstractEvent) {
         if (!(abstractEvent instanceof NorthboundEvent)) {
-            logger.error("Unable to process abstract event " + abstractEvent);
+            LOG.error("Unable to process abstract event {}", abstractEvent);
             return;
         }
         NorthboundEvent ev = (NorthboundEvent) abstractEvent;
@@ -189,7 +189,7 @@ public class NetworkHandler extends AbstractHandler implements INeutronNetworkAw
                 doNeutronNetworkDeleted(ev.getNeutronNetwork());
                 break;
             default:
-                logger.warn("Unable to process event action " + ev.getAction());
+                LOG.warn("Unable to process event action {}", ev.getAction());
                 break;
         }
     }
index 2ecf1090b851d1caa658a4a93852a6d7fb32498a..cb9b9cfe9cb2f8d764099610c494c31887ed03c6 100644 (file)
@@ -32,7 +32,7 @@ import org.slf4j.LoggerFactory;
  * Handle requests for Neutron Port.
  */
 public class PortHandler extends AbstractHandler implements INeutronPortAware, ConfigInterface {
-    static final Logger logger = LoggerFactory.getLogger(PortHandler.class);
+    private static final Logger LOG = LoggerFactory.getLogger(PortHandler.class);
 
     // The implementation for each of these services is resolved by the OSGi Service Manager
     private volatile NodeCacheManager nodeCacheManager;
@@ -61,8 +61,7 @@ public class PortHandler extends AbstractHandler implements INeutronPortAware, C
         enqueueEvent(new NorthboundEvent(neutronPort, Action.ADD));
     }
     private void doNeutronPortCreated(NeutronPort neutronPort) {
-        logger.debug(" Port-ADD successful for tenant-id - {}," +
-                     " network-id - {}, port-id - {}",
+        LOG.debug(" Port-ADD successful for tenant-id - {}, network-id - {}, port-id - {}",
                      neutronPort.getTenantID(), neutronPort.getNetworkUUID(),
                      neutronPort.getID());
         neutronL3Adapter.handleNeutronPortEvent(neutronPort, Action.ADD);
@@ -94,7 +93,7 @@ public class PortHandler extends AbstractHandler implements INeutronPortAware, C
         enqueueEvent(new NorthboundEvent(neutronPort, Action.UPDATE));
     }
     private void doNeutronPortUpdated(NeutronPort neutronPort) {
-        logger.debug("Handling neutron update port " + neutronPort);
+        LOG.debug("Handling neutron update port {}", neutronPort);
         neutronL3Adapter.handleNeutronPortEvent(neutronPort, Action.UPDATE);
     }
 
@@ -120,7 +119,7 @@ public class PortHandler extends AbstractHandler implements INeutronPortAware, C
         enqueueEvent(new NorthboundEvent(neutronPort, Action.DELETE));
     }
     private void doNeutronPortDeleted(NeutronPort neutronPort) {
-        logger.debug("Handling neutron delete port " + neutronPort);
+        LOG.debug("Handling neutron delete port {}", neutronPort);
         neutronL3Adapter.handleNeutronPortEvent(neutronPort, Action.DELETE);
         //TODO: Need to implement getNodes
         List<Node> nodes = nodeCacheManager.getNodes();
@@ -131,17 +130,16 @@ public class PortHandler extends AbstractHandler implements INeutronPortAware, C
                     String neutronPortId =
                             southbound.getInterfaceExternalIdsValue(port, Constants.EXTERNAL_ID_INTERFACE_ID);
                     if (neutronPortId != null && neutronPortId.equalsIgnoreCase(neutronPort.getPortUUID())) {
-                        logger.trace("neutronPortDeleted: Delete interface {}", port.getName());
+                        LOG.trace("neutronPortDeleted: Delete interface {}", port.getName());
                         southbound.deleteTerminationPoint(node, port.getName());
                         break;
                     }
                 }
             } catch (Exception e) {
-                logger.error("Exception during handlingNeutron port delete", e);
+                LOG.error("Exception during handlingNeutron port delete", e);
             }
         }
-        logger.debug(" PORT delete successful for tenant-id - {}, " +
-                     " network-id - {}, port-id - {}",
+        LOG.debug(" PORT delete successful for tenant-id - {}, network-id - {}, port-id - {}",
                      neutronPort.getTenantID(), neutronPort.getNetworkUUID(),
                      neutronPort.getID());
     }
@@ -155,7 +153,7 @@ public class PortHandler extends AbstractHandler implements INeutronPortAware, C
     @Override
     public void processEvent(AbstractEvent abstractEvent) {
         if (!(abstractEvent instanceof NorthboundEvent)) {
-            logger.error("Unable to process abstract event " + abstractEvent);
+            LOG.error("Unable to process abstract event {}", abstractEvent);
             return;
         }
         NorthboundEvent ev = (NorthboundEvent) abstractEvent;
@@ -170,7 +168,7 @@ public class PortHandler extends AbstractHandler implements INeutronPortAware, C
                 doNeutronPortUpdated(ev.getPort());
                 break;
             default:
-                logger.warn("Unable to process event action " + ev.getAction());
+                LOG.warn("Unable to process event action {}", ev.getAction());
                 break;
         }
     }
index f82354f36a0fcdb78c7279c4c82dfd7d62187471..85fe8ebd759bb9c0bb88fd4fa7eff88c6ce76e00 100644 (file)
@@ -29,7 +29,7 @@ import org.slf4j.LoggerFactory;
 public class PortSecurityHandler extends AbstractHandler
         implements INeutronSecurityGroupAware, INeutronSecurityRuleAware, ConfigInterface {
 
-    static final Logger logger = LoggerFactory.getLogger(PortSecurityHandler.class);
+    private static final Logger LOG = LoggerFactory.getLogger(PortSecurityHandler.class);
 
     @Override
     public int canCreateNeutronSecurityGroup(NeutronSecurityGroup neutronSecurityGroup) {
@@ -42,7 +42,7 @@ public class PortSecurityHandler extends AbstractHandler
 
         result = canCreateNeutronSecurityGroup(neutronSecurityGroup);
         if (result != HttpURLConnection.HTTP_CREATED) {
-            logger.debug("Neutron Security Group creation failed {} ", result);
+            LOG.debug("Neutron Security Group creation failed {} ", result);
             return;
         }
     }
@@ -67,7 +67,7 @@ public class PortSecurityHandler extends AbstractHandler
         //TODO: Trigger flowmod removals
         int result = canDeleteNeutronSecurityGroup(neutronSecurityGroup);
         if  (result != HttpURLConnection.HTTP_OK) {
-            logger.error(" delete Neutron Security Rule validation failed for result - {} ", result);
+            LOG.error(" delete Neutron Security Rule validation failed for result - {} ", result);
             return;
         }
     }
@@ -91,7 +91,7 @@ public class PortSecurityHandler extends AbstractHandler
 
         result = canCreateNeutronSecurityRule(neutronSecurityRule);
         if (result != HttpURLConnection.HTTP_CREATED) {
-            logger.debug("Neutron Security Group creation failed {} ", result);
+            LOG.debug("Neutron Security Group creation failed {} ", result);
             return;
         }
     }
@@ -115,7 +115,7 @@ public class PortSecurityHandler extends AbstractHandler
     public void neutronSecurityRuleDeleted(NeutronSecurityRule neutronSecurityRule) {
         int result = canDeleteNeutronSecurityRule(neutronSecurityRule);
         if  (result != HttpURLConnection.HTTP_OK) {
-            logger.error(" delete Neutron Security Rule validation failed for result - {} ", result);
+            LOG.error(" delete Neutron Security Rule validation failed for result - {} ", result);
             return;
         }
     }
@@ -129,7 +129,7 @@ public class PortSecurityHandler extends AbstractHandler
     @Override
     public void processEvent(AbstractEvent abstractEvent) {
         if (!(abstractEvent instanceof NorthboundEvent)) {
-            logger.error("Unable to process abstract event " + abstractEvent);
+            LOG.error("Unable to process abstract event {}", abstractEvent);
             return;
         }
         NorthboundEvent ev = (NorthboundEvent) abstractEvent;
@@ -137,7 +137,7 @@ public class PortSecurityHandler extends AbstractHandler
             // TODO: add handling of events here, once callbacks do something
             //       other than logging.
             default:
-                logger.warn("Unable to process event action " + ev.getAction());
+                LOG.warn("Unable to process event action {}", ev.getAction());
                 break;
         }
     }
index bc9aab75d96cd3f33d9b85e741e0ca0a05da4a52..ef79971423dbfc4ae8672c3d81d8d225f294eb2d 100644 (file)
@@ -27,7 +27,7 @@ import org.slf4j.LoggerFactory;
  * Handle requests for Neutron Router.
  */
 public class RouterHandler extends AbstractHandler implements INeutronRouterAware, ConfigInterface {
-    static final Logger logger = LoggerFactory.getLogger(RouterHandler.class);
+    private static final Logger LOG = LoggerFactory.getLogger(RouterHandler.class);
 
     // The implementation for each of these services is resolved by the OSGi Service Manager
     private volatile NeutronL3Adapter neutronL3Adapter;
@@ -128,7 +128,7 @@ public class RouterHandler extends AbstractHandler implements INeutronRouterAwar
      */
     @Override
     public int canAttachInterface(NeutronRouter router, NeutronRouter_Interface routerInterface) {
-        logger.debug(" Router {} asked if it can attach interface {}. Subnet {}",
+        LOG.debug(" Router {} asked if it can attach interface {}. Subnet {}",
                      router.getName(),
                      routerInterface.getPortUUID(),
                      routerInterface.getSubnetUUID());
@@ -163,7 +163,7 @@ public class RouterHandler extends AbstractHandler implements INeutronRouterAwar
      */
     @Override
     public int canDetachInterface(NeutronRouter router, NeutronRouter_Interface routerInterface) {
-        logger.debug(" Router {} asked if it can detach interface {}. Subnet {}",
+        LOG.debug(" Router {} asked if it can detach interface {}. Subnet {}",
                      router.getName(),
                      routerInterface.getPortUUID(),
                      routerInterface.getSubnetUUID());
@@ -193,7 +193,7 @@ public class RouterHandler extends AbstractHandler implements INeutronRouterAwar
     @Override
     public void processEvent(AbstractEvent abstractEvent) {
         if (!(abstractEvent instanceof NorthboundEvent)) {
-            logger.error("Unable to process abstract event " + abstractEvent);
+            LOG.error("Unable to process abstract event {}", abstractEvent);
             return;
         }
         NorthboundEvent ev = (NorthboundEvent) abstractEvent;
@@ -212,7 +212,7 @@ public class RouterHandler extends AbstractHandler implements INeutronRouterAwar
                 }
                 break;
             default:
-                logger.warn("Unable to process event action " + ev.getAction());
+                LOG.warn("Unable to process event action {}", ev.getAction());
                 break;
         }
     }
index 61f6d7cf75a9116a0f9b8fea4afcdae42b4730de..9318b3e7c7f624f932522c28b82676a77c100474 100644 (file)
@@ -32,7 +32,7 @@ import org.slf4j.LoggerFactory;
  */
 public class SouthboundHandler extends AbstractHandler
         implements ConfigInterface, NodeCacheListener, OvsdbInventoryListener {
-    private static final Logger LOGGER = LoggerFactory.getLogger(SouthboundHandler.class);
+    private static final Logger LOG = LoggerFactory.getLogger(SouthboundHandler.class);
 
     // The implementation for each of these services is resolved by the OSGi Service Manager
     private volatile ConfigurationService configurationService;
@@ -64,7 +64,7 @@ public class SouthboundHandler extends AbstractHandler
                 type = SouthboundEvent.Type.OPENVSWITCH;
                 break;
             default:
-                LOGGER.warn("Invalid OvsdbType: {}", ovsdbType);
+                LOG.warn("Invalid OvsdbType: {}", ovsdbType);
                 break;
         }
         return type;
@@ -72,28 +72,28 @@ public class SouthboundHandler extends AbstractHandler
 
     @Override
     public void ovsdbUpdate(Node node, DataObject resourceAugmentationData, OvsdbType ovsdbType, Action action) {
-        LOGGER.info("ovsdbUpdate: {} - {} - <<{}>> <<{}>>", ovsdbType, action, node, resourceAugmentationData);
+        LOG.info("ovsdbUpdate: {} - {} - <<{}>> <<{}>>", ovsdbType, action, node, resourceAugmentationData);
         enqueueEvent(new SouthboundEvent(node, resourceAugmentationData,
                 ovsdbTypeToSouthboundEventType(ovsdbType), action));
     }
 
     private void handleInterfaceUpdate (Node node, OvsdbTerminationPointAugmentation tp) {
-        LOGGER.debug("handleInterfaceUpdate <{}> <{}>", node, tp);
+        LOG.debug("handleInterfaceUpdate <{}> <{}>", node, tp);
         NeutronNetwork network = tenantNetworkManager.getTenantNetwork(tp);
         if (network != null && !network.getRouterExternal()) {
-            LOGGER.trace("handleInterfaceUpdate <{}> <{}> network: {}", node, tp, network.getNetworkUUID());
+            LOG.trace("handleInterfaceUpdate <{}> <{}> network: {}", node, tp, network.getNetworkUUID());
             if (bridgeConfigurationManager.createLocalNetwork(node, network)) {
                 networkingProviderManager.getProvider(node).handleInterfaceUpdate(network, node, tp);
             }
         } else {
-            LOGGER.debug("No tenant network found on node: <{}> for interface: <{}>", node, tp);
+            LOG.debug("No tenant network found on node: <{}> for interface: <{}>", node, tp);
         }
         neutronL3Adapter.handleInterfaceEvent(node, tp, network, Action.UPDATE);
     }
 
     private void handleInterfaceDelete (Node node, OvsdbTerminationPointAugmentation intf,
                                         boolean isLastInstanceOnNode, NeutronNetwork network) {
-        LOGGER.debug("handleInterfaceDelete: node: <{}>, isLastInstanceOnNode: {}, interface: <{}>",
+        LOG.debug("handleInterfaceDelete: node: <{}>, isLastInstanceOnNode: {}, interface: <{}>",
                 node, isLastInstanceOnNode, intf);
 
         neutronL3Adapter.handleInterfaceEvent(node, intf, network, Action.DELETE);
@@ -106,7 +106,7 @@ public class SouthboundHandler extends AbstractHandler
             // vlan doesn't need a tunnel endpoint
             if (!network.getProviderNetworkType().equalsIgnoreCase(NetworkHandler.NETWORK_TYPE_VLAN) &&
                     configurationService.getTunnelEndPoint(node) == null) {
-                LOGGER.error("Tunnel end-point configuration missing. Please configure it in OpenVSwitch Table");
+                LOG.error("Tunnel end-point configuration missing. Please configure it in OpenVSwitch Table");
                 return;
             }
             networkingProviderManager.getProvider(node).handleInterfaceDelete(network.getProviderNetworkType(),
@@ -116,7 +116,7 @@ public class SouthboundHandler extends AbstractHandler
 
     @Override
     public void triggerUpdates() {
-        LOGGER.info("triggerUpdates");
+        LOG.info("triggerUpdates");
         List<Node> ovsdbNodes = southbound.readOvsdbTopologyNodes();
         for (Node node : ovsdbNodes) {
             ovsdbUpdate(node, node.getAugmentation(OvsdbNodeAugmentation.class),
@@ -126,7 +126,7 @@ public class SouthboundHandler extends AbstractHandler
 
     private void processPortDelete(Node node, OvsdbTerminationPointAugmentation ovsdbTerminationPointAugmentation,
                                    Object context) {
-        LOGGER.debug("processPortDelete <{}> <{}>", node, ovsdbTerminationPointAugmentation);
+        LOG.debug("processPortDelete <{}> <{}>", node, ovsdbTerminationPointAugmentation);
         NeutronNetwork network = null;
         if (context == null) {
             network = tenantNetworkManager.getTenantNetwork(ovsdbTerminationPointAugmentation);
@@ -138,10 +138,10 @@ public class SouthboundHandler extends AbstractHandler
             if (network != null) {
                 this.handleInterfaceDelete(node, ovsdbTerminationPointAugmentation, false, network);
             } else {
-                LOGGER.warn("processPortDelete: network was null, ignoring update");
+                LOG.warn("processPortDelete: network was null, ignoring update");
             }
         } else if (network != null && !network.getRouterExternal()) {
-            LOGGER.debug("Network {}: Delete interface {} attached to bridge {}", network.getNetworkUUID(),
+            LOG.debug("Network {}: Delete interface {} attached to bridge {}", network.getNetworkUUID(),
                     ovsdbTerminationPointAugmentation.getInterfaceUuid(), node.getNodeId());
             try {
                 OvsdbBridgeAugmentation ovsdbBridgeAugmentation = southbound.getBridge(node);
@@ -167,17 +167,17 @@ public class SouthboundHandler extends AbstractHandler
                     }
                 }
             } catch (Exception e) {
-                LOGGER.error("Error fetching Interface Rows for node " + node, e);
+                LOG.error("Error fetching Interface Rows for node {}", node, e);
             }
         }
     }
 
     private boolean isInterfaceOfInterest(OvsdbTerminationPointAugmentation terminationPoint, List<String> phyIfName) {
-        LOGGER.trace("SouthboundHandler#isInterfaceOfInterest: Interface : {}", terminationPoint);
+        LOG.trace("SouthboundHandler#isInterfaceOfInterest: Interface : {}", terminationPoint);
 
         if(terminationPoint.getInterfaceType() == null){
             // This is OK since eth ports don't have an interface type
-            LOGGER.info("No type found for the interface : {}", terminationPoint);
+            LOG.info("No type found for the interface : {}", terminationPoint);
             return false;
         }
         return MdsalHelper.createOvsdbInterfaceType(
@@ -198,7 +198,7 @@ public class SouthboundHandler extends AbstractHandler
      */
     @Override
     public void notifyNode (Node node, Action action) {
-        LOGGER.info("notifyNode: action: {}, Node <{}>", action, node);
+        LOG.info("notifyNode: action: {}, Node <{}>", action, node);
 
         if ((action.equals(Action.ADD)) && (southbound.getBridge(node) != null)) {
             networkingProviderManager.getProvider(node).initializeOFFlowRules(node);
@@ -214,11 +214,11 @@ public class SouthboundHandler extends AbstractHandler
     @Override
     public void processEvent(AbstractEvent abstractEvent) {
         if (!(abstractEvent instanceof SouthboundEvent)) {
-            LOGGER.error("processEvent: Unable to process abstract event {}", abstractEvent);
+            LOG.error("processEvent: Unable to process abstract event {}", abstractEvent);
             return;
         }
         SouthboundEvent ev = (SouthboundEvent) abstractEvent;
-        LOGGER.trace("processEvent: {}", ev);
+        LOG.trace("processEvent: {}", ev);
         switch (ev.getType()) {
             case NODE:
                 processOvsdbNodeEvent(ev);
@@ -237,8 +237,7 @@ public class SouthboundHandler extends AbstractHandler
                 break;
 
             default:
-                LOGGER.warn("Unable to process type " + ev.getType() +
-                        " action " + ev.getAction() + " for node " + ev.getNode());
+                LOG.warn("Unable to process type {} action {} for node {}", ev.getType(), ev.getAction(), ev.getNode());
                 break;
         }
     }
@@ -258,18 +257,18 @@ public class SouthboundHandler extends AbstractHandler
     }
 
     private void processOvsdbNodeCreate(Node node, OvsdbNodeAugmentation ovsdbNode) {
-        LOGGER.info("processOvsdbNodeCreate <{}> <{}>", node, ovsdbNode);
+        LOG.info("processOvsdbNodeCreate <{}> <{}>", node, ovsdbNode);
         nodeCacheManager.nodeAdded(node);
         bridgeConfigurationManager.prepareNode(node);
     }
 
     private void processOvsdbNodeUpdate(Node node, OvsdbNodeAugmentation ovsdbNode) {
-        LOGGER.info("processOvsdbNodeUpdate <{}> <{}>", node, ovsdbNode);
+        LOG.info("processOvsdbNodeUpdate <{}> <{}>", node, ovsdbNode);
         nodeCacheManager.nodeAdded(node);
     }
 
     private void processOvsdbNodeDelete(Node node, OvsdbNodeAugmentation ovsdbNode) {
-        LOGGER.info("processOvsdbNodeDelete <{}> <{}>", node, ovsdbNode);
+        LOG.info("processOvsdbNodeDelete <{}> <{}>", node, ovsdbNode);
         nodeCacheManager.nodeRemoved(node);
         /* TODO SB_MIGRATION
         * I don't think we want to do this yet
@@ -293,7 +292,7 @@ public class SouthboundHandler extends AbstractHandler
     }
 
     private void processPortUpdate(Node node, OvsdbTerminationPointAugmentation port) {
-        LOGGER.debug("processPortUpdate <{}> <{}>", node, port);
+        LOG.debug("processPortUpdate <{}> <{}>", node, port);
         NeutronNetwork network = tenantNetworkManager.getTenantNetwork(port);
         if (network != null ){
             if(!network.getRouterExternal()){
@@ -314,7 +313,7 @@ public class SouthboundHandler extends AbstractHandler
     }
 
     private void processOpenVSwitchUpdate(Node node) {
-        LOGGER.debug("processOpenVSwitchUpdate {}", node);
+        LOG.debug("processOpenVSwitchUpdate {}", node);
         // TODO this node might be the OvsdbNode and not have termination points
         // Would need to change listener or grab tp nodes in here.
         List<TerminationPoint> terminationPoints = southbound.extractTerminationPoints(node);
@@ -353,36 +352,36 @@ public class SouthboundHandler extends AbstractHandler
             if (datapathId != null) {
                 rv = true;
             } else {
-                LOGGER.info("datapathId not found");
+                LOG.info("datapathId not found");
             }
         }
         return rv;
     }
 
     private void processBridgeCreate(Node node, OvsdbBridgeAugmentation bridge) {
-        LOGGER.debug("processBridgeCreate <{}> <{}>", node, bridge);
+        LOG.debug("processBridgeCreate <{}> <{}>", node, bridge);
         String datapathId = southbound.getDatapathId(bridge);
         // Having a datapathId means the ovsdb node has connected to ODL
         if (datapathId != null) {
             nodeCacheManager.nodeAdded(node);
         } else {
-            LOGGER.info("processBridgeCreate datapathId not found");
+            LOG.info("processBridgeCreate datapathId not found");
         }
     }
 
     private void processBridgeUpdate(Node node, OvsdbBridgeAugmentation bridge) {
-        LOGGER.debug("processBridgeUpdate <{}> <{}>", node, bridge);
+        LOG.debug("processBridgeUpdate <{}> <{}>", node, bridge);
         String datapathId = southbound.getDatapathId(bridge);
         // Having a datapathId means the ovsdb node has connected to ODL
         if (datapathId != null) {
             nodeCacheManager.nodeAdded(node);
         } else {
-            LOGGER.info("processBridgeUpdate datapathId not found");
+            LOG.info("processBridgeUpdate datapathId not found");
         }
     }
 
     private void processBridgeDelete(Node node, OvsdbBridgeAugmentation bridge) {
-        LOGGER.debug("processBridgeDelete: Delete bridge from config data store: <{}> <{}>",
+        LOG.debug("processBridgeDelete: Delete bridge from config data store: <{}> <{}>",
                 node, bridge);
         nodeCacheManager.nodeRemoved(node);
         // TODO SB_MIGRATION
index 8c63f0ad0be50b646030bd14270a42a49fa74d6e..d477d87659cb86b54c69ac4b77d7fe59c1e9ed38 100644 (file)
@@ -27,7 +27,7 @@ import com.google.common.base.Preconditions;
 
 public class SubnetHandler extends AbstractHandler implements INeutronSubnetAware, ConfigInterface {
 
-    static final Logger logger = LoggerFactory.getLogger(SubnetHandler.class);
+    private static final Logger LOG = LoggerFactory.getLogger(SubnetHandler.class);
 
     // The implementation for each of these services is resolved by the OSGi Service Manager
     private volatile NeutronL3Adapter neutronL3Adapter;
@@ -71,7 +71,7 @@ public class SubnetHandler extends AbstractHandler implements INeutronSubnetAwar
     @Override
     public void processEvent(AbstractEvent abstractEvent) {
         if (!(abstractEvent instanceof NorthboundEvent)) {
-            logger.error("Unable to process abstract event " + abstractEvent);
+            LOG.error("Unable to process abstract event {}", abstractEvent);
             return;
         }
         NorthboundEvent ev = (NorthboundEvent) abstractEvent;
@@ -85,7 +85,7 @@ public class SubnetHandler extends AbstractHandler implements INeutronSubnetAwar
                 neutronL3Adapter.handleNeutronSubnetEvent(ev.getSubnet(), ev.getAction());
                 break;
             default:
-                logger.warn("Unable to process event action " + ev.getAction());
+                LOG.warn("Unable to process event action {}", ev.getAction());
                 break;
         }
     }
index 868b435875a6d0195c050725c95c64b85a1b725b..2c4415a53971e48db3a4253c5a3021b07280d5f7 100644 (file)
@@ -66,7 +66,7 @@ public final class UuidUtils {
     private static final int UUID_TIME_LEN = (UUID_TIME_LOW +
                                               UUID_TIME_MID + UUID_TIME_HIGH_VERSION);
 
-    static final Logger logger = LoggerFactory.getLogger(UuidUtils.class);
+    private static final Logger LOG = LoggerFactory.getLogger(UuidUtils.class);
 
     /**
      * Convert neutron object id to  key syntax.
@@ -80,7 +80,7 @@ public final class UuidUtils {
             return null;
         }
 
-        logger.trace(" neutronID - {}, length - {} ",
+        LOG.trace(" neutronID - {}, length - {} ",
                      neutronID, neutronID.length());
         if (!isValidNeutronID(neutronID)) {
             return null;
@@ -108,7 +108,7 @@ public final class UuidUtils {
             return false;
         }
         boolean isValid;
-        logger.trace("id - {}, length - {} ", id, id.length());
+        LOG.trace("id - {}, length - {} ", id, id.length());
         /**
          * check the string length
          * if length is 36 its a uuid do uuid validation
@@ -121,7 +121,7 @@ public final class UuidUtils {
                 String toUUID = fromUUID.toString();
                 isValid = toUUID.equalsIgnoreCase(id);
             } catch(IllegalArgumentException e) {
-                logger.error(" IllegalArgumentExecption for id - {} ", id);
+                LOG.error(" IllegalArgumentExecption for id - {} ", id, e);
                 isValid = false;
             }
         } else {
@@ -142,7 +142,7 @@ public final class UuidUtils {
         if (id == null) {
             return null;
         }
-        logger.trace("id - {}, length - {} ", id, id.length());
+        LOG.trace("id - {}, length - {} ", id, id.length());
         /**
          * ID must be less than 32 bytes,
          * Shorten UUID string length from 36 to 31 as follows:
@@ -158,7 +158,7 @@ public final class UuidUtils {
             tKey.deleteCharAt(UUID_VERSION_POS);
             key = tKey.toString();
         } catch(IllegalArgumentException ile) {
-            logger.error(" Invalid UUID - {} ", id);
+            LOG.error(" Invalid UUID - {} ", id, ile);
             key = null;
         }
         return key;
@@ -182,7 +182,7 @@ public final class UuidUtils {
          * and reconvert it to  key
          */
 
-        logger.trace(" id - {}, length - {} ", id, id.length());
+        LOG.trace(" id - {}, length - {} ", id, id.length());
         try {
             StringBuilder tKey = new StringBuilder();
             String tmpStr = id.substring(0, UUID_TIME_LOW);
@@ -211,10 +211,10 @@ public final class UuidUtils {
                 key = convertUUIDToKey(tmpStr);
             }
         } catch(IndexOutOfBoundsException ibe) {
-            logger.error(" Exception! Invalid UUID - {} ", id);
+            LOG.error(" Exception! Invalid UUID - {} ", id, ibe);
             key = null;
         } catch (IllegalArgumentException iae) {
-            logger.error(" Exception! Invalid object ID - {} ", id);
+            LOG.error(" Exception! Invalid object ID - {} ", id, iae);
             key = null;
         }
         return key;
index 08fd8d5c8303bde3850aca5278aee655c735c1a1..12e94f2c1605dd31b8fbfe207623636f04ceb57f 100644 (file)
@@ -43,7 +43,7 @@ import org.slf4j.LoggerFactory;
  * @author Sam Hague (shague@redhat.com)
  */
 public class BridgeConfigurationManagerImpl implements BridgeConfigurationManager, ConfigInterface {
-    private static final Logger LOGGER = LoggerFactory.getLogger(BridgeConfigurationManagerImpl.class);
+    private static final Logger LOG = LoggerFactory.getLogger(BridgeConfigurationManagerImpl.class);
 
     // The implementation for each of these services is resolved by the OSGi Service Manager
     private volatile ConfigurationService configurationService;
@@ -85,7 +85,7 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
     public boolean isNodeTunnelReady(Node bridgeNode, Node ovsdbNode) {
         Preconditions.checkNotNull(configurationService);
         if (!southbound.isBridgeOnOvsdbNode(ovsdbNode, configurationService.getIntegrationBridgeName())) {
-            LOGGER.trace("isNodeTunnelReady: node: {}, {} missing",
+            LOG.trace("isNodeTunnelReady: node: {}, {} missing",
                     bridgeNode, configurationService.getIntegrationBridgeName());
             return false;
         }
@@ -99,14 +99,14 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
 
         final String brInt = configurationService.getIntegrationBridgeName();
         if (!southbound.isBridgeOnOvsdbNode(ovsdbNode, brInt)) {
-            LOGGER.trace("isNodeVlanReady: node: {}, {} missing", bridgeNode, brInt);
+            LOG.trace("isNodeVlanReady: node: {}, {} missing", bridgeNode, brInt);
             return false;
         }
 
         /* Check if physical device is added to br-int. */
         String phyNetName = getPhysicalInterfaceName(ovsdbNode, network.getProviderPhysicalNetwork());
         if (!isPortOnBridge(bridgeNode, phyNetName)) {
-            LOGGER.trace("isNodeVlanReady: node: {}, eth missing", bridgeNode);
+            LOG.trace("isNodeVlanReady: node: {}, eth missing", bridgeNode);
             return false;
         }
 
@@ -131,15 +131,15 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
                     if (isPortOnBridge(extBridgeNode, portNameExt)) {
                         ready = true;
                     } else {
-                        LOGGER.trace("isNodeL3Ready: node: {}, {} missing",
+                        LOG.trace("isNodeL3Ready: node: {}, {} missing",
                                 bridgeNode, portNameExt);
                     }
                 } else {
-                    LOGGER.trace("isNodeL3Ready: node: {}, {} missing",
+                    LOG.trace("isNodeL3Ready: node: {}, {} missing",
                             bridgeNode, portNameInt);
                 }
             } else {
-                LOGGER.trace("isNodeL3Ready: node: {}, {} missing",
+                LOG.trace("isNodeL3Ready: node: {}, {} missing",
                         bridgeNode, brExt);
             }
         } else {
@@ -155,7 +155,7 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
         try {
             createIntegrationBridge(ovsdbNode);
         } catch (Exception e) {
-            LOGGER.error("Error creating Integration Bridge on {}", ovsdbNode, e);
+            LOG.error("Error creating Integration Bridge on {}", ovsdbNode, e);
             return;
         }
 
@@ -164,7 +164,7 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
                 createExternalBridge(ovsdbNode);
             }
         } catch (Exception e) {
-            LOGGER.error("Error creating External Bridge on {}", ovsdbNode, e);
+            LOG.error("Error creating External Bridge on {}", ovsdbNode, e);
             return;
         }
         // this node is an ovsdb node so it doesn't have a bridge
@@ -182,7 +182,7 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
         Node ovsdbNode = southbound.readOvsdbNode(bridgeNode);
         if (ovsdbNode == null) {
             //this should never happen
-            LOGGER.error("createLocalNetwork could not find ovsdbNode from bridge node " + bridgeNode);
+            LOG.error("createLocalNetwork could not find ovsdbNode from bridge node " + bridgeNode);
             return false;
         }
         if (network.getProviderNetworkType().equalsIgnoreCase(NetworkHandler.NETWORK_TYPE_VLAN)) {
@@ -190,7 +190,7 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
                 try {
                     isCreated = createBridges(bridgeNode, ovsdbNode, network);
                 } catch (Exception e) {
-                    LOGGER.error("Error creating internal vlan net network " + bridgeNode, e);
+                    LOG.error("Error creating internal vlan net network " + bridgeNode, e);
                 }
             } else {
                 isCreated = true;
@@ -201,7 +201,7 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
                 try {
                     isCreated = createBridges(bridgeNode, ovsdbNode, network);
                 } catch (Exception e) {
-                    LOGGER.error("Error creating internal vxlan/gre net network " + bridgeNode, e);
+                    LOG.error("Error creating internal vxlan/gre net network " + bridgeNode, e);
                 }
             } else {
                 isCreated = true;
@@ -230,8 +230,8 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
         }
 
         if (phyIf == null) {
-            LOGGER.error("Physical interface not found for Node: {}, Network {}",
-                         node, physicalNetwork);
+            LOG.error("Physical interface not found for Node: {}, Network {}",
+                    node, physicalNetwork);
         }
 
         return phyIf;
@@ -283,7 +283,7 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
         Preconditions.checkNotNull(configurationService);
 
         if (!addBridge(ovsdbNode, configurationService.getIntegrationBridgeName())) {
-            LOGGER.debug("Integration Bridge Creation failed");
+            LOG.debug("Integration Bridge Creation failed");
             return false;
         }
         return true;
@@ -293,7 +293,7 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
         Preconditions.checkNotNull(configurationService);
 
         if (!addBridge(ovsdbNode, configurationService.getExternalBridgeName())) {
-            LOGGER.debug("External Bridge Creation failed");
+            LOG.debug("External Bridge Creation failed");
             return false;
         }
         return true;
@@ -358,18 +358,18 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
         Preconditions.checkNotNull(configurationService);
         Preconditions.checkNotNull(networkingProviderManager);
 
-        LOGGER.debug("createBridges: node: {}, network type: {}", bridgeNode, network.getProviderNetworkType());
+        LOG.debug("createBridges: node: {}, network type: {}", bridgeNode, network.getProviderNetworkType());
 
         final String brInt = configurationService.getIntegrationBridgeName();
         if (! createIntegrationBridge(ovsdbNode)) {
-            LOGGER.debug("{} Bridge creation failed", brInt);
+            LOG.debug("{} Bridge creation failed", brInt);
             return false;
         }
 
         if (configurationService.isL3ForwardingEnabled()) {
             final String brExt = configurationService.getExternalBridgeName();
             if (! createExternalBridge(ovsdbNode)) {
-                LOGGER.error("{} Bridge creation failed", brExt);
+                LOG.error("{} Bridge creation failed", brExt);
                 return false;
             }
 
@@ -380,13 +380,13 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
             Preconditions.checkNotNull(portNameExt);
 
             if (!addPatchPort(bridgeNode, brInt, portNameInt, portNameExt)) {
-                LOGGER.error("Add Port {} to Bridge {} failed", portNameInt, brInt);
+                LOG.error("Add Port {} to Bridge {} failed", portNameInt, brInt);
                 return false;
             }
             Node extBridgeNode = southbound.readBridgeNode(ovsdbNode, brExt);
             Preconditions.checkNotNull(extBridgeNode);
             if (!addPatchPort(extBridgeNode, brExt, portNameExt, portNameInt)) {
-                LOGGER.error("Add Port {} to Bridge {} failed", portNameExt, brExt);
+                LOG.error("Add Port {} to Bridge {} failed", portNameExt, brExt);
                 return false;
             }
         }
@@ -395,12 +395,12 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
         if (network.getProviderNetworkType().equalsIgnoreCase(NetworkHandler.NETWORK_TYPE_VLAN)) {
             String phyNetName = this.getPhysicalInterfaceName(bridgeNode, network.getProviderPhysicalNetwork());
             if (!addPortToBridge(bridgeNode, brInt, phyNetName)) {
-                LOGGER.debug("Add Port {} to Bridge {} failed", phyNetName, brInt);
+                LOG.debug("Add Port {} to Bridge {} failed", phyNetName, brInt);
                 return false;
             }
         }
 
-        LOGGER.debug("createBridges: node: {}, status: success", bridgeNode);
+        LOG.debug("createBridges: node: {}, status: success", bridgeNode);
         return true;
     }
 
@@ -414,14 +414,14 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
             rv = southbound.addTerminationPoint(node, bridgeName, portName, null);
 
             if (rv) {
-                LOGGER.info("addPortToBridge: node: {}, bridge: {}, portname: {} status: success",
+                LOG.info("addPortToBridge: node: {}, bridge: {}, portname: {} status: success",
                         node.getNodeId().getValue(), bridgeName, portName);
             } else {
-                LOGGER.error("addPortToBridge: node: {}, bridge: {}, portname: {} status: FAILED",
+                LOG.error("addPortToBridge: node: {}, bridge: {}, portname: {} status: FAILED",
                         node.getNodeId().getValue(), bridgeName, portName);
             }
         } else {
-            LOGGER.trace("addPortToBridge: node: {}, bridge: {}, portname: {} status: not_needed",
+            LOG.trace("addPortToBridge: node: {}, bridge: {}, portname: {} status: not_needed",
                     node.getNodeId().getValue(), bridgeName, portName);
         }
 
@@ -438,14 +438,14 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
             rv = southbound.addPatchTerminationPoint(node, bridgeName, portName, peerPortName);
 
             if (rv) {
-                LOGGER.info("addPatchPort: node: {}, bridge: {}, portname: {} peer: {} status: success",
+                LOG.info("addPatchPort: node: {}, bridge: {}, portname: {} peer: {} status: success",
                         node.getNodeId().getValue(), bridgeName, portName, peerPortName);
             } else {
-                LOGGER.error("addPatchPort: node: {}, bridge: {}, portname: {} peer: {} status: FAILED",
+                LOG.error("addPatchPort: node: {}, bridge: {}, portname: {} peer: {} status: FAILED",
                         node.getNodeId().getValue(), bridgeName, portName, peerPortName);
             }
         } else {
-            LOGGER.trace("addPatchPort: node: {}, bridge: {}, portname: {} peer: {} status: not_needed",
+            LOG.trace("addPatchPort: node: {}, bridge: {}, portname: {} peer: {} status: not_needed",
                     node.getNodeId().getValue(), bridgeName, portName, peerPortName);
         }
 
@@ -474,7 +474,7 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
                     return addressString;
                 }
             } catch (UnknownHostException e) {
-                LOGGER.error("Host {} is invalid", addressString);
+                LOG.error("Host {} is invalid", addressString);
             }
         }
 
@@ -486,7 +486,7 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
                     return addressString;
                 }
             } catch (UnknownHostException e) {
-                LOGGER.error("Host {} is invalid", addressString);
+                LOG.error("Host {} is invalid", addressString);
             }
         }
 
@@ -501,7 +501,7 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
             try {
                 openFlowPort = Short.decode(portString).shortValue();
             } catch (NumberFormatException e) {
-                LOGGER.warn("Invalid port:{}, use default({})", portString,
+                LOG.warn("Invalid port:{}, use default({})", portString,
                         openFlowPort);
             }
         }
@@ -526,7 +526,7 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
                 if(connectionInfo != null && connectionInfo.getLocalIp() != null) {
                     controllerIpStr = new String(connectionInfo.getLocalIp().getValue());
                 }else{
-                    LOGGER.warn("Ovsdb Node does not contains connection info : {}",node);
+                    LOG.warn("Ovsdb Node does not contains connection info : {}", node);
                 }
             }
         }else {
@@ -535,14 +535,14 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
 
         if(controllerIpStr == null) {
             // Neither user provided ip nor ovsdb node has controller ip, Lets use local machine ip address
-            LOGGER.debug("Use local machine ip address as a OpenFlow Controller ip address");
+            LOG.debug("Use local machine ip address as a OpenFlow Controller ip address");
             controllerIpStr = getLocalControllerHostIpAddress();
         }
         if(controllerIpStr != null){
-            LOGGER.debug("Targe OpenFlow Controller found : {}",controllerIpStr);
+            LOG.debug("Targe OpenFlow Controller found : {}", controllerIpStr);
             setControllerStr = Constants.OPENFLOW_CONNECTION_PROTOCOL + ":" + controllerIpStr + ":" + openflowPort;
         }else {
-            LOGGER.warn("Failed to determine OpenFlow controller ip address");
+            LOG.warn("Failed to determine OpenFlow controller ip address");
         }
         return setControllerStr;
     }
@@ -562,7 +562,7 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
                 }
             }
         }catch (Exception e){
-            LOGGER.warn("Exception while fetching local host ip address ",e);
+            LOG.warn("Exception while fetching local host ip address ", e);
         }
         return ipaddress;
     }
index 239009d4954d176f55332926cfbd730a0f964ccc..264b1f8c58a1f8736d0b3bd1de715649fc0595ff 100644 (file)
@@ -30,7 +30,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class ConfigurationServiceImpl implements ConfigurationService, ConfigInterface {
-    static final Logger logger = LoggerFactory.getLogger(ConfigurationServiceImpl.class);
+    private static final Logger LOG = LoggerFactory.getLogger(ConfigurationServiceImpl.class);
 
     private String integrationBridgeName;
     private String networkBridgeName;
@@ -141,10 +141,10 @@ public class ConfigurationServiceImpl implements ConfigurationService, ConfigInt
         if (tunnelEndpoint != null) {
             try {
                 address = InetAddress.getByName(tunnelEndpoint);
+                LOG.debug("Tunnel Endpoint for Node {} {}", node, address.getHostAddress());
             } catch (UnknownHostException e) {
-                logger.error("Error populating Tunnel Endpoint for Node {} ", node, e);
+                LOG.error("Error populating Tunnel Endpoint for Node {} ", node, e);
             }
-            logger.debug("Tunnel Endpoint for Node {} {}", node, address.getHostAddress());
         }
         return address;
     }
index 129276c32efa4fda8f2aae63b0acc44d9d4df790..bd1a65c2ab53207cf8e2703c1675f26c3c933dc0 100644 (file)
@@ -28,7 +28,7 @@ import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.TimeUnit;
 
 public class EventDispatcherImpl implements EventDispatcher, ConfigInterface {
-    static final Logger logger = LoggerFactory.getLogger(EventDispatcher.class);
+    private static final Logger LOG = LoggerFactory.getLogger(EventDispatcher.class);
     private ExecutorService eventHandler;
     private volatile BlockingQueue<AbstractEvent> events;
     private AbstractHandler[] handlers;
@@ -46,24 +46,24 @@ public class EventDispatcherImpl implements EventDispatcher, ConfigInterface {
             public void run() {
                 Thread t = Thread.currentThread();
                 t.setName("EventDispatcherImpl");
-                logger.info("EventDispatcherImpl: started {}", t.getName());
+                LOG.info("EventDispatcherImpl: started {}", t.getName());
                 while (true) {
                     AbstractEvent ev;
                     try {
                         ev = events.take();
                     } catch (InterruptedException e) {
-                        logger.info("The event handler thread was interrupted, shutting down", e);
+                        LOG.info("The event handler thread was interrupted, shutting down", e);
                         return;
                     }
                     try {
                         dispatchEvent(ev);
                     } catch (Exception e) {
-                        logger.error("Exception in dispatching event "+ev.toString(), e);
+                        LOG.error("Exception in dispatching event {}", ev.toString(), e);
                     }
                 }
             }
         });
-        logger.debug("event dispatcher is started");
+        LOG.debug("event dispatcher is started");
     }
 
     void stop() {
@@ -75,7 +75,7 @@ public class EventDispatcherImpl implements EventDispatcher, ConfigInterface {
                 eventHandler.shutdownNow();
                 // Wait a while for tasks to respond to being cancelled
                 if (!eventHandler.awaitTermination(10, TimeUnit.SECONDS)) {
-                    logger.error("Dispatcher's event handler did not terminate");
+                    LOG.error("Dispatcher's event handler did not terminate");
                 }
             }
         } catch (InterruptedException e) {
@@ -84,13 +84,13 @@ public class EventDispatcherImpl implements EventDispatcher, ConfigInterface {
             // Preserve interrupt status
             Thread.currentThread().interrupt();
         }
-        logger.debug("event dispatcher is stopped");
+        LOG.debug("event dispatcher is stopped");
     }
 
     private void dispatchEvent(AbstractEvent ev) {
         AbstractHandler handler = handlers[ev.getHandlerType().ordinal()];
         if (handler == null) {
-            logger.warn("event dispatcher found no handler for {}", ev);
+            LOG.warn("event dispatcher found no handler for {}", ev);
             return;
         }
 
@@ -101,13 +101,13 @@ public class EventDispatcherImpl implements EventDispatcher, ConfigInterface {
         Long pid = (Long) ref.getProperty(org.osgi.framework.Constants.SERVICE_ID);
         Object handlerTypeObject = ref.getProperty(Constants.EVENT_HANDLER_TYPE_PROPERTY);
         if (!(handlerTypeObject instanceof AbstractEvent.HandlerType)){
-            logger.error("Abstract handler reg failed to provide a valid handler type: {} ref: {} handler: {}",
+            LOG.error("Abstract handler reg failed to provide a valid handler type: {} ref: {} handler: {}",
                     handlerTypeObject, ref.getClass().getName(), handler.getClass().getName());
             return;
         }
         AbstractEvent.HandlerType handlerType = (AbstractEvent.HandlerType) handlerTypeObject;
         handlers[handlerType.ordinal()] = handler;
-        logger.info("eventHandlerAdded: handler: {}, pid: {}, type: {}",
+        LOG.info("eventHandlerAdded: handler: {}, pid: {}, type: {}",
                 handler.getClass().getName(), pid, handlerType);
     }
 
@@ -115,12 +115,12 @@ public class EventDispatcherImpl implements EventDispatcher, ConfigInterface {
         Long pid = (Long) ref.getProperty(org.osgi.framework.Constants.SERVICE_ID);
         Object handlerTypeObject = ref.getProperty(Constants.EVENT_HANDLER_TYPE_PROPERTY);
         if (!(handlerTypeObject instanceof AbstractEvent.HandlerType)){
-            logger.error("Abstract handler unreg failed to provide a valid handler type " + handlerTypeObject);
+            LOG.error("Abstract handler unreg failed to provide a valid handler type {}", handlerTypeObject);
             return;
         }
         AbstractEvent.HandlerType handlerType = (AbstractEvent.HandlerType) handlerTypeObject;
         handlers[handlerType.ordinal()] = null;
-        logger.debug("Event handler for type {} unregistered pid {}", handlerType, pid);
+        LOG.debug("Event handler for type {} unregistered pid {}", handlerType, pid);
     }
 
     /**
@@ -131,14 +131,14 @@ public class EventDispatcherImpl implements EventDispatcher, ConfigInterface {
     @Override
     public void enqueueEvent(AbstractEvent event) {
         if (event == null) {
-            logger.warn("enqueueEvent: event is null");
+            LOG.warn("enqueueEvent: event is null");
             return;
         }
 
         try {
             events.put(event);
         } catch (InterruptedException e) {
-            logger.error("Thread was interrupted while trying to enqueue event ", e);
+            LOG.error("Thread was interrupted while trying to enqueue event ", e);
         }
     }
 
index 1c58e6ca6062aeb7bbd1bedc9f44306926e76e82..52c1e7778c6a931c3a4fdf2118c768daa0b05684 100644 (file)
@@ -57,7 +57,7 @@ import java.util.concurrent.Executors;
  * as well as the multi-tenant router forwarding provider.
  */
 public class NeutronL3Adapter implements ConfigInterface {
-    private static final Logger LOGGER = LoggerFactory.getLogger(NeutronL3Adapter.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NeutronL3Adapter.class);
 
     // The implementation for each of these services is resolved by the OSGi Service Manager
     private volatile ConfigurationService configurationService;
@@ -118,7 +118,7 @@ public class NeutronL3Adapter implements ConfigInterface {
     private static final String DEFAULT_EXT_RTR_MAC = "00:00:5E:00:01:01";
 
     public NeutronL3Adapter() {
-        LOGGER.info(">>>>>> NeutronL3Adapter constructor {}", this.getClass());
+        LOG.info(">>>>>> NeutronL3Adapter constructor {}", this.getClass());
     }
 
     private void initL3AdapterMembers() {
@@ -143,15 +143,15 @@ public class NeutronL3Adapter implements ConfigInterface {
             }
 
             this.enabled = true;
-            LOGGER.info("OVSDB L3 forwarding is enabled");
+            LOG.info("OVSDB L3 forwarding is enabled");
             if (configurationService.isDistributedArpDisabled()) {
                 this.flgDistributedARPEnabled = false;
-                LOGGER.info("Distributed ARP responder is disabled");
+                LOG.info("Distributed ARP responder is disabled");
             } else {
-                LOGGER.debug("Distributed ARP responder is enabled");
+                LOG.debug("Distributed ARP responder is enabled");
             }
         } else {
-            LOGGER.debug("OVSDB L3 forwarding is disabled");
+            LOG.debug("OVSDB L3 forwarding is disabled");
         }
     }
 
@@ -181,7 +181,7 @@ public class NeutronL3Adapter implements ConfigInterface {
      * @param subnet An instance of NeutronSubnet object.
      */
     public void handleNeutronSubnetEvent(final NeutronSubnet subnet, Action action) {
-        LOGGER.debug("Neutron subnet {} event : {}", action, subnet.toString());
+        LOG.debug("Neutron subnet {} event : {}", action, subnet.toString());
         if (!this.enabled) {
             return;
         }
@@ -196,7 +196,7 @@ public class NeutronL3Adapter implements ConfigInterface {
      * @param neutronPort An instance of NeutronPort object.
      */
     public void handleNeutronPortEvent(final NeutronPort neutronPort, Action action) {
-        LOGGER.debug("Neutron port {} event : {}", action, neutronPort.toString());
+        LOG.debug("Neutron port {} event : {}", action, neutronPort.toString());
         if (!this.enabled) {
             return;
         }
@@ -207,11 +207,11 @@ public class NeutronL3Adapter implements ConfigInterface {
             if(!isDelete){
                 Node externalBridgeNode = getExternalBridgeNode();
                 if(externalBridgeNode != null){
-                    LOGGER.info("Port {} is network router gateway interface, "
-                            + "triggering gateway resolution for the attached external network on node {}",neutronPort,externalBridgeNode);
+                    LOG.info("Port {} is network router gateway interface, "
+                            + "triggering gateway resolution for the attached external network on node {}", neutronPort, externalBridgeNode);
                     this.triggerGatewayMacResolver(externalBridgeNode, neutronPort);
                 }else{
-                    LOGGER.error("Did not find Node that has external bridge (br-ex), Gateway resolution failed");
+                    LOG.error("Did not find Node that has external bridge (br-ex), Gateway resolution failed");
                 }
             }else{
                 NeutronNetwork externalNetwork = neutronNetworkCache.getNetwork(neutronPort.getNetworkUUID());
@@ -267,7 +267,7 @@ public class NeutronL3Adapter implements ConfigInterface {
      * @param neutronRouter An instance of NeutronRouter object.
      */
     public void handleNeutronRouterEvent(final NeutronRouter neutronRouter, Action action) {
-        LOGGER.debug("Neutron router {} event : {}", action, neutronRouter.toString());
+        LOG.debug("Neutron router {} event : {}", action, neutronRouter.toString());
         if (!this.enabled) {
             return;
         }
@@ -284,7 +284,7 @@ public class NeutronL3Adapter implements ConfigInterface {
     public void handleNeutronRouterInterfaceEvent(final NeutronRouter neutronRouter,
                                                   final NeutronRouter_Interface neutronRouterInterface,
                                                   Action action) {
-        LOGGER.debug("Router interface {} got event {}. Subnet {}",
+        LOG.debug("Router interface {} got event {}. Subnet {}",
                      neutronRouterInterface.getPortUUID(),
                      action,
                      neutronRouterInterface.getSubnetUUID());
@@ -327,7 +327,7 @@ public class NeutronL3Adapter implements ConfigInterface {
                                              Action actionIn) {
         Preconditions.checkNotNull(neutronFloatingIP);
 
-        LOGGER.debug(" Floating IP {} {}<->{}, network uuid {}", actionIn,
+        LOG.debug(" Floating IP {} {}<->{}, network uuid {}", actionIn,
                 neutronFloatingIP.getFixedIPAddress(),
                 neutronFloatingIP.getFloatingIPAddress(),
                 neutronFloatingIP.getFloatingNetworkUUID());
@@ -369,7 +369,7 @@ public class NeutronL3Adapter implements ConfigInterface {
 
         final FloatIpData fid = floatIpDataMapCache.get(neutronFloatingIP.getID());
         if (fid == null) {
-            LOGGER.trace("programFlowsForFloatingIPInboundAdd {} for {} uuid {} not in local cache",
+            LOG.trace("programFlowsForFloatingIPInboundAdd {} for {} uuid {} not in local cache",
                     action, neutronFloatingIP.getFloatingIPAddress(), neutronFloatingIP.getID());
             return;
         }
@@ -386,7 +386,7 @@ public class NeutronL3Adapter implements ConfigInterface {
 
         final FloatIpData fid = floatIpDataMapCache.get(neutronFloatingIP.getID());
         if (fid == null) {
-            LOGGER.trace("programFlowsForFloatingIPOutbound {} for {} uuid {} not in local cache",
+            LOG.trace("programFlowsForFloatingIPOutbound {} for {} uuid {} not in local cache",
                     action, neutronFloatingIP.getFloatingIPAddress(), neutronFloatingIP.getID());
             return;
         }
@@ -416,7 +416,7 @@ public class NeutronL3Adapter implements ConfigInterface {
         Preconditions.checkNotNull(neutronFloatingIP.getFloatingIPAddress());
 
         if (floatIpDataMapCache.get(neutronFloatingIP.getID()) != null) {
-            LOGGER.trace("programFlowsForFloatingIPArpAdd for neutronFloatingIP {} uuid {} is already done",
+            LOG.trace("programFlowsForFloatingIPArpAdd for neutronFloatingIP {} uuid {} is already done",
                     neutronFloatingIP.getFloatingIPAddress(), neutronFloatingIP.getID());
             return;
         }
@@ -441,7 +441,7 @@ public class NeutronL3Adapter implements ConfigInterface {
                 providerSegmentationId == null || providerSegmentationId.isEmpty() ||
                 floatingIpMac == null || floatingIpMac.isEmpty() ||
                 neutronRouterMac == null || neutronRouterMac.isEmpty()) {
-            LOGGER.trace("Floating IP {}<->{}, incomplete floatPort {} tenantPortUuid {} seg {} mac {} rtrMac {}",
+            LOG.trace("Floating IP {}<->{}, incomplete floatPort {} tenantPortUuid {} seg {} mac {} rtrMac {}",
                     fixedIpAddress,
                     floatingIpAddress,
                     neutronPortForFloatIp,
@@ -456,7 +456,7 @@ public class NeutronL3Adapter implements ConfigInterface {
         final Long dpId = nodeIfPair.getLeft();
         final Long ofPort = findOFPortForExtPatch(dpId);
         if (ofPort == null) {
-            LOGGER.warn("Unable to locate OF port of patch port to connect floating ip to external bridge. dpid {}",
+            LOG.warn("Unable to locate OF port of patch port to connect floating ip to external bridge. dpid {}",
                     dpId);
             return;
         }
@@ -468,7 +468,7 @@ public class NeutronL3Adapter implements ConfigInterface {
             final FloatIpData floatIpData = new FloatIpData(dpId, ofPort, providerSegmentationId, floatingIpMac,
                     floatingIpAddress, fixedIpAddress, neutronRouterMac);
             floatIpDataMapCache.put(neutronFloatingIP.getID(), floatIpData);
-            LOGGER.info("Floating IP {}<->{} programmed ARP mac {} on OFport {} seg {} dpid {}",
+            LOG.info("Floating IP {}<->{} programmed ARP mac {} on OFport {} seg {} dpid {}",
                     neutronFloatingIP.getFixedIPAddress(), neutronFloatingIP.getFloatingIPAddress(),
                     floatingIpMac, ofPort, providerSegmentationId, dpId);
         }
@@ -477,14 +477,14 @@ public class NeutronL3Adapter implements ConfigInterface {
     private void programFlowsForFloatingIPArpDelete(final String neutronFloatingIPUuid) {
         final FloatIpData floatIpData = floatIpDataMapCache.get(neutronFloatingIPUuid);
         if (floatIpData == null) {
-            LOGGER.trace("programFlowsForFloatingIPArpDelete for uuid {} is not needed", neutronFloatingIPUuid);
+            LOG.trace("programFlowsForFloatingIPArpDelete for uuid {} is not needed", neutronFloatingIPUuid);
             return;
         }
 
         if (programStaticArpStage1(floatIpData.dpid, encodeExcplicitOFPort(floatIpData.ofPort), floatIpData.macAddress,
                 floatIpData.floatingIpAddress, Action.DELETE)) {
             floatIpDataMapCache.remove(neutronFloatingIPUuid);
-            LOGGER.info("Floating IP {} un-programmed ARP mac {} on {} dpid {}",
+            LOG.info("Floating IP {} un-programmed ARP mac {} on {} dpid {}",
                     floatIpData.floatingIpAddress, floatIpData.macAddress, floatIpData.ofPort, floatIpData.dpid);
         }
     }
@@ -525,7 +525,7 @@ public class NeutronL3Adapter implements ConfigInterface {
      * @param neutronNetwork An {@link org.opendaylight.neutron.spi.NeutronNetwork} instance of NeutronFloatingIP object.
      */
     public void handleNeutronNetworkEvent(final NeutronNetwork neutronNetwork, Action action) {
-        LOGGER.debug("neutronNetwork {}: network: {}", action, neutronNetwork);
+        LOG.debug("neutronNetwork {}: network: {}", action, neutronNetwork);
         if (!this.enabled) {
             return;
         }
@@ -546,7 +546,7 @@ public class NeutronL3Adapter implements ConfigInterface {
      */
     public void handleInterfaceEvent(final Node bridgeNode, final OvsdbTerminationPointAugmentation intf,
                                      final NeutronNetwork neutronNetwork, Action action) {
-        LOGGER.debug("southbound interface {} node:{} interface:{}, neutronNetwork:{}",
+        LOG.debug("southbound interface {} node:{} interface:{}, neutronNetwork:{}",
                      action, bridgeNode.getNodeId().getValue(), intf.getName(), neutronNetwork);
         if (!this.enabled) {
             return;
@@ -556,7 +556,7 @@ public class NeutronL3Adapter implements ConfigInterface {
         final Long dpId = getDpidForIntegrationBridge(bridgeNode);
         final Uuid interfaceUuid = intf.getInterfaceUuid();
 
-        LOGGER.trace("southbound interface {} node:{} interface:{}, neutronNetwork:{} port:{} dpid:{} intfUuid:{}",
+        LOG.trace("southbound interface {} node:{} interface:{}, neutronNetwork:{} port:{} dpid:{} intfUuid:{}",
                 action, bridgeNode.getNodeId().getValue(), intf.getName(), neutronNetwork, neutronPort, dpId, interfaceUuid);
 
         if (neutronPort != null) {
@@ -577,7 +577,7 @@ public class NeutronL3Adapter implements ConfigInterface {
 
     private void handleInterfaceEventAdd(final String neutronPortUuid, Long dpId, final Uuid interfaceUuid) {
         neutronPortToDpIdCache.put(neutronPortUuid, new ImmutablePair<>(dpId, interfaceUuid));
-        LOGGER.debug("handleInterfaceEvent add cache entry NeutronPortUuid {} : dpid {}, ifUuid {}",
+        LOG.debug("handleInterfaceEvent add cache entry NeutronPortUuid {} : dpid {}, ifUuid {}",
                 neutronPortUuid, dpId, interfaceUuid.getValue());
     }
 
@@ -586,7 +586,7 @@ public class NeutronL3Adapter implements ConfigInterface {
         for (Map.Entry<String, Pair<Long, Uuid>> entry : neutronPortToDpIdCache.entrySet()) {
             final String currPortUuid = entry.getKey();
             if (intf.getInterfaceUuid().equals(entry.getValue().getRight())) {
-                LOGGER.debug("handleInterfaceEventDelete remove cache entry NeutronPortUuid {} : dpid {}, ifUuid {}",
+                LOG.debug("handleInterfaceEventDelete remove cache entry NeutronPortUuid {} : dpid {}, ifUuid {}",
                         currPortUuid, dpId, intf.getInterfaceUuid().getValue());
                 neutronPortToDpIdCache.remove(currPortUuid);
                 break;
@@ -627,7 +627,7 @@ public class NeutronL3Adapter implements ConfigInterface {
         final Action action = isDelete ? Action.DELETE : Action.ADD;
         List<Node> nodes = nodeCacheManager.getBridgeNodes();
         if (nodes.isEmpty()) {
-            LOGGER.trace("updateL3ForNeutronPort has no nodes to work with");
+            LOG.trace("updateL3ForNeutronPort has no nodes to work with");
         }
         for (Node node : nodes) {
             final Long dpid = getDpidForIntegrationBridge(node);
@@ -663,12 +663,12 @@ public class NeutronL3Adapter implements ConfigInterface {
         final Boolean isProgrammed = l3ForwardingCache.contains(cacheKey);
 
         if (actionForNode == Action.DELETE && isProgrammed == Boolean.FALSE) {
-            LOGGER.trace("programL3ForwardingStage1 for node {} providerId {} mac {} ip {} action {} is already done",
+            LOG.trace("programL3ForwardingStage1 for node {} providerId {} mac {} ip {} action {} is already done",
                          node.getNodeId().getValue(), providerSegmentationId, macAddress, ipStr, actionForNode);
             return;
         }
         if (actionForNode == Action.ADD && isProgrammed == Boolean.TRUE) {
-            LOGGER.trace("programL3ForwardingStage1 for node {} providerId {} mac {} ip {} action {} is already done",
+            LOG.trace("programL3ForwardingStage1 for node {} providerId {} mac {} ip {} action {} is already done",
                     node.getNodeId().getValue(), providerSegmentationId, macAddress, ipStr, actionForNode);
             return;
         }
@@ -701,11 +701,11 @@ public class NeutronL3Adapter implements ConfigInterface {
         }
 
         if (status.isSuccess()) {
-            LOGGER.debug("ProgramL3Forwarding {} for mac:{} addr:{} node:{} action:{}",
+            LOG.debug("ProgramL3Forwarding {} for mac:{} addr:{} node:{} action:{}",
                          l3ForwardingProvider == null ? "skipped" : "programmed",
                          macAddress, address, node.getNodeId().getValue(), actionForNode);
         } else {
-            LOGGER.error("ProgramL3Forwarding failed for mac:{} addr:{} node:{} action:{} status:{}",
+            LOG.error("ProgramL3Forwarding failed for mac:{} addr:{} node:{} action:{} status:{}",
                          macAddress, address, node.getNodeId().getValue(), actionForNode, status);
         }
         return status;
@@ -730,7 +730,7 @@ public class NeutronL3Adapter implements ConfigInterface {
         final String cidr = subnet != null ? subnet.getCidr() : null;
         final int mask = getMaskLenFromCidr(cidr);
 
-        LOGGER.trace("programFlowsForNeutronRouterInterface called for interface {} isDelete {}",
+        LOG.trace("programFlowsForNeutronRouterInterface called for interface {} isDelete {}",
                      destNeutronRouterInterface, isDelete);
 
         // in delete path, mac address as well as ip address are not provided. Being so, let's find them from
@@ -748,7 +748,7 @@ public class NeutronL3Adapter implements ConfigInterface {
             cidr == null || cidr.isEmpty() ||
             macAddress == null || macAddress.isEmpty() ||
             ipList == null || ipList.isEmpty()) {
-            LOGGER.debug("programFlowsForNeutronRouterInterface is bailing seg:{} cidr:{} mac:{}  ip:{}",
+            LOG.debug("programFlowsForNeutronRouterInterface is bailing seg:{} cidr:{} mac:{}  ip:{}",
                          destinationSegmentationId, cidr, macAddress, ipList);
             // done: go no further w/out all the info needed...
             return;
@@ -766,7 +766,7 @@ public class NeutronL3Adapter implements ConfigInterface {
 
         List<Node> nodes = nodeCacheManager.getBridgeNodes();
         if (nodes.isEmpty()) {
-            LOGGER.trace("programFlowsForNeutronRouterInterface has no nodes to work with");
+            LOG.trace("programFlowsForNeutronRouterInterface has no nodes to work with");
         }
         for (Node node : nodes) {
             final Long dpid = getDpidForIntegrationBridge(node);
@@ -777,7 +777,7 @@ public class NeutronL3Adapter implements ConfigInterface {
             for (Neutron_IPs neutronIP : ipList) {
                 final String ipStr = neutronIP.getIpAddress();
                 if (ipStr.isEmpty()) {
-                    LOGGER.debug("programFlowsForNeutronRouterInterface is skipping node {} ip {}",
+                    LOG.debug("programFlowsForNeutronRouterInterface is skipping node {} ip {}",
                             node.getNodeId().getValue(), ipStr);
                     continue;
                 }
@@ -845,7 +845,7 @@ public class NeutronL3Adapter implements ConfigInterface {
 
         final String sourceSubnetId = srcNeutronRouterInterface.getSubnetUUID();
         if (sourceSubnetId == null) {
-            LOGGER.error("Could not get provider Subnet ID from router interface {}",
+            LOG.error("Could not get provider Subnet ID from router interface {}",
                          srcNeutronRouterInterface.getID());
             return;
         }
@@ -853,13 +853,13 @@ public class NeutronL3Adapter implements ConfigInterface {
         final NeutronSubnet sourceSubnet = neutronSubnetCache.getSubnet(sourceSubnetId);
         final String sourceNetworkId = sourceSubnet == null ? null : sourceSubnet.getNetworkUUID();
         if (sourceNetworkId == null) {
-            LOGGER.error("Could not get provider Network ID from subnet {}", sourceSubnetId);
+            LOG.error("Could not get provider Network ID from subnet {}", sourceSubnetId);
             return;
         }
 
         final NeutronNetwork sourceNetwork = neutronNetworkCache.getNetwork(sourceNetworkId);
         if (sourceNetwork == null) {
-            LOGGER.error("Could not get provider Network for Network ID {}", sourceNetworkId);
+            LOG.error("Could not get provider Network for Network ID {}", sourceNetworkId);
             return;
         }
 
@@ -869,7 +869,7 @@ public class NeutronL3Adapter implements ConfigInterface {
         }
         final String sourceSegmentationId = sourceNetwork.getProviderSegmentationID();
         if (sourceSegmentationId == null) {
-            LOGGER.error("Could not get provider Segmentation ID for Subnet {}", sourceSubnetId);
+            LOG.error("Could not get provider Segmentation ID for Subnet {}", sourceSubnetId);
             return;
         }
         if (sourceSegmentationId.equals(destinationSegmentationId)) {
@@ -891,7 +891,7 @@ public class NeutronL3Adapter implements ConfigInterface {
             if (cidr2 == null || cidr2.isEmpty() ||
                 macAddress2 == null || macAddress2.isEmpty() ||
                 ipList2 == null || ipList2.isEmpty()) {
-                LOGGER.trace("programFlowsForNeutronRouterInterfacePair reflexive is bailing seg:{} cidr:{} mac:{} ip:{}",
+                LOG.trace("programFlowsForNeutronRouterInterfacePair reflexive is bailing seg:{} cidr:{} mac:{} ip:{}",
                              sourceSegmentationId, cidr2, macAddress2, ipList2);
                 // done: go no further w/out all the info needed...
                 return;
@@ -924,14 +924,14 @@ public class NeutronL3Adapter implements ConfigInterface {
         final Boolean isProgrammed = routerInterfacesCache.contains(cacheKey);
 
         if (actionForNode == Action.DELETE && isProgrammed == Boolean.FALSE) {
-            LOGGER.trace("programRouterInterfaceStage1 for node {} sourceSegId {} destSegId {} mac {} ip {} mask {}" +
+            LOG.trace("programRouterInterfaceStage1 for node {} sourceSegId {} destSegId {} mac {} ip {} mask {}" +
                          " action {} is already done",
                          node.getNodeId().getValue(), sourceSegmentationId, destinationSegmentationId,
                          macAddress, ipStr, mask, actionForNode);
             return;
         }
         if (actionForNode == Action.ADD && isProgrammed == Boolean.TRUE) {
-            LOGGER.trace("programRouterInterfaceStage1 for node {} sourceSegId {} destSegId {} mac {} ip {} mask {}" +
+            LOG.trace("programRouterInterfaceStage1 for node {} sourceSegId {} destSegId {} mac {} ip {} mask {}" +
                          " action {} is already done",
                          node.getNodeId().getValue(), sourceSegmentationId, destinationSegmentationId,
                          macAddress, ipStr, mask, actionForNode);
@@ -969,12 +969,12 @@ public class NeutronL3Adapter implements ConfigInterface {
         }
 
         if (status.isSuccess()) {
-            LOGGER.debug("ProgramRouterInterface {} for mac:{} addr:{}/{} node:{} srcTunId:{} destTunId:{} action:{}",
+            LOG.debug("ProgramRouterInterface {} for mac:{} addr:{}/{} node:{} srcTunId:{} destTunId:{} action:{}",
                          routingProvider == null ? "skipped" : "programmed",
                          macAddress, address, mask, node.getNodeId().getValue(), sourceSegmentationId, destinationSegmentationId,
                          actionForNode);
         } else {
-            LOGGER.error("ProgramRouterInterface failed for mac:{} addr:{}/{} node:{} srcTunId:{} destTunId:{} action:{} status:{}",
+            LOG.error("ProgramRouterInterface failed for mac:{} addr:{}/{} node:{} srcTunId:{} destTunId:{} action:{} status:{}",
                          macAddress, address, mask, node.getNodeId().getValue(), sourceSegmentationId, destinationSegmentationId,
                          actionForNode, status);
         }
@@ -991,12 +991,12 @@ public class NeutronL3Adapter implements ConfigInterface {
         final Boolean isProgrammed = staticArpEntryCache.contains(cacheKey);
 
         if (action == Action.DELETE && isProgrammed == Boolean.FALSE) {
-            LOGGER.trace("programStaticArpStage1 dpid {} segOrOfPort {} mac {} ip {} action {} is already done",
+            LOG.trace("programStaticArpStage1 dpid {} segOrOfPort {} mac {} ip {} action {} is already done",
                     dpid, segOrOfPort, macAddress, ipStr, action);
             return true;
         }
         if (action == Action.ADD && isProgrammed == Boolean.TRUE) {
-            LOGGER.trace("programStaticArpStage1 dpid {} segOrOfPort {} mac {} ip {} action {} is already done",
+            LOG.trace("programStaticArpStage1 dpid {} segOrOfPort {} mac {} ip {} action {} is already done",
                     dpid, segOrOfPort, macAddress, ipStr, action);
             return true;
         }
@@ -1031,11 +1031,11 @@ public class NeutronL3Adapter implements ConfigInterface {
         }
 
         if (status.isSuccess()) {
-            LOGGER.debug("ProgramStaticArp {} for mac:{} addr:{} dpid:{} segOrOfPort:{} action:{}",
+            LOG.debug("ProgramStaticArp {} for mac:{} addr:{} dpid:{} segOrOfPort:{} action:{}",
                          arpProvider == null ? "skipped" : "programmed",
                          macAddress, address, dpid, segOrOfPort, action);
         } else {
-            LOGGER.error("ProgramStaticArp failed for mac:{} addr:{} dpid:{} segOrOfPort:{} action:{} status:{}",
+            LOG.error("ProgramStaticArp failed for mac:{} addr:{} dpid:{} segOrOfPort:{} action:{} status:{}",
                          macAddress, address, dpid, segOrOfPort, action, status);
         }
         return status;
@@ -1051,13 +1051,13 @@ public class NeutronL3Adapter implements ConfigInterface {
         final Boolean isProgrammed = inboundIpRewriteCache.contains(cacheKey);
 
         if (action == Action.DELETE && isProgrammed == Boolean.FALSE) {
-            LOGGER.trace("programInboundIpRewriteStage1 dpid {} OFPort {} seg {} matchAddress {} rewriteAddress {}" +
+            LOG.trace("programInboundIpRewriteStage1 dpid {} OFPort {} seg {} matchAddress {} rewriteAddress {}" +
                     " action {} is already done",
                     dpid, inboundOFPort, providerSegmentationId, matchAddress, rewriteAddress, action);
             return true;
         }
         if (action == Action.ADD && isProgrammed == Boolean.TRUE) {
-            LOGGER.trace("programInboundIpRewriteStage1 dpid {} OFPort {} seg {} matchAddress {} rewriteAddress {}" +
+            LOG.trace("programInboundIpRewriteStage1 dpid {} OFPort {} seg {} matchAddress {} rewriteAddress {}" +
                     " action is already done",
                     dpid, inboundOFPort, providerSegmentationId, matchAddress, rewriteAddress, action);
             return true;
@@ -1095,11 +1095,11 @@ public class NeutronL3Adapter implements ConfigInterface {
 
         if (status.isSuccess()) {
             final boolean isSkipped = inboundNatProvider == null;
-            LOGGER.debug("programInboundIpRewriteStage2 {} for dpid:{} ofPort:{} seg:{} match:{} rewrite:{} action:{}",
+            LOG.debug("programInboundIpRewriteStage2 {} for dpid:{} ofPort:{} seg:{} match:{} rewrite:{} action:{}",
                     isSkipped ? "skipped" : "programmed",
                     dpid, inboundOFPort, providerSegmentationId, matchAddress, rewriteAddress, action);
         } else {
-            LOGGER.error("programInboundIpRewriteStage2 failed for dpid:{} ofPort:{} seg:{} match:{} rewrite:{} action:{}" +
+            LOG.error("programInboundIpRewriteStage2 failed for dpid:{} ofPort:{} seg:{} match:{} rewrite:{} action:{}" +
                          " status:{}",
                     dpid, inboundOFPort, providerSegmentationId, matchAddress, rewriteAddress, action,
                     status);
@@ -1116,12 +1116,12 @@ public class NeutronL3Adapter implements ConfigInterface {
         final Boolean isProgrammed = outboundIpRewriteExclusionCache.contains(cacheKey);
 
         if (actionForRewriteExclusion == Action.DELETE && isProgrammed == Boolean.FALSE) {
-            LOGGER.trace("programIpRewriteExclusionStage1 node {} providerId {} cidr {} action {} is already done",
+            LOG.trace("programIpRewriteExclusionStage1 node {} providerId {} cidr {} action {} is already done",
                          node.getNodeId().getValue(), providerSegmentationId, cidr, actionForRewriteExclusion);
             return;
         }
         if (actionForRewriteExclusion == Action.ADD && isProgrammed == Boolean.TRUE) {
-            LOGGER.trace("programIpRewriteExclusionStage1 node {} providerId {} cidr {} action {} is already done",
+            LOG.trace("programIpRewriteExclusionStage1 node {} providerId {} cidr {} action {} is already done",
                          node.getNodeId().getValue(), providerSegmentationId, cidr, actionForRewriteExclusion);
             return;
         }
@@ -1145,11 +1145,11 @@ public class NeutronL3Adapter implements ConfigInterface {
 
         if (status.isSuccess()) {
             final boolean isSkipped = outboundNatProvider == null;
-            LOGGER.debug("IpRewriteExclusion {} for cidr:{} node:{} action:{}",
+            LOG.debug("IpRewriteExclusion {} for cidr:{} node:{} action:{}",
                          isSkipped ? "skipped" : "programmed",
                          cidr, node.getNodeId().getValue(), actionForNode);
         } else {
-            LOGGER.error("IpRewriteExclusion failed for cidr:{} node:{} action:{} status:{}",
+            LOG.error("IpRewriteExclusion failed for cidr:{} node:{} action:{} status:{}",
                          cidr, node.getNodeId().getValue(), actionForNode, status);
         }
         return status;
@@ -1163,13 +1163,13 @@ public class NeutronL3Adapter implements ConfigInterface {
         final Boolean isProgrammed = outboundIpRewriteCache.contains(cacheKey);
 
         if (action == Action.DELETE && isProgrammed == Boolean.FALSE) {
-            LOGGER.trace("programOutboundIpRewriteStage1 dpid {} seg {} fixedIpAddress {} floatIp {} action {} " +
+            LOG.trace("programOutboundIpRewriteStage1 dpid {} seg {} fixedIpAddress {} floatIp {} action {} " +
                          "is already done",
                     fid.dpid, fid.segId, fid.fixedIpAddress, fid.floatingIpAddress, action);
             return;
         }
         if (action == Action.ADD && isProgrammed == Boolean.TRUE) {
-            LOGGER.trace("programOutboundIpRewriteStage1 dpid {} seg {} fixedIpAddress {} floatIp {} action {} " +
+            LOG.trace("programOutboundIpRewriteStage1 dpid {} seg {} fixedIpAddress {} floatIp {} action {} " +
                          "is already done",
                     fid.dpid, fid.segId, fid.fixedIpAddress, fid.floatingIpAddress, action);
             return;
@@ -1202,12 +1202,12 @@ public class NeutronL3Adapter implements ConfigInterface {
 
         if (status.isSuccess()) {
             final boolean isSkipped = outboundNatProvider == null;
-            LOGGER.debug("programOutboundIpRewriteStage2 {} for dpid {} seg {} fixedIpAddress {} floatIp {}" +
+            LOG.debug("programOutboundIpRewriteStage2 {} for dpid {} seg {} fixedIpAddress {} floatIp {}" +
                             " action {}",
                          isSkipped ? "skipped" : "programmed",
                          fid.dpid, fid.segId, fid.fixedIpAddress, fid.floatingIpAddress, action);
         } else {
-            LOGGER.error("programOutboundIpRewriteStage2 failed for dpid {} seg {} fixedIpAddress {} floatIp {}" +
+            LOG.error("programOutboundIpRewriteStage2 failed for dpid {} seg {} fixedIpAddress {} floatIp {}" +
                          " action {} status:{}",
                          fid.dpid, fid.segId, fid.fixedIpAddress, fid.floatingIpAddress, action, status);
         }
@@ -1284,7 +1284,7 @@ public class NeutronL3Adapter implements ConfigInterface {
                 final NeutronSubnet externalSubnet = getExternalNetworkSubnet(gatewayPort);
                 if(externalSubnet != null){
                     if(externalSubnet.getGatewayIP() != null){
-                        LOGGER.info("Trigger MAC resolution for gateway ip {} on Node {}",externalSubnet.getGatewayIP(),node.getNodeId());
+                        LOG.info("Trigger MAC resolution for gateway ip {} on Node {}", externalSubnet.getGatewayIP(), node.getNodeId());
 
                         ListenableFuture<MacAddress> gatewayMacAddress =
                                 gatewayMacResolver.resolveMacAddress(getDpidForExternalBridge(node),
@@ -1298,27 +1298,27 @@ public class NeutronL3Adapter implements ConfigInterface {
                                 public void onSuccess(MacAddress result) {
                                     if(result != null){
                                         updateExternalRouterMac(result.getValue());
-                                        LOGGER.info("Resolved MAC address for gateway IP {} is {}", externalSubnet.getGatewayIP(),result.getValue());
+                                        LOG.info("Resolved MAC address for gateway IP {} is {}", externalSubnet.getGatewayIP(), result.getValue());
                                     }else{
-                                        LOGGER.warn("MAC address resolution failed for gateway IP {}",externalSubnet.getGatewayIP());
+                                        LOG.warn("MAC address resolution failed for gateway IP {}", externalSubnet.getGatewayIP());
                                     }
                                 }
 
                                 @Override
                                 public void onFailure(Throwable t) {
-                                    LOGGER.warn("MAC address resolution failed for gateway IP {}",externalSubnet.getGatewayIP());
+                                    LOG.warn("MAC address resolution failed for gateway IP {}", externalSubnet.getGatewayIP());
                                 }
                             }, gatewayMacResolverPool);
                         }
                     }else{
-                        LOGGER.warn("No gateway IP address found for external subnet {}",externalSubnet);
+                        LOG.warn("No gateway IP address found for external subnet {}", externalSubnet);
                     }
                 }else{
-                    LOGGER.warn("Neutron subnet not found for external network {}",externalNetwork);
+                    LOG.warn("Neutron subnet not found for external network {}", externalNetwork);
                 }
             }
         }else{
-            LOGGER.warn("Neutron network not found for router interface {}",gatewayPort);
+            LOG.warn("Neutron network not found for router interface {}", gatewayPort);
         }
     }
 
index 9813b215bad7f24ab3aa94baa9b30a58d6b851e4..1db75d31aaa7250503048b26447c07fc2eb26641 100644 (file)
@@ -36,21 +36,20 @@ import com.google.common.collect.Maps;
  * @author Sam Hague (shague@redhat.com)
  */
 public class NodeCacheManagerImpl extends AbstractHandler implements NodeCacheManager, ConfigInterface {
-    private static final Logger logger = LoggerFactory.getLogger(NodeCacheManagerImpl.class);
-    private final Object nodeCacheLock = new Object();
+    private static final Logger LOG = LoggerFactory.getLogger(NodeCacheManagerImpl.class);
     private Map<NodeId, Node> nodeCache = new ConcurrentHashMap<>();
     private Map<Long, NodeCacheListener> handlers = Maps.newHashMap();
     private volatile Southbound southbound;
 
     @Override
     public void nodeAdded(Node node) {
-        logger.debug("nodeAdded: {}", node);
+        LOG.debug("nodeAdded: {}", node);
         enqueueEvent(new NodeCacheManagerEvent(node, Action.UPDATE));
     }
 
     @Override
     public void nodeRemoved(Node node) {
-        logger.debug("nodeRemoved: {}", node);
+        LOG.debug("nodeRemoved: {}", node);
         enqueueEvent(new NodeCacheManagerEvent(node, Action.DELETE));
     }
 
@@ -67,7 +66,7 @@ public class NodeCacheManagerImpl extends AbstractHandler implements NodeCacheMa
         }
         nodeCache.put(nodeId, node);
 
-        logger.debug("processNodeUpdate: {} Node type {} {}: {}",
+        LOG.debug("processNodeUpdate: {} Node type {} {}: {}",
                 nodeCache.size(),
                 southbound.getBridge(node) != null ? "BridgeNode" : "OvsdbNode",
                 action == Action.ADD ? "ADD" : "UPDATE",
@@ -77,10 +76,10 @@ public class NodeCacheManagerImpl extends AbstractHandler implements NodeCacheMa
             try {
                 handler.notifyNode(node, action);
             } catch (Exception e) {
-                logger.error("Failed notifying node add event", e);
+                LOG.error("Failed notifying node add event", e);
             }
         }
-        logger.debug("processNodeUpdate returns");
+        LOG.debug("processNodeUpdate returns");
     }
 
     private void processNodeRemoved(Node node) {
@@ -89,10 +88,10 @@ public class NodeCacheManagerImpl extends AbstractHandler implements NodeCacheMa
             try {
                 handler.notifyNode(node, Action.DELETE);
             } catch (Exception e) {
-                logger.error("Failed notifying node remove event", e);
+                LOG.error("Failed notifying node remove event", e);
             }
         }
-        logger.warn("processNodeRemoved returns");
+        LOG.warn("processNodeRemoved returns");
     }
 
     /**
@@ -104,11 +103,11 @@ public class NodeCacheManagerImpl extends AbstractHandler implements NodeCacheMa
     @Override
     public void processEvent(AbstractEvent abstractEvent) {
         if (!(abstractEvent instanceof NodeCacheManagerEvent)) {
-            logger.error("Unable to process abstract event " + abstractEvent);
+            LOG.error("Unable to process abstract event {}", abstractEvent);
             return;
         }
         NodeCacheManagerEvent ev = (NodeCacheManagerEvent) abstractEvent;
-        logger.debug("NodeCacheManagerImpl: dequeue: {}", ev);
+        LOG.debug("NodeCacheManagerImpl: dequeue: {}", ev);
         switch (ev.getAction()) {
             case DELETE:
                 processNodeRemoved(ev.getNode());
@@ -117,7 +116,7 @@ public class NodeCacheManagerImpl extends AbstractHandler implements NodeCacheMa
                 processNodeUpdate(ev.getNode());
                 break;
             default:
-                logger.warn("Unable to process event action " + ev.getAction());
+                LOG.warn("Unable to process event action {}", ev.getAction());
                 break;
         }
     }
@@ -125,13 +124,13 @@ public class NodeCacheManagerImpl extends AbstractHandler implements NodeCacheMa
     public void cacheListenerAdded(final ServiceReference ref, NodeCacheListener handler){
         Long pid = (Long) ref.getProperty(org.osgi.framework.Constants.SERVICE_ID);
         handlers.put(pid, handler);
-        logger.info("Node cache listener registered, pid {} {}", pid, handler.getClass().getName());
+        LOG.info("Node cache listener registered, pid {} {}", pid, handler.getClass().getName());
     }
 
     public void cacheListenerRemoved(final ServiceReference ref){
         Long pid = (Long) ref.getProperty(org.osgi.framework.Constants.SERVICE_ID);
         handlers.remove(pid);
-        logger.debug("Node cache listener unregistered, pid {}", pid);
+        LOG.debug("Node cache listener unregistered, pid {}", pid);
     }
 
     @Override
index a1b081255ee17ce1db3c5a5598cacc5d4524a247..bb4a727894ad8e005b1e01498846c53cdd58d9d3 100644 (file)
@@ -29,7 +29,7 @@ import com.google.common.collect.Iterables;
 import com.google.common.collect.Maps;
 
 public class ProviderNetworkManagerImpl implements ConfigInterface, NetworkingProviderManager {
-    static final Logger logger = LoggerFactory.getLogger(ProviderNetworkManagerImpl.class);
+    private static final Logger LOG = LoggerFactory.getLogger(ProviderNetworkManagerImpl.class);
     private HashMap<Long, ProviderEntry> providers = Maps.newHashMap();
     private HashMap<Node, NetworkingProvider> nodeToProviderMapping = Maps.newHashMap();
     private volatile OvsdbInventoryService ovsdbInventoryService;
@@ -51,7 +51,7 @@ public class ProviderNetworkManagerImpl implements ConfigInterface, NetworkingPr
 
         Iterable<ProviderEntry> matchingProviders = Iterables.filter(providers.values(), providerEntryPredicate);
         if (!matchingProviders.iterator().hasNext()) {
-            logger.error("No providers matching {} found", targetVersion);
+            LOG.error("No providers matching {} found", targetVersion);
         }
 
         // Return the first match as only have one matching provider today
@@ -70,7 +70,7 @@ public class ProviderNetworkManagerImpl implements ConfigInterface, NetworkingPr
                 (String) ref.getProperty(Constants.OPENFLOW_VERSION_PROPERTY));
         properties.put(Constants.PROVIDER_TYPE_PROPERTY, (String) ref.getProperty(Constants.PROVIDER_TYPE_PROPERTY));
         providers.put(pid, new ProviderEntry(provider, properties));
-        logger.info("Neutron Networking Provider Registered: {}, with {} and pid={}",
+        LOG.info("Neutron Networking Provider Registered: {}, with {} and pid={}",
                 provider.getClass().getName(), properties.toString(), pid);
 
         ovsdbInventoryService.providersReady();
@@ -79,7 +79,7 @@ public class ProviderNetworkManagerImpl implements ConfigInterface, NetworkingPr
     public void providerRemoved(final ServiceReference ref){
         Long pid = (Long)ref.getProperty(org.osgi.framework.Constants.SERVICE_ID);
         providers.remove(pid);
-        logger.info("Neutron Networking Provider Removed: {}", pid);
+        LOG.info("Neutron Networking Provider Removed: {}", pid);
     }
 
     @Override
index c29e7adc52f85060d48f12ef734bd593bfaffc46..1082a8ff5169da681239ea2a62b11d057caff10e 100644 (file)
@@ -31,7 +31,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class SecurityServicesImpl implements ConfigInterface, SecurityServicesManager {
-    static final Logger logger = LoggerFactory.getLogger(TenantNetworkManagerImpl.class);
+    private static final Logger LOG = LoggerFactory.getLogger(TenantNetworkManagerImpl.class);
     private volatile INeutronPortCRUD neutronPortCache;
     private volatile INeutronSubnetCRUD neutronSubnetCache;
     private volatile Southbound southbound;
@@ -44,10 +44,10 @@ public class SecurityServicesImpl implements ConfigInterface, SecurityServicesMa
      */
     public boolean isPortSecurityReady(OvsdbTerminationPointAugmentation terminationPointAugmentation) {
         if (neutronPortCache == null) {
-            logger.error("neutron port is null");
+            LOG.error("neutron port is null");
             return false;
         }
-        logger.trace("isPortSecurityReady for {}", terminationPointAugmentation.getName());
+        LOG.trace("isPortSecurityReady for {}", terminationPointAugmentation.getName());
         String neutronPortId = southbound.getInterfaceExternalIdsValue(terminationPointAugmentation,
                 Constants.EXTERNAL_ID_INTERFACE_ID);
         if (neutronPortId == null) {
@@ -59,18 +59,18 @@ public class SecurityServicesImpl implements ConfigInterface, SecurityServicesMa
         }
         String deviceOwner = neutronPort.getDeviceOwner();
         if (!deviceOwner.contains("compute")) {
-            logger.debug("Port {} is not a compute host, it is a: {}", neutronPortId, deviceOwner);
+            LOG.debug("Port {} is not a compute host, it is a: {}", neutronPortId, deviceOwner);
         }
-        logger.debug("isPortSecurityReady() is a {} ", deviceOwner);
+        LOG.debug("isPortSecurityReady() is a {} ", deviceOwner);
         List<NeutronSecurityGroup> securityGroups = neutronPort.getSecurityGroups();
         if (securityGroups.isEmpty()) {
-            logger.debug("Check for device: {} does not contain a Security Group for port: {}", deviceOwner,
+            LOG.debug("Check for device: {} does not contain a Security Group for port: {}", deviceOwner,
                     neutronPortId);
             return false;
         }
         String vmPort = southbound.getInterfaceExternalIdsValue(terminationPointAugmentation,
                 Constants.EXTERNAL_ID_VM_MAC);
-        logger.debug("Security Group Check {} DOES contain a Neutron Security Group", neutronPortId);
+        LOG.debug("Security Group Check {} DOES contain a Neutron Security Group", neutronPortId);
         return true;
     }
 
@@ -82,10 +82,10 @@ public class SecurityServicesImpl implements ConfigInterface, SecurityServicesMa
      */
     public NeutronSecurityGroup getSecurityGroupInPort(OvsdbTerminationPointAugmentation terminationPointAugmentation) {
         if (neutronPortCache == null) {
-            logger.error("neutron port is null");
+            LOG.error("neutron port is null");
             return null;
         }
-        logger.trace("isPortSecurityReady for {}", terminationPointAugmentation.getName());
+        LOG.trace("isPortSecurityReady for {}", terminationPointAugmentation.getName());
         String neutronPortId = southbound.getInterfaceExternalIdsValue(terminationPointAugmentation,
                 Constants.EXTERNAL_ID_INTERFACE_ID);
         if (neutronPortId == null) {
@@ -109,10 +109,10 @@ public class SecurityServicesImpl implements ConfigInterface, SecurityServicesMa
     public NeutronPort getDHCPServerPort(
             OvsdbTerminationPointAugmentation terminationPointAugmentation) {
         if (neutronPortCache == null) {
-            logger.error("getDHCPServerPort: neutron port is null");
+            LOG.error("getDHCPServerPort: neutron port is null");
             return null;
         }
-        logger.trace("getDHCPServerPort for {}",
+        LOG.trace("getDHCPServerPort for {}",
                 terminationPointAugmentation.getName());
         String neutronPortId = southbound.getInterfaceExternalIdsValue(
                 terminationPointAugmentation,
@@ -125,7 +125,7 @@ public class SecurityServicesImpl implements ConfigInterface, SecurityServicesMa
         List<Neutron_IPs> fixedIps = neutronPort.getFixedIPs();
         if(null==fixedIps || 0 == fixedIps.size() )
         {
-            logger.error("getDHCPServerPort: No fixed ip is assigned");
+            LOG.error("getDHCPServerPort: No fixed ip is assigned");
             return null;
         }
         String subnetUUID = fixedIps.iterator().next().getSubnetUUID();
@@ -144,10 +144,10 @@ public class SecurityServicesImpl implements ConfigInterface, SecurityServicesMa
     @Override
     public boolean isComputePort(OvsdbTerminationPointAugmentation terminationPointAugmentation) {
         if (neutronPortCache == null) {
-            logger.error("neutron port is null");
+            LOG.error("neutron port is null");
             return false;
         }
-        logger.trace("isComputePort for {}", terminationPointAugmentation.getName());
+        LOG.trace("isComputePort for {}", terminationPointAugmentation.getName());
         String neutronPortId = southbound.getInterfaceExternalIdsValue(terminationPointAugmentation,
                 Constants.EXTERNAL_ID_INTERFACE_ID);
         if (neutronPortId == null) {
@@ -159,7 +159,7 @@ public class SecurityServicesImpl implements ConfigInterface, SecurityServicesMa
         }
         String deviceOwner = neutronPort.getDeviceOwner();
         if (!deviceOwner.contains("compute")) {
-            logger.debug("isComputePort : Port {} is not a DHCP server port", neutronPortId,deviceOwner);
+            LOG.debug("isComputePort : Port {} is not a DHCP server port", neutronPortId, deviceOwner);
             return false;
         }
         return true;
@@ -168,10 +168,10 @@ public class SecurityServicesImpl implements ConfigInterface, SecurityServicesMa
     @Override
     public boolean isLastPortinSubnet(Node node, OvsdbTerminationPointAugmentation terminationPointAugmentation) {
         if (neutronPortCache == null) {
-            logger.error("isLastPortinSubnet: neutron port is null");
+            LOG.error("isLastPortinSubnet: neutron port is null");
             return false;
         }
-        logger.trace("isLastPortinSubnet: for {}", terminationPointAugmentation.getName());
+        LOG.trace("isLastPortinSubnet: for {}", terminationPointAugmentation.getName());
         String neutronPortId = southbound.getInterfaceExternalIdsValue(terminationPointAugmentation,
                                                                        Constants.EXTERNAL_ID_INTERFACE_ID);
         if (neutronPortId == null) {
@@ -214,7 +214,7 @@ public class SecurityServicesImpl implements ConfigInterface, SecurityServicesMa
 
     @Override
     public boolean isLastPortinBridge(Node node, OvsdbTerminationPointAugmentation terminationPointAugmentation) {
-        logger.trace("isLastPortinBridge: for {}", terminationPointAugmentation.getName());
+        LOG.trace("isLastPortinBridge: for {}", terminationPointAugmentation.getName());
         List<TerminationPoint> terminationPoints = node.getTerminationPoint();
         if(terminationPoints != null && !terminationPoints.isEmpty()){
             for(TerminationPoint tp : terminationPoints){
@@ -237,10 +237,10 @@ public class SecurityServicesImpl implements ConfigInterface, SecurityServicesMa
     public List<Neutron_IPs> getIpAddress(Node node,
                                 OvsdbTerminationPointAugmentation terminationPointAugmentation) {
         if (neutronPortCache == null) {
-            logger.error("getIpAddress: neutron port is null");
+            LOG.error("getIpAddress: neutron port is null");
             return null;
         }
-        logger.trace("getIpAddress: for {}", terminationPointAugmentation.getName());
+        LOG.trace("getIpAddress: for {}", terminationPointAugmentation.getName());
         String neutronPortId = southbound.getInterfaceExternalIdsValue(terminationPointAugmentation,
                 Constants.EXTERNAL_ID_INTERFACE_ID);
         if (neutronPortId == null) {
index 1ecfa0168bb08c945d08f6df846c079601716eb8..46a64c6fac46aeadc44fd35bb28a9ab0bb4b499f 100644 (file)
@@ -29,7 +29,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class TenantNetworkManagerImpl implements ConfigInterface, TenantNetworkManager {
-    static final Logger logger = LoggerFactory.getLogger(TenantNetworkManagerImpl.class);
+    private static final Logger LOG = LoggerFactory.getLogger(TenantNetworkManagerImpl.class);
     private INeutronNetworkCRUD neutronNetworkCache;
     private INeutronPortCRUD neutronPortCache;
     private VlanConfigurationCache vlanConfigurationCache;
@@ -48,18 +48,18 @@ public class TenantNetworkManagerImpl implements ConfigInterface, TenantNetworkM
     public void reclaimInternalVlan(Node node, NeutronNetwork network) {
         int vlan = vlanConfigurationCache.reclaimInternalVlan(node, network.getID());
         if (vlan <= 0) {
-            logger.debug("Unable to get an internalVlan for Network {}", network);
+            LOG.debug("Unable to get an internalVlan for Network {}", network);
             return;
         }
-        logger.debug("Removed Vlan {} on {}", vlan);
+        LOG.debug("Removed Vlan {} on {}", vlan);
     }
 
     @Override
     public void programInternalVlan(Node node, OvsdbTerminationPointAugmentation tp, NeutronNetwork network) {
         int vlan = vlanConfigurationCache.getInternalVlan(node, network.getID());
-        logger.debug("Programming Vlan {} on {}", vlan, tp);
+        LOG.debug("Programming Vlan {} on {}", vlan, tp);
         if (vlan <= 0) {
-            logger.debug("Unable to get an internalVlan for Network {}", network);
+            LOG.debug("Unable to get an internalVlan for Network {}", network);
             return;
         }
 
@@ -70,7 +70,7 @@ public class TenantNetworkManagerImpl implements ConfigInterface, TenantNetworkM
     public boolean isTenantNetworkPresentInNode(Node node, String segmentationId) {
         String networkId = this.getNetworkId(segmentationId);
         if (networkId == null) {
-            logger.debug("Tenant Network not found with Segmenation-id {}",segmentationId);
+            LOG.debug("Tenant Network not found with Segmenation-id {}", segmentationId);
             return false;
         }
 
@@ -79,17 +79,17 @@ public class TenantNetworkManagerImpl implements ConfigInterface, TenantNetworkM
             for (OvsdbTerminationPointAugmentation port : ports) {
                 String ifaceId = southbound.getInterfaceExternalIdsValue(port, Constants.EXTERNAL_ID_INTERFACE_ID);
                 if (ifaceId != null && isInterfacePresentInTenantNetwork(ifaceId, networkId)) {
-                    logger.debug("Tenant Network {} with Segmentation-id {} is present in Node {} / Interface {}",
+                    LOG.debug("Tenant Network {} with Segmentation-id {} is present in Node {} / Interface {}",
                             networkId, segmentationId, node, port);
                     return true;
                 }
             }
         } catch (Exception e) {
-            logger.error("Error while trying to determine if network is present on node", e);
+            LOG.error("Error while trying to determine if network is present on node", e);
             return false;
         }
 
-        logger.debug("Tenant Network {} with Segmenation-id {} is NOT present in Node {}",
+        LOG.debug("Tenant Network {} with Segmenation-id {} is NOT present in Node {}",
                 networkId, segmentationId, node);
 
         return false;
@@ -114,7 +114,7 @@ public class TenantNetworkManagerImpl implements ConfigInterface, TenantNetworkM
         Preconditions.checkNotNull(neutronPortCache);
         NeutronNetwork neutronNetwork = null;
 
-        logger.debug("getTenantNetwork for {}", terminationPointAugmentation);
+        LOG.debug("getTenantNetwork for {}", terminationPointAugmentation);
         String neutronPortId = southbound.getInterfaceExternalIdsValue(terminationPointAugmentation,
                 Constants.EXTERNAL_ID_INTERFACE_ID);
         if (neutronPortId != null) {
@@ -122,17 +122,17 @@ public class TenantNetworkManagerImpl implements ConfigInterface, TenantNetworkM
             if (neutronPort != null) {
                 neutronNetwork = neutronNetworkCache.getNetwork(neutronPort.getNetworkUUID());
                 if (neutronNetwork != null) {
-                    logger.debug("mapped to {}", neutronNetwork);
+                    LOG.debug("mapped to {}", neutronNetwork);
                 } else {
-                    logger.debug("getTenantNetwork: did not find neutronNetwork in cache from neutronPort {}",
+                    LOG.debug("getTenantNetwork: did not find neutronNetwork in cache from neutronPort {}",
                                  neutronPortId);
                 }
             } else {
-                logger.info("getTenantNetwork did not find neutronPort {} from termination point {}",
+                LOG.info("getTenantNetwork did not find neutronPort {} from termination point {}",
                         neutronPortId, terminationPointAugmentation.getName());
             }
         } else {
-            logger.debug("getTenantNetwork: did not find {} in external_ids", Constants.EXTERNAL_ID_INTERFACE_ID);
+            LOG.debug("getTenantNetwork: did not find {} in external_ids", Constants.EXTERNAL_ID_INTERFACE_ID);
         }
         return neutronNetwork;
     }
@@ -142,16 +142,16 @@ public class TenantNetworkManagerImpl implements ConfigInterface, TenantNetworkM
         Preconditions.checkNotNull(neutronPortCache);
         NeutronPort neutronPort = null;
 
-        logger.trace("getTenantPort for {}", terminationPointAugmentation.getName());
+        LOG.trace("getTenantPort for {}", terminationPointAugmentation.getName());
         String neutronPortId = southbound.getInterfaceExternalIdsValue(terminationPointAugmentation,
                 Constants.EXTERNAL_ID_INTERFACE_ID);
         if (neutronPortId != null) {
             neutronPort = neutronPortCache.getPort(neutronPortId);
         }
         if (neutronPort != null) {
-            logger.debug("mapped to {}", neutronPort);
+            LOG.debug("mapped to {}", neutronPort);
         } else {
-            logger.warn("getTenantPort did not find port for {}", terminationPointAugmentation.getName());
+            LOG.warn("getTenantPort did not find port for {}", terminationPointAugmentation.getName());
         }
 
         return neutronPort;
index 0c4867aad8d2af980af1044575ff7c9fa9479fcc..70141a20e43273cb3612dcf3d5e761912642139f 100644 (file)
@@ -30,7 +30,7 @@ import org.slf4j.LoggerFactory;
  * @author Sam Hague
  */
 public class VlanConfigurationCacheImpl implements ConfigInterface, VlanConfigurationCache {
-    static final Logger logger = LoggerFactory.getLogger(VlanConfigurationCacheImpl.class);
+    private static final Logger LOG = LoggerFactory.getLogger(VlanConfigurationCacheImpl.class);
     private Map<String, NodeConfiguration> configurationCache = Maps.newConcurrentMap();
     private volatile TenantNetworkManager tenantNetworkManager;
     private volatile Southbound southbound;
@@ -63,7 +63,7 @@ public class VlanConfigurationCacheImpl implements ConfigInterface, VlanConfigur
                 internalVlanInUse(nodeConfiguration, vlan);
                 nodeConfiguration.getTenantVlanMap().put(networkId, vlan);
             } else {
-                logger.debug("Node: {} initialized without a vlan", node);
+                LOG.debug("Node: {} initialized without a vlan", node);
             }
         }
         configurationCache.put(nodeUuid, nodeConfiguration);
index 0e28de8cc5a35a487dd4d2c12cbce97f21252759..7833d358e25e9135b88e1dffc5118d9462cee0e6 100644 (file)
@@ -20,7 +20,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class NodeUtils {
-    protected static final Logger LOG = LoggerFactory.getLogger(NodeUtils.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NodeUtils.class);
 
     public static String getId (String identifier) {
         String id = identifier;
index 4eb1235b4ef3f642e3e33b6e8102b7a330f76747..33b955198bef871c817633f015c8155d538e3215 100644 (file)
@@ -15,8 +15,6 @@ import org.opendaylight.ovsdb.compatibility.plugin.api.NodeUtils;
 import org.opendaylight.ovsdb.compatibility.plugin.api.OvsdbConnectionService;
 import org.opendaylight.ovsdb.plugin.api.Connection;
 import org.opendaylight.ovsdb.plugin.api.ConnectionConstants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * This is a proxy class for ovsdb plugin's OvsdbConnectionService class
@@ -27,7 +25,6 @@ import org.slf4j.LoggerFactory;
  *
  */
 public class ConnectionServiceImpl implements OvsdbConnectionService{
-    protected static final Logger logger = LoggerFactory.getLogger(ConnectionServiceImpl.class);
 
     private volatile org.opendaylight.ovsdb.plugin.api.OvsdbConnectionService pluginOvsdbConnectionService;
 
index 70a01e6269f6ed84d3c1f3e5cd9439bab9e1fc81..5b4f1635ff4411bb09fd735ce2c45cfd3da50d21 100644 (file)
@@ -20,8 +20,6 @@ import org.opendaylight.ovsdb.compatibility.plugin.api.OvsdbInventoryService;
 import org.opendaylight.ovsdb.compatibility.plugin.impl.ConfigurationServiceImpl;
 import org.opendaylight.ovsdb.compatibility.plugin.impl.ConnectionServiceImpl;
 import org.opendaylight.ovsdb.compatibility.plugin.impl.InventoryServiceImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Activator for ovsdb plugin compatibility layer
@@ -29,8 +27,6 @@ import org.slf4j.LoggerFactory;
  *
  */
 public class Activator extends ComponentActivatorAbstractBase {
-    protected static final Logger logger = LoggerFactory
-            .getLogger(Activator.class);
 
     /**
      * Function called when the activator starts just after some initializations
index 47af9fb3e3c2d83d73ac569f21fe4f328120a9cf..ea8a737fd001849e80debc3bb1e084050f2203f6 100644 (file)
@@ -15,9 +15,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.N
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 public class Connection {
     private Node node;
     private String identifier;
@@ -33,8 +30,6 @@ public class Connection {
 
     private Long idCounter;
 
-    private static final Logger logger = LoggerFactory.getLogger(Connection.class);
-
     public Connection(String identifier, OvsdbClient client) {
         super();
 
index 12acd4717910e21f81080cfddf6fed511cc46e4a..8a8c3d5e948e3844e983d79ea4ebad5cf6e07458 100644 (file)
@@ -66,8 +66,7 @@ import com.google.common.util.concurrent.ListenableFuture;
 
 public class ConfigurationServiceImpl implements OvsdbConfigurationService
 {
-    private static final Logger LOGGER = LoggerFactory
-            .getLogger(ConfigurationServiceImpl.class);
+    private static final Logger LOG = LoggerFactory.getLogger(ConfigurationServiceImpl.class);
 
     OvsdbConnectionService connectionService;
     OvsdbInventoryService ovsdbInventoryService;
@@ -218,7 +217,7 @@ public class ConfigurationServiceImpl implements OvsdbConfigurationService
         if (myParentUuid == null) {
             myParentUuid = this.getSpecialCaseParentUUID(node, OvsVswitchdSchemaConstants.DATABASE_NAME, tableName);
         }
-        LOGGER.debug("insertRow Connection : {} Table : {} ParentTable : {} Parent Column: {} Parent UUID : {} Row : {}",
+        LOG.debug("insertRow Connection : {} Table : {} ParentTable : {} Parent Column: {} Parent UUID : {} Row : {}",
                 client.getConnectionInfo(), tableName, parentColumn[0], parentColumn[1], myParentUuid, row);
 
         DatabaseSchema dbSchema = client.getDatabaseSchema(OvsVswitchdSchemaConstants.DATABASE_NAME);
@@ -291,7 +290,7 @@ public class ConfigurationServiceImpl implements OvsdbConfigurationService
             parentColumn = new String[]{null, null};
         }
 
-        LOGGER.debug("deleteRow : Connection : {} databaseName : {} tableName : {} Uuid : {} ParentTable : {} ParentColumn : {}",
+        LOG.debug("deleteRow : Connection : {} databaseName : {} tableName : {} Uuid : {} ParentTable : {} ParentColumn : {}",
                 client.getConnectionInfo(), databaseName, tableName, uuid, parentColumn[0], parentColumn[1]);
 
         DatabaseSchema dbSchema = client.getDatabaseSchema(databaseName);
@@ -312,7 +311,7 @@ public class ConfigurationServiceImpl implements OvsdbConfigurationService
                 }
             }
         } catch (InterruptedException | ExecutionException e) {
-            LOGGER.error("Error in deleteRow() {} {}", node, tableName, e);
+            LOG.error("Error in deleteRow() {} {}", node, tableName, e);
         }
 
         return new Status(StatusCode.SUCCESS);
@@ -353,7 +352,7 @@ public class ConfigurationServiceImpl implements OvsdbConfigurationService
                     return controllerIP;
                 }
             } catch (UnknownHostException e) {
-                LOGGER.error("Host {} is invalid", addressString);
+                LOG.error("Host {} is invalid", addressString);
             }
         }
 
@@ -366,7 +365,7 @@ public class ConfigurationServiceImpl implements OvsdbConfigurationService
                     return controllerIP;
                 }
             } catch (UnknownHostException e) {
-                LOGGER.error("Host {} is invalid", addressString);
+                LOG.error("Host {} is invalid", addressString);
             }
         }
 
@@ -374,7 +373,7 @@ public class ConfigurationServiceImpl implements OvsdbConfigurationService
             controllerIP = connection.getClient().getConnectionInfo().getLocalAddress();
             return controllerIP;
         } catch (Exception e) {
-            LOGGER.debug("Invalid connection provided to getControllerIPAddresses", e);
+            LOG.debug("Invalid connection provided to getControllerIPAddresses", e);
         }
         return controllerIP;
     }
@@ -387,7 +386,7 @@ public class ConfigurationServiceImpl implements OvsdbConfigurationService
             try {
                 openFlowPort = Short.decode(portString).shortValue();
             } catch (NumberFormatException e) {
-                LOGGER.warn("Invalid port:{}, use default({})", portString,
+                LOG.warn("Invalid port:{}, use default({})", portString,
                         openFlowPort);
             }
         }
@@ -434,11 +433,11 @@ public class ConfigurationServiceImpl implements OvsdbConfigurationService
             bridge.setProtocols(protocols);
             updateOperationStatus = this.updateRow(node, bridge.getSchema().getName(),
                                                    null, bridgeUUID, bridge.getRow());
-            LOGGER.debug("Bridge {} updated to {} with Status {}", bridgeUUID,
+            LOG.debug("Bridge {} updated to {} with Status {}", bridgeUUID,
                     protocols.toArray()[0], updateOperationStatus);
 
         } catch (SchemaVersionMismatchException e){
-            LOGGER.debug(e.toString());
+            LOG.debug(e.toString());
         }
 
         // If we fail to update the protocols
@@ -475,7 +474,7 @@ public class ConfigurationServiceImpl implements OvsdbConfigurationService
 
     public Boolean setBridgeOFController(Node node, String bridgeIdentifier) {
         if (connectionService == null) {
-            LOGGER.error("Couldn't refer to the ConnectionService");
+            LOG.error("Couldn't refer to the ConnectionService");
             return false;
         }
 
@@ -491,7 +490,7 @@ public class ConfigurationServiceImpl implements OvsdbConfigurationService
                 }
             }
         } catch(Exception e) {
-            LOGGER.error("Error in setBridgeOFController()", e);
+            LOG.error("Error in setBridgeOFController()", e);
         }
         return false;
     }
@@ -685,7 +684,7 @@ public class ConfigurationServiceImpl implements OvsdbConfigurationService
             parentColumn = this.getReferencingColumn(parentTableSchema, tableName);
         }
 
-        LOGGER.debug("insertTree Connection : {} Table : {} ParentTable : {} Parent Column: {} Parent UUID : {} Row : {}",
+        LOG.debug("insertTree Connection : {} Table : {} ParentTable : {} Parent Column: {} Parent UUID : {} Row : {}",
                 client.getConnectionInfo(), tableName, parentTable, parentColumn, parentUuid, row);
 
         Map<UUID, Map.Entry<String, Row<GenericTableSchema>>> referencedRows = Maps.newConcurrentMap();
@@ -780,7 +779,7 @@ public class ConfigurationServiceImpl implements OvsdbConfigurationService
                         referencedRows.put(refUuid, new AbstractMap.SimpleEntry<String, Row<GenericTableSchema>>(refRowObject.getRefTable(), refRow));
                         extractReferencedRows(node, dbName, refRow, referencedRows, namedUuidSuffix);
                     } catch (InterruptedException | ExecutionException e) {
-                        LOGGER.error("Exception while extracting multi-level Row references " + e.getLocalizedMessage());
+                        LOG.error("Exception while extracting multi-level Row references " + e.getLocalizedMessage());
                     }
                 } else if (column.getData() instanceof OvsdbSet) {
                     OvsdbSet<Object> setObject = (OvsdbSet<Object>)column.getData();
@@ -797,7 +796,7 @@ public class ConfigurationServiceImpl implements OvsdbConfigurationService
                                 referencedRows.put(refUuid, new AbstractMap.SimpleEntry<String, Row<GenericTableSchema>>(refRowObject.getRefTable(), refRow));
                                 extractReferencedRows(node, dbName, refRow, referencedRows, namedUuidSuffix);
                             } catch (InterruptedException | ExecutionException e) {
-                                LOGGER.error("Exception while extracting multi-level Row references " + e.getLocalizedMessage());
+                                LOG.error("Exception while extracting multi-level Row references " + e.getLocalizedMessage());
                             }
                         } else {
                             modifiedSet.add(obj);
@@ -863,7 +862,7 @@ public class ConfigurationServiceImpl implements OvsdbConfigurationService
         Connection connection = connectionService.getConnection(node);
         OvsdbClient client = connection.getClient();
 
-        LOGGER.debug("updateRow : Connection : {} databaseName : {} tableName : {} rowUUID : {} row : {}",
+        LOG.debug("updateRow : Connection : {} databaseName : {} tableName : {} rowUUID : {} row : {}",
                 client.getConnectionInfo(), databaseName, tableName, rowUuid, row.toString());
         try{
             DatabaseSchema dbSchema = client.getDatabaseSchema(databaseName);
@@ -909,7 +908,7 @@ public class ConfigurationServiceImpl implements OvsdbConfigurationService
             myParentColumn = this.getReferencingColumn(parentTableSchema, tableName);
         }
 
-        LOGGER.debug("deleteRow : Connection : {} databaseName : {} tableName : {} Uuid : {} ParentTable : {} ParentColumn : {}",
+        LOG.debug("deleteRow : Connection : {} databaseName : {} tableName : {} Uuid : {} ParentTable : {} ParentColumn : {}",
                 client.getConnectionInfo(), databaseName, tableName, rowUuid, parentTable, myParentColumn);
 
         DatabaseSchema dbSchema = client.getDatabaseSchema(databaseName);
@@ -930,7 +929,7 @@ public class ConfigurationServiceImpl implements OvsdbConfigurationService
                 }
             }
         } catch (InterruptedException | ExecutionException e) {
-            LOGGER.error("Error in deleteRow() {} {} {} {}", node, databaseName, tableName, parentTable, e);
+            LOG.error("Error in deleteRow() {} {} {} {}", node, databaseName, tableName, parentTable, e);
         }
     }
 
index 8582174d835096e3e94dc1c4e2049dad70dbbf69..25d5b843ec592e08f33556067e0c8291c1d610ef 100644 (file)
@@ -54,7 +54,7 @@ import com.google.common.collect.Lists;
  */
 public class ConnectionServiceImpl implements OvsdbConnectionService,
                                               OvsdbConnectionListener {
-    protected static final Logger logger = LoggerFactory.getLogger(ConnectionServiceImpl.class);
+    private static final Logger LOG = LoggerFactory.getLogger(ConnectionServiceImpl.class);
 
     // Properties that can be set in config.ini
     private static final Integer DEFAULT_OVSDB_PORT = 6640;
@@ -103,13 +103,13 @@ public class ConnectionServiceImpl implements OvsdbConnectionService,
         }
 
         if (!connectionLib.startOvsdbManager(ovsdbListenPort)) {
-            logger.warn("Start OVSDB manager call from ConnectionService was not necessary");
+            LOG.warn("Start OVSDB manager call from ConnectionService was not necessary");
         }
 
         /* Then get connection clients */
         Collection<OvsdbClient> connections = connectionLib.getConnections();
         for (OvsdbClient client : connections) {
-            logger.info("CONNECT start connected clients client = {}", client);
+            LOG.info("CONNECT start connected clients client = {}", client);
             this.connected(client);
         }
     }
@@ -144,7 +144,7 @@ public class ConnectionServiceImpl implements OvsdbConnectionService,
         try {
             address = InetAddress.getByName(params.get(ConnectionConstants.ADDRESS));
         } catch (Exception e) {
-            logger.error("Unable to resolve " + params.get(ConnectionConstants.ADDRESS), e);
+            LOG.error("Unable to resolve {}", params.get(ConnectionConstants.ADDRESS), e);
             return null;
         }
 
@@ -161,9 +161,9 @@ public class ConnectionServiceImpl implements OvsdbConnectionService,
             OvsdbClient client = connectionLib.connect(address, port);
             return handleNewConnection(identifier, client);
         } catch (InterruptedException e) {
-            logger.error("Thread was interrupted during connect", e);
+            LOG.error("Thread was interrupted during connect", e);
         } catch (ExecutionException e) {
-            logger.error("ExecutionException in handleNewConnection for identifier " + identifier, e);
+            LOG.error("ExecutionException in handleNewConnection for identifier " + identifier, e);
         }
         return null;
     }
@@ -227,10 +227,10 @@ public class ConnectionServiceImpl implements OvsdbConnectionService,
             @Override
             public void run() {
                 try {
-                    logger.info("Initialize inventory for {}", connection.toString());
+                    LOG.info("Initialize inventory for {}", connection.toString());
                     initializeInventoryForNewNode(connection);
                 } catch (InterruptedException | ExecutionException | IOException e) {
-                    logger.error("Failed to initialize inventory for node with identifier " + identifier, e);
+                    LOG.error("Failed to initialize inventory for node with identifier {}", identifier, e);
                     ovsdbConnections.remove(identifier);
                 }
             }
@@ -244,7 +244,7 @@ public class ConnectionServiceImpl implements OvsdbConnectionService,
     }
 
     public void channelClosed(Node node) throws Exception {
-        logger.info("Connection to Node : {} closed", node);
+        LOG.info("Connection to Node : {} closed", node);
         disconnect(node);
         ovsdbInventoryService.removeNode(node);
     }
@@ -256,7 +256,7 @@ public class ConnectionServiceImpl implements OvsdbConnectionService,
 
         List<String> databases = client.getDatabases().get();
         if (databases == null) {
-            logger.error("Unable to get Databases for the ovsdb connection : {}", client.getConnectionInfo());
+            LOG.error("Unable to get Databases for the ovsdb connection : {}", client.getConnectionInfo());
             return;
         }
         for (String database : databases) {
@@ -264,7 +264,7 @@ public class ConnectionServiceImpl implements OvsdbConnectionService,
             TableUpdates updates = this.monitorTables(connection.getNode(), dbSchema);
             ovsdbInventoryService.processTableUpdates(connection.getNode(), dbSchema.getName(), updates);
         }
-        logger.info("Notifying Inventory Listeners for Node Added: {}", connection.getNode().toString());
+        LOG.info("Notifying Inventory Listeners for Node Added: {}", connection.getNode().toString());
         ovsdbInventoryService.notifyNodeAdded(connection.getNode(), address, port);
     }
 
@@ -272,12 +272,12 @@ public class ConnectionServiceImpl implements OvsdbConnectionService,
         Connection connection = getConnection(node);
         OvsdbClient client = connection.getClient();
         if (dbSchema == null) {
-            logger.error("Unable to get Database Schema for the ovsdb connection : {}", client.getConnectionInfo());
+            LOG.error("Unable to get Database Schema for the ovsdb connection : {}", client.getConnectionInfo());
             return null;
         }
         Set<String> tables = dbSchema.getTables();
         if (tables == null) {
-            logger.warn("Database {} without any tables. Strange !", dbSchema.getName());
+            LOG.warn("Database {} without any tables. Strange !", dbSchema.getName());
             return null;
         }
         List<MonitorRequest<GenericTableSchema>> monitorRequests = Lists.newArrayList();
index 00a4a28d60be593e00ec41f9135d0014eae654a5..4766ad45d8a01f7cdbf7208b62435a746095dbd6 100644 (file)
@@ -29,8 +29,6 @@ import org.opendaylight.ovsdb.plugin.api.OvsdbInventoryService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
 
 import com.google.common.collect.Sets;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.Maps;
 
@@ -40,8 +38,6 @@ import com.google.common.collect.Maps;
  *
  */
 public class InventoryServiceImpl implements OvsdbInventoryService {
-    private static final Logger logger = LoggerFactory
-            .getLogger(InventoryServiceImpl.class);
     private ConcurrentMap<Node, NodeDatabase> dbCache = Maps.newConcurrentMap();
     private ScheduledExecutorService executor;
     private OvsdbConfigurationService ovsdbConfigurationService;
index b23066f8f8dd938bad158b01d847932d490b4ec0..11d1f727fb819b519b00b9e422017fccaea66a81 100644 (file)
@@ -13,11 +13,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 public class NodeUtils {
-    protected static final Logger LOG = LoggerFactory.getLogger(NodeUtils.class);
 
     public static String getId (String identifier) {
         String id = identifier;
index 80ad548dc5da22cfdd35c922e8685637a2566e48..18d4a9b94c98c7d3724ce0a19c838ae36408fbff 100644 (file)
@@ -79,7 +79,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 public class InstructionUtils {
-    private static final Logger logger = LoggerFactory.getLogger(InstructionUtils.class);
+    private static final Logger LOG = LoggerFactory.getLogger(InstructionUtils.class);
     private static final int IPV4 = 0x8100;
     private static final int MAX_LENGTH = 0xffff;
 
@@ -158,7 +158,7 @@ public class InstructionUtils {
     public static InstructionBuilder createOutputPortInstructions(InstructionBuilder ib, Long dpidLong, Long port) {
 
         NodeConnectorId ncid = new NodeConnectorId("openflow:" + dpidLong + ":" + port);
-        logger.debug("createOutputPortInstructions() Node Connector ID is - Type=openflow: DPID={} inPort={} ",
+        LOG.debug("createOutputPortInstructions() Node Connector ID is - Type=openflow: DPID={} inPort={} ",
                 dpidLong, port);
 
         List<Action> actionList = Lists.newArrayList();
@@ -193,7 +193,7 @@ public class InstructionUtils {
             Long dpidLong, Long port,
             List<Instruction> instructions) {
         NodeConnectorId ncid = new NodeConnectorId("openflow:" + dpidLong + ":" + port);
-        logger.debug(
+        LOG.debug(
                 "addOutputPortInstructions() Node Connector ID is - Type=openflow: DPID={} port={} existingInstructions={}",
                 dpidLong, port, instructions);
 
@@ -239,7 +239,7 @@ public class InstructionUtils {
 
         final NodeConnectorId ncid = new NodeConnectorId("openflow:" + dpidLong + ":" + port);
         final Uri ncidUri = new Uri(ncid);
-        logger.debug(
+        LOG.debug(
                 "removeOutputPortFromInstructions() Node Connector ID is - Type=openflow: DPID={} port={} existingInstructions={}",
                 dpidLong, port, instructions);
 
@@ -300,7 +300,7 @@ public class InstructionUtils {
                 } else if (action.getOrder() == removedActionOrder) {
                     // Sanity: implementation assumes no two actions have the same order
                     //
-                    logger.error("Found action with same order as the action removed for {}, order {} index {}: {}",
+                    LOG.error("Found action with same order as the action removed for {}, order {} index {}: {}",
                             ncid, removedActionOrder, i, action);
                 }
 
@@ -329,7 +329,7 @@ public class InstructionUtils {
             ApplyActionsBuilder aab = new ApplyActionsBuilder();
             aab.setAction(actionList);
             ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
-            logger.debug("removeOutputPortFromInstructions() : applyAction {}", aab.build());
+            LOG.debug("removeOutputPortFromInstructions() : applyAction {}", aab.build());
             return false;
         } else {
             /* if all output ports are removed. Return true to indicate flow remove */
index 5eda399db8f795a4ad5d85e874134dac42569389..4084c29a0a6e986201c6f8258b7a5a473bb0ae3a 100644 (file)
@@ -74,7 +74,7 @@ import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
 
 public class MatchUtils {
-    private static final Logger logger = LoggerFactory.getLogger(MatchUtils.class);
+    private static final Logger LOG = LoggerFactory.getLogger(MatchUtils.class);
     public static final short ICMP_SHORT = 1;
     public static final short TCP_SHORT = 6;
     public static final short UDP_SHORT = 17;
@@ -93,7 +93,7 @@ public class MatchUtils {
     public static MatchBuilder createInPortMatch(MatchBuilder matchBuilder, Long dpidLong, Long inPort) {
 
         NodeConnectorId ncid = new NodeConnectorId("openflow:" + dpidLong + ":" + inPort);
-        logger.debug("createInPortMatch() Node Connector ID is - Type=openflow: DPID={} inPort={} ", dpidLong, inPort);
+        LOG.debug("createInPortMatch() Node Connector ID is - Type=openflow: DPID={} inPort={} ", dpidLong, inPort);
         matchBuilder.setInPort(NodeConnectorId.getDefaultInstance(ncid.getValue()));
         matchBuilder.setInPort(ncid);