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