tony-liu | f7d2a26 | 2016-10-17 16:32:24 +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 | f7d2a26 | 2016-10-17 16:32:24 +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.actn.mdsc.pce; |
| 18 | |
| 19 | import org.onosproject.tetunnel.api.tunnel.TeTunnel; |
| 20 | import org.onosproject.tetunnel.api.tunnel.path.TeRouteSubobject; |
| 21 | |
| 22 | import java.util.Collection; |
| 23 | import java.util.List; |
| 24 | |
| 25 | /** |
| 26 | * TE tunnel PCE management API. |
| 27 | */ |
| 28 | public interface TeTunnelPceService { |
| 29 | |
| 30 | /** |
| 31 | * Calculates available paths for the specified TE tunnel. |
| 32 | * <p> |
| 33 | * PCE which is suitable for the specified TE tunnel and with the highest |
| 34 | * priority will be chosen for the path calculation. |
| 35 | * |
| 36 | * @param teTunnel tunnel information to be calculated |
| 37 | * @return available paths for the specified TE tunnel |
| 38 | */ |
| 39 | Collection<List<TeRouteSubobject>> computePaths(TeTunnel teTunnel); |
| 40 | |
| 41 | /** |
| 42 | * Calculates available paths for the specified TE tunnel with specified |
| 43 | * PCE. |
| 44 | * |
| 45 | * @param teTunnel tunnel information to be calculated |
| 46 | * @param pce PCE to be used for path calculation |
| 47 | * @return available paths for the specified TE tunnel |
| 48 | */ |
| 49 | Collection<List<TeRouteSubobject>> computePaths(TeTunnel teTunnel, |
| 50 | TeTunnelPce pce); |
| 51 | |
| 52 | /** |
| 53 | * Registers a new pce. |
| 54 | * |
| 55 | * @param pce new PCE to be registered. |
| 56 | */ |
| 57 | void registerPce(TeTunnelPce pce); |
| 58 | } |