tony-liu | aff59a7 | 2016-10-21 15:41:46 +0800 | [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.tetunnel.api; |
| 18 | |
| 19 | import org.onosproject.incubator.net.tunnel.TunnelId; |
| 20 | import org.onosproject.tetopology.management.api.TeTopologyKey; |
chenqinghui | 86320ae | 2016-12-01 15:40:39 +0800 | [diff] [blame^] | 21 | import org.onosproject.tetunnel.api.lsp.TeLsp; |
| 22 | import org.onosproject.tetunnel.api.lsp.TeLspKey; |
tony-liu | aff59a7 | 2016-10-21 15:41:46 +0800 | [diff] [blame] | 23 | import org.onosproject.tetunnel.api.tunnel.TeTunnel; |
| 24 | import org.onosproject.tetunnel.api.tunnel.TeTunnelKey; |
| 25 | |
| 26 | import java.util.Collection; |
| 27 | |
| 28 | /** |
| 29 | * Service for TE Tunnel attributes management. |
| 30 | * <p> |
| 31 | * Please note that this service works with the existing Tunnel subsystem |
| 32 | * together, just as an extension to the tunnel subsystem, and only focus on TE |
| 33 | * Tunnel attributes management. |
| 34 | */ |
| 35 | public interface TeTunnelService { |
| 36 | |
| 37 | /** |
| 38 | * Returns the TE Tunnel with the specified key. |
| 39 | * |
| 40 | * @param teTunnelKey TE Tunnel key |
| 41 | * @return TeTunnel or null if one with the given key is not known |
| 42 | */ |
| 43 | TeTunnel getTeTunnel(TeTunnelKey teTunnelKey); |
| 44 | |
| 45 | /** |
| 46 | * Returns the TE Tunnel with the specified identifier. |
| 47 | * |
| 48 | * @param tunnelId corresponding tunnel identifier |
| 49 | * @return TeTunnel or null if one with the given identifier is not known |
| 50 | */ |
| 51 | TeTunnel getTeTunnel(TunnelId tunnelId); |
| 52 | |
| 53 | /** |
| 54 | * Returns the corresponding tunnel identifier of a TE tunnel with the |
| 55 | * specified key. |
| 56 | * |
| 57 | * @param teTunnelKey TE Tunnel key |
| 58 | * @return corresponding tunnel identifier or null if one with the given |
| 59 | * key is not known |
| 60 | */ |
| 61 | TunnelId getTunnelId(TeTunnelKey teTunnelKey); |
| 62 | |
| 63 | /** |
| 64 | * Returns a collection of currently known TE tunnels. |
| 65 | * |
| 66 | * @return collection of TE tunnels |
| 67 | */ |
| 68 | Collection<TeTunnel> getTeTunnels(); |
| 69 | |
| 70 | /** |
| 71 | * Returns a collection of currently known TE Tunnels filtered by the |
| 72 | * specified TE tunnel type. |
| 73 | * |
| 74 | * @param type TE tunnel type to filter by |
| 75 | * @return filtered collection of TE tunnels |
| 76 | */ |
| 77 | Collection<TeTunnel> getTeTunnels(TeTunnel.Type type); |
| 78 | |
| 79 | /** |
| 80 | * Returns a collection of currently known TE tunnels filtered by specified |
| 81 | * TE topology key. |
| 82 | * |
| 83 | * @param teTopologyKey TE topology key to filter by |
| 84 | * @return filtered collection of TE tunnels |
| 85 | */ |
| 86 | Collection<TeTunnel> getTeTunnels(TeTopologyKey teTopologyKey); |
| 87 | |
chenqinghui | 86320ae | 2016-12-01 15:40:39 +0800 | [diff] [blame^] | 88 | /** |
| 89 | * Returns the TE LSP with the specified key. |
| 90 | * |
| 91 | * @param key TE LSP key |
| 92 | * @return TeLsp or null if one with the given key is not known |
| 93 | */ |
| 94 | TeLsp getTeLsp(TeLspKey key); |
| 95 | |
| 96 | /** |
| 97 | * Returns a collection of currently known TE LSPs. |
| 98 | * |
| 99 | * @return collection of TeLsp |
| 100 | */ |
| 101 | Collection<TeLsp> getTeLsps(); |
| 102 | |
tony-liu | aff59a7 | 2016-10-21 15:41:46 +0800 | [diff] [blame] | 103 | //TODO: add interfaces for teGlobal and teLspState |
| 104 | } |