samuel | 8d6b0a9 | 2015-07-11 13:22:57 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 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 | package org.onosproject.net.behaviour; |
| 17 | |
| 18 | import org.onosproject.net.Annotated; |
| 19 | import org.onosproject.net.Description; |
| 20 | |
| 21 | import com.google.common.annotations.Beta; |
| 22 | |
| 23 | /** |
| 24 | * Describes a tunnel. |
| 25 | */ |
| 26 | @Beta |
| 27 | public interface TunnelDescription extends Description, Annotated { |
| 28 | |
| 29 | /** |
| 30 | * Tunnel technology type. |
| 31 | */ |
| 32 | enum Type { |
| 33 | /** |
| 34 | * Signifies that this is a MPLS tunnel. |
| 35 | */ |
| 36 | MPLS, |
| 37 | /** |
| 38 | * Signifies that this is a L2 tunnel. |
| 39 | */ |
| 40 | VLAN, |
| 41 | /** |
| 42 | * Signifies that this is a DC L2 extension tunnel. |
| 43 | */ |
| 44 | VXLAN, |
| 45 | /** |
| 46 | * Signifies that this is a L3 tunnel. |
| 47 | */ |
| 48 | GRE, |
| 49 | /** |
| 50 | * Signifies that this is a L1 OTN tunnel. |
| 51 | */ |
| 52 | ODUK, |
| 53 | /** |
| 54 | * Signifies that this is a L0 OCH tunnel. |
| 55 | */ |
| 56 | OCH |
| 57 | } |
| 58 | |
| 59 | /** |
| 60 | * Returns the connection point source. |
| 61 | * |
| 62 | * @return tunnel source ConnectionPoint |
| 63 | */ |
| 64 | TunnelEndPoint src(); |
| 65 | |
| 66 | /** |
| 67 | * Returns the connection point destination. |
| 68 | * |
| 69 | * @return tunnel destination |
| 70 | */ |
| 71 | TunnelEndPoint dst(); |
| 72 | |
| 73 | /** |
| 74 | * Returns the tunnel type. |
| 75 | * |
| 76 | * @return tunnel type |
| 77 | */ |
| 78 | Type type(); |
| 79 | |
| 80 | /** |
| 81 | * Return the name of a tunnel. |
| 82 | * |
| 83 | * @return Tunnel Name |
| 84 | */ |
| 85 | TunnelName tunnelName(); |
| 86 | } |