Change LOG level in PCE 48/99548/12
authorGilles Thouenon <gilles.thouenon@orange.com>
Tue, 1 Feb 2022 17:00:07 +0000 (18:00 +0100)
committermanuedelf <emmanuelle.delfour@orange.com>
Fri, 17 Jun 2022 10:13:22 +0000 (12:13 +0200)
Change most of LOG messages of PCE from Info to Debug level.

JIRA: TRNSPRTPCE-570
Signed-off-by: Gilles Thouenon <gilles.thouenon@orange.com>
Change-Id: I1b2626b605f263ec62c534c453a1d211053c56eb

pce/src/main/java/org/opendaylight/transportpce/pce/constraints/PceConstraints.java
pce/src/main/java/org/opendaylight/transportpce/pce/graph/PceGraph.java
pce/src/main/java/org/opendaylight/transportpce/pce/graph/PostAlgoPathValidator.java
pce/src/main/java/org/opendaylight/transportpce/pce/impl/PceServiceRPCImpl.java
pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/PceCalculation.java
pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/PceLink.java
pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/PceOpticalNode.java
pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/PceOtnNode.java
pce/src/main/java/org/opendaylight/transportpce/pce/service/PathComputationServiceImpl.java

index 22809649ac00dc5af71a391ddaafb8901ec0886e..4b63819f857a6961b96b9616158eec1a63404d16 100644 (file)
@@ -9,6 +9,7 @@ package org.opendaylight.transportpce.pce.constraints;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.StringJoiner;
 import org.opendaylight.transportpce.pce.networkanalyzer.PceOpticalNode;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.PceMetric;
 import org.slf4j.Logger;
@@ -173,6 +174,13 @@ public class PceConstraints {
             return name;
         }
 
+        @Override
+        public String toString() {
+            return new StringJoiner(", ", ResourcePair.class.getSimpleName() + "[", "]")
+                    .add("type=" + type)
+                    .add("name='" + name + "'")
+                    .toString();
+        }
     }
 
     public List<ResourcePair> getListToInclude() {
index a7a45e765709f05028509b5be8c5f3bdf7965cb3..5b59a4c07d19667d9ec000ccfd7aa6c9eca6744b 100644 (file)
@@ -13,6 +13,10 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Map.Entry;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
 import org.jgrapht.GraphPath;
 import org.jgrapht.alg.shortestpath.KShortestSimplePaths;
 import org.jgrapht.alg.shortestpath.PathValidator;
@@ -54,7 +58,7 @@ public class PceGraph {
     private List<PceLink> shortestPathAtoZ = null;
 
     // for path calculation
-    List<GraphPath<String, PceGraphEdge>> allWPaths = null;
+    Map<Integer, GraphPath<String, PceGraphEdge>> allWPaths = null;
 
     private List<PceLink> pathAtoZ = new ArrayList<>();
 
@@ -84,17 +88,21 @@ public class PceGraph {
         populateWithLinks(weightedGraph);
 
         if (!runKgraphs(weightedGraph)) {
-            LOG.info("In calcPath : pceResult {}", pceResult);
+            LOG.error("In calcPath : pceResult {}", pceResult);
             return false;
         }
-
         // validate found paths
         pceResult.setRC(ResponseCodes.RESPONSE_FAILED);
-        for (GraphPath<String, PceGraphEdge> path : allWPaths) {
+        for (Entry<Integer, GraphPath<String, PceGraphEdge>> entry : allWPaths.entrySet()) {
+            GraphPath<String, PceGraphEdge> path = entry.getValue();
+            LOG.info("validating path n° {} - {}", entry.getKey(), path.getVertexList());
             PostAlgoPathValidator papv = new PostAlgoPathValidator();
             pceResult = papv.checkPath(path, allPceNodes, pceResult, pceHardConstraints, serviceType);
-            LOG.info("In calcPath after PostAlgoPathValidator {} {}",
-                    pceResult.getResponseCode(), ResponseCodes.RESPONSE_OK);
+            if (ResponseCodes.RESPONSE_OK.equals(pceResult.getResponseCode())) {
+                LOG.info("Path is validated");
+            } else {
+                LOG.warn("Path not validated - cause: {}", pceResult.getLocalCause());
+            }
 
             if (!pceResult.getResponseCode().equals(ResponseCodes.RESPONSE_OK)) {
                 LOG.warn("In calcPath: post algo validations DROPPED the path {}", path);
@@ -116,7 +124,7 @@ public class PceGraph {
                 case StringConstants.SERVICE_TYPE_OTUC4:
                 case StringConstants.SERVICE_TYPE_400GE:
                 case StringConstants.SERVICE_TYPE_OTU4:
-                    LOG.info(
+                    LOG.debug(
                         "In calcPath Path FOUND path for wl [{}], min Freq assignment {}, max Freq assignment {},"
                         + " hops {}, distance per metrics {}, path AtoZ {}",
                         pceResult.getResultWavelength(), pceResult.getMinFreq(), pceResult.getMaxFreq(),
@@ -124,7 +132,7 @@ public class PceGraph {
                     break;
 
                 default:
-                    LOG.info(
+                    LOG.debug(
                         "In calcPath Path FOUND path for hops {}, distance per metrics {}, path AtoZ {}",
                         pathAtoZ.size(), path.getWeight(), pathAtoZ);
                     break;
@@ -152,7 +160,12 @@ public class PceGraph {
         // KShortestPaths on weightedGraph
         KShortestSimplePaths<String, PceGraphEdge> swp =
             new KShortestSimplePaths<>(weightedGraph, mhopsPerPath, wpv);
-        allWPaths = swp.getPaths(apceNode.getNodeId().getValue(), zpceNode.getNodeId().getValue(), kpathsToBring);
+        List<GraphPath<String, PceGraphEdge>> weightedPathList = swp
+            .getPaths(apceNode.getNodeId().getValue(), zpceNode.getNodeId().getValue(), kpathsToBring);
+        allWPaths = IntStream
+            .range(0, weightedPathList.size())
+            .boxed()
+            .collect(Collectors.toMap(Function.identity(), weightedPathList::get));
 
         if (allWPaths.isEmpty()) {
             LOG.info(" In runKgraphs : algorithm didn't find any path");
@@ -162,10 +175,8 @@ public class PceGraph {
         }
 
         // debug print
-        for (GraphPath<String, PceGraphEdge> path : allWPaths) {
-            LOG.debug("path Weight: {} : {}", path.getWeight(), path.getVertexList());
-        }
-
+        allWPaths
+            .forEach((k, v) -> LOG.info("path n° {} - weight: {} - path: {}", k, v.getWeight(), v.getVertexList()));
         return true;
     }
 
index 960ae3bc1e6e407399d5aa99b40b042e11631d6a..10f781cef1c13ae103622f6146dcc231c59999e7 100644 (file)
@@ -81,17 +81,17 @@ public class PostAlgoPathValidator {
                     return pceResult;
                 }
                 if (spectrumAssignment.getFlexGrid()) {
-                    LOG.info("Spectrum assignment flexgrid mode");
+                    LOG.debug("Spectrum assignment flexgrid mode");
                     pceResult.setResultWavelength(GridConstant.IRRELEVANT_WAVELENGTH_NUMBER);
                 } else {
-                    LOG.info("Spectrum assignment fixedgrid mode");
+                    LOG.debug("Spectrum assignment fixedgrid mode");
                     pceResult.setResultWavelength(
                             GridUtils.getWaveLengthIndexFromSpectrumAssigment(spectrumAssignment.getBeginIndex()
                                 .toJava()));
                 }
                 pceResult.setMinFreq(GridUtils.getStartFrequencyFromIndex(spectrumAssignment.getBeginIndex().toJava()));
                 pceResult.setMaxFreq(GridUtils.getStopFrequencyFromIndex(spectrumAssignment.getStopIndex().toJava()));
-                LOG.info("In PostAlgoPathValidator: spectrum assignment found {} {}", spectrumAssignment, path);
+                LOG.debug("In PostAlgoPathValidator: spectrum assignment found {} {}", spectrumAssignment, path);
 
                 // Check the OSNR
                 if (!checkOSNR(path)) {
@@ -178,7 +178,9 @@ public class PostAlgoPathValidator {
 
     // Check the inclusion if it is defined in the hard constraints
     private boolean checkInclude(GraphPath<String, PceGraphEdge> path, PceConstraints pceHardConstraintsInput) {
-        List<ResourcePair> listToInclude = pceHardConstraintsInput.getListToInclude();
+        List<ResourcePair> listToInclude = pceHardConstraintsInput.getListToInclude()
+            .stream().sorted((rp1, rp2) -> rp1.getName().compareTo(rp2.getName()))
+            .collect(Collectors.toList());
         if (listToInclude.isEmpty()) {
             return true;
         }
@@ -262,7 +264,7 @@ public class PostAlgoPathValidator {
 
     private Map<String, Uint16> chooseTribPort(GraphPath<String,
         PceGraphEdge> path, Map<NodeId, PceNode> allPceNodes, Map<String, List<Uint16>> tribSlotMap, int nbSlot) {
-        LOG.info("In choosetribPort: edgeList = {} ", path.getEdgeList());
+        LOG.debug("In choosetribPort: edgeList = {} ", path.getEdgeList());
         Map<String, Uint16> tribPortMap = new HashMap<>();
 
         for (PceGraphEdge edge : path.getEdgeList()) {
@@ -297,7 +299,7 @@ public class PostAlgoPathValidator {
 
     private Map<String, List<Uint16>> chooseTribSlot(GraphPath<String,
         PceGraphEdge> path, Map<NodeId, PceNode> allPceNodes, int nbSlot) {
-        LOG.info("In choosetribSlot: edgeList = {} ", path.getEdgeList());
+        LOG.debug("In choosetribSlot: edgeList = {} ", path.getEdgeList());
         Map<String, List<Uint16>> tribSlotMap = new HashMap<>();
 
         for (PceGraphEdge edge : path.getEdgeList()) {
@@ -414,15 +416,15 @@ public class PostAlgoPathValidator {
         Arrays.fill(freqMap, (byte) GridConstant.AVAILABLE_SLOT_VALUE);
         BitSet result = BitSet.valueOf(freqMap);
         boolean isFlexGrid = true;
-        LOG.info("Processing path {} with length {}", path, path.getLength());
+        LOG.debug("Processing path {} with length {}", path, path.getLength());
         BitSet pceNodeFreqMap;
         for (PceGraphEdge edge : path.getEdgeList()) {
-            LOG.info("Processing source {} ", edge.link().getSourceId());
+            LOG.debug("Processing source {} ", edge.link().getSourceId());
             if (allPceNodes.containsKey(edge.link().getSourceId())) {
                 PceNode pceNode = allPceNodes.get(edge.link().getSourceId());
-                LOG.info("Processing PCE node {}", pceNode);
+                LOG.debug("Processing PCE node {}", pceNode);
                 if (StringConstants.OPENROADM_DEVICE_VERSION_1_2_1.equals(pceNode.getVersion())) {
-                    LOG.info("Node {}: version is {} and slot width granularity is {} -> fixed grid mode",
+                    LOG.debug("Node {}: version is {} and slot width granularity is {} -> fixed grid mode",
                         pceNode.getNodeId(), pceNode.getVersion(), pceNode.getSlotWidthGranularity());
                     isFlexGrid = false;
                 }
index b0754ce02f99d3f65beaf89150de9afc2b2f5821..7c48710e4526b990cd0990952727cd8bc6ebd525 100644 (file)
@@ -50,6 +50,7 @@ public class PceServiceRPCImpl implements TransportpcePceService {
     public ListenableFuture<RpcResult<PathComputationRequestOutput>>
             pathComputationRequest(PathComputationRequestInput input) {
         LOG.info("RPC path computation request received");
+        LOG.debug("input parameters are : input = {}", input.toString());
         PathComputationRequestOutput output = null;
         try {
             output = this.pathComputationService.pathComputationRequest(input).get();
index a817bec4aaed44050e6d259f0b4288c60f09a309..c916b378c0d7626eb966a082ad07d24537524988 100644 (file)
@@ -112,7 +112,7 @@ public class PceCalculation {
 
     public void retrievePceNetwork() {
 
-        LOG.info("In PceCalculation retrieveNetwork: ");
+        LOG.debug("In PceCalculation retrieveNetwork");
 
         if (!readMdSal()) {
             returnStructure.setRC(ResponseCodes.RESPONSE_FAILED);
@@ -150,7 +150,7 @@ public class PceCalculation {
                     input.getServiceAEnd().getTxDirection().getPort().getPortName())
                 : null);
 
-        LOG.info("parseInput: A and Z :[{}] and [{}]", anodeId, znodeId);
+        LOG.debug("parseInput: A and Z :[{}] and [{}]", anodeId, znodeId);
 
         getAZnodeId();
 
@@ -202,7 +202,7 @@ public class PceCalculation {
             case StringConstants.SERVICE_TYPE_OTUC2:
             case StringConstants.SERVICE_TYPE_OTUC3:
             case StringConstants.SERVICE_TYPE_OTUC4:
-                LOG.info("readMdSal: network {}", NetworkUtils.OVERLAY_NETWORK_ID);
+                LOG.debug("readMdSal: network {}", NetworkUtils.OVERLAY_NETWORK_ID);
                 nwInstanceIdentifier = InstanceIdentifier.builder(Networks.class)
                     .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID))).build();
                 break;
@@ -214,7 +214,7 @@ public class PceCalculation {
             case StringConstants.SERVICE_TYPE_ODUC4:
             case StringConstants.SERVICE_TYPE_10GE:
             case StringConstants.SERVICE_TYPE_1GE:
-                LOG.info("readMdSal: network {}", NetworkUtils.OTN_NETWORK_ID);
+                LOG.debug("readMdSal: network {}", NetworkUtils.OTN_NETWORK_ID);
                 nwInstanceIdentifier = InstanceIdentifier.builder(Networks.class)
                     .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OTN_NETWORK_ID))).build();
                 break;
@@ -384,7 +384,7 @@ public class PceCalculation {
     }
 
     private boolean validateLink(Link link) {
-        LOG.info("validateLink: link {} ", link);
+        LOG.debug("validateLink: link {} ", link);
 
         NodeId sourceId = link.getSource().getSourceNode();
         NodeId destId = link.getDestination().getDestNode();
@@ -433,7 +433,7 @@ public class PceCalculation {
     }
 
     private void validateNode(Node node) {
-        LOG.info("validateNode: node {} ", node);
+        LOG.debug("validateNode: node {} ", node);
         // PceNode will be used in Graph algorithm
         Node1 node1 = node.augmentation(Node1.class);
         if (node1 == null) {
@@ -453,7 +453,7 @@ public class PceCalculation {
             deviceNodeId = node.getNodeId().getValue();
         }
 
-        LOG.info("Device node id {} for {}", deviceNodeId, node);
+        LOG.debug("Device node id {} for {}", deviceNodeId, node);
         PceOpticalNode pceNode = new PceOpticalNode(deviceNodeId, this.serviceType, portMapping, node, nodeType,
             mappingUtils.getOpenRoadmVersion(deviceNodeId), getSlotWidthGranularity(deviceNodeId, node.getNodeId()),
             getCentralFreqGranularity(deviceNodeId, node.getNodeId()));
@@ -461,7 +461,7 @@ public class PceCalculation {
         pceNode.initFrequenciesBitSet();
 
         if (!pceNode.isValid()) {
-            LOG.warn(" validateNode: Node is ignored");
+            LOG.debug(" validateNode: Node {} is ignored", node.getNodeId().getValue());
             return;
         }
         if (validateNodeConstraints(pceNode).equals(ConstraintTypes.HARD_EXCLUDE)) {
@@ -577,11 +577,11 @@ public class PceCalculation {
             return ConstraintTypes.NONE;
         }
         if (pceHardConstraints.getExcludeSupNodes().contains(pcenode.getSupNetworkNodeId())) {
-            LOG.info("validateNodeConstraints: {}", pcenode.getNodeId().getValue());
+            LOG.debug("validateNodeConstraints: {}", pcenode.getNodeId().getValue());
             return ConstraintTypes.HARD_EXCLUDE;
         }
         if (pceHardConstraints.getExcludeCLLI().contains(pcenode.getSupClliNodeId())) {
-            LOG.info("validateNodeConstraints: {}", pcenode.getNodeId().getValue());
+            LOG.debug("validateNodeConstraints: {}", pcenode.getNodeId().getValue());
             return ConstraintTypes.HARD_EXCLUDE;
         }
         return ConstraintTypes.NONE;
@@ -600,7 +600,7 @@ public class PceCalculation {
         List<Long> constraints = new ArrayList<>(pceHardConstraints.getExcludeSRLG());
         constraints.retainAll(link.getsrlgList());
         if (!constraints.isEmpty()) {
-            LOG.info("validateLinkConstraints: {}", link.getLinkId().getValue());
+            LOG.debug("validateLinkConstraints: {}", link.getLinkId().getValue());
             return ConstraintTypes.HARD_EXCLUDE;
         }
 
@@ -627,7 +627,7 @@ public class PceCalculation {
                 pceNode.initXndrTps(input.getServiceAEnd().getServiceFormat());
                 break;
             default:
-                LOG.warn("endPceNode: Node {} is not SRG or XPONDER !", nodeId);
+                LOG.debug("endPceNode: Node {} is not SRG or XPONDER !", nodeId);
                 return false;
         }
 
@@ -736,7 +736,7 @@ public class PceCalculation {
                 }
                 allPceLinks.put(linkId, pceOtnLink);
                 source.addOutgoingLink(pceOtnLink);
-                LOG.info("validateLink: OTN-LINK added to allPceLinks {}", pceOtnLink);
+                LOG.debug("validateLink: OTN-LINK added to allPceLinks {}", pceOtnLink);
                 break;
             default:
                 LOG.warn("validateLink: link type is not supported {}", pceOtnLink);
@@ -770,7 +770,7 @@ public class PceCalculation {
 
     private static void printNodesInfo(Map<NodeId, PceNode> allPceNodes) {
         allPceNodes.forEach(((nodeId, pceNode) -> {
-            LOG.info("In printNodes in node {} : outgoing links {} ", pceNode.getNodeId().getValue(),
+            LOG.debug("In printNodes in node {} : outgoing links {} ", pceNode.getNodeId().getValue(),
                     pceNode.getOutgoingLinks());
         }));
     }
index 56aaddf50df789c2ee6b63a96565704ad5415749..7eb06d8cbd3e463d7aac79a772a51c88233c6a20 100644 (file)
@@ -75,7 +75,7 @@ public class PceLink implements Serializable {
     private static final double LOWER_BOUND_OSNR = 0.1;
 
     public PceLink(Link link, PceNode source, PceNode dest) {
-        LOG.info("PceLink: : PceLink start ");
+        LOG.debug("PceLink: : PceLink start ");
 
         this.linkId = link.getLinkId();
 
@@ -153,7 +153,7 @@ public class PceLink implements Serializable {
                 return 1L;
             }
             tmp += entry.getValue().getSRLGLength().doubleValue() / CELERITY;
-            LOG.info("In PceLink: The latency of link {} == {}", link.getLinkId(), tmp);
+            LOG.debug("In PceLink: The latency of link {} == {}", link.getLinkId(), tmp);
         }
         return (long) Math.ceil(tmp);
     }
@@ -390,7 +390,7 @@ public class PceLink implements Serializable {
 
         if ((this.availableBandwidth >= neededBW)
             && ((neededType == null) || (neededType.equals(otnLinkType)))) {
-            LOG.info("PceLink: Selected Link {} has available bandwidth and is eligible for {} creation ",
+            LOG.debug("PceLink: Selected Link {} has available bandwidth and is eligible for {} creation ",
                 linkId, serviceType);
         }
 
index c472622934d1036674b3acf0a27a3712cd60f58f..74e70c7806f4942f44c8f4f84c05295f4ea5be9b 100644 (file)
@@ -101,7 +101,7 @@ public class PceOpticalNode implements PceNode {
         if (!isValid()) {
             return;
         }
-        LOG.info("initSrgTpList: getting SRG tps from ROADM node {}", this.nodeId);
+        LOG.debug("initSrgTpList: getting SRG tps from ROADM node {}", this.nodeId);
         org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1 nodeTp =
                 this.node.augmentation(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang
                     .ietf.network.topology.rev180226.Node1.class);
@@ -119,26 +119,26 @@ public class PceOpticalNode implements PceNode {
                 .augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev211210
                         .TerminationPoint1.class);
             OpenroadmTpType type = cntp1.getTpType();
-            LOG.info("type = {} for tp {}", type.getName(), tp);
+            LOG.debug("type = {} for tp {}", type.getName(), tp);
 
             switch (type) {
                 case SRGTXRXCP:
                 case SRGRXCP:
                 case SRGTXCP:
                     if (State.InService.equals(cntp1.getOperationalState())) {
-                        LOG.info("initSrgTpList: adding SRG-CP tp = {} ", tp.getTpId().getValue());
+                        LOG.debug("initSrgTpList: adding SRG-CP tp = {} ", tp.getTpId().getValue());
                         this.availableSrgCp.put(tp.getTpId().getValue(), cntp1.getTpType());
                     }
                     break;
                 case SRGRXPP:
                 case SRGTXPP:
                 case SRGTXRXPP:
-                    LOG.info("initSrgTpList: SRG-PP tp = {} found", tp.getTpId().getValue());
+                    LOG.debug("initSrgTpList: SRG-PP tp = {} found", tp.getTpId().getValue());
                     if (isTerminationPointAvailable(nttp1)) {
-                        LOG.info("initSrgTpList: adding SRG-PP tp '{}'", tp.getTpId().getValue());
+                        LOG.debug("initSrgTpList: adding SRG-PP tp '{}'", tp.getTpId().getValue());
                         this.availableSrgPp.put(tp.getTpId().getValue(), cntp1.getTpType());
                         if (State.InService.equals(cntp1.getOperationalState())) {
-                            LOG.info("initSrgTpList: adding SRG-PP tp '{}'", tp.getTpId().getValue());
+                            LOG.debug("initSrgTpList: adding SRG-PP tp '{}'", tp.getTpId().getValue());
                             this.availableSrgPp.put(tp.getTpId().getValue(), cntp1.getTpType());
                         }
                     } else {
@@ -154,7 +154,7 @@ public class PceOpticalNode implements PceNode {
             this.valid = false;
             return;
         }
-        LOG.info("initSrgTpList: availableSrgPp size = {} && availableSrgCp size = {} in {}",
+        LOG.debug("initSrgTpList: availableSrgPp size = {} && availableSrgCp size = {} in {}",
             this.availableSrgPp.size(), this.availableSrgCp.size(), this);
     }
 
@@ -252,7 +252,7 @@ public class PceOpticalNode implements PceNode {
     }
 
     public void initXndrTps(ServiceFormat serviceFormat) {
-        LOG.info("PceNod: initXndrTps for node : {}", this.nodeId);
+        LOG.debug("PceNod: initXndrTps for node : {}", this.nodeId);
         if (!isValid()) {
             return;
         }
@@ -271,7 +271,7 @@ public class PceOpticalNode implements PceNode {
             .node.TerminationPoint tp : allTps) {
             TerminationPoint1 cntp1 = tp.augmentation(TerminationPoint1.class);
             if (cntp1.getTpType() != OpenroadmTpType.XPONDERNETWORK) {
-                LOG.warn("initXndrTps: {} is not an Xponder network port", cntp1.getTpType().getName());
+                LOG.debug("initXndrTps: {} is not an Xponder network port", cntp1.getTpType().getName());
                 continue;
             }
             if (!isTpWithGoodCapabilities(tp)) {
@@ -288,7 +288,7 @@ public class PceOpticalNode implements PceNode {
                 .TerminationPoint1.class);
             if (nttp1 != null && nttp1.getXpdrNetworkAttributes().getWavelength() != null) {
                 this.usedXpndrNWTps.add(tp.getTpId().getValue());
-                LOG.info("initXndrTps: XPONDER tp = {} is used", tp.getTpId().getValue());
+                LOG.debug("initXndrTps: XPONDER tp = {} is used", tp.getTpId().getValue());
             } else {
                 this.valid = true;
             }
@@ -314,7 +314,7 @@ public class PceOpticalNode implements PceNode {
 
     @Override
     public String getRdmSrgClient(String tp, String direction) {
-        LOG.info("getRdmSrgClient: Getting PP client for tp '{}' on node : {}", tp, this.nodeId);
+        LOG.debug("getRdmSrgClient: Getting PP client for tp '{}' on node : {}", tp, this.nodeId);
         OpenroadmTpType srgType = null;
         OpenroadmTpType cpType = this.availableSrgCp.get(tp);
         if (cpType == null) {
@@ -323,7 +323,7 @@ public class PceOpticalNode implements PceNode {
         }
         switch (cpType) {
             case SRGTXRXCP:
-                LOG.info("getRdmSrgClient: Getting BI Directional PP port ...");
+                LOG.debug("getRdmSrgClient: Getting BI Directional PP port ...");
                 // Take the first-element in the available PP key set
                 if (availableSrgPp.entrySet().iterator().next().getKey()
                         // and check if the port is bidirectional
@@ -336,17 +336,17 @@ public class PceOpticalNode implements PceNode {
                 }
                 break;
             case SRGTXCP:
-                LOG.info("getRdmSrgClient: Getting UNI Rx PP port ...");
+                LOG.debug("getRdmSrgClient: Getting UNI Rx PP port ...");
                 srgType = OpenroadmTpType.SRGRXPP;
                 break;
             case SRGRXCP:
-                LOG.info("getRdmSrgClient: Getting UNI Tx PP port ...");
+                LOG.debug("getRdmSrgClient: Getting UNI Tx PP port ...");
                 srgType = OpenroadmTpType.SRGTXPP;
                 break;
             default:
                 break;
         }
-        LOG.info("getRdmSrgClient:  Getting client PP for CP '{}'", tp);
+        LOG.debug("getRdmSrgClient:  Getting client PP for CP '{}'", tp);
         if (!this.availableSrgPp.isEmpty()) {
             Optional<String> client = null;
             final OpenroadmTpType openType = srgType;
@@ -359,7 +359,7 @@ public class PceOpticalNode implements PceNode {
                 LOG.error("getRdmSrgClient: ROADM {} doesn't have PP Client for CP {}", this, tp);
                 return null;
             }
-            LOG.info("getRdmSrgClient: client PP {} for CP {} found !", client, tp);
+            LOG.debug("getRdmSrgClient: client PP {} for CP {} found !", client, tp);
             return client.get();
         } else {
             LOG.error("getRdmSrgClient: SRG TerminationPoint PP list is not available for node {}", this);
index 80b345e2554fe23f7cce9fd788baf34ae8237d67..f4f40a394322b6abb34e78f02d9542ad53c5c34e 100644 (file)
@@ -146,7 +146,7 @@ public class PceOtnNode implements PceNode {
     }
 
     public void initXndrTps(String mode) {
-        LOG.info("PceOtnNode: initXndrTps for node {}", this.nodeId.getValue());
+        LOG.debug("PceOtnNode: initXndrTps for node {}", this.nodeId.getValue());
         this.availableXponderTp.clear();
         this.modeType = mode;
         List<TerminationPoint> allTps =
@@ -180,7 +180,7 @@ public class PceOtnNode implements PceNode {
                 case XPONDERNETWORK:
                     String notCreatedServiceType = xpdrNetTpCreation(ontTp1);
                     if (notCreatedServiceType == null) {
-                        LOG.info("TP {} of XPONDER {} is validated",
+                        LOG.debug("TP {} of XPONDER {} is validated",
                             tp.getTpId().getValue(),
                             node.getNodeId().getValue());
                         this.availableXpdrNWTps.add(tp.getTpId());
@@ -196,7 +196,7 @@ public class PceOtnNode implements PceNode {
                         continue;
                     }
                     if (checkClientTp(ontTp1)) {
-                        LOG.info("TP {} of XPONDER {} is validated",
+                        LOG.debug("TP {} of XPONDER {} is validated",
                             tp.getTpId(),
                             node.getNodeId().getValue());
                         this.availableXpdrClientTps.add(tp.getTpId());
@@ -316,7 +316,7 @@ public class PceOtnNode implements PceNode {
     private boolean checkTpForOdtuTermination(TerminationPoint1 ontTp1) {
         for (SupportedInterfaceCapability sic :
                 ontTp1.getTpSupportedInterfaces().getSupportedInterfaceCapability().values()) {
-            LOG.info("in checkTpForOduTermination - sic = {}", sic.getIfCapType());
+            LOG.debug("in checkTpForOduTermination - sic = {}", sic.getIfCapType());
             if ((sic.getIfCapType().equals(IfOCHOTU4ODU4.class)
                     || sic.getIfCapType().equals(IfOtsiOtsigroup.class))
                     && (ontTp1.getXpdrTpPortConnectionAttributes() == null
@@ -367,7 +367,7 @@ public class PceOtnNode implements PceNode {
         } else if (OpenroadmNodeType.SWITCH.equals(this.nodeType)) {
             initXndrTps(INTERMEDIATE_MODETYPE);
         } else {
-            LOG.info("validateAZxponder: XPONDER is ignored == {}", nodeId.getValue());
+            LOG.warn("validateAZxponder: XPONDER is ignored == {}", nodeId.getValue());
             valid = false;
         }
     }
@@ -406,7 +406,7 @@ public class PceOtnNode implements PceNode {
         // Validate switch for use as an intermediate XPONDER on the path
         initXndrTps(INTERMEDIATE_MODETYPE);
         if (this.valid) {
-            LOG.info("validateIntermediateSwitch: Switch usable for transit == {}", nodeId.getValue());
+            LOG.debug("validateIntermediateSwitch: Switch usable for transit == {}", nodeId.getValue());
         } else {
             LOG.debug("validateIntermediateSwitch: Switch unusable for transit == {}", nodeId.getValue());
         }
index a3a954d7bd810ee992d27e8ecd36adfc408cac10..dfc614a6cbbb03d2a556c47a6f551282dca9e5a9 100644 (file)
@@ -145,7 +145,7 @@ public class PathComputationServiceImpl implements PathComputationService {
 
     @Override
     public ListenableFuture<PathComputationRequestOutput> pathComputationRequest(PathComputationRequestInput input) {
-        LOG.info("pathComputationRequest");
+        LOG.debug("input parameters are : input = {}", input.toString());
         return executor.submit(new Callable<PathComputationRequestOutput>() {
 
             @Override