Add Supported OM to PortMapping.yang
[transportpce.git] / common / src / main / java / org / opendaylight / transportpce / common / mapping / PortMapping.java
index 425e5a6b8c62ed8c263bd0495af4f1c060b99124..e5a9b66747b93d4f85c6022d1ff834e78396e828 100644 (file)
@@ -11,9 +11,9 @@ package org.opendaylight.transportpce.common.mapping;
 
 import java.util.List;
 import java.util.Map;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.mapping.Mapping;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.mc.capabilities.McCapabilities;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.network.Nodes;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev231221.mapping.Mapping;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev231221.mc.capabilities.McCapabilities;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev231221.network.Nodes;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.org.openroadm.device.container.org.openroadm.device.OduSwitchingPools;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.org.openroadm.device.container.org.openroadm.device.odu.switching.pools.non.blocking.list.PortList;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
@@ -24,6 +24,8 @@ public interface PortMapping {
 
     PortMappingVersion221 getPortMappingVersion221();
 
+    PortMappingVersion710 getPortMappingVersion710();
+
     /**
      * This method creates logical to physical port mapping for a given device.
      * Instead of parsing all the circuit packs/ports in the device, this methods
@@ -107,6 +109,30 @@ public interface PortMapping {
      */
     Mapping getMapping(String nodeId, String circuitPackName, String portName);
 
+    /**
+     * This method for a given node's termination point returns the Mapping object
+     * based on portmapping.yang model stored in the MD-SAL data store which is
+     * created when the node is connected for the first time. The mapping object
+     * basically contains the following attributes of interest:
+     *
+     * <p>
+     * 1. Supporting circuit pack
+     *
+     * <p>
+     * 2. Supporting port
+     *
+     * <p>
+     * 3. Supporting OTS/OMS interface (if port on ROADM)
+     *
+     * @param nodeId
+     *            Unique Identifier for the node of interest.
+     * @param interfName
+     *            Name of the OTS interface
+     *
+     * @return Result Mapping object if success otherwise null.
+     */
+    Mapping getMappingFromOtsInterface(String nodeId, String interfName);
+
     /**
      * This method removes a given mapping data from the mapping list
      * stored in the datastore while the Netconf device is already