PCE modification in order to prepare flexgrid
[transportpce.git] / pce / src / main / java / org / opendaylight / transportpce / pce / networkanalyzer / PceOpticalNode.java
index ebb8767481499bc45ff11dfc5468ca099a60ce43..4afbf70f69ff3b9abb696427bc89815ac38aea1e 100644 (file)
@@ -45,14 +45,16 @@ public class PceOpticalNode implements PceNode {
     private List<PceLink> outgoingLinks = new ArrayList<>();
     private Map<String, String> clientPerNwTp = new HashMap<>();
     private final AvailFreqMapsKey freqMapKey = new AvailFreqMapsKey(GridConstant.C_BAND);
+    private String version;
 
-    public PceOpticalNode(Node node, OpenroadmNodeType nodeType) {
-        if (node != null && node.getNodeId() != null && nodeType != null) {
+    public PceOpticalNode(Node node, OpenroadmNodeType nodeType, String version) {
+        if (node != null && node.getNodeId() != null && nodeType != null && version != null) {
             this.node = node;
             this.nodeId = node.getNodeId();
             this.nodeType = nodeType;
+            this.version = version;
         } else {
-            LOG.error("PceNode: one of parameters is not populated : nodeId, node type");
+            LOG.error("PceNode: one of parameters is not populated : nodeId, node type, version");
             this.valid = false;
         }
     }
@@ -368,4 +370,14 @@ public class PceOpticalNode implements PceNode {
             wlIndex++;
         }
     }
+
+    /*
+    * (non-Javadoc)
+    *
+    * @see org.opendaylight.transportpce.pce.networkanalyzer.PceNode#getVersion()
+    */
+    @Override
+    public String getVersion() {
+        return this.version;
+    }
 }