Pier Luigi Ventre | 0a023f4 | 2016-04-30 11:03:15 +0200 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package org.onosproject.sdxl2; |
| 18 | |
pierventre | 1483e64 | 2016-06-08 18:52:29 +0200 | [diff] [blame] | 19 | import org.onosproject.net.ConnectPoint; |
| 20 | import org.onosproject.net.intent.Key; |
| 21 | |
pierventre | 3849e56 | 2016-05-11 11:47:32 +0200 | [diff] [blame] | 22 | import java.util.Optional; |
Pier Luigi Ventre | 0a023f4 | 2016-04-30 11:03:15 +0200 | [diff] [blame] | 23 | import java.util.Set; |
| 24 | |
| 25 | /** |
pierventre | 3849e56 | 2016-05-11 11:47:32 +0200 | [diff] [blame] | 26 | * Service that allows to create virtual named sdx-l2s |
| 27 | * in which is possible to provide connectivity |
Pier Luigi Ventre | 0a023f4 | 2016-04-30 11:03:15 +0200 | [diff] [blame] | 28 | * (layer 2 Virtual Circuits - VC) between edge ports. |
| 29 | */ |
| 30 | public interface SdxL2Service { |
| 31 | |
| 32 | /** |
pierventre | 3849e56 | 2016-05-11 11:47:32 +0200 | [diff] [blame] | 33 | * Creates a named SDX-L2. |
Pier Luigi Ventre | 0a023f4 | 2016-04-30 11:03:15 +0200 | [diff] [blame] | 34 | * |
pierventre | 3849e56 | 2016-05-11 11:47:32 +0200 | [diff] [blame] | 35 | * @param sdxl2 SDX-L2 name |
Pier Luigi Ventre | 0a023f4 | 2016-04-30 11:03:15 +0200 | [diff] [blame] | 36 | */ |
| 37 | void createSdxL2(String sdxl2); |
| 38 | |
| 39 | /** |
pierventre | 3849e56 | 2016-05-11 11:47:32 +0200 | [diff] [blame] | 40 | * Deletes a named SDX-L2. |
Pier Luigi Ventre | 0a023f4 | 2016-04-30 11:03:15 +0200 | [diff] [blame] | 41 | * |
Carolina Fernandez | ad89343 | 2016-07-18 11:11:34 +0200 | [diff] [blame] | 42 | * @param sdxl2 name of SDX-L2 |
Pier Luigi Ventre | 0a023f4 | 2016-04-30 11:03:15 +0200 | [diff] [blame] | 43 | */ |
| 44 | void deleteSdxL2(String sdxl2); |
| 45 | |
| 46 | /** |
pierventre | 3849e56 | 2016-05-11 11:47:32 +0200 | [diff] [blame] | 47 | * Returns a set of SDX-L2 names. |
Pier Luigi Ventre | 0a023f4 | 2016-04-30 11:03:15 +0200 | [diff] [blame] | 48 | * |
Carolina Fernandez | ad89343 | 2016-07-18 11:11:34 +0200 | [diff] [blame] | 49 | * @return set of SDX-L2 names |
Pier Luigi Ventre | 0a023f4 | 2016-04-30 11:03:15 +0200 | [diff] [blame] | 50 | */ |
| 51 | Set<String> getSdxL2s(); |
| 52 | |
pierventre | 3849e56 | 2016-05-11 11:47:32 +0200 | [diff] [blame] | 53 | /** |
Carolina Fernandez | ad89343 | 2016-07-18 11:11:34 +0200 | [diff] [blame] | 54 | * Adds a Connection Point to an SDX-L2. |
pierventre | 3849e56 | 2016-05-11 11:47:32 +0200 | [diff] [blame] | 55 | * |
Carolina Fernandez | ad89343 | 2016-07-18 11:11:34 +0200 | [diff] [blame] | 56 | * @param sdxl2 name of SDX-L2 |
| 57 | * @param sdxl2cp SDX-L2 Connection Point object |
pierventre | 3849e56 | 2016-05-11 11:47:32 +0200 | [diff] [blame] | 58 | */ |
| 59 | void addSdxL2ConnectionPoint(String sdxl2, SdxL2ConnectionPoint sdxl2cp); |
| 60 | |
| 61 | /** |
Carolina Fernandez | ad89343 | 2016-07-18 11:11:34 +0200 | [diff] [blame] | 62 | * Returns all names of Connection Points names in a SDX-L2 or |
| 63 | * all the names of SDX-L2 Connection Points. |
pierventre | 3849e56 | 2016-05-11 11:47:32 +0200 | [diff] [blame] | 64 | * |
Carolina Fernandez | ad89343 | 2016-07-18 11:11:34 +0200 | [diff] [blame] | 65 | * @param sdxl2 name of SDX-L2 |
pierventre | 3849e56 | 2016-05-11 11:47:32 +0200 | [diff] [blame] | 66 | * @return a set of SDX-L2 connection points names |
| 67 | */ |
| 68 | Set<String> getSdxL2ConnectionPoints(Optional<String> sdxl2); |
| 69 | |
| 70 | /** |
Carolina Fernandez | ad89343 | 2016-07-18 11:11:34 +0200 | [diff] [blame] | 71 | * Removes a Connection Point from an SDX-L2. |
pierventre | 3849e56 | 2016-05-11 11:47:32 +0200 | [diff] [blame] | 72 | * |
Carolina Fernandez | ad89343 | 2016-07-18 11:11:34 +0200 | [diff] [blame] | 73 | * @param sdxl2cp name of SDX-L2 Connection Point |
pierventre | 3849e56 | 2016-05-11 11:47:32 +0200 | [diff] [blame] | 74 | */ |
| 75 | void removeSdxL2ConnectionPoint(String sdxl2cp); |
| 76 | |
pierventre | 1483e64 | 2016-06-08 18:52:29 +0200 | [diff] [blame] | 77 | /** |
Carolina Fernandez | ad89343 | 2016-07-18 11:11:34 +0200 | [diff] [blame] | 78 | * Creates an L2 Virtual Circuit between two SDX-L2 Connection Points. |
pierventre | 1483e64 | 2016-06-08 18:52:29 +0200 | [diff] [blame] | 79 | * |
Carolina Fernandez | ad89343 | 2016-07-18 11:11:34 +0200 | [diff] [blame] | 80 | * @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 |
pierventre | 1483e64 | 2016-06-08 18:52:29 +0200 | [diff] [blame] | 97 | * @return the relative SdxL2ConnectionPoint object |
| 98 | */ |
| 99 | SdxL2ConnectionPoint getSdxL2ConnectionPoint(String sdxl2cp); |
| 100 | |
| 101 | /** |
Carolina Fernandez | ad89343 | 2016-07-18 11:11:34 +0200 | [diff] [blame] | 102 | * 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 | /** |
pierventre | 1483e64 | 2016-06-08 18:52:29 +0200 | [diff] [blame] | 118 | * Returns the state of the Intent that has been provided as input. |
| 119 | * |
Carolina Fernandez | ad89343 | 2016-07-18 11:11:34 +0200 | [diff] [blame] | 120 | * @param intentKey key of the intent |
| 121 | * @return the last state of the intent |
pierventre | 1483e64 | 2016-06-08 18:52:29 +0200 | [diff] [blame] | 122 | */ |
| 123 | SdxL2State getIntentState(Key intentKey); |
| 124 | |
| 125 | /** |
| 126 | * Returns the state of the EdgePort that has been provided as input. |
| 127 | * |
Carolina Fernandez | ad89343 | 2016-07-18 11:11:34 +0200 | [diff] [blame] | 128 | * @param edgeport the Connection Point representing the edge port |
| 129 | * @return the last state of the edge port |
pierventre | 1483e64 | 2016-06-08 18:52:29 +0200 | [diff] [blame] | 130 | */ |
| 131 | SdxL2State getEdgePortState(ConnectPoint edgeport); |
| 132 | |
| 133 | /** |
| 134 | * Cleans the state of the Application. |
| 135 | */ |
| 136 | void cleanSdxL2(); |
| 137 | |
Pier Luigi Ventre | 0a023f4 | 2016-04-30 11:03:15 +0200 | [diff] [blame] | 138 | } |