blob: 6ed4799b98d69afe5a9626cdd5d6a490a236dd60 [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
tom4774c8f2014-09-16 11:17:08 -070052 */
tomcbefa232014-09-16 14:17:20 -070053 Set<Path> getPaths(ElementId src, ElementId dst, LinkWeight weight);
tom4774c8f2014-09-16 11:17:08 -070054
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -070055 /**
Thomas Vachuska41fe1ec2015-12-03 23:17:02 -080056 * Returns the set of all disjoint shortest path pairs between the
57 * specified source and destination elements. The path is computed using
58 * the default edge-weight function, which by default is hop-count.
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -070059 *
Thomas Vachuska48e64e42015-09-22 15:32:55 -070060 * @param src source device
61 * @param dst destination device
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -070062 * @return set of all shortest paths between the two devices
63 */
64 Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst);
65
66 /**
Thomas Vachuska41fe1ec2015-12-03 23:17:02 -080067 * Returns the set of all disjoint shortest path pairs between the
68 * specified source and destination elements. The path is computed using
69 * the supplied edge-weight function.
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -070070 *
Thomas Vachuska48e64e42015-09-22 15:32:55 -070071 * @param src source device
72 * @param dst destination device
73 * @param weight edge-weight entity
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -070074 * @return set of all shortest paths between the two devices
75 */
76 Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst,
77 LinkWeight weight);
78
79 /**
Thomas Vachuska41fe1ec2015-12-03 23:17:02 -080080 * Returns the set of all disjoint shortest path pairs between the
81 * specified source and destination elements and taking into consideration
82 * the provided risk profile. The path is computed using the default
83 * edge-weight function, which by default is hop-count.
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -070084 *
Thomas Vachuska48e64e42015-09-22 15:32:55 -070085 * @param src source device
86 * @param dst destination device
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -070087 * @param riskProfile map of edges to risk profiles
88 * @return set of all shortest paths between the two devices
89 */
Thomas Vachuska48e64e42015-09-22 15:32:55 -070090 Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst,
91 Map<Link, Object> riskProfile);
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -070092
93 /**
Thomas Vachuska41fe1ec2015-12-03 23:17:02 -080094 * Returns the set of all disjoint shortest path pairs between the
95 * specified source and destination elements and taking into consideration
96 * the provided risk profile. The path is computed using the supplied
97 * edge-weight function.
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -070098 *
Thomas Vachuska48e64e42015-09-22 15:32:55 -070099 * @param src source device
100 * @param dst destination device
101 * @param weight edge-weight entity
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -0700102 * @param riskProfile map of edges to risk profiles
103 * @return set of all shortest paths between the two devices
104 */
Thomas Vachuska48e64e42015-09-22 15:32:55 -0700105 Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst,
Thomas Vachuska41fe1ec2015-12-03 23:17:02 -0800106 LinkWeight weight,
107 Map<Link, Object> riskProfile);
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -0700108
tom4774c8f2014-09-16 11:17:08 -0700109}