Andreas Pantelopoulos | 4c7de13 | 2018-02-22 12:32:42 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016-present Open Networking Foundation |
| 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.segmentrouting.pwaas; |
| 18 | |
| 19 | import org.onlab.packet.MplsLabel; |
| 20 | import org.onlab.packet.VlanId; |
| 21 | import org.onosproject.net.Link; |
| 22 | |
| 23 | import java.util.List; |
| 24 | |
| 25 | public interface L2Tunnel { |
| 26 | |
| 27 | /** |
| 28 | * Return the mode of the l2 tunnel. |
| 29 | * |
| 30 | * @return The pw mode. |
| 31 | */ |
| 32 | L2Mode pwMode(); |
| 33 | |
| 34 | /** |
| 35 | * Returns the service delimiting tag. |
| 36 | * |
| 37 | * @return the sd tag |
| 38 | */ |
| 39 | VlanId sdTag(); |
| 40 | |
| 41 | /** |
| 42 | * Returns the id of the tunnel. |
| 43 | * |
| 44 | * @return the tunnel id |
| 45 | */ |
| 46 | long tunnelId(); |
| 47 | |
| 48 | /** |
| 49 | * Return the label of the pseudowire. |
| 50 | * |
| 51 | * @return the pw label. |
| 52 | */ |
| 53 | MplsLabel pwLabel(); |
| 54 | |
| 55 | /** |
| 56 | * Returns the path used by the pseudowire. |
| 57 | * |
| 58 | * @return The path that is used |
| 59 | */ |
| 60 | List<Link> pathUsed(); |
| 61 | |
| 62 | /** |
| 63 | * Returns the transport vlan used by the pseudowire. |
| 64 | * |
| 65 | * @return The transport vlan |
| 66 | */ |
| 67 | VlanId transportVlan(); |
| 68 | |
| 69 | /** |
| 70 | * Returns the inter-co label used by the pseudowire. |
| 71 | * |
| 72 | * @return The inter CO label. |
| 73 | */ |
| 74 | MplsLabel interCoLabel(); |
| 75 | |
| 76 | /** |
| 77 | * Sets the path that this pw uses. |
| 78 | * |
| 79 | * @param path The apth to use |
| 80 | */ |
| 81 | void setPath(List<Link> path); |
| 82 | |
| 83 | /** |
| 84 | * Set the transport vlan that this pw will use. |
| 85 | * |
| 86 | * @param vlan The vlan to use. |
| 87 | */ |
| 88 | void setTransportVlan(VlanId vlan); |
| 89 | } |