alshabib
Committed by Gerrit Code Review

adding specified treatments when uninstalling intents

Change-Id: I4a200a6df9fce048321846c6df9b9e79457f7dfd
......@@ -123,7 +123,8 @@ public class PathIntentInstaller implements IntentInstaller<PathIntent> {
while (links.hasNext()) {
builder.matchInport(prev.port());
Link link = links.next();
TrafficTreatment treatment = builder()
TrafficTreatment treatment = // if this is the last flow rule, apply the intent's treatments
(links.hasNext() ? builder() : builder(intent.treatment()))
.setOutput(link.src().port()).build();
FlowRule rule = new DefaultFlowRule(link.src().deviceId(),
builder.build(), treatment,
......