Manage ODU4 services over multiple OTU4
[transportpce.git] / networkmodel / src / main / java / org / opendaylight / transportpce / networkmodel / service / NetworkModelService.java
1 /*
2  * Copyright © 2016 AT&T and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.transportpce.networkmodel.service;
9
10 import java.util.List;
11 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev210927.mapping.Mapping;
12 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.renderer.rpc.result.sp.Link;
13 import org.opendaylight.yang.gen.v1.http.transportpce.topology.rev210511.OtnLinkType;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNodeConnectionStatus;
15 import org.opendaylight.yangtools.yang.common.Uint32;
16
17 /**
18  * Service for data manipulation on OpenROADM topology models.
19  */
20 public interface NetworkModelService {
21
22     /**
23      * Create new OpenROADM node in all OpenROADM topologies.
24      *
25      * @param nodeId
26      *     unique node ID of new OpenROADM node
27      * @param nodeVersion
28      *     OpenROADM node version
29      */
30     void createOpenRoadmNode(String nodeId, String nodeVersion);
31
32     /**
33      * Delete OpenROADM node from portmapping and topologies.
34      *
35      * @param nodeId
36      *     unique node ID of OpenROADM node.
37      *
38      * @return result of node deletion from portmapping and topologies
39      */
40     boolean deleteOpenRoadmnode(String nodeId);
41
42     /**
43      * Update termination point, and if need, be associated links, of
44      * openroadm-topology and otn-topology after a change on a given mapping.
45      *
46      * @param nodeId
47      *            unique node ID of OpenROADM node at the origin of the NETCONF
48      *            notification change.
49      * @param mapping
50      *            updated mapping following the device notification change.
51      */
52     void updateOpenRoadmTopologies(String nodeId, Mapping mapping);
53
54     /**
55      * Set/update connection status of OpenROADM node.
56      *
57      * @param nodeId
58      *     unique node ID of new OpenROADM node
59      * @param connectionStatus
60      *     connection status of the node
61      */
62     void setOpenRoadmNodeStatus(String nodeId, NetconfNodeConnectionStatus.ConnectionStatus connectionStatus);
63
64     /**
65      * create new otn link in otn-topology.
66      *
67      * @param notifLink
68      *     Expressed by the means of a link, specifies the
69      *     termination points of the otn link to create.
70      * @param suppLinks
71      *     list of link-id supported the service (used when more than one supported link)
72      * @param linkType
73      *     OtnLinkType, as OTU4, ODTU, etc
74      */
75     void createOtnLinks(
76         org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.renderer.rpc.result.sp.Link
77         notifLink, List<String> suppLinks, OtnLinkType linkType);
78
79     /**
80      * delete otn links from otn-topology.
81      *
82      * @param notifLink
83      *     Expressed by the means of a link, specifies the
84      *     termination points of the otn link to create.
85      * @param suppLinks
86      *     list of link-id supported the service (used when more than one supported link)
87      * @param linkType
88      *     OtnLinkType, as OTU4, ODTU, etc
89      */
90     void deleteOtnLinks(
91         org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.renderer.rpc.result.sp.Link
92         notifLink, List<String> suppLinks, OtnLinkType linkType);
93
94     /**
95      * Update otn links from otn-topology.
96      * For services using low-order odu, updates bandwidth parameters
97      * for both the direct parent high-order odu link, and also its server
98      * otu link.
99      *
100      * @param link
101      *     link containing termination points to be updated
102      * @param serviceRate
103      *     Service rate may be 1G, 10G, 100G or 400G
104      * @param tribPortNb
105      *     Trib port number allocated by the service
106      * @param minTribSoltNb
107      *     First contiguous trib slot number allocated by the service
108      * @param maxTribSoltNb
109      *     Last contiguous trib slot number allocated by the service
110      * @param isDeletion
111      *     True indicates if the low-order otn service must be deleted
112      */
113     void updateOtnLinks(Link link, Uint32 serviceRate, Short tribPortNb, Short minTribSoltNb, Short maxTribSoltNb,
114             boolean isDeletion);
115
116     /**
117      * Update otn links from otn-topology.
118      * For services using directly a high-order odu, updates bandwidth parameters
119      * of the direct parent otu link.
120      *
121      * @param supportedLinks
122      *     list of link-id supported the service (used when more than one supported link)
123      * @param isDeletion
124      *     True indicates if the low-order otn service must be deleted
125      */
126     void updateOtnLinks(List<String> supportedLinks, boolean isDeletion);
127 }