Bump upstream dependencies to K-SR2
[transportpce.git] / networkmodel / src / main / java / org / opendaylight / transportpce / networkmodel / service / NetworkModelService.java
index c3606ed2b284df24eb155e31360d655d783e9790..d89004a789983a28fff2f41dad59cf2cff4b11fd 100644 (file)
@@ -7,10 +7,11 @@
  */
 package org.opendaylight.transportpce.networkmodel.service;
 
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev210426.mapping.Mapping;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210618.renderer.rpc.result.sp.Link;
-import org.opendaylight.yang.gen.v1.http.transportpce.topology.rev210511.OtnLinkType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNodeConnectionStatus;
+import java.util.List;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev220630.OtnLinkType;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220922.mapping.Mapping;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.renderer.rpc.result.sp.Link;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.device.rev240118.ConnectionOper.ConnectionStatus;
 import org.opendaylight.yangtools.yang.common.Uint32;
 
 /**
@@ -29,13 +30,14 @@ public interface NetworkModelService {
     void createOpenRoadmNode(String nodeId, String nodeVersion);
 
     /**
-     * Delete OpenROADM node mapping and topologies.
+     * Delete OpenROADM node from portmapping and topologies.
      *
      * @param nodeId
      *     unique node ID of OpenROADM node.
      *
+     * @return result of node deletion from portmapping and topologies
      */
-    void deleteOpenRoadmnode(String nodeId);
+    boolean deleteOpenRoadmnode(String nodeId);
 
     /**
      * Update termination point, and if need, be associated links, of
@@ -57,54 +59,74 @@ public interface NetworkModelService {
      * @param connectionStatus
      *     connection status of the node
      */
-    void setOpenRoadmNodeStatus(String nodeId, NetconfNodeConnectionStatus.ConnectionStatus connectionStatus);
+    void setOpenRoadmNodeStatus(String nodeId, ConnectionStatus connectionStatus);
 
     /**
      * create new otn link in otn-topology.
      *
-     * @param nodeA
-     *     OpenROADM node ID for link termination point A
-     * @param tpA
-     *     OpenROADM tp id on nodeA for link termination point A
-     * @param nodeZ
-     *     OpenROADM node ID for link termination point Z
-     * @param tpZ
-     *     OpenROADM tp id on nodeZ for link termination point Z
+     * @param notifLink
+     *     Expressed by the means of a link, specifies the
+     *     termination points of the otn link to create.
+     * @param suppLinks
+     *     list of link-id supported the service (used when more than one supported link)
      * @param linkType
      *     OtnLinkType, as OTU4, ODTU, etc
      */
-    void createOtnLinks(String nodeA, String tpA, String nodeZ, String tpZ, OtnLinkType linkType);
+    void createOtnLinks(
+        org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.renderer.rpc.result.sp.Link
+        notifLink, List<String> suppLinks, OtnLinkType linkType);
 
     /**
      * delete otn links from otn-topology.
      *
-     * @param nodeA
-     *     OpenROADM node ID for link termination point A
-     * @param tpA
-     *     OpenROADM tp id on nodeA for link termination point A
-     * @param nodeZ
-     *     OpenROADM node ID for link termination point Z
-     * @param tpZ
-     *     OpenROADM tp id on nodeZ for link termination point Z
+     * @param notifLink
+     *     Expressed by the means of a link, specifies the
+     *     termination points of the otn link to create.
+     * @param suppLinks
+     *     list of link-id supported the service (used when more than one supported link)
      * @param linkType
      *     OtnLinkType, as OTU4, ODTU, etc
      */
-    void deleteOtnLinks(String nodeA, String tpA, String nodeZ, String tpZ, OtnLinkType linkType);
+    void deleteOtnLinks(
+        org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.renderer.rpc.result.sp.Link
+        notifLink, List<String> suppLinks, OtnLinkType linkType);
 
     /**
-     * update otn links from otn-topology.
+     * Update otn links from otn-topology.
+     * For services using low-order odu, updates bandwidth parameters
+     * for both the direct parent high-order odu link, and also its server
+     * otu link.
      *
      * @param link
-     *     link containing termination points to be updated
+     *     link containing termination points to be updated (used for use
+     *     case with a single supported link)
+     * @param supportedLinks
+     *     list of link-id supported the service (used for use case with
+     *     several supported links)
      * @param serviceRate
-     *     Service rate may be 1G, 10G or 100G
+     *     Service rate may be 1G, 10G, 100G or 400G
      * @param tribPortNb
      *     Trib port number allocated by the service
-     * @param tribSoltNb
-     *     First trib slot number allocated by the service
+     * @param minTribSoltNb
+     *     First contiguous trib slot number allocated by the service
+     * @param maxTribSoltNb
+     *     Last contiguous trib slot number allocated by the service
      * @param isDeletion
-     *       True indicates if the low-order otn service must be deleted
+     *     True indicates if the low-order otn service must be deleted
      */
-    void updateOtnLinks(Link link, Uint32 serviceRate, Short tribPortNb, Short tribSoltNb, boolean isDeletion);
+    void updateOtnLinks(Link link, List<String> supportedLinks, Uint32 serviceRate, Short tribPortNb,
+            Short minTribSoltNb, Short maxTribSoltNb, boolean isDeletion);
 
+    /**
+     * Update otn links from otn-topology.
+     * For services using directly a high-order odu, updates bandwidth parameters
+     * of the direct parent otu link.
+     *
+     * @param supportedLinks
+     *     list of link-id supported the service (used for use case with
+     *     several supported links)
+     * @param isDeletion
+     *     True indicates if the low-order otn service must be deleted
+     */
+    void updateOtnLinks(List<String> supportedLinks, boolean isDeletion);
 }