Adapt PCE code for OTN services
[transportpce.git] / pce / src / main / java / org / opendaylight / transportpce / pce / constraints / PceConstraints.java
index 5b79cb9a9fef98f8315ef079deaf710d162e507c..cc05a3747d4803a97a417c6a5727bac25026c741 100644 (file)
@@ -10,7 +10,7 @@ package org.opendaylight.transportpce.pce.constraints;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.opendaylight.transportpce.pce.networkanalyzer.PceNode;
+import org.opendaylight.transportpce.pce.networkanalyzer.PceOpticalNode;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.RoutingConstraintsSp;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -24,7 +24,7 @@ public class PceConstraints {
     private RoutingConstraintsSp.PceMetric pceMetrics = RoutingConstraintsSp.PceMetric.HopCount;
     private Long maxLatency = (long) -1;
 
-    /////////////// EXCLUDE ///////////////////
+    // Structure related to  EXCLUDE constraints
     // Nodes/CLLI/SRLG lists might consist of two types of elements : (1)from diversity constraints (2)from exclude list
     // e.g.: nodesToExclude - topo-level nodes IDs - comes from diversity constraints
     //     : supNodesToExclude - supporting nodes IDs - comes from exclude list
@@ -37,16 +37,12 @@ public class PceConstraints {
 
     private List<String> clliToExclude = new ArrayList<String>();
     private List<String> clliNodesToExclude = new ArrayList<String>();
-    private List<String> nodesToInclude = new ArrayList<String>();
-    private List<PceNode> pceNodesToInclude = new ArrayList<PceNode>();
-
-    public static final Long CONST_OSNR = 1L;
-    private double maxOSNR = (CONST_OSNR / (Math.pow(10, (24 / 10.0))));
 
-    /**.
-     * /////////////// INCLUDE CONSTRAINTS.///////////////////
-     */
+    ///Structures related to INCLUDE constraints
+    private List<String> nodesToInclude = new ArrayList<String>();
+    private List<PceOpticalNode> pceNodesToInclude = new ArrayList<PceOpticalNode>();
     private List<ResourcePair> listToInclude = new ArrayList<ResourcePair>();
+
     private List<String> srlgNames = new ArrayList<String>();
 
     public enum ResourceType {
@@ -149,21 +145,16 @@ public class PceConstraints {
         nodesToInclude.addAll(nodes);
     }
 
-    public List<PceNode> getIncludePceNodes() {
+    public List<PceOpticalNode> getIncludePceNodes() {
         LOG.debug("in Pceconstraints getIncludePceNodes size = {}", pceNodesToInclude.size());
         return pceNodesToInclude;
     }
 
-    public void setIncludePceNode(PceNode node) {
+    public void setIncludePceNode(PceOpticalNode node) {
         LOG.info("in Pceconstraints setIncludePceNode new node = {}", node.toString());
         this.pceNodesToInclude.add(node);
     }
 
-    public Double getMaxOSNR() {
-        LOG.debug("in Pceconstraints getMaxOSNR = {}", maxOSNR);
-        return maxOSNR;
-    }
-
     public class ResourcePair {
         public ResourcePair(ResourceType type, String name) {
             super();