Skip to content

Commit

Permalink
[TEST]: Improvement: Path Manipulation: Complex Flow(switch triplet)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuliia Miroshnychenko authored and pablomuri committed Jan 30, 2025
1 parent 3fd4d21 commit 7209a8e
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 260 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ class SwitchPairs {
return this
}

SwitchPairs withoutOf12Switches() {
switchPairs = switchPairs.findAll { it.src.ofVersion != "OF_12" && it.dst.ofVersion != "OF_12" }
return this
}

SwitchPairs withTraffgensOnBothEnds() {
switchPairs = switchPairs.findAll { [it.src, it.dst].every { !it.traffGens.isEmpty() } }
return this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class SwitchTriplets {
SwitchTriplets nonNeighbouring() {
switchTriplets = switchTriplets.findAll {
it.shared != it.ep1 && it.ep1 != it.ep2 && it.ep2 != it.shared &&
it.getPathsEp1().every {it.size() > 2} &&
it.getPathsEp2().every {it.size() > 2}}
it.pathsEp1.every {it.size() > 2} &&
it.pathsEp2.every {it.size() > 2}}

return this
}
Expand Down Expand Up @@ -149,7 +149,7 @@ class SwitchTriplets {
.unique(false) { a, b -> a.intersect(b) == [] ? 1 : 0 }
def yPoints = topologyHelper.findPotentialYPoints(it)

yPoints.size() == 1 && (isYPointOnSharedEp ? yPoints[0] == it.shared : yPoints[0] != it.shared) && yPoints[0] != it.ep1 && yPoints[0] != it.ep2 &&
yPoints.size() == 1 && (isYPointOnSharedEp ? yPoints[0] == it.shared.dpId : yPoints[0] != it.shared.dpId) && yPoints[0] != it.ep1.dpId && yPoints[0] != it.ep2.dpId &&
ep1paths.size() >= 2 && ep2paths.size() >= 2
}
}
Expand Down Expand Up @@ -184,7 +184,7 @@ class SwitchTriplets {

SwitchTriplet findSwitchTripletWithYPointOnSharedEp() {
return switchTriplets.find {
topologyHelper.findPotentialYPoints(it).size() == 1 && it.getShared().getDpId() == topologyHelper.findPotentialYPoints(it).get(0).getDpId()
topologyHelper.findPotentialYPoints(it).size() == 1 && it.getShared().getDpId() == topologyHelper.findPotentialYPoints(it).get(0)
}
}

Expand Down Expand Up @@ -226,7 +226,8 @@ class SwitchTriplets {
ep1: ep1,
ep2: ep2,
pathsEp1: retrievePairPathNode(shared.dpId, ep1.dpId),
pathsEp2: retrievePairPathNode(shared.dpId, ep2.dpId))
pathsEp2: retrievePairPathNode(shared.dpId, ep2.dpId),
topologyDefinition: topology)
}
}

Expand Down
Loading

0 comments on commit 7209a8e

Please sign in to comment.