Fixing GUI to work with the new flow objective intents.
Fixing onos-check-flows script; it was broken badly. Change-Id: I0962dcf879a1030449ac7cd5c0b19c211d5f36df
Showing
3 changed files
with
14 additions
and
8 deletions
... | @@ -6,16 +6,14 @@ | ... | @@ -6,16 +6,14 @@ |
6 | aux=/tmp/stc-$$.log | 6 | aux=/tmp/stc-$$.log |
7 | trap "rm -f $aux 2>/dev/null" EXIT | 7 | trap "rm -f $aux 2>/dev/null" EXIT |
8 | 8 | ||
9 | -onos ${1:-$OCI} "onos:flows" > $aux | ||
10 | -cat $aux | ||
11 | - | ||
12 | for i in {1..5}; do | 9 | for i in {1..5}; do |
13 | - let status=0 | 10 | + onos ${1:-$OCI} "onos:flows" > $aux |
14 | - grep "PENDING_" $aux && let status=status+1 | 11 | + if grep "PENDING_" $aux; then |
15 | - if [ "$status" == "0" ] | 12 | + sleep 5 |
16 | - then | 13 | + else |
14 | + cat $aux | ||
17 | exit 0 | 15 | exit 0 |
18 | fi | 16 | fi |
19 | - sleep 5 | ||
20 | done | 17 | done |
18 | +cat $aux | ||
21 | exit 1 | 19 | exit 1 | ... | ... |
... | @@ -29,6 +29,7 @@ import org.onosproject.net.flow.FlowEntry; | ... | @@ -29,6 +29,7 @@ import org.onosproject.net.flow.FlowEntry; |
29 | import org.onosproject.net.flow.TrafficTreatment; | 29 | import org.onosproject.net.flow.TrafficTreatment; |
30 | import org.onosproject.net.flow.instructions.Instruction; | 30 | import org.onosproject.net.flow.instructions.Instruction; |
31 | import org.onosproject.net.flow.instructions.Instructions.OutputInstruction; | 31 | import org.onosproject.net.flow.instructions.Instructions.OutputInstruction; |
32 | +import org.onosproject.net.intent.FlowObjectiveIntent; | ||
32 | import org.onosproject.net.intent.FlowRuleIntent; | 33 | import org.onosproject.net.intent.FlowRuleIntent; |
33 | import org.onosproject.net.intent.Intent; | 34 | import org.onosproject.net.intent.Intent; |
34 | import org.onosproject.net.intent.LinkCollectionIntent; | 35 | import org.onosproject.net.intent.LinkCollectionIntent; |
... | @@ -572,6 +573,8 @@ public class TrafficMonitor { | ... | @@ -572,6 +573,8 @@ public class TrafficMonitor { |
572 | links = ((PathIntent) installable).path().links(); | 573 | links = ((PathIntent) installable).path().links(); |
573 | } else if (installable instanceof FlowRuleIntent) { | 574 | } else if (installable instanceof FlowRuleIntent) { |
574 | links = linkResources(installable); | 575 | links = linkResources(installable); |
576 | + } else if (installable instanceof FlowObjectiveIntent) { | ||
577 | + links = linkResources(installable); | ||
575 | } else if (installable instanceof LinkCollectionIntent) { | 578 | } else if (installable instanceof LinkCollectionIntent) { |
576 | links = ((LinkCollectionIntent) installable).links(); | 579 | links = ((LinkCollectionIntent) installable).links(); |
577 | } else if (installable instanceof OpticalPathIntent) { | 580 | } else if (installable instanceof OpticalPathIntent) { | ... | ... |
... | @@ -24,6 +24,7 @@ import org.onosproject.net.Link; | ... | @@ -24,6 +24,7 @@ import org.onosproject.net.Link; |
24 | import org.onosproject.net.device.DeviceService; | 24 | import org.onosproject.net.device.DeviceService; |
25 | import org.onosproject.net.flow.FlowRule; | 25 | import org.onosproject.net.flow.FlowRule; |
26 | import org.onosproject.net.host.HostService; | 26 | import org.onosproject.net.host.HostService; |
27 | +import org.onosproject.net.intent.FlowObjectiveIntent; | ||
27 | import org.onosproject.net.intent.FlowRuleIntent; | 28 | import org.onosproject.net.intent.FlowRuleIntent; |
28 | import org.onosproject.net.intent.HostToHostIntent; | 29 | import org.onosproject.net.intent.HostToHostIntent; |
29 | import org.onosproject.net.intent.Intent; | 30 | import org.onosproject.net.intent.Intent; |
... | @@ -180,6 +181,10 @@ public class TopoIntentFilter { | ... | @@ -180,6 +181,10 @@ public class TopoIntentFilter { |
180 | if (rulesContainDevice(flowRuleIntent.flowRules(), device.id())) { | 181 | if (rulesContainDevice(flowRuleIntent.flowRules(), device.id())) { |
181 | return true; | 182 | return true; |
182 | } | 183 | } |
184 | + } else if (installable instanceof FlowObjectiveIntent) { | ||
185 | + FlowObjectiveIntent objectiveIntent = (FlowObjectiveIntent) installable; | ||
186 | + return objectiveIntent.devices().contains(device.id()); | ||
187 | + | ||
183 | } else if (installable instanceof LinkCollectionIntent) { | 188 | } else if (installable instanceof LinkCollectionIntent) { |
184 | LinkCollectionIntent linksIntent = (LinkCollectionIntent) installable; | 189 | LinkCollectionIntent linksIntent = (LinkCollectionIntent) installable; |
185 | if (pathContainsDevice(linksIntent.links(), device.id())) { | 190 | if (pathContainsDevice(linksIntent.links(), device.id())) { | ... | ... |
-
Please register or login to post a comment