Fix checkstyle log -> LOG errors 89/60289/1
authorDonald Hunter <donaldh@cisco.com>
Thu, 13 Jul 2017 13:48:33 +0000 (14:48 +0100)
committerDonald Hunter <donaldh@cisco.com>
Thu, 13 Jul 2017 14:47:55 +0000 (15:47 +0100)
Change-Id: I74c47f8d32a6afa02323c0b3fcced6c7d902188c
Signed-off-by: Donald Hunter <donaldh@cisco.com>
15 files changed:
cisco-xr-driver/src/main/java/org/opendaylight/unimgr/mef/nrp/cisco/xr/TopologyDataHandler.java
cisco-xr-driver/src/test/java/org/opendaylight/unimgr/mef/nrp/cisco/xr/l2vpn/activator/L2vpnLocalConnectionActivatorTest.java
edgeassure-1000/src/main/java/org/opendaylight/unimgr/mef/nrp/edgeassure/EdgeAssureActivator.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/common/NrpDao.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/impl/NrpInitializer.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/impl/connectivityservice/CreateConnectivityAction.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/impl/connectivityservice/DeleteConnectivityAction.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/impl/connectivityservice/TapiConnectivityServiceImpl.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/impl/decomposer/BasicDecomposer.java
impl/src/main/java/org/opendaylight/unimgr/mef/nrp/impl/decomposer/DecompositionAction.java
netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/EvcListener.java
netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/NodeConnectorListener.java
netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/UniPortManager.java
template-driver/src/main/java/org/opendaylight/unimgr/mef/nrp/template/driver/TemplateDriver.java
template-driver/src/main/java/org/opendaylight/unimgr/mef/nrp/template/tapi/TopologyDataHandler.java

index 987b8cc3622503529f18bfc4118baca24a938dc1..3eabbb254c7c8c96ad09d82672f0464d4bdf56fc 100644 (file)
@@ -77,7 +77,7 @@ import com.google.common.util.concurrent.Futures;
  * @author bartosz.michalik@amartus.com
  */
 public class TopologyDataHandler implements DataTreeChangeListener<Node> {
-    private static final Logger log = LoggerFactory.getLogger(TopologyDataHandler.class);
+    private static final Logger LOG = LoggerFactory.getLogger(TopologyDataHandler.class);
     public static final InstanceIdentifier<Topology> NETCONF_TOPO_IID =
             InstanceIdentifier
                     .create(NetworkTopology.class)
@@ -111,7 +111,7 @@ public class TopologyDataHandler implements DataTreeChangeListener<Node> {
     }
 
     public void init() {
-        log.debug("initializing topology handler for {}", DriverConstants.XR_NODE);
+        LOG.debug("initializing topology handler for {}", DriverConstants.XR_NODE);
         ReadWriteTransaction tx = dataBroker.newReadWriteTransaction();
 
         NrpDao dao = new NrpDao(tx);
@@ -120,7 +120,7 @@ public class TopologyDataHandler implements DataTreeChangeListener<Node> {
         Futures.addCallback(tx.submit(), new FutureCallback<Void>() {
             @Override
             public void onSuccess(@Nullable Void result) {
-                log.info("Node {} created", DriverConstants.XR_NODE);
+                LOG.info("Node {} created", DriverConstants.XR_NODE);
                 capabilitiesService = new CapabilitiesService(dataBroker);
                 registerNetconfTreeListener();
 
@@ -128,13 +128,13 @@ public class TopologyDataHandler implements DataTreeChangeListener<Node> {
 
             @Override
             public void onFailure(Throwable t) {
-                log.error("No node created due to the error", t);
+                LOG.error("No node created due to the error", t);
                 try {
                     TimeUnit.SECONDS.sleep(3);
                 } catch (InterruptedException _e) {
 
                 }
-                log.info("retrying initialization of Topology handler for {}", DriverConstants.XR_NODE);
+                LOG.info("retrying initialization of Topology handler for {}", DriverConstants.XR_NODE);
                 init();
             }
         });
@@ -146,7 +146,7 @@ public class TopologyDataHandler implements DataTreeChangeListener<Node> {
 
     public void close() {
         if(registration != null) {
-            log.info("closing netconf tree listener");
+            LOG.info("closing netconf tree listener");
             registration.close();
         }
 
@@ -157,7 +157,7 @@ public class TopologyDataHandler implements DataTreeChangeListener<Node> {
         InstanceIdentifier<Node> nodeId = NETCONF_TOPO_IID.child(Node.class);
 
         registration = dataBroker.registerDataTreeChangeListener(new DataTreeIdentifier<>(LogicalDatastoreType.OPERATIONAL, nodeId), this);
-        log.info("netconf tree listener registered");
+        LOG.info("netconf tree listener registered");
     }
 
 
@@ -178,13 +178,13 @@ public class TopologyDataHandler implements DataTreeChangeListener<Node> {
             onAddedNodes(addedNodes);
         } catch(Exception e) {
             //TODO improve error handling
-            log.error("error while processing new Cisco nodes", e);
+            LOG.error("error while processing new Cisco nodes", e);
         }
     }
 
     private void onAddedNodes(@Nonnull Collection<Node> added) throws ReadFailedException {
         if(added.isEmpty()) return;
-        log.debug("found {} added XR nodes", added.size());
+        LOG.debug("found {} added XR nodes", added.size());
 
         final ReadWriteTransaction topoTx = dataBroker.newReadWriteTransaction();
         NrpDao dao = new NrpDao(topoTx);
@@ -201,7 +201,7 @@ public class TopologyDataHandler implements DataTreeChangeListener<Node> {
                     .build();
             dao.addSip(sip);
             nep = new OwnedNodeEdgePointBuilder(nep).setMappedServiceInterfacePoint(Collections.singletonList(sip.getUuid())).build();
-            log.trace("Adding nep {} to {} node", nep.getUuid(), DriverConstants.XR_NODE);
+            LOG.trace("Adding nep {} to {} node", nep.getUuid(), DriverConstants.XR_NODE);
             dao.updateNep(DriverConstants.XR_NODE, nep);
         });
 
@@ -209,12 +209,12 @@ public class TopologyDataHandler implements DataTreeChangeListener<Node> {
 
             @Override
             public void onSuccess(@Nullable Void result) {
-                log.debug("TAPI node upadate successful");
+                LOG.debug("TAPI node upadate successful");
             }
 
             @Override
             public void onFailure(Throwable t) {
-                log.warn("TAPI node upadate failed due to an error", t);
+                LOG.warn("TAPI node upadate failed due to an error", t);
             }
         });
     }
@@ -236,7 +236,7 @@ public class TopologyDataHandler implements DataTreeChangeListener<Node> {
                 Optional<MountPoint> mountPoint = mountService.getMountPoint(id);
                 if(mountPoint.isPresent()) {
                     DataBroker deviceBroker = mountPoint.get().getService(DataBroker.class).get();
-                    log.debug(deviceBroker.toString());
+                    LOG.debug(deviceBroker.toString());
                     List<OwnedNodeEdgePoint> tps;
                     try(ReadOnlyTransaction tx = deviceBroker.newReadOnlyTransaction()) {
                         tps = ports(tx)
@@ -247,7 +247,7 @@ public class TopologyDataHandler implements DataTreeChangeListener<Node> {
                                 .filter(isNep::test)
                                 .map(i -> {
                                     InterfaceConfigurationKey ikey = i.getKey();
-                                    log.debug("found {} interface", ikey);
+                                    LOG.debug("found {} interface", ikey);
 
                                     Uuid tpId = new Uuid(cn.getNodeId().getValue() + ":" + ikey.getInterfaceName().getValue());
                                     return tpBuilder
@@ -261,11 +261,11 @@ public class TopologyDataHandler implements DataTreeChangeListener<Node> {
                     return tps.stream();
 
                 } else {
-                    log.warn("no mount point for {}", key);
+                    LOG.warn("no mount point for {}", key);
                 }
 
             } catch (Exception e) {
-                log.warn("error while processing " + key, e);
+                LOG.warn("error while processing " + key, e);
             }
             return Stream.empty();
         }).collect(Collectors.toList());
index 79b18353eaa96c4be34a760e7f89d85c4618eddd..204b27e035b222a1e1606507de167d110456f81c 100644 (file)
@@ -47,7 +47,7 @@ import com.google.common.util.concurrent.CheckedFuture;
 @RunWith(PowerMockRunner.class)
 @PrepareForTest(MountPointHelper.class)
 public class L2vpnLocalConnectionActivatorTest extends AbstractDataBrokerTest{
-    private static final Logger log = LoggerFactory.getLogger(L2vpnLocalConnectionActivatorTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(L2vpnLocalConnectionActivatorTest.class);
 
     private L2vpnLocalConnectActivator l2VpnLocalConnectActivator;
     private MountPointService mountService;
@@ -112,7 +112,7 @@ public class L2vpnLocalConnectionActivatorTest extends AbstractDataBrokerTest{
     }
 
     private void activate(){
-        log.debug("activate L2VPN");
+        LOG.debug("activate L2VPN");
         try {
             l2VpnLocalConnectActivator.activate(endPoints,serviceId);
         } catch (TransactionCommitFailedException e) {
index 6e749f2744f055ae966debee87ec04d467c9399d..95adca92c26cf1949387058f07f0af96133be6e3 100644 (file)
@@ -36,7 +36,7 @@ import com.google.common.base.Optional;
 
 public class EdgeAssureActivator implements ResourceActivator {
 
-    private static final Logger log = LoggerFactory.getLogger(EdgeAssureActivator.class);
+    private static final Logger LOG = LoggerFactory.getLogger(EdgeAssureActivator.class);
     private MountPointService mountService;
     DataBroker baseDataBroker;
 
@@ -47,7 +47,7 @@ public class EdgeAssureActivator implements ResourceActivator {
 
     @Override
     public void activate(List<EndPoint> endPoints, String serviceName) throws ResourceNotAvailableException, TransactionCommitFailedException {
-        log.info("Activation called on EdgeAssureActivator");
+        LOG.info("Activation called on EdgeAssureActivator");
         Uuid sip = endPoints.get(0).getEndpoint().getServiceInterfacePoint();
         String nodeName = SipHandler.getDeviceName(sip);
         long evcId = 1;
@@ -66,12 +66,12 @@ public class EdgeAssureActivator implements ResourceActivator {
             WriteTransaction w = netconfDataBroker.newWriteOnlyTransaction();
             w.merge(LogicalDatastoreType.CONFIGURATION, evcConfigId, evcBuilder.build());
         } else {
-            log.error("");
+            LOG.error("");
         }
     }
 
     @Override
     public void deactivate(List<EndPoint> endPoints, String serviceName) throws TransactionCommitFailedException, ResourceNotAvailableException {
-        log.info("Deactivation called on EdgeAssureActivator. Not yet implemented.");
+        LOG.info("Deactivation called on EdgeAssureActivator. Not yet implemented.");
     }
 }
\ No newline at end of file
index dc955e16e9d93517d7324a1b303443c9a8969cf7..22fdf5fbfbaa06ca855f07a8261775baf607b0c4 100644 (file)
@@ -46,7 +46,7 @@ import com.google.common.base.Optional;
  * @author bartosz.michalik@amartus.com
  */
 public class NrpDao  {
-    private static final Logger log = LoggerFactory.getLogger(NrpDao.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NrpDao.class);
     private final ReadWriteTransaction tx;
     private final ReadTransaction rtx;
 
@@ -105,7 +105,7 @@ public class NrpDao  {
                 }
             }
         } catch (ReadFailedException e) {
-            log.error("Cannot read {} with id {}",OwnedNodeEdgePoint.class, nodeId);
+            LOG.error("Cannot read {} with id {}",OwnedNodeEdgePoint.class, nodeId);
         }
     }
 
@@ -127,7 +127,7 @@ public class NrpDao  {
             return rtx.read(LogicalDatastoreType.OPERATIONAL,
                     ctx().child(ServiceInterfacePoint.class, new ServiceInterfacePointKey(universalId))).checkedGet().isPresent();
         } catch (ReadFailedException e) {
-            log.error("Cannot read sip with id {}", universalId.getValue());
+            LOG.error("Cannot read sip with id {}", universalId.getValue());
         }
         return false;
     }
@@ -167,7 +167,7 @@ public class NrpDao  {
         verifyTx();
         if(uuids == null) return ;
         uuids.forEach(sip -> {
-            log.debug("removing ServiceInterfacePoint with id {}", sip);
+            LOG.debug("removing ServiceInterfacePoint with id {}", sip);
             tx.delete(LogicalDatastoreType.OPERATIONAL, ctx().child(ServiceInterfacePoint.class, new ServiceInterfacePointKey(sip)));
         });
     }
@@ -183,7 +183,7 @@ public class NrpDao  {
                     ));
                 }
             } catch (ReadFailedException e) {
-                log.error("Cannot read node with id {}", nodeId);
+                LOG.error("Cannot read node with id {}", nodeId);
             }
         }
 
@@ -208,7 +208,7 @@ public class NrpDao  {
                     ctx().augmentation(org.opendaylight.yang.gen.v1.urn.mef.yang.tapi.connectivity.rev170712.Context1.class))
                     .checkedGet().orNull().getConnectivityService();
         } catch (ReadFailedException e) {
-            log.warn("reading connectivity services failed", e);
+            LOG.warn("reading connectivity services failed", e);
             return null;
         }
     }
@@ -219,7 +219,7 @@ public class NrpDao  {
                     .checkedGet().orNull();
 
         } catch (ReadFailedException e) {
-            log.warn("reading connectivity service failed", e);
+            LOG.warn("reading connectivity service failed", e);
             return null;
         }
     }
@@ -239,7 +239,7 @@ public class NrpDao  {
                     .checkedGet().orNull();
 
         } catch (ReadFailedException e) {
-            log.warn("reading connectivity service failed", e);
+            LOG.warn("reading connectivity service failed", e);
             return null;
         }
     }
index 8b96a10a9347646bcd032a515f2145dfaedc6fe9..0df43b44594b0af785a9867f1eff62725c4c0088 100644 (file)
@@ -43,7 +43,7 @@ import com.google.common.util.concurrent.CheckedFuture;
  * @author bartosz.michalik@amartus.com
  */
 public class NrpInitializer {
-    private static final Logger log = LoggerFactory.getLogger(NrpInitializer.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NrpInitializer.class);
     private final DataBroker dataBroker;
 
 
@@ -59,7 +59,7 @@ public class NrpInitializer {
         Optional<? extends DataObject> context = result.checkedGet();
 
         if(! context.isPresent()) {
-            log.info("initialize Presto NRP context");
+            LOG.info("initialize Presto NRP context");
             Context ctx = new ContextBuilder()
                     .setUuid(new Uuid(PRESTO_CTX))
                     .addAugmentation(org.opendaylight.yang.gen.v1.urn.mef.yang.tapi.topology.rev170712.Context1.class, context())
@@ -68,9 +68,9 @@ public class NrpInitializer {
             tx.put(LogicalDatastoreType.OPERATIONAL, ctxId, ctx);
             try {
                 tx.submit().checkedGet();
-                log.debug("Presto context model created");
+                LOG.debug("Presto context model created");
             } catch (TransactionCommitFailedException e) {
-                log.error("Failed to create presto context model");
+                LOG.error("Failed to create presto context model");
                 throw new IllegalStateException("cannot create presto context", e);
             }
         }
@@ -89,7 +89,7 @@ public class NrpInitializer {
 
     private Topology extTopo() {
         Uuid topoId = new Uuid(PRESTO_EXT_TOPO);
-        log.debug("Adding {}", PRESTO_EXT_TOPO);
+        LOG.debug("Adding {}", PRESTO_EXT_TOPO);
         return new TopologyBuilder()
                 .setLayerProtocolName(Collections.singletonList(Eth.class))
                 .setUuid(topoId)
@@ -111,7 +111,7 @@ public class NrpInitializer {
 
     private Topology systemTopo() {
         Uuid topoId = new Uuid(PRESTO_SYSTEM_TOPO);
-        log.debug("Adding {}", PRESTO_SYSTEM_TOPO);
+        LOG.debug("Adding {}", PRESTO_SYSTEM_TOPO);
         return new TopologyBuilder()
                 .setLayerProtocolName(Collections.singletonList(Eth.class))
                 .setUuid(topoId)
index 8ea3522627b5d2fcfd6819c2acdee184185e0bf3..e6c1d2a9dea682299eeba74336e3c23b33023e03 100644 (file)
@@ -67,7 +67,7 @@ import com.google.common.util.concurrent.Futures;
  * @author bartosz.michalik@amartus.com
  */
 class CreateConnectivityAction implements Callable<RpcResult<CreateConnectivityServiceOutput>> {
-    private static final Logger log = LoggerFactory.getLogger(CreateConnectivityAction.class);
+    private static final Logger LOG = LoggerFactory.getLogger(CreateConnectivityAction.class);
 
     private TapiConnectivityServiceImpl service;
     private final CreateConnectivityServiceInput input;
@@ -83,7 +83,7 @@ class CreateConnectivityAction implements Callable<RpcResult<CreateConnectivityS
 
     @Override
     public RpcResult<CreateConnectivityServiceOutput> call() throws Exception {
-        log.debug("running CreateConnectivityService task");
+        LOG.debug("running CreateConnectivityService task");
 
         try {
             RequestValidator.ValidationResult validationResult = validateInput();
@@ -105,21 +105,21 @@ class CreateConnectivityAction implements Callable<RpcResult<CreateConnectivityS
             if (tx != null) {
                 ActivationTransaction.Result txResult = tx.activate();
                 if (txResult.isSuccessful()) {
-                    log.info("ConnectivityService construct activated successfully, request = {} ", input);
+                    LOG.info("ConnectivityService construct activated successfully, request = {} ", input);
 
                     ConnectivityService service = createConnectivityModel(uniqueStamp);
                     CreateConnectivityServiceOutput result = new CreateConnectivityServiceOutputBuilder()
                             .setService(new ServiceBuilder(service).build()).build();
                     return RpcResultBuilder.success(result).build();
                 } else {
-                    log.warn("CreateConnectivityService failed, reason = {}, request = {}", txResult.getMessage(), input);
+                    LOG.warn("CreateConnectivityService failed, reason = {}, request = {}", txResult.getMessage(), input);
                 }
             }
             throw new IllegalStateException("no transaction created for create connectivity request");
 
 
         } catch (Exception e) {
-            log.warn("Exception in create connectivity service", e);
+            LOG.warn("Exception in create connectivity service", e);
             return RpcResultBuilder
                     .<CreateConnectivityServiceOutput>failed()
                     .withError(ErrorType.APPLICATION, e.getMessage())
@@ -128,7 +128,7 @@ class CreateConnectivityAction implements Callable<RpcResult<CreateConnectivityS
     }
 
     private ActivationTransaction prepareTransaction(String serviceId) throws FailureResult {
-        log.debug("decompose request");
+        LOG.debug("decompose request");
         decomposedRequest = service.getDecomposer().decompose(endpoints, null);
 
         ActivationTransaction tx = new ActivationTransaction();
@@ -139,7 +139,7 @@ class CreateConnectivityAction implements Callable<RpcResult<CreateConnectivityS
                 throw new IllegalStateException(MessageFormat.format("driver {} cannot be created", s.getNodeUuid()));
             }
             driver.get().initialize(s.getEndpoints(), serviceId, null);
-            log.debug("driver {} added to activation transaction", driver.get());
+            LOG.debug("driver {} added to activation transaction", driver.get());
             return driver.get();
         }).forEach(tx::addDriver);
 
@@ -158,7 +158,7 @@ class CreateConnectivityAction implements Callable<RpcResult<CreateConnectivityS
         assert decomposedRequest != null : "this method can be only run after request was successfuly decomposed";
         //sort of unique ;)
 
-        log.debug("Preparing connectivity related model for {}", uniqueStamp);
+        LOG.debug("Preparing connectivity related model for {}", uniqueStamp);
 
         List<Connection> systemConnections = decomposedRequest.stream().map(s -> new ConnectionBuilder()
                 .setUuid(new Uuid("conn:" + s.getNodeUuid().getValue() + ":" + uniqueStamp))
@@ -206,16 +206,16 @@ class CreateConnectivityAction implements Callable<RpcResult<CreateConnectivityS
 
         tx.put(LogicalDatastoreType.OPERATIONAL, TapiConnectivityServiceImpl.connectivityCtx.child(Connection.class, new ConnectionKey(globalConnection.getUuid())), globalConnection);
 
-        log.debug("Storing connectivity related model for {} to operational data store", uniqueStamp);
+        LOG.debug("Storing connectivity related model for {} to operational data store", uniqueStamp);
         Futures.addCallback(tx.submit(), new FutureCallback<Void>() {
             @Override
             public void onSuccess(@Nullable Void result) {
-                log.info("Success with serializing Connections and Connectivity Service for {}", uniqueStamp);
+                LOG.info("Success with serializing Connections and Connectivity Service for {}", uniqueStamp);
             }
 
             @Override
             public void onFailure(Throwable t) {
-                log.error("Error with serializing Connections and Connectivity Service for " + uniqueStamp, t);
+                LOG.error("Error with serializing Connections and Connectivity Service for " + uniqueStamp, t);
             }
         });
 
index bcf98fb7b7a1ab686313d0886cdbf81d6960a61a..8ef75b575282516b95898daf1f0102d38f75cb77 100644 (file)
@@ -48,7 +48,7 @@ import org.slf4j.LoggerFactory;
  * @author bartosz.michalik@amartus.com
  */
 public class DeleteConnectivityAction implements Callable<RpcResult<DeleteConnectivityServiceOutput>> {
-    private static final Logger log = LoggerFactory.getLogger(DeleteConnectivityAction.class);
+    private static final Logger LOG = LoggerFactory.getLogger(DeleteConnectivityAction.class);
 
     private final DeleteConnectivityServiceInput input;
     private final TapiConnectivityServiceImpl service;
@@ -79,7 +79,7 @@ public class DeleteConnectivityAction implements Callable<RpcResult<DeleteConnec
         try {
             data = prepareData(cs, nrpDao);
         } catch(Exception e) {
-            log.info("Service {} does not exists", input.getServiceIdOrName());
+            LOG.info("Service {} does not exists", input.getServiceIdOrName());
             return RpcResultBuilder
                     .<DeleteConnectivityServiceOutput>failed()
                     .withError(RpcError.ErrorType.APPLICATION, MessageFormat.format("error while preparing data for service {0} ", input.getServiceIdOrName()))
@@ -96,19 +96,19 @@ public class DeleteConnectivityAction implements Callable<RpcResult<DeleteConnec
             if (tx != null) {
                 ActivationTransaction.Result txResult = tx.deactivate();
                 if (txResult.isSuccessful()) {
-                    log.info("ConnectivityService construct deactivated successfully, request = {} ", input);
+                    LOG.info("ConnectivityService construct deactivated successfully, request = {} ", input);
                     removeConnectivity();
 
                     DeleteConnectivityServiceOutput result = new DeleteConnectivityServiceOutputBuilder()
                             .setService(new ServiceBuilder(response).build()).build();
                     return RpcResultBuilder.success(result).build();
                 } else {
-                    log.warn("CreateConnectivityService deactivation failed, reason = {}, request = {}", txResult.getMessage(), input);
+                    LOG.warn("CreateConnectivityService deactivation failed, reason = {}, request = {}", txResult.getMessage(), input);
                 }
             }
             throw new IllegalStateException("no transaction created for delete connectivity request");
         } catch(Exception e) {
-            log.warn("Exception in create connectivity service", e);
+            LOG.warn("Exception in create connectivity service", e);
             return RpcResultBuilder
                     .<DeleteConnectivityServiceOutput>failed()
                     .build();
@@ -118,10 +118,10 @@ public class DeleteConnectivityAction implements Callable<RpcResult<DeleteConnec
     private void removeConnectivity() throws TransactionCommitFailedException {
         WriteTransaction tx = service.getBroker().newWriteOnlyTransaction();
         InstanceIdentifier<Context1> conCtx = NrpDao.ctx().augmentation(Context1.class);
-        log.debug("Removing connectivity service {}", serviceId.getValue());
+        LOG.debug("Removing connectivity service {}", serviceId.getValue());
         tx.delete(LogicalDatastoreType.OPERATIONAL, conCtx.child(ConnectivityService.class, new ConnectivityServiceKey(serviceId)));
         connectionIds.forEach(csId -> {
-            log.debug("Removing connection {}", csId.getValue());
+            LOG.debug("Removing connection {}", csId.getValue());
             tx.delete(LogicalDatastoreType.OPERATIONAL, conCtx.child(Connection.class, new ConnectionKey(csId)));
         });
         //TODO should be transactional with operations on deactivation
@@ -137,7 +137,7 @@ public class DeleteConnectivityAction implements Callable<RpcResult<DeleteConnec
                 throw new IllegalStateException(MessageFormat.format("driver {} cannot be created", e.getKey()));
             }
             driver.get().initialize(e.getValue(), serviceId.getValue(), null);
-            log.debug("driver {} added to deactivation transaction", driver.get());
+            LOG.debug("driver {} added to deactivation transaction", driver.get());
             return driver.get();
         }).forEach(tx::addDriver);
         return tx;
index a536d190777126b752458cef440f4cbf9e8aedec..1c5b9bf35a4324a6369b540051b1f628feba543b 100644 (file)
@@ -44,7 +44,7 @@ import org.slf4j.LoggerFactory;
  */
 public class TapiConnectivityServiceImpl implements TapiConnectivityService, AutoCloseable {
 
-    private static final Logger log = LoggerFactory.getLogger(TapiConnectivityServiceImpl.class);
+    private static final Logger LOG = LoggerFactory.getLogger(TapiConnectivityServiceImpl.class);
     private ActivationDriverRepoService driverRepo;
     private RequestDecomposer decomposer;
     private RequestValidator validator;
@@ -64,7 +64,7 @@ public class TapiConnectivityServiceImpl implements TapiConnectivityService, Aut
         Objects.requireNonNull(validator);
         Objects.requireNonNull(broker);
         Objects.requireNonNull(serviceIdPool);
-        log.info("TapiConnectivityService initialized");
+        LOG.info("TapiConnectivityService initialized");
     }
 
     @Override
index 1ae3f26df65ee88d422d4608b89b3e2addcbd415..e9cc07fa4aec81826282653f28bb5f448cf12a7a 100644 (file)
@@ -25,13 +25,13 @@ import org.slf4j.LoggerFactory;
  *
  */
 public class BasicDecomposer implements RequestDecomposer {
-    private static final Logger log = LoggerFactory.getLogger(BasicDecomposer.class);
+    private static final Logger LOG = LoggerFactory.getLogger(BasicDecomposer.class);
 
     private final DataBroker broker;
 
     public BasicDecomposer(DataBroker broker) {
         this.broker = broker;
-        log.trace("basic decomposer initialized");
+        LOG.trace("basic decomposer initialized");
     }
 
     /**
index 737c0b388a403b6e8565ab9adbaaf0198851ac45..37f128b3ed29b0eb79a754f59cc6dbb9ba5b4cb6 100644 (file)
@@ -39,7 +39,7 @@ import org.slf4j.LoggerFactory;
  * @author bartosz.michalik@amartus.com
  */
 public class DecompositionAction {
-    private static final Logger log = LoggerFactory.getLogger(DecompositionAction.class);
+    private static final Logger LOG = LoggerFactory.getLogger(DecompositionAction.class);
     private final List<EndPoint> endpoints;
     private final DataBroker broker;
     private HashMap<Uuid, Vertex> sipToNep = new HashMap<>();
@@ -130,7 +130,7 @@ public class DecompositionAction {
             if(sips == null || sips.isEmpty()) {
                 return  new Vertex(nodeUuid, nep.getUuid(), null);
             }
-            if(sips.size() > 1) log.warn("NodeEdgePoint {} have multiple ServiceInterfacePoint mapped, selecting first one", nep.getUuid());
+            if(sips.size() > 1) LOG.warn("NodeEdgePoint {} have multiple ServiceInterfacePoint mapped, selecting first one", nep.getUuid());
             return new Vertex(nodeUuid, nep.getUuid(), sips.get(0));
 
         });
index d27218165169ad2cd7742c527de4798feed3571c..1c3d4c8bafb6c00dca66eb2d1f88434e97bef9a0 100644 (file)
@@ -46,7 +46,7 @@ import jline.internal.Log;
 
 public class EvcListener extends UnimgrDataTreeChangeListener<Evc> implements IUniAwareService {
 
-    private static final Logger log = LoggerFactory.getLogger(EvcListener.class);
+    private static final Logger LOG = LoggerFactory.getLogger(EvcListener.class);
     private ListenerRegistration<EvcListener> evcListenerRegistration;
     private final IUniPortManager uniPortManager;
     private final UniQosManager uniQosManager;
@@ -67,9 +67,9 @@ public class EvcListener extends UnimgrDataTreeChangeListener<Evc> implements IU
             final DataTreeIdentifier<Evc> dataTreeIid = new DataTreeIdentifier<>(LogicalDatastoreType.CONFIGURATION,
                     MefServicesUtils.getEvcsInstanceIdentifier());
             evcListenerRegistration = dataBroker.registerDataTreeChangeListener(dataTreeIid, this);
-            log.info("EvcDataTreeChangeListener created and registered");
+            LOG.info("EvcDataTreeChangeListener created and registered");
         } catch (final Exception e) {
-            log.error("Evc DataChange listener registration failed !", e);
+            LOG.error("Evc DataChange listener registration failed !", e);
             throw new IllegalStateException("Evc registration Listener failed.", e);
         }
     }
@@ -82,7 +82,7 @@ public class EvcListener extends UnimgrDataTreeChangeListener<Evc> implements IU
     @Override
     public void add(DataTreeModification<Evc> newDataObject) {
         if (newDataObject.getRootPath() != null && newDataObject.getRootNode() != null) {
-            log.info("evc {} created", newDataObject.getRootNode().getIdentifier());
+            LOG.info("evc {} created", newDataObject.getRootNode().getIdentifier());
             addEvc(newDataObject);
         }
     }
@@ -90,7 +90,7 @@ public class EvcListener extends UnimgrDataTreeChangeListener<Evc> implements IU
     @Override
     public void remove(DataTreeModification<Evc> removedDataObject) {
         if (removedDataObject.getRootPath() != null && removedDataObject.getRootNode() != null) {
-            log.info("evc {} deleted", removedDataObject.getRootNode().getIdentifier());
+            LOG.info("evc {} deleted", removedDataObject.getRootNode().getIdentifier());
             removeEvc(removedDataObject);
         }
     }
@@ -98,7 +98,7 @@ public class EvcListener extends UnimgrDataTreeChangeListener<Evc> implements IU
     @Override
     public void update(DataTreeModification<Evc> modifiedDataObject) {
         if (modifiedDataObject.getRootPath() != null && modifiedDataObject.getRootNode() != null) {
-            log.info("evc {} updated", modifiedDataObject.getRootNode().getIdentifier());
+            LOG.info("evc {} updated", modifiedDataObject.getRootNode().getIdentifier());
             updateEvc(modifiedDataObject);
         }
     }
@@ -135,7 +135,7 @@ public class EvcListener extends UnimgrDataTreeChangeListener<Evc> implements IU
                 NetvirtUtils.createElanInstance(dataBroker, instanceName, isEtree, evc.getSegmentationId());
                 evcElan = getOperEvcElan(evcId);
                 if (evcElan == null) {
-                    log.error("Evc {} has not been created as required. Nothing to reconnect", evcId);
+                    LOG.error("Evc {} has not been created as required. Nothing to reconnect", evcId);
                     return;
                 }
             }
@@ -174,7 +174,7 @@ public class EvcListener extends UnimgrDataTreeChangeListener<Evc> implements IU
 
             EvcElan evcElan = getOperEvcElan(evcId);
             if (evcElan == null) {
-                log.error("Evc {} has not been created as required. Nothing to disconnect", evcId);
+                LOG.error("Evc {} has not been created as required. Nothing to disconnect", evcId);
                 return;
             }
 
@@ -199,7 +199,7 @@ public class EvcListener extends UnimgrDataTreeChangeListener<Evc> implements IU
 
                 // Create interfaces
                 if (data.getUnis() == null) {
-                    log.info("No UNI's in service {}, exiting", instanceName);
+                    LOG.info("No UNI's in service {}, exiting", instanceName);
                     return;
                 }
                 for (Uni uni : data.getUnis().getUni()) {
@@ -208,7 +208,7 @@ public class EvcListener extends UnimgrDataTreeChangeListener<Evc> implements IU
                 updateQos(data.getUnis().getUni());
             }
         } catch (final Exception e) {
-            log.error("Add evc failed !", e);
+            LOG.error("Add evc failed !", e);
         }
     }
 
@@ -223,7 +223,7 @@ public class EvcListener extends UnimgrDataTreeChangeListener<Evc> implements IU
                 updateQos(uniToRemove);
                 EvcElan evcElan = getOperEvcElan(evcId);
                 if (evcElan == null) {
-                    log.error("Evc {} has not been created as required. Nothing to remove", data.getEvcId().getValue());
+                    LOG.error("Evc {} has not been created as required. Nothing to remove", data.getEvcId().getValue());
                     return;
                 }
 
@@ -233,12 +233,12 @@ public class EvcListener extends UnimgrDataTreeChangeListener<Evc> implements IU
                     removeUniElanInterfaces(evcId, instanceName, uni);
                 }
 
-                log.info("Removing elan instance: " + instanceName);
+                LOG.info("Removing elan instance: " + instanceName);
                 NetvirtUtils.deleteElanInstance(dataBroker, instanceName);
                 removeOperEvcElan(evcId);
             }
         } catch (final Exception e) {
-            log.error("Remove evc failed !", e);
+            LOG.error("Remove evc failed !", e);
         }
     }
 
@@ -261,7 +261,7 @@ public class EvcListener extends UnimgrDataTreeChangeListener<Evc> implements IU
 
                 String instanceName = original.getEvcId().getValue();
                 boolean isEtree = update.getEvcType() == EvcType.RootedMultipoint;
-                log.info("Updating {} instance: {}", isEtree ? "etree" : "elan", instanceName);
+                LOG.info("Updating {} instance: {}", isEtree ? "etree" : "elan", instanceName);
 
                 // Changed Uni will be deleted / recreated
                 List<Uni> uniToRemove = new ArrayList<>(originalUni);
@@ -284,7 +284,7 @@ public class EvcListener extends UnimgrDataTreeChangeListener<Evc> implements IU
                 updateUnis(uniToUpdate);
             }
         } catch (final Exception e) {
-            log.error("Update evc failed !", e);
+            LOG.error("Update evc failed !", e);
         }
     }
 
@@ -310,11 +310,11 @@ public class EvcListener extends UnimgrDataTreeChangeListener<Evc> implements IU
                 throw new UnsupportedOperationException(errorMessage);
             }
             if (isOperEvcElanPort(evcId, interfaceName)) {
-                log.info("elan interface for elan {} vlan {} interface {} exists already", instanceName, 0,
+                LOG.info("elan interface for elan {} vlan {} interface {} exists already", instanceName, 0,
                         interfaceName);
                 return;
             }
-            log.info("Creting elan interface for elan {} vlan {} interface {}", instanceName, 0, interfaceName);
+            LOG.info("Creting elan interface for elan {} vlan {} interface {}", instanceName, 0, interfaceName);
             NetvirtUtils.createElanInterface(dataBroker, instanceName, interfaceName, roleToInterfaceType(role),
                     isEtree);
             if (uni.isPortSecurityEnabled() && uni.getSecurityGroups() != null && !uni.getSecurityGroups().isEmpty()) {
@@ -336,11 +336,11 @@ public class EvcListener extends UnimgrDataTreeChangeListener<Evc> implements IU
                     throw new UnsupportedOperationException(errorMessage);
                 }
                 if (isOperEvcElanPort(evcId, interfaceName)) {
-                    log.info("elan interface for elan {} vlan {} interface {} exists already", instanceName, 0,
+                    LOG.info("elan interface for elan {} vlan {} interface {} exists already", instanceName, 0,
                             interfaceName);
                     return;
                 }
-                log.info("Creting elan interface for elan {} vlan {} interface {}", instanceName, 0, interfaceName);
+                LOG.info("Creting elan interface for elan {} vlan {} interface {}", instanceName, 0, interfaceName);
                 NetvirtUtils.createElanInterface(dataBroker, instanceName, interfaceName, roleToInterfaceType(role),
                         isEtree);
                 if (uni.isPortSecurityEnabled() && uni.getSecurityGroups() != null && !uni.getSecurityGroups().isEmpty()) {
@@ -364,7 +364,7 @@ public class EvcListener extends UnimgrDataTreeChangeListener<Evc> implements IU
         if (evcUniCeVlan.isEmpty()) {
             String interfaceName = uniPortManager.getUniVlanInterface(uni.getUniId().getValue(), Long.valueOf(0));
             if (interfaceName == null || !isOperEvcElanPort(evcId, interfaceName)) {
-                log.info("elan interface for elan {} vlan {} is not operational, nothing to remove", instanceName, 0,
+                LOG.info("elan interface for elan {} vlan {} is not operational, nothing to remove", instanceName, 0,
                         interfaceName);
                 interfaceName = uniPortManager.getUniVlanInterfaceName(uni.getUniId().getValue(), null);
             }
@@ -374,7 +374,7 @@ public class EvcListener extends UnimgrDataTreeChangeListener<Evc> implements IU
                 Long vlan = safeCastVlan(ceVlan.getVid());
                 String interfaceName = uniPortManager.getUniVlanInterface(uni.getUniId().getValue(), vlan);
                 if (interfaceName == null || !isOperEvcElanPort(evcId, interfaceName)) {
-                    log.info("elan interface for elan {} vlan {} is not operational, nothing to remove", instanceName,
+                    LOG.info("elan interface for elan {} vlan {} is not operational, nothing to remove", instanceName,
                             vlan, interfaceName);
                     interfaceName = uniPortManager.getUniVlanInterfaceName(uni.getUniId().getValue(), vlan);
                 }
@@ -389,13 +389,13 @@ public class EvcListener extends UnimgrDataTreeChangeListener<Evc> implements IU
     }
 
     private void removeElanInterface(InstanceIdentifier<Evc> identifier, String uniId, String interfaceName) {
-        log.info("Removing elan interface: " + interfaceName);
+        LOG.info("Removing elan interface: " + interfaceName);
         uniQosManager.unMapUniPortBandwidthLimits(uniId, interfaceName);
         NetvirtUtils.deleteElanInterface(dataBroker, interfaceName);
 
         EvcElan evcElan = getOperEvcElan(identifier);
         if (evcElan == null) {
-            log.error("Removing non-operational Elan interface {}", interfaceName);
+            LOG.error("Removing non-operational Elan interface {}", interfaceName);
         }
 
         deleteOperEvcElanPort(identifier, interfaceName);
@@ -405,7 +405,7 @@ public class EvcListener extends UnimgrDataTreeChangeListener<Evc> implements IU
     private Long safeCastVlan(Object vid) {
         if (!(vid instanceof Long)) {
             String errorMessage = String.format("vlan id %s cannot be cast to Long", vid);
-            log.error(errorMessage);
+            LOG.error(errorMessage);
             throw new UnsupportedOperationException(errorMessage);
         }
         return (Long) vid;
index be5f97601d55756e9cdce91485c55c9f5f5626af..f2c9099d1bd7791a4934ded69ceca809979494a0 100644 (file)
@@ -47,7 +47,7 @@ public class NodeConnectorListener extends UnimgrDataTreeChangeListener<FlowCapa
 
     private static final String BRIDGE_PREFIX = "br-";
     private static final String TUNNEL_PREFIX = "tun";
-    private static final Logger log = LoggerFactory.getLogger(NodeConnectorListener.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NodeConnectorListener.class);
     private static boolean generateMac = false;
     private final UniPortManager uniPortManager;
     private ListenerRegistration<NodeConnectorListener> nodeConnectorListenerRegistration;
@@ -65,11 +65,11 @@ public class NodeConnectorListener extends UnimgrDataTreeChangeListener<FlowCapa
             final DataTreeIdentifier<FlowCapableNodeConnector> dataTreeIid = new DataTreeIdentifier<>(
                     LogicalDatastoreType.OPERATIONAL, getInstanceIdentifier());
             nodeConnectorListenerRegistration = dataBroker.registerDataTreeChangeListener(dataTreeIid, this);
-            log.info("NodeConnectorListener created and registered");
+            LOG.info("NodeConnectorListener created and registered");
 
             configIntegrationBridge();
         } catch (final Exception e) {
-            log.error("Node connector listener registration failed !", e);
+            LOG.error("Node connector listener registration failed !", e);
             throw new IllegalStateException("Node connector listener registration failed.", e);
         }
     }
@@ -88,7 +88,7 @@ public class NodeConnectorListener extends UnimgrDataTreeChangeListener<FlowCapa
     @Override
     public void add(DataTreeModification<FlowCapableNodeConnector> newDataObject) {
         if (newDataObject.getRootPath() != null && newDataObject.getRootNode() != null) {
-            log.info("node connector {} created", newDataObject.getRootNode().getIdentifier());
+            LOG.info("node connector {} created", newDataObject.getRootNode().getIdentifier());
             addFlowCapableNodeConnector(newDataObject);
         }
     }
@@ -96,7 +96,7 @@ public class NodeConnectorListener extends UnimgrDataTreeChangeListener<FlowCapa
     @Override
     public void remove(DataTreeModification<FlowCapableNodeConnector> removedDataObject) {
         if (removedDataObject.getRootPath() != null && removedDataObject.getRootNode() != null) {
-            log.info("node connector {} deleted", removedDataObject.getRootNode().getIdentifier());
+            LOG.info("node connector {} deleted", removedDataObject.getRootNode().getIdentifier());
             removeFlowCapableNodeConnector(removedDataObject);
         }
     }
@@ -104,7 +104,7 @@ public class NodeConnectorListener extends UnimgrDataTreeChangeListener<FlowCapa
     @Override
     public void update(DataTreeModification<FlowCapableNodeConnector> modifiedDataObject) {
         if (modifiedDataObject.getRootPath() != null && modifiedDataObject.getRootNode() != null) {
-            log.info("node connector {} updated", modifiedDataObject.getRootNode().getIdentifier());
+            LOG.info("node connector {} updated", modifiedDataObject.getRootNode().getIdentifier());
             updateFlowCapableNodeConnector(modifiedDataObject);
         }
     }
@@ -117,7 +117,7 @@ public class NodeConnectorListener extends UnimgrDataTreeChangeListener<FlowCapa
 
             handleNodeConnectorAdded(dataBroker, dpnFromNodeConnectorId, data);
         } catch (final Exception e) {
-            log.error("Add node connector failed !", e);
+            LOG.error("Add node connector failed !", e);
         }
     }
 
@@ -129,7 +129,7 @@ public class NodeConnectorListener extends UnimgrDataTreeChangeListener<FlowCapa
 
             handleNodeConnectorRemoved(dataBroker, dpnFromNodeConnectorId, data);
         } catch (final Exception e) {
-            log.error("Remove node connector failed !", e);
+            LOG.error("Remove node connector failed !", e);
         }
     }
 
@@ -142,7 +142,7 @@ public class NodeConnectorListener extends UnimgrDataTreeChangeListener<FlowCapa
 
             handleNodeConnectorUpdated(dataBroker, dpnFromNodeConnectorId, original, update);
         } catch (final Exception e) {
-            log.error("Update node connector failed !", e);
+            LOG.error("Update node connector failed !", e);
         }
     }
 
@@ -169,13 +169,13 @@ public class NodeConnectorListener extends UnimgrDataTreeChangeListener<FlowCapa
         String uniName = MefInterfaceUtils.getDeviceInterfaceName(dpnId, nodeConnector.getName());
 
         if (shouldFilterOutNodeConnector(uniName)) {
-            log.info("filtered out interface {} with device {}", nodeConnector.getName(), dpnId);
+            LOG.info("filtered out interface {} with device {}", nodeConnector.getName(), dpnId);
             return;
         }
 
         WriteTransaction tx = dataBroker.newWriteOnlyTransaction();
 
-        log.info("Adding mef uni/device interface {} with device {}", nodeConnector.getName(), dpnId);
+        LOG.info("Adding mef uni/device interface {} with device {}", nodeConnector.getName(), dpnId);
 
         InstanceIdentifier<Interface> interfacePath = MefInterfaceUtils.getDeviceInterfaceInstanceIdentifier(dpnId,
                 uniName);
@@ -206,7 +206,7 @@ public class NodeConnectorListener extends UnimgrDataTreeChangeListener<FlowCapa
         try {
             futures.get();
         } catch (InterruptedException | ExecutionException e) {
-            log.error("Error writing to datastore (path, data) : ({}, {}), ({}, {})", interfacePath, deviceInterface,
+            LOG.error("Error writing to datastore (path, data) : ({}, {}), ({}, {})", interfacePath, deviceInterface,
                     uniPath, uni);
             throw new RuntimeException(e.getMessage());
         }
index 1bfc599853c31faade4deb3b9e31dc77a4a1490d..4539af63ea84e8f66afa3390cc5130c13b99daf5 100644 (file)
@@ -40,7 +40,7 @@ import com.google.common.base.Optional;
 
 public class UniPortManager extends UnimgrDataTreeChangeListener<Uni> implements IUniPortManager {
 
-    private static final Logger log = LoggerFactory.getLogger(UniPortManager.class);
+    private static final Logger LOG = LoggerFactory.getLogger(UniPortManager.class);
     private ListenerRegistration<UniPortManager> uniListenerRegistration;
     private static int maxWaitRetries = 3;
     private static long noVlan = 0l;
@@ -56,9 +56,9 @@ public class UniPortManager extends UnimgrDataTreeChangeListener<Uni> implements
             final DataTreeIdentifier<Uni> dataTreeIid = new DataTreeIdentifier<>(LogicalDatastoreType.CONFIGURATION,
                     getInstanceIdentifier());
             uniListenerRegistration = dataBroker.registerDataTreeChangeListener(dataTreeIid, this);
-            log.info("UniPortListener created and registered");
+            LOG.info("UniPortListener created and registered");
         } catch (final Exception e) {
-            log.error("UniPortListener registration failed !", e);
+            LOG.error("UniPortListener registration failed !", e);
             throw new IllegalStateException("UniPortListener registration failed.", e);
         }
     }
@@ -75,7 +75,7 @@ public class UniPortManager extends UnimgrDataTreeChangeListener<Uni> implements
     @Override
     public void add(DataTreeModification<Uni> newDataObject) {
         if (newDataObject.getRootPath() != null && newDataObject.getRootNode() != null) {
-            log.info("uni node {} created", newDataObject.getRootNode().getIdentifier());
+            LOG.info("uni node {} created", newDataObject.getRootNode().getIdentifier());
         }
         Uni confUni = newDataObject.getRootNode().getDataAfter();
         String uniId = confUni.getUniId().getValue();
@@ -91,7 +91,7 @@ public class UniPortManager extends UnimgrDataTreeChangeListener<Uni> implements
     @Override
     public void remove(DataTreeModification<Uni> removedDataObject) {
         if (removedDataObject.getRootPath() != null && removedDataObject.getRootNode() != null) {
-            log.info("uni node {} deleted", removedDataObject.getRootNode().getIdentifier());
+            LOG.info("uni node {} deleted", removedDataObject.getRootNode().getIdentifier());
         }
         Uni confUni = removedDataObject.getRootNode().getDataBefore();
         String uniId = confUni.getUniId().getValue();
@@ -106,7 +106,7 @@ public class UniPortManager extends UnimgrDataTreeChangeListener<Uni> implements
     @Override
     public void update(DataTreeModification<Uni> modifiedDataObject) {
         if (modifiedDataObject.getRootPath() != null && modifiedDataObject.getRootNode() != null) {
-            log.info("node connector {} updated", modifiedDataObject.getRootNode().getIdentifier());
+            LOG.info("node connector {} updated", modifiedDataObject.getRootNode().getIdentifier());
         }
         Uni confUni = modifiedDataObject.getRootNode().getDataAfter();
         String uniId = confUni.getUniId().getValue();
@@ -123,14 +123,14 @@ public class UniPortManager extends UnimgrDataTreeChangeListener<Uni> implements
     public void updateOperUni(String uniId) {
         Uni confUni = MefInterfaceUtils.getUni(dataBroker, uniId, LogicalDatastoreType.CONFIGURATION);
         if (confUni == null) {
-            log.debug("No UNI {} exists, nothing to update");
+            LOG.debug("No UNI {} exists, nothing to update");
             return;
         }
         synchronized (uniId.intern()) {
             if (!checkOperUni(uniId)) {
                 return;
             }
-            log.info("UNI  {} ports updated", uniId);
+            LOG.info("UNI  {} ports updated", uniId);
 
             removeCheckUniPorts(confUni);
             addCheckUniPorts(confUni);
@@ -141,7 +141,7 @@ public class UniPortManager extends UnimgrDataTreeChangeListener<Uni> implements
     public void removeUniPorts(String uniId) {
         Uni confUni = MefInterfaceUtils.getUni(dataBroker, uniId, LogicalDatastoreType.CONFIGURATION);
         if (confUni == null) {
-            log.debug("No UNI {} exists, nothing to update");
+            LOG.debug("No UNI {} exists, nothing to update");
             return;
         }
         synchronized (uniId.intern()) {
@@ -155,7 +155,7 @@ public class UniPortManager extends UnimgrDataTreeChangeListener<Uni> implements
     private boolean checkOperUni(String uniId) {
         Uni operUni = MefInterfaceUtils.getUni(dataBroker, uniId, LogicalDatastoreType.OPERATIONAL);
         if (operUni == null) {
-            log.info("Uni {} is not operational", uniId);
+            LOG.info("Uni {} is not operational", uniId);
             return false;
         }
         return true;
@@ -229,7 +229,7 @@ public class UniPortManager extends UnimgrDataTreeChangeListener<Uni> implements
     }
 
     private VlanToPort addTrunkInterface(String interfaceName, String parentInterfaceName, WriteTransaction tx) {
-        log.info("Adding VLAN trunk {} ParentRef {}", interfaceName, parentInterfaceName);
+        LOG.info("Adding VLAN trunk {} ParentRef {}", interfaceName, parentInterfaceName);
         Interface trunkInterface = NetvirtUtils.createTrunkInterface(interfaceName, parentInterfaceName);
         NetvirtUtils.writeInterface(trunkInterface, tx);
         return createOperTrunkInterfaceMapping(Long.valueOf(0), trunkInterface.getName());
@@ -237,7 +237,7 @@ public class UniPortManager extends UnimgrDataTreeChangeListener<Uni> implements
 
     private VlanToPort addTrunkMemberInterface(String interfaceName, String parentInterfaceName, Long vlan,
             WriteTransaction tx) {
-        log.info("Adding VLAN trunk member {} ParentRef {}", interfaceName, parentInterfaceName);
+        LOG.info("Adding VLAN trunk member {} ParentRef {}", interfaceName, parentInterfaceName);
         Interface trunkInterface = NetvirtUtils.createTrunkMemberInterface(interfaceName, parentInterfaceName,
                 vlan.intValue());
         NetvirtUtils.writeInterface(trunkInterface, tx);
@@ -245,7 +245,7 @@ public class UniPortManager extends UnimgrDataTreeChangeListener<Uni> implements
     }
 
     private VlanToPort removeTrunkInterface(String interfaceName, Long vlan, WriteTransaction tx) {
-        log.info("Delete VLAN trunk {}", interfaceName);
+        LOG.info("Delete VLAN trunk {}", interfaceName);
         NetvirtUtils.deleteInterface(interfaceName, tx);
         return createOperTrunkInterfaceMapping(vlan, interfaceName);
     }
@@ -302,19 +302,19 @@ public class UniPortManager extends UnimgrDataTreeChangeListener<Uni> implements
     @Override
     public void addCeVlan(String uniId, Long vlanId) {
         if (getUniVlanInterfaceNoRetry(uniId, vlanId) != null) {
-            log.debug("UNI {} Port for vlan {} exists already, nothing to update", uniId, vlanId);
+            LOG.debug("UNI {} Port for vlan {} exists already, nothing to update", uniId, vlanId);
             return;
         }
         synchronized (uniId.intern()) {
             Uni confUni = MefInterfaceUtils.getUni(dataBroker, uniId, LogicalDatastoreType.CONFIGURATION);
             if (confUni == null) {
-                log.debug("No UNI {} exists, nothing to update");
+                LOG.debug("No UNI {} exists, nothing to update");
                 return;
             }
             if (!checkOperUni(uniId)) {
                 return;
             }
-            log.info("UNI  {} Vlan {} adding", uniId, vlanId);
+            LOG.info("UNI  {} Vlan {} adding", uniId, vlanId);
             List<CeVlan> ceVlans = confUni.getCeVlans() != null ? confUni.getCeVlans().getCeVlan() : new ArrayList<>();
             CeVlanBuilder ceVlanBuilder = new CeVlanBuilder();
             ceVlanBuilder.setVid(new VlanIdType(vlanId));
@@ -333,19 +333,19 @@ public class UniPortManager extends UnimgrDataTreeChangeListener<Uni> implements
     @Override
     public void removeCeVlan(String uniId, Long vlanId) {
         if (getUniVlanInterfaceNoRetry(uniId, vlanId) == null) {
-            log.debug("No UNI {} Port for vlan {} dosn't exist already, nothing to delete", uniId, vlanId);
+            LOG.debug("No UNI {} Port for vlan {} dosn't exist already, nothing to delete", uniId, vlanId);
             return;
         }
         synchronized (uniId.intern()) {
             Uni confUni = MefInterfaceUtils.getUni(dataBroker, uniId, LogicalDatastoreType.CONFIGURATION);
             if (confUni == null) {
-                log.debug("No UNI {} exists, nothing to update");
+                LOG.debug("No UNI {} exists, nothing to update");
                 return;
             }
             if (!checkOperUni(uniId)) {
                 return;
             }
-            log.info("UNI  {} Vlan {} deleting", uniId, vlanId);
+            LOG.info("UNI  {} Vlan {} deleting", uniId, vlanId);
             UniBuilder uniBuilder = new UniBuilder(confUni);
 
             if (vlanId != null && vlanId != noVlan) {
@@ -386,7 +386,7 @@ public class UniPortManager extends UnimgrDataTreeChangeListener<Uni> implements
     }
 
     private String getUniVlanInterfaceRetry(String uniId, Long vlanId, int retries) {
-        log.trace("Retry {} to wait for uniId {} vlan {} interface", retries, uniId, vlanId);
+        LOG.trace("Retry {} to wait for uniId {} vlan {} interface", retries, uniId, vlanId);
         List<VlanToPort> vlanToPorts = getOperTrunkInterfaces(uniId);
         java.util.Optional<String> toReturn = vlanToPorts.stream()
                 .filter(port -> port.getVlan().getValue().equals(vlanId)).map(port -> port.getVlanPortId()).findFirst();
index 2bc2d471675c6962186565077b5afe761ec081db..0e48ed783a145ec666a65d30414847ad905ea34d 100644 (file)
@@ -26,7 +26,7 @@ import org.slf4j.LoggerFactory;
  * @author bartosz.michalik@amartus.com
  */
 public class TemplateDriver implements ActivationDriverBuilder {
-    private static final Logger log = LoggerFactory.getLogger(TemplateDriver.class);
+    private static final Logger LOG = LoggerFactory.getLogger(TemplateDriver.class);
     @Override
     public Optional<ActivationDriver> driverFor(BuilderContext context) {
         // build a stateful driver
@@ -41,12 +41,12 @@ public class TemplateDriver implements ActivationDriverBuilder {
 
             @Override
             public void commit() {
-                log.info("commit was triggered for {}", serviceId);
+                LOG.info("commit was triggered for {}", serviceId);
             }
 
             @Override
             public void rollback() {
-                log.info("rollback was triggered for {}", serviceId);
+                LOG.info("rollback was triggered for {}", serviceId);
             }
 
             @Override
@@ -57,13 +57,13 @@ public class TemplateDriver implements ActivationDriverBuilder {
             @Override
             public void activate() throws TransactionCommitFailedException, ResourceActivatorException {
                 // method can fail if you wish
-                log.info("activate was triggered for {}", serviceId);
+                LOG.info("activate was triggered for {}", serviceId);
             }
 
             @Override
             public void deactivate() throws TransactionCommitFailedException, ResourceActivatorException {
                 // method can fail if you wish
-                log.info("adectivate was triggered for {}", serviceId);
+                LOG.info("adectivate was triggered for {}", serviceId);
             }
 
             @Override
index 7f816fd602189703c2921bf95da6d0a06d80aa3f..dbec931cc41b20e2c7b067494f15f22759080bf4 100644 (file)
@@ -41,7 +41,7 @@ import org.slf4j.LoggerFactory;
  * @author bartosz.michalik@amartus.com
  */
 public class TopologyDataHandler {
-    private static final Logger log = LoggerFactory.getLogger(TopologyDataHandler.class);
+    private static final Logger LOG = LoggerFactory.getLogger(TopologyDataHandler.class);
     private DataBroker dataBroker;
 
     public TopologyDataHandler(DataBroker dataBroker) {
@@ -50,7 +50,7 @@ public class TopologyDataHandler {
 
     public void init() {
         Objects.requireNonNull(dataBroker);
-        log.info("Starting topology handler");
+        LOG.info("Starting topology handler");
         // this is a static and simplistic topology push to the TAPI system topology
 
         ReadWriteTransaction tx = dataBroker.newReadWriteTransaction();
@@ -79,7 +79,7 @@ public class TopologyDataHandler {
 
             tx.submit().checkedGet();
         } catch (TransactionCommitFailedException e) {
-            log.error("Adding node to system topology has failed", e);
+            LOG.error("Adding node to system topology has failed", e);
         }
 
     }
@@ -124,7 +124,7 @@ public class TopologyDataHandler {
     }
 
     public void close() {
-        log.info("Closing topology handler");
+        LOG.info("Closing topology handler");
     }
 
 }