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