Carolina Fernandez | ad89343 | 2016-07-18 11:11:34 +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 | |
| 19 | import java.util.Optional; |
| 20 | import java.util.Set; |
| 21 | |
| 22 | /** |
| 23 | * Service that allows the creation of L2 Virtual Circuits |
| 24 | * between edge ports of a given SDN network. |
| 25 | */ |
| 26 | public interface SdxL2VCService { |
| 27 | |
| 28 | /** |
| 29 | * Creates an L2 Virtual Circuit between two SDX-L2 Connection Points. |
| 30 | * |
| 31 | * @param sdxl2 name of SDX-L2 |
| 32 | * @param sdxl2cplhs name of SDX-L2 CP, left hand side of the VC |
| 33 | * @param sdxl2cprhs name of SDX-L2 CP, right hand side of the VC |
| 34 | */ |
| 35 | void addVC(String sdxl2, SdxL2ConnectionPoint sdxl2cplhs, SdxL2ConnectionPoint sdxl2cprhs); |
| 36 | |
| 37 | /** |
| 38 | * Deletes a Virtual Circuit from an SDX-L2. |
| 39 | * |
| 40 | * @param sdxl2cplhs name of SDX-L2 CP, left hand side of the VC |
| 41 | * @param sdxl2cprhs name of SDX-L2 CP, right hand side of the VC |
| 42 | */ |
| 43 | void removeVC(SdxL2ConnectionPoint sdxl2cplhs, SdxL2ConnectionPoint sdxl2cprhs); |
| 44 | |
| 45 | /** |
| 46 | * Deletes a Virtual Circuit where a given SDX-L2 CP acts as endpoint. |
| 47 | * |
| 48 | * @param cp Connection Point |
| 49 | */ |
| 50 | void removeVC(SdxL2ConnectionPoint cp); |
| 51 | |
| 52 | /** |
| 53 | * Removes all Virtual Circuits created in a given SDX-L2. |
| 54 | * |
| 55 | * @param sdxl2 name of SDX-L2 |
| 56 | */ |
| 57 | void removeVCs(String sdxl2); |
| 58 | |
| 59 | /** |
| 60 | * Returns Virtual Circuits (either all or those created in a given SDX-L2). |
| 61 | * |
| 62 | * @param sdxl2 name of SDX-L2 |
| 63 | * @return the set of virtual circuits name |
| 64 | */ |
| 65 | Set<String> getVCs(Optional<String> sdxl2); |
| 66 | |
| 67 | /** |
| 68 | * Returns an encoded Virtual Circuit in a given SDX-L2. |
| 69 | * |
| 70 | * @param lhs left hand side of the VC |
| 71 | * @param rhs right hand side of the VC |
| 72 | * @return encoded VC |
| 73 | */ |
| 74 | String getVC(SdxL2ConnectionPoint lhs, SdxL2ConnectionPoint rhs); |
| 75 | } |