blob: 8601abbe44d9c275eb769a7ab6a57c5ce78a6b7d [file] [log] [blame]
Pier Luigi Ventre0a023f42016-04-30 11:03:15 +02001/*
2 * Copyright 2016-present Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.sdxl2;
18
pierventre1483e642016-06-08 18:52:29 +020019import org.onosproject.net.ConnectPoint;
20import org.onosproject.net.intent.Key;
21
pierventre3849e562016-05-11 11:47:32 +020022import java.util.Optional;
Pier Luigi Ventre0a023f42016-04-30 11:03:15 +020023import java.util.Set;
24
25/**
pierventre3849e562016-05-11 11:47:32 +020026 * Service that allows to create virtual named sdx-l2s
27 * in which is possible to provide connectivity
Pier Luigi Ventre0a023f42016-04-30 11:03:15 +020028 * (layer 2 Virtual Circuits - VC) between edge ports.
29 */
30public interface SdxL2Service {
31
32 /**
pierventre3849e562016-05-11 11:47:32 +020033 * Creates a named SDX-L2.
Pier Luigi Ventre0a023f42016-04-30 11:03:15 +020034 *
pierventre3849e562016-05-11 11:47:32 +020035 * @param sdxl2 SDX-L2 name
Pier Luigi Ventre0a023f42016-04-30 11:03:15 +020036 */
37 void createSdxL2(String sdxl2);
38
39 /**
pierventre3849e562016-05-11 11:47:32 +020040 * Deletes a named SDX-L2.
Pier Luigi Ventre0a023f42016-04-30 11:03:15 +020041 *
Carolina Fernandezad893432016-07-18 11:11:34 +020042 * @param sdxl2 name of SDX-L2
Pier Luigi Ventre0a023f42016-04-30 11:03:15 +020043 */
44 void deleteSdxL2(String sdxl2);
45
46 /**
pierventre3849e562016-05-11 11:47:32 +020047 * Returns a set of SDX-L2 names.
Pier Luigi Ventre0a023f42016-04-30 11:03:15 +020048 *
Carolina Fernandezad893432016-07-18 11:11:34 +020049 * @return set of SDX-L2 names
Pier Luigi Ventre0a023f42016-04-30 11:03:15 +020050 */
51 Set<String> getSdxL2s();
52
pierventre3849e562016-05-11 11:47:32 +020053 /**
Carolina Fernandezad893432016-07-18 11:11:34 +020054 * Adds a Connection Point to an SDX-L2.
pierventre3849e562016-05-11 11:47:32 +020055 *
Carolina Fernandezad893432016-07-18 11:11:34 +020056 * @param sdxl2 name of SDX-L2
57 * @param sdxl2cp SDX-L2 Connection Point object
pierventre3849e562016-05-11 11:47:32 +020058 */
59 void addSdxL2ConnectionPoint(String sdxl2, SdxL2ConnectionPoint sdxl2cp);
60
61 /**
Carolina Fernandezad893432016-07-18 11:11:34 +020062 * Returns all names of Connection Points names in a SDX-L2 or
63 * all the names of SDX-L2 Connection Points.
pierventre3849e562016-05-11 11:47:32 +020064 *
Carolina Fernandezad893432016-07-18 11:11:34 +020065 * @param sdxl2 name of SDX-L2
pierventre3849e562016-05-11 11:47:32 +020066 * @return a set of SDX-L2 connection points names
67 */
68 Set<String> getSdxL2ConnectionPoints(Optional<String> sdxl2);
69
70 /**
Carolina Fernandezad893432016-07-18 11:11:34 +020071 * Removes a Connection Point from an SDX-L2.
pierventre3849e562016-05-11 11:47:32 +020072 *
Carolina Fernandezad893432016-07-18 11:11:34 +020073 * @param sdxl2cp name of SDX-L2 Connection Point
pierventre3849e562016-05-11 11:47:32 +020074 */
75 void removeSdxL2ConnectionPoint(String sdxl2cp);
76
pierventre1483e642016-06-08 18:52:29 +020077 /**
Carolina Fernandezad893432016-07-18 11:11:34 +020078 * Creates an L2 Virtual Circuit between two SDX-L2 Connection Points.
pierventre1483e642016-06-08 18:52:29 +020079 *
Carolina Fernandezad893432016-07-18 11:11:34 +020080 * @param sdxl2 name of SDX-L2
81 * @param sdxl2cplhs name of SDX-L2 CP, left hand side of the VC
82 * @param sdxl2cprhs name of SDX-L2 CP, right hand side of the VC
83 */
84 void addVC(String sdxl2, String sdxl2cplhs, String sdxl2cprhs);
85
86 /**
87 * Deletes a Virtual Circuit between Connection Points in an SDX-L2.
88 *
89 * @param vc name of SDX-L2 VC
90 */
91 void removeVC(String vc);
92
93 /**
94 * Returns a Connection Point in an SDX-L2.
95 *
96 * @param sdxl2cp name of SDX-L2 Connection Point
pierventre1483e642016-06-08 18:52:29 +020097 * @return the relative SdxL2ConnectionPoint object
98 */
99 SdxL2ConnectionPoint getSdxL2ConnectionPoint(String sdxl2cp);
100
101 /**
Carolina Fernandezad893432016-07-18 11:11:34 +0200102 * Returns all the Virtual Circuits in an SDX-L2.
103 *
104 * @param sdxl2 name of SDX-L2
105 * @return set of Virtual Circuits names
106 */
107 Set<String> getVirtualCircuits(Optional<String> sdxl2);
108
109 /**
110 * Returns a Virtual Circuit in an SDX-L2.
111 *
112 * @param sdxl2vc name of the SDX-L2 VC
113 * @return the relative VirtualCircuit object
114 */
115 VirtualCircuit getVirtualCircuit(String sdxl2vc);
116
117 /**
pierventre1483e642016-06-08 18:52:29 +0200118 * Returns the state of the Intent that has been provided as input.
119 *
Carolina Fernandezad893432016-07-18 11:11:34 +0200120 * @param intentKey key of the intent
121 * @return the last state of the intent
pierventre1483e642016-06-08 18:52:29 +0200122 */
123 SdxL2State getIntentState(Key intentKey);
124
125 /**
126 * Returns the state of the EdgePort that has been provided as input.
127 *
Carolina Fernandezad893432016-07-18 11:11:34 +0200128 * @param edgeport the Connection Point representing the edge port
129 * @return the last state of the edge port
pierventre1483e642016-06-08 18:52:29 +0200130 */
131 SdxL2State getEdgePortState(ConnectPoint edgeport);
132
133 /**
134 * Cleans the state of the Application.
135 */
136 void cleanSdxL2();
137
Pier Luigi Ventre0a023f42016-04-30 11:03:15 +0200138}