upgrade portmapping YANG to introduce OTN
[transportpce.git] / common / src / main / java / org / opendaylight / transportpce / common / mapping / PortMapping.java
index a213fd795e7722cd20e41a2af3beab6deb5320b5..9ae8e9c8b6d759f047e6cedea66fc87e1e8bc3ca 100644 (file)
@@ -8,7 +8,8 @@
 
 package org.opendaylight.transportpce.common.mapping;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.nodes.Mapping;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev200113.network.Nodes;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev200113.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);
 }