blob: adfca3d7a72566d2bcab3c6035da931b879dd4a2 [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2014-present Open Networking Laboratory
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07003 *
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 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.net.topology;
tom4774c8f2014-09-16 11:17:08 -070017
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -070018import org.onosproject.net.DisjointPath;
Brian O'Connorabafb502014-12-02 22:26:20 -080019import org.onosproject.net.ElementId;
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -070020import org.onosproject.net.Link;
Brian O'Connorabafb502014-12-02 22:26:20 -080021import org.onosproject.net.Path;
tom4774c8f2014-09-16 11:17:08 -070022
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -070023import java.util.Map;
tom4774c8f2014-09-16 11:17:08 -070024import java.util.Set;
25
26/**
27 * Service for obtaining pre-computed paths or for requesting computation of
28 * paths using the current topology snapshot.
29 */
30public interface PathService {
31
32 /**
Thomas Vachuska41fe1ec2015-12-03 23:17:02 -080033 * Returns the set of all shortest paths between the specified source and
34 * destination elements. The path is computed using the default edge-weight
35 * function, which by default is hop-count.
tom4774c8f2014-09-16 11:17:08 -070036 *
tomcbefa232014-09-16 14:17:20 -070037 * @param src source element
38 * @param dst destination element
39 * @return set of all shortest paths between the two elements
tom4774c8f2014-09-16 11:17:08 -070040 */
tomcbefa232014-09-16 14:17:20 -070041 Set<Path> getPaths(ElementId src, ElementId dst);
tom4774c8f2014-09-16 11:17:08 -070042
43 /**
Thomas Vachuska41fe1ec2015-12-03 23:17:02 -080044 * Returns the set of all shortest paths between the specified source and
45 * destination network elements. The path is computed using the supplied
46 * edge-weight function.
tom4774c8f2014-09-16 11:17:08 -070047 *
Thomas Vachuska48e64e42015-09-22 15:32:55 -070048 * @param src source element
49 * @param dst destination element
Yuta HIGUCHI5c947272014-11-03 21:39:21 -080050 * @param weight edge-weight entity
tomcbefa232014-09-16 14:17:20 -070051 * @return set of all shortest paths between the two element
Andrey Komarov2398d962016-09-26 15:11:23 +030052 *
53 * @deprecated in Junco (1.9.0), use version with LinkWeigher instead
tom4774c8f2014-09-16 11:17:08 -070054 */
Andrey Komarov2398d962016-09-26 15:11:23 +030055 @Deprecated
tomcbefa232014-09-16 14:17:20 -070056 Set<Path> getPaths(ElementId src, ElementId dst, LinkWeight weight);
tom4774c8f2014-09-16 11:17:08 -070057
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -070058 /**
Andrey Komarov2398d962016-09-26 15:11:23 +030059 * Returns the set of all shortest paths between the specified source and
60 * destination network elements. The path is computed using the supplied
61 * edge-weight function.
62 *
63 * @param src source element
64 * @param dst destination element
65 * @param weigher edge-weight entity
66 * @return set of all shortest paths between the two element
67 */
68 Set<Path> getPaths(ElementId src, ElementId dst, LinkWeigher weigher);
69
70 /**
Thomas Vachuska41fe1ec2015-12-03 23:17:02 -080071 * Returns the set of all disjoint shortest path pairs between the
72 * specified source and destination elements. The path is computed using
73 * the default edge-weight function, which by default is hop-count.
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -070074 *
Thomas Vachuska48e64e42015-09-22 15:32:55 -070075 * @param src source device
76 * @param dst destination device
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -070077 * @return set of all shortest paths between the two devices
78 */
79 Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst);
80
81 /**
Thomas Vachuska41fe1ec2015-12-03 23:17:02 -080082 * Returns the set of all disjoint shortest path pairs between the
83 * specified source and destination elements. The path is computed using
84 * the supplied edge-weight function.
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -070085 *
Thomas Vachuska48e64e42015-09-22 15:32:55 -070086 * @param src source device
87 * @param dst destination device
88 * @param weight edge-weight entity
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -070089 * @return set of all shortest paths between the two devices
Andrey Komarov2398d962016-09-26 15:11:23 +030090 *
91 * @deprecated in Junco (1.9.0), use version with LinkWeigher instead
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -070092 */
Andrey Komarov2398d962016-09-26 15:11:23 +030093 @Deprecated
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -070094 Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst,
95 LinkWeight weight);
96
97 /**
Thomas Vachuska41fe1ec2015-12-03 23:17:02 -080098 * Returns the set of all disjoint shortest path pairs between the
Andrey Komarov2398d962016-09-26 15:11:23 +030099 * specified source and destination elements. The path is computed using
100 * the supplied edge-weight function.
101 *
102 * @param src source device
103 * @param dst destination device
104 * @param weigher edge-weight entity
105 * @return set of all shortest paths between the two devices
106 */
107 Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst,
108 LinkWeigher weigher);
109
110 /**
111 * Returns the set of all disjoint shortest path pairs between the
Thomas Vachuska41fe1ec2015-12-03 23:17:02 -0800112 * specified source and destination elements and taking into consideration
113 * the provided risk profile. The path is computed using the default
114 * edge-weight function, which by default is hop-count.
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -0700115 *
Thomas Vachuska48e64e42015-09-22 15:32:55 -0700116 * @param src source device
117 * @param dst destination device
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -0700118 * @param riskProfile map of edges to risk profiles
119 * @return set of all shortest paths between the two devices
120 */
Thomas Vachuska48e64e42015-09-22 15:32:55 -0700121 Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst,
122 Map<Link, Object> riskProfile);
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -0700123
124 /**
Thomas Vachuska41fe1ec2015-12-03 23:17:02 -0800125 * Returns the set of all disjoint shortest path pairs between the
126 * specified source and destination elements and taking into consideration
127 * the provided risk profile. The path is computed using the supplied
128 * edge-weight function.
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -0700129 *
Thomas Vachuska48e64e42015-09-22 15:32:55 -0700130 * @param src source device
131 * @param dst destination device
132 * @param weight edge-weight entity
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -0700133 * @param riskProfile map of edges to risk profiles
134 * @return set of all shortest paths between the two devices
Andrey Komarov2398d962016-09-26 15:11:23 +0300135 *
136 * @deprecated in Junco (1.9.0), use version with LinkWeigher instead
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -0700137 */
Andrey Komarov2398d962016-09-26 15:11:23 +0300138 @Deprecated
Thomas Vachuska48e64e42015-09-22 15:32:55 -0700139 Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst,
Thomas Vachuska41fe1ec2015-12-03 23:17:02 -0800140 LinkWeight weight,
141 Map<Link, Object> riskProfile);
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -0700142
Andrey Komarov2398d962016-09-26 15:11:23 +0300143 /**
144 * Returns the set of all disjoint shortest path pairs between the
145 * specified source and destination elements and taking into consideration
146 * the provided risk profile. The path is computed using the supplied
147 * edge-weight function.
148 *
149 * @param src source device
150 * @param dst destination device
151 * @param weigher edge-weight entity
152 * @param riskProfile map of edges to risk profiles
153 * @return set of all shortest paths between the two devices
154 */
155 Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst,
156 LinkWeigher weigher,
157 Map<Link, Object> riskProfile);
158
tom4774c8f2014-09-16 11:17:08 -0700159}