Merge "Improve container support in tox.ini"
[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 org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev210426.mapping.Mapping;
11 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210618.renderer.rpc.result.sp.Link;
12 import org.opendaylight.yang.gen.v1.http.transportpce.topology.rev210511.OtnLinkType;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNodeConnectionStatus;
14 import org.opendaylight.yangtools.yang.common.Uint32;
15
16 /**
17  * Service for data manipulation on OpenROADM topology models.
18  */
19 public interface NetworkModelService {
20
21     /**
22      * Create new OpenROADM node in all OpenROADM topologies.
23      *
24      * @param nodeId
25      *     unique node ID of new OpenROADM node
26      * @param nodeVersion
27      *     OpenROADM node version
28      */
29     void createOpenRoadmNode(String nodeId, String nodeVersion);
30
31     /**
32      * Delete OpenROADM node from portmapping and topologies.
33      *
34      * @param nodeId
35      *     unique node ID of OpenROADM node.
36      *
37      * @return result of node deletion from portmapping and topologies
38      */
39     boolean deleteOpenRoadmnode(String nodeId);
40
41     /**
42      * Update termination point, and if need, be associated links, of
43      * openroadm-topology and otn-topology after a change on a given mapping.
44      *
45      * @param nodeId
46      *            unique node ID of OpenROADM node at the origin of the NETCONF
47      *            notification change.
48      * @param mapping
49      *            updated mapping following the device notification change.
50      */
51     void updateOpenRoadmTopologies(String nodeId, Mapping mapping);
52
53     /**
54      * Set/update connection status of OpenROADM node.
55      *
56      * @param nodeId
57      *     unique node ID of new OpenROADM node
58      * @param connectionStatus
59      *     connection status of the node
60      */
61     void setOpenRoadmNodeStatus(String nodeId, NetconfNodeConnectionStatus.ConnectionStatus connectionStatus);
62
63     /**
64      * create new otn link in otn-topology.
65      *
66      * @param nodeA
67      *     OpenROADM node ID for link termination point A
68      * @param tpA
69      *     OpenROADM tp id on nodeA for link termination point A
70      * @param nodeZ
71      *     OpenROADM node ID for link termination point Z
72      * @param tpZ
73      *     OpenROADM tp id on nodeZ for link termination point Z
74      * @param linkType
75      *     OtnLinkType, as OTU4, ODTU, etc
76      */
77     void createOtnLinks(String nodeA, String tpA, String nodeZ, String tpZ, OtnLinkType linkType);
78
79     /**
80      * delete otn links from otn-topology.
81      *
82      * @param nodeA
83      *     OpenROADM node ID for link termination point A
84      * @param tpA
85      *     OpenROADM tp id on nodeA for link termination point A
86      * @param nodeZ
87      *     OpenROADM node ID for link termination point Z
88      * @param tpZ
89      *     OpenROADM tp id on nodeZ for link termination point Z
90      * @param linkType
91      *     OtnLinkType, as OTU4, ODTU, etc
92      */
93     void deleteOtnLinks(String nodeA, String tpA, String nodeZ, String tpZ, OtnLinkType linkType);
94
95     /**
96      * update otn links from otn-topology.
97      *
98      * @param link
99      *     link containing termination points to be updated
100      * @param serviceRate
101      *     Service rate may be 1G, 10G, 100G or 400G
102      * @param tribPortNb
103      *     Trib port number allocated by the service
104      * @param minTribSoltNb
105      *     First contiguous trib slot number allocated by the service
106      * @param maxTribSoltNb
107      *     Last contiguous trib slot number allocated by the service
108      * @param isDeletion
109      *       True indicates if the low-order otn service must be deleted
110      */
111     void updateOtnLinks(Link link, Uint32 serviceRate, Short tribPortNb, Short minTribSoltNb, Short maxTribSoltNb,
112             boolean isDeletion);
113 }