Search in sources :

Example 1 with DefaultDisjointPath

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));
}
Also used : DefaultPath(org.onosproject.net.DefaultPath) DefaultDisjointPath(org.onosproject.net.DefaultDisjointPath) Path(org.onosproject.net.Path) DisjointPath(org.onosproject.net.DisjointPath) DefaultDisjointPath(org.onosproject.net.DefaultDisjointPath)

Aggregations

DefaultDisjointPath (org.onosproject.net.DefaultDisjointPath)1 DefaultPath (org.onosproject.net.DefaultPath)1 DisjointPath (org.onosproject.net.DisjointPath)1 Path (org.onosproject.net.Path)1