Add node-info in portmapping structure
[transportpce.git] / common / src / main / java / org / opendaylight / transportpce / common / mapping / PortMapping.java
index a636105c4bda082b50ee2d617ee88dae1c682c5b..4b2eddeecb35fee5bb63f296e77f9107c1a1cebe 100644 (file)
@@ -8,7 +8,8 @@
 
 package org.opendaylight.transportpce.common.mapping;
 
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.network.nodes.Mapping;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev190702.network.Nodes;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev190702.network.nodes.Mapping;
 
 public interface PortMapping {
 
@@ -38,10 +39,12 @@ public interface PortMapping {
      *
      * @param nodeId
      *            node ID
+     * @param nodeVersion
+     *            node version
      *
      * @return true/false based on status of operation
      */
-    boolean createMappingData(String nodeId);
+    boolean createMappingData(String nodeId, String nodeVersion);
 
     /**
      * This method removes mapping data from the datastore after disconnecting
@@ -78,4 +81,18 @@ public interface PortMapping {
     Mapping getMapping(String nodeId, String logicalConnPoint);
 
     boolean updateMapping(String nodeId, Mapping mapping);
+
+    /**
+     * Returns all Mapping informations for a given ordm device.
+     * This method returns all Mapping informations already stored in the MD-SAL
+     * data store for a given openroadm device. Beyound the list of mappings, it
+     * gives access to general node information as its version or its node type,
+     * etc.
+     *
+     * @param nodeId
+     *            Unique Identifier for the node of interest.
+     *
+     * @return node data if success otherwise null.
+     */
+    Nodes getNode(String nodeId);
 }