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=dbbf0aaaf0e3cbb4f5ad18408522a15ba398df94;hb=56d1795b647693ec1d620d6aca2c4003e3b302ca;hp=f5f2f2ca26cdf6780be1d6524451ca09adddf1d9;hpb=693587d930bbac1d8711bf12f5e9b9df3562b00d;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 f5f2f2ca2..dbbf0aaaf 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,12 @@ */ package org.opendaylight.transportpce.networkmodel.service; +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.rev220316.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.node.topology.rev150114.NetconfNodeConnectionStatus; +import org.opendaylight.yangtools.yang.common.Uint32; /** * Service for data manipulation on OpenROADM topology models. @@ -18,26 +23,110 @@ 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 */ - void createOpenROADMnode(String nodeId); + 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 + * @param nodeId + * unique node ID of OpenROADM node. + * + * @return result of node deletion from portmapping and topologies + */ + boolean 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 deleteOpenROADMnode(String nodeId); + 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); + void setOpenRoadmNodeStatus(String nodeId, NetconfNodeConnectionStatus.ConnectionStatus connectionStatus); + /** + * create new otn link in otn-topology. + * + * @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( + org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.renderer.rpc.result.sp.Link + notifLink, List suppLinks, OtnLinkType linkType); + + /** + * delete otn links from otn-topology. + * + * @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( + org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.renderer.rpc.result.sp.Link + notifLink, List suppLinks, OtnLinkType linkType); + + /** + * 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 (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, 100G or 400G + * @param tribPortNb + * Trib port 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(Link link, List 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 supportedLinks, boolean isDeletion); }