Fix circuit-pack equipment state on XPDR
[transportpce.git] / common / src / main / java / org / opendaylight / transportpce / common / mapping / PortMapping.java
index 5ddbe0109378d5d5954c5b56cb6e2d9bc44fcc14..a213fd795e7722cd20e41a2af3beab6deb5320b5 100644 (file)
@@ -36,15 +36,27 @@ public interface PortMapping {
      * successful the mapping gets stored in datastore corresponding to
      * portmapping.yang data model.
      *
+     * @param nodeId
+     *            node ID
+     *
      * @return true/false based on status of operation
      */
     boolean createMappingData(String nodeId);
 
     /**
-     * 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:
+     * This method removes mapping data from the datastore after disconnecting
+     * ODL from a Netconf device.
+     *
+     * @param nodeId
+     *            node ID
+     */
+    void deleteMappingData(String nodeId);
+
+    /**
+     * 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
@@ -53,13 +65,17 @@ public interface PortMapping {
      * 2. Supporting port
      *
      * <p>
-     * 3. Supporting OMS interface (if port on ROADM) 4. Supporting OTS interface (if port on ROADM)
+     * 3. Supporting OMS interface (if port on ROADM) 4. Supporting OTS
+     * interface (if port on ROADM)
      *
-     * @param nodeId Unique Identifier for the node of interest.
-     * @param logicalConnPoint Name of the logical point
+     * @param nodeId
+     *            Unique Identifier for the node of interest.
+     * @param logicalConnPoint
+     *            Name of the logical point
      *
      * @return Result Mapping object if success otherwise null.
      */
-
     Mapping getMapping(String nodeId, String logicalConnPoint);
+
+    boolean updateMapping(String nodeId, Mapping mapping);
 }