Manage OTN links at 400G
[transportpce.git] / networkmodel / src / main / java / org / opendaylight / transportpce / networkmodel / service / NetworkModelService.java
index 74a249928bb0ecc183ea4bcea75b1b8487c37329..4845ba30789cf3c1f25323e9dd34d514f87df960 100644 (file)
@@ -7,10 +7,11 @@
  */
 package org.opendaylight.transportpce.networkmodel.service;
 
-import java.util.List;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.circuit.packs.CircuitPacks;
-import org.opendaylight.yang.gen.v1.http.transportpce.topology.rev201019.OtnLinkType;
+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 org.opendaylight.yangtools.yang.common.Uint32;
 
 /**
  * Service for data manipulation on OpenROADM topology models.
@@ -37,15 +38,16 @@ public interface NetworkModelService {
     void deleteOpenRoadmnode(String nodeId);
 
     /**
-     * Update OpenROADM network topology. TODO: update all topologies
+     * Update termination point, and if need, be associated links, of
+     * openroadm-topology and otn-topology after a change on a given mapping.
      *
      * @param nodeId
-     *     unique node ID of OpenROADM node that sent the NETCONF notification.
-     * @param changedCpack
-     *     circuit pack modified from the NETCONF notification.
-     *
+     *            unique node ID of OpenROADM node at the origin of the NETCONF
+     *            notification change.
+     * @param mapping
+     *            updated mapping following the device notification change.
      */
-    void updateOpenRoadmNetworkTopology(String nodeId, CircuitPacks changedCpack);
+    void updateOpenRoadmTopologies(String nodeId, Mapping mapping);
 
     /**
      * Set/update connection status of OpenROADM node.
@@ -92,19 +94,19 @@ public interface NetworkModelService {
     /**
      * update otn links from otn-topology.
      *
-     * @param nodeTps
-     *     List containing a string composed of the netconf nodeId , and the
-     *       termination point supporting the service
+     * @param link
+     *     link containing termination points to be updated
      * @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
      */
-    void updateOtnLinks(List<String> nodeTps, String serviceRate, Short tribPortNb, Short tribSoltNb,
-        boolean isDeletion);
-
+    void updateOtnLinks(Link link, Uint32 serviceRate, Short tribPortNb, Short minTribSoltNb, Short maxTribSoltNb,
+            boolean isDeletion);
 }