879ed961e4c1a3eac8714000e5467506f2875562
[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 nodeA
68      *     OpenROADM node ID for link termination point A
69      * @param tpA
70      *     OpenROADM tp id on nodeA for link termination point A
71      * @param nodeZ
72      *     OpenROADM node ID for link termination point Z
73      * @param tpZ
74      *     OpenROADM tp id on nodeZ for link termination point Z
75      * @param linkType
76      *     OtnLinkType, as OTU4, ODTU, etc
77      */
78     void createOtnLinks(String nodeA, String tpA, String nodeZ, String tpZ, OtnLinkType linkType);
79
80     /**
81      * delete otn links from otn-topology.
82      *
83      * @param nodeA
84      *     OpenROADM node ID for link termination point A
85      * @param tpA
86      *     OpenROADM tp id on nodeA for link termination point A
87      * @param nodeZ
88      *     OpenROADM node ID for link termination point Z
89      * @param tpZ
90      *     OpenROADM tp id on nodeZ for link termination point Z
91      * @param linkType
92      *     OtnLinkType, as OTU4, ODTU, etc
93      */
94     void deleteOtnLinks(String nodeA, String tpA, String nodeZ, String tpZ, OtnLinkType linkType);
95
96     /**
97      * Update otn links from otn-topology.
98      * For services using low-order odu, updates bandwidth parameters
99      * for both the direct parent high-order odu link, and also its server
100      * otu link.
101      *
102      * @param link
103      *     link containing termination points to be updated
104      * @param serviceRate
105      *     Service rate may be 1G, 10G, 100G or 400G
106      * @param tribPortNb
107      *     Trib port number allocated by the service
108      * @param minTribSoltNb
109      *     First contiguous trib slot number allocated by the service
110      * @param maxTribSoltNb
111      *     Last contiguous trib slot number allocated by the service
112      * @param isDeletion
113      *     True indicates if the low-order otn service must be deleted
114      */
115     void updateOtnLinks(Link link, Uint32 serviceRate, Short tribPortNb, Short minTribSoltNb, Short maxTribSoltNb,
116             boolean isDeletion);
117
118     /**
119      * Update otn links from otn-topology.
120      * For services using directly a high-order odu, updates bandwidth parameters
121      * of the direct parent otu link.
122      *
123      * @param link
124      *     link containing termination points to be updated
125      * @param supportedLinks
126      *     list of link-id supported the service (used when more than one supported link)
127      * @param isDeletion
128      *     True indicates if the low-order otn service must be deleted
129      */
130     void updateOtnLinks(Link link, List<String> supportedLinks, boolean isDeletion);
131 }