edf0c89696b05e4bc626b4cb3ff5bb5a87421e5b
[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.rev210426.mapping.Mapping;
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 mapping and topologies.
33      *
34      * @param nodeId
35      *     unique node ID of OpenROADM node.
36      *
37      */
38     void deleteOpenRoadmnode(String nodeId);
39
40     /**
41      * Update termination point, and if need, be associated links, of
42      * openroadm-topology and otn-topology after a change on a given mapping.
43      *
44      * @param nodeId
45      *            unique node ID of OpenROADM node at the origin of the NETCONF
46      *            notification change.
47      * @param mapping
48      *            updated mapping following the device notification change.
49      */
50     void updateOpenRoadmTopologies(String nodeId, Mapping mapping);
51
52     /**
53      * Set/update connection status of OpenROADM node.
54      *
55      * @param nodeId
56      *     unique node ID of new OpenROADM node
57      * @param connectionStatus
58      *     connection status of the node
59      */
60     void setOpenRoadmNodeStatus(String nodeId, NetconfNodeConnectionStatus.ConnectionStatus connectionStatus);
61
62     /**
63      * create new otn link in otn-topology.
64      *
65      * @param nodeA
66      *     OpenROADM node ID for link termination point A
67      * @param tpA
68      *     OpenROADM tp id on nodeA for link termination point A
69      * @param nodeZ
70      *     OpenROADM node ID for link termination point Z
71      * @param tpZ
72      *     OpenROADM tp id on nodeZ for link termination point Z
73      * @param linkType
74      *     OtnLinkType, as OTU4, ODTU, etc
75      */
76     void createOtnLinks(String nodeA, String tpA, String nodeZ, String tpZ, OtnLinkType linkType);
77
78     /**
79      * delete otn links from otn-topology.
80      *
81      * @param nodeA
82      *     OpenROADM node ID for link termination point A
83      * @param tpA
84      *     OpenROADM tp id on nodeA for link termination point A
85      * @param nodeZ
86      *     OpenROADM node ID for link termination point Z
87      * @param tpZ
88      *     OpenROADM tp id on nodeZ for link termination point Z
89      * @param linkType
90      *     OtnLinkType, as OTU4, ODTU, etc
91      */
92     void deleteOtnLinks(String nodeA, String tpA, String nodeZ, String tpZ, OtnLinkType linkType);
93
94     /**
95      * update otn links from otn-topology.
96      *
97      * @param nodeTps
98      *     List containing a string composed of the netconf nodeId , and the
99      *       termination point supporting the service
100      * @param serviceRate
101      *     Service rate may be 1G, 10G or 100G
102      * @param tribPortNb
103      *     Trib port number allocated by the service
104      * @param tribSoltNb
105      *     First trib slot number allocated by the service
106      * @param isDeletion
107      *       True indicates if the low-order otn service must be deleted
108      */
109     void updateOtnLinks(List<String> nodeTps, Uint32 serviceRate, Short tribPortNb, Short tribSoltNb,
110         boolean isDeletion);
111
112 }