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