blob: 5ad499999f95c70d00d3de62b5a87adf5eb41233 [file] [log] [blame]
Mahesh Poojary Sba827292016-05-09 11:31:12 +05301/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016-present Open Networking Foundation
Mahesh Poojary Sba827292016-05-09 11:31:12 +05303 *
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 */
16package org.onosproject.pce.pcestore.api;
17
Satish Kba1c9122017-04-05 15:27:23 +053018import org.onosproject.incubator.net.tunnel.TunnelId;
Priyanka Bbae0eeb12016-11-30 11:59:48 +053019import org.onosproject.pce.pceservice.ExplicitPathInfo;
Mahesh Poojary Sf920ec02016-05-17 23:16:09 +053020import org.onosproject.pce.pcestore.PcePathInfo;
Mahesh Poojary Sba827292016-05-09 11:31:12 +053021
Satish K2eb5d842017-04-04 16:28:37 +053022import java.util.List;
Mahesh Poojary Sba827292016-05-09 11:31:12 +053023
24/**
25 * Abstraction of an entity providing pool of available labels to devices, links and tunnels.
26 */
27public interface PceStore {
Mahesh Poojary Sba827292016-05-09 11:31:12 +053028
29 /**
Mahesh Poojary Sf920ec02016-05-17 23:16:09 +053030 * 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 Sf920ec02016-05-17 23:16:09 +053038 * Retrieves the failed path info count.
39 *
40 * @return failed path info count
41 */
42 int getFailedPathInfoCount();
43
44 /**
Mahesh Poojary Sf920ec02016-05-17 23:16:09 +053045 * 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 Sf920ec02016-05-17 23:16:09 +053052 * Stores path information into failed path info store.
53 *
54 * @param failedPathInfo failed path information
55 */
56 void addFailedPathInfo(PcePathInfo failedPathInfo);
57
Mahesh Poojary Sf920ec02016-05-17 23:16:09 +053058
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 Bbae0eeb12016-11-30 11:59:48 +053066
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 Kba1c9122017-04-05 15:27:23 +053083
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 Sba827292016-05-09 11:31:12 +0530114}