use of org.onosproject.net.topology.Topology in project trellis-control by opennetworkinglab.
the class McastUtils method getPaths.
/**
* Gets path from src to dst computed using the custom link weigher.
*
* @param src source device ID
* @param dst destination device ID
* @param linksToEnforce links to be enforced
* @return list of paths from src to dst
*/
List<Path> getPaths(DeviceId src, DeviceId dst, Set<Link> linksToEnforce) {
final Topology currentTopology = topologyService.currentTopology();
final LinkWeigher linkWeigher = new SRLinkWeigher(srManager, src, linksToEnforce);
List<Path> allPaths = Lists.newArrayList(topologyService.getPaths(currentTopology, src, dst, linkWeigher));
log.trace("{} path(s) found from {} to {}", allPaths.size(), src, dst);
return allPaths;
}
Aggregations