X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=networkmodel%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Fnetworkmodel%2Fservice%2FNetworkModelService.java;h=c3606ed2b284df24eb155e31360d655d783e9790;hb=73478a3a5354a2a557520fec6314532bf0ad6a29;hp=f3242a1e4cd0d7e662cdacfc3b4d53f47510b306;hpb=34e6cc32bbda6f19e394c14904d7b78a520e1b96;p=transportpce.git diff --git a/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/service/NetworkModelService.java b/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/service/NetworkModelService.java index f3242a1e4..c3606ed2b 100644 --- a/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/service/NetworkModelService.java +++ b/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/service/NetworkModelService.java @@ -7,7 +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 org.opendaylight.yangtools.yang.common.Uint32; /** * Service for data manipulation on OpenROADM topology models. @@ -18,28 +22,89 @@ public interface NetworkModelService { * Create new OpenROADM node in all OpenROADM topologies. * * @param nodeId - * unique node ID of new OpenROADM node + * unique node ID of new OpenROADM node * @param nodeVersion - * OpenROADM node version + * OpenROADM node version */ - void createOpenROADMnode(String nodeId, String nodeVersion); + void createOpenRoadmNode(String nodeId, String nodeVersion); /** * Delete OpenROADM node mapping and topologies. * - * @param nodeId unique node ID of OpenROADM node + * @param nodeId + * unique node ID of OpenROADM node. * */ - void deleteOpenROADMnode(String nodeId); + void deleteOpenRoadmnode(String nodeId); + + /** + * 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 at the origin of the NETCONF + * notification change. + * @param mapping + * updated mapping following the device notification change. + */ + void updateOpenRoadmTopologies(String nodeId, Mapping mapping); /** * Set/update connection status of OpenROADM node. * * @param nodeId - * unique node ID of new OpenROADM node + * unique node ID of new OpenROADM node * @param connectionStatus - * connection status of the node + * connection status of the node + */ + void setOpenRoadmNodeStatus(String nodeId, NetconfNodeConnectionStatus.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 linkType + * OtnLinkType, as OTU4, ODTU, etc + */ + void createOtnLinks(String nodeA, String tpA, String nodeZ, String tpZ, 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 linkType + * OtnLinkType, as OTU4, ODTU, etc + */ + void deleteOtnLinks(String nodeA, String tpA, String nodeZ, String tpZ, OtnLinkType linkType); + + /** + * update otn links from otn-topology. + * + * @param link + * link containing termination points to be updated + * @param serviceRate + * Service rate may be 1G, 10G or 100G + * @param tribPortNb + * Trib port number allocated by the service + * @param tribSoltNb + * First trib slot number allocated by the service + * @param isDeletion + * True indicates if the low-order otn service must be deleted */ - void setOpenROADMnodeStatus(String nodeId, NetconfNodeConnectionStatus.ConnectionStatus connectionStatus); + void updateOtnLinks(Link link, Uint32 serviceRate, Short tribPortNb, Short tribSoltNb, boolean isDeletion); }