use of org.onosproject.net.DefaultDisjointPath in project onos by opennetworkinglab.
the class AbstractPathService method edgeToEdgePathD.
// Produces a direct edge-to-edge path.
private DisjointPath edgeToEdgePathD(EdgeLink srcLink, EdgeLink dstLink, DisjointPath path, LinkWeigher weigher) {
Path primary = null;
Path backup = null;
if (path != null) {
primary = path.primary();
backup = path.backup();
}
if (backup == null) {
return new DefaultDisjointPath(PID, (DefaultPath) edgeToEdgePath(srcLink, dstLink, primary, weigher));
}
return new DefaultDisjointPath(PID, (DefaultPath) edgeToEdgePath(srcLink, dstLink, primary, weigher), (DefaultPath) edgeToEdgePath(srcLink, dstLink, backup, weigher));
}
Aggregations