tony-liu | aff59a7 | 2016-10-21 15:41:46 +0800 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame^] | 2 | * Copyright 2016-present Open Networking Foundation |
tony-liu | aff59a7 | 2016-10-21 15:41:46 +0800 | [diff] [blame] | 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.tetunnel.api.tunnel.path; |
| 18 | |
| 19 | import org.onosproject.tetunnel.api.lsp.TeLspKey; |
| 20 | |
| 21 | import java.util.List; |
| 22 | |
| 23 | /** |
| 24 | * Representation of a TE tunnel path. |
| 25 | */ |
| 26 | public interface TePath { |
| 27 | |
| 28 | /** |
| 29 | * Types of TE path. |
| 30 | */ |
| 31 | enum Type { |
| 32 | /** |
| 33 | * Designates a dynamically computed path. |
| 34 | */ |
| 35 | DYNAMIC, |
| 36 | /** |
| 37 | * Designates a path with explicit route. |
| 38 | */ |
| 39 | EXPLICIT |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * Returns type of this TE path. |
| 44 | * |
| 45 | * @return type of this TE path |
| 46 | */ |
| 47 | Type type(); |
| 48 | |
| 49 | /** |
| 50 | * Returns keys of TE LSPs of this TE path. |
| 51 | * |
| 52 | * @return list of keys of TE LSPs |
| 53 | */ |
| 54 | List<TeLspKey> lsps(); |
| 55 | |
| 56 | /** |
| 57 | * Returns specified route of ths (Explicit) TE path. |
| 58 | * |
| 59 | * @return list of TE route subobjects. |
| 60 | */ |
| 61 | List<TeRouteSubobject> explicitRoute(); |
| 62 | |
| 63 | /** |
| 64 | * Returns secondary TE paths of this TE path. |
| 65 | * |
| 66 | * @return list of secondary TE paths. |
| 67 | */ |
| 68 | List<TePath> secondaryPaths(); |
| 69 | |
| 70 | //TODO add more attributes here. |
| 71 | } |