Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2014-present Open Networking Laboratory |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [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 | */ |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 16 | package org.onosproject.net.topology; |
tom | 61359e9 | 2014-09-16 15:50:27 -0700 | [diff] [blame] | 17 | |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 18 | import org.onosproject.net.ConnectPoint; |
| 19 | import org.onosproject.net.DeviceId; |
Nikhil Cheerla | 2ec191f | 2015-07-09 12:34:54 -0700 | [diff] [blame] | 20 | import org.onosproject.net.DisjointPath; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 21 | import org.onosproject.net.Link; |
| 22 | import org.onosproject.net.Path; |
tom | 61359e9 | 2014-09-16 15:50:27 -0700 | [diff] [blame] | 23 | |
Nikhil Cheerla | 2ec191f | 2015-07-09 12:34:54 -0700 | [diff] [blame] | 24 | import java.util.Map; |
tom | 61359e9 | 2014-09-16 15:50:27 -0700 | [diff] [blame] | 25 | import java.util.Set; |
Marc De Leenheer | 552eeb6 | 2017-05-15 17:43:27 -0700 | [diff] [blame] | 26 | import java.util.stream.Stream; |
tom | 61359e9 | 2014-09-16 15:50:27 -0700 | [diff] [blame] | 27 | |
| 28 | /** |
| 29 | * Test adapter for topology service. |
| 30 | */ |
| 31 | public class TopologyServiceAdapter implements TopologyService { |
| 32 | @Override |
| 33 | public Topology currentTopology() { |
| 34 | return null; |
| 35 | } |
| 36 | |
| 37 | @Override |
| 38 | public boolean isLatest(Topology topology) { |
| 39 | return false; |
| 40 | } |
| 41 | |
| 42 | @Override |
| 43 | public TopologyGraph getGraph(Topology topology) { |
| 44 | return null; |
| 45 | } |
| 46 | |
| 47 | @Override |
| 48 | public Set<TopologyCluster> getClusters(Topology topology) { |
| 49 | return null; |
| 50 | } |
| 51 | |
| 52 | @Override |
| 53 | public TopologyCluster getCluster(Topology topology, ClusterId clusterId) { |
| 54 | return null; |
| 55 | } |
| 56 | |
| 57 | @Override |
Andrey Komarov | 2398d96 | 2016-09-26 15:11:23 +0300 | [diff] [blame] | 58 | public Set<DeviceId> getClusterDevices(Topology topology, |
| 59 | TopologyCluster cluster) { |
tom | 61359e9 | 2014-09-16 15:50:27 -0700 | [diff] [blame] | 60 | return null; |
| 61 | } |
| 62 | |
| 63 | @Override |
Andrey Komarov | 2398d96 | 2016-09-26 15:11:23 +0300 | [diff] [blame] | 64 | public Set<Link> getClusterLinks(Topology topology, |
| 65 | TopologyCluster cluster) { |
tom | 61359e9 | 2014-09-16 15:50:27 -0700 | [diff] [blame] | 66 | return null; |
| 67 | } |
| 68 | |
| 69 | @Override |
| 70 | public Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst) { |
| 71 | return null; |
| 72 | } |
| 73 | |
| 74 | @Override |
Andrey Komarov | 2398d96 | 2016-09-26 15:11:23 +0300 | [diff] [blame] | 75 | public Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst, |
| 76 | LinkWeight weight) { |
tom | 61359e9 | 2014-09-16 15:50:27 -0700 | [diff] [blame] | 77 | return null; |
| 78 | } |
| 79 | |
| 80 | @Override |
Andrey Komarov | 2398d96 | 2016-09-26 15:11:23 +0300 | [diff] [blame] | 81 | public Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst, |
| 82 | LinkWeigher weigher) { |
| 83 | return null; |
| 84 | } |
| 85 | |
| 86 | @Override |
Marc De Leenheer | 552eeb6 | 2017-05-15 17:43:27 -0700 | [diff] [blame] | 87 | public Set<Path> getKShortestPaths(Topology topology, DeviceId src, DeviceId dst, |
| 88 | LinkWeigher weigher, int maxPaths) { |
| 89 | return null; |
| 90 | } |
| 91 | |
| 92 | @Override |
| 93 | public Stream<Path> getKShortestPaths(Topology topology, DeviceId src, DeviceId dst, LinkWeigher weigher) { |
| 94 | return null; |
| 95 | } |
| 96 | |
| 97 | @Override |
Andrey Komarov | 2398d96 | 2016-09-26 15:11:23 +0300 | [diff] [blame] | 98 | public boolean isInfrastructure(Topology topology, |
| 99 | ConnectPoint connectPoint) { |
tom | 61359e9 | 2014-09-16 15:50:27 -0700 | [diff] [blame] | 100 | return false; |
| 101 | } |
| 102 | |
| 103 | @Override |
Andrey Komarov | 2398d96 | 2016-09-26 15:11:23 +0300 | [diff] [blame] | 104 | public boolean isBroadcastPoint(Topology topology, |
| 105 | ConnectPoint connectPoint) { |
tom | 61359e9 | 2014-09-16 15:50:27 -0700 | [diff] [blame] | 106 | return false; |
| 107 | } |
| 108 | |
| 109 | @Override |
| 110 | public void addListener(TopologyListener listener) { |
| 111 | } |
| 112 | |
| 113 | @Override |
| 114 | public void removeListener(TopologyListener listener) { |
| 115 | } |
Thomas Vachuska | 48e64e4 | 2015-09-22 15:32:55 -0700 | [diff] [blame] | 116 | |
Nikhil Cheerla | 2ec191f | 2015-07-09 12:34:54 -0700 | [diff] [blame] | 117 | @Override |
Andrey Komarov | 2398d96 | 2016-09-26 15:11:23 +0300 | [diff] [blame] | 118 | public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, |
| 119 | DeviceId dst) { |
Nikhil Cheerla | 2ec191f | 2015-07-09 12:34:54 -0700 | [diff] [blame] | 120 | return null; |
| 121 | } |
| 122 | |
| 123 | @Override |
Thomas Vachuska | 48e64e4 | 2015-09-22 15:32:55 -0700 | [diff] [blame] | 124 | public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, |
Andrey Komarov | 2398d96 | 2016-09-26 15:11:23 +0300 | [diff] [blame] | 125 | DeviceId dst, |
| 126 | LinkWeight weight) { |
Nikhil Cheerla | 2ec191f | 2015-07-09 12:34:54 -0700 | [diff] [blame] | 127 | return null; |
| 128 | } |
| 129 | |
| 130 | @Override |
Andrey Komarov | 2398d96 | 2016-09-26 15:11:23 +0300 | [diff] [blame] | 131 | public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, |
| 132 | DeviceId dst, |
| 133 | LinkWeigher weigher) { |
| 134 | return null; |
| 135 | } |
| 136 | |
| 137 | @Override |
| 138 | public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, |
| 139 | DeviceId dst, |
Thomas Vachuska | 48e64e4 | 2015-09-22 15:32:55 -0700 | [diff] [blame] | 140 | Map<Link, Object> riskProfile) { |
Nikhil Cheerla | 2ec191f | 2015-07-09 12:34:54 -0700 | [diff] [blame] | 141 | return null; |
| 142 | } |
| 143 | |
| 144 | @Override |
Thomas Vachuska | 48e64e4 | 2015-09-22 15:32:55 -0700 | [diff] [blame] | 145 | public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, |
| 146 | DeviceId dst, LinkWeight weight, |
| 147 | Map<Link, Object> riskProfile) { |
Nikhil Cheerla | 2ec191f | 2015-07-09 12:34:54 -0700 | [diff] [blame] | 148 | return null; |
| 149 | } |
tom | 61359e9 | 2014-09-16 15:50:27 -0700 | [diff] [blame] | 150 | |
Andrey Komarov | 2398d96 | 2016-09-26 15:11:23 +0300 | [diff] [blame] | 151 | @Override |
| 152 | public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, |
| 153 | DeviceId dst, |
| 154 | LinkWeigher weigher, |
| 155 | Map<Link, Object> riskProfile) { |
| 156 | return null; |
| 157 | } |
| 158 | |
tom | 61359e9 | 2014-09-16 15:50:27 -0700 | [diff] [blame] | 159 | } |