Mahesh Poojary S | ba82729 | 2016-05-09 11:31:12 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame^] | 2 | * Copyright 2016-present Open Networking Foundation |
Mahesh Poojary S | ba82729 | 2016-05-09 11:31:12 +0530 | [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 | package org.onosproject.pce.pcestore.api; |
| 17 | |
Satish K | ba1c912 | 2017-04-05 15:27:23 +0530 | [diff] [blame] | 18 | import org.onosproject.incubator.net.tunnel.TunnelId; |
Priyanka B | bae0eeb1 | 2016-11-30 11:59:48 +0530 | [diff] [blame] | 19 | import org.onosproject.pce.pceservice.ExplicitPathInfo; |
Mahesh Poojary S | f920ec0 | 2016-05-17 23:16:09 +0530 | [diff] [blame] | 20 | import org.onosproject.pce.pcestore.PcePathInfo; |
Mahesh Poojary S | ba82729 | 2016-05-09 11:31:12 +0530 | [diff] [blame] | 21 | |
Satish K | 2eb5d84 | 2017-04-04 16:28:37 +0530 | [diff] [blame] | 22 | import java.util.List; |
Mahesh Poojary S | ba82729 | 2016-05-09 11:31:12 +0530 | [diff] [blame] | 23 | |
| 24 | /** |
| 25 | * Abstraction of an entity providing pool of available labels to devices, links and tunnels. |
| 26 | */ |
| 27 | public interface PceStore { |
Mahesh Poojary S | ba82729 | 2016-05-09 11:31:12 +0530 | [diff] [blame] | 28 | |
| 29 | /** |
Mahesh Poojary S | f920ec0 | 2016-05-17 23:16:09 +0530 | [diff] [blame] | 30 | * Checks whether path info is present in failed path info list. |
| 31 | * |
| 32 | * @param failedPathInfo failed path information |
| 33 | * @return success or failure |
| 34 | */ |
| 35 | boolean existsFailedPathInfo(PcePathInfo failedPathInfo); |
| 36 | |
| 37 | /** |
Mahesh Poojary S | f920ec0 | 2016-05-17 23:16:09 +0530 | [diff] [blame] | 38 | * Retrieves the failed path info count. |
| 39 | * |
| 40 | * @return failed path info count |
| 41 | */ |
| 42 | int getFailedPathInfoCount(); |
| 43 | |
| 44 | /** |
Mahesh Poojary S | f920ec0 | 2016-05-17 23:16:09 +0530 | [diff] [blame] | 45 | * Retrieves path info collection from failed path info store. |
| 46 | * |
| 47 | * @return collection of failed path info |
| 48 | */ |
| 49 | Iterable<PcePathInfo> getFailedPathInfos(); |
| 50 | |
| 51 | /** |
Mahesh Poojary S | f920ec0 | 2016-05-17 23:16:09 +0530 | [diff] [blame] | 52 | * Stores path information into failed path info store. |
| 53 | * |
| 54 | * @param failedPathInfo failed path information |
| 55 | */ |
| 56 | void addFailedPathInfo(PcePathInfo failedPathInfo); |
| 57 | |
Mahesh Poojary S | f920ec0 | 2016-05-17 23:16:09 +0530 | [diff] [blame] | 58 | |
| 59 | /** |
| 60 | * Removes path info from failed path info store. |
| 61 | * |
| 62 | * @param failedPathInfo failed path information |
| 63 | * @return success or failure |
| 64 | */ |
| 65 | boolean removeFailedPathInfo(PcePathInfo failedPathInfo); |
Priyanka B | bae0eeb1 | 2016-11-30 11:59:48 +0530 | [diff] [blame] | 66 | |
| 67 | /** |
| 68 | * Adds explicit path info to the map with corresponding tunnel name. |
| 69 | * |
| 70 | * @param tunnelName tunnel name as key |
| 71 | * @param explicitPathInfo list of explicit path objects |
| 72 | * @return whether it is added to map |
| 73 | */ |
| 74 | boolean tunnelNameExplicitPathInfoMap(String tunnelName, List<ExplicitPathInfo> explicitPathInfo); |
| 75 | |
| 76 | /** |
| 77 | * Gets explicit path info based on tunnel name. |
| 78 | * |
| 79 | * @param tunnelName tunnel name as key |
| 80 | * @return list of explicit path info |
| 81 | */ |
| 82 | List<ExplicitPathInfo> getTunnelNameExplicitPathInfoMap(String tunnelName); |
Satish K | ba1c912 | 2017-04-05 15:27:23 +0530 | [diff] [blame] | 83 | |
| 84 | //DisjointPath getDisjointPaths(String tunnelName); |
| 85 | |
| 86 | //boolean addDisjointPathInfo(String tunnelName, DisjointPath path); |
| 87 | |
| 88 | /** |
| 89 | * Stores load balancing tunnels by load balance path name. |
| 90 | * |
| 91 | * @param loadBalancingPathName load balancing path name |
| 92 | * @param tunnelIds list load balancing tunnels |
| 93 | * @return success or failure |
| 94 | */ |
| 95 | boolean addLoadBalancingTunnelIdsInfo(String loadBalancingPathName, TunnelId... tunnelIds); |
| 96 | |
| 97 | /** |
| 98 | * Query load balancing tunnels by load balance path name. |
| 99 | * |
| 100 | * @param loadBalancingPathName load balancing path name |
| 101 | * @return list of load balancing tunnels |
| 102 | */ |
| 103 | List<TunnelId> getLoadBalancingTunnelIds(String loadBalancingPathName); |
| 104 | |
| 105 | /** |
| 106 | * Removes load balancing tunnel info. |
| 107 | * |
| 108 | * @param loadBalancingPathName load balancing path name |
| 109 | * @return success or failure |
| 110 | */ |
| 111 | boolean removeLoadBalancingTunnelIdsInfo(String loadBalancingPathName); |
| 112 | |
| 113 | //boolean removeDisjointPathInfo(String tunnelName); |
Mahesh Poojary S | ba82729 | 2016-05-09 11:31:12 +0530 | [diff] [blame] | 114 | } |