alshabib
Committed by Gerrit Code Review

adding specified treatments when uninstalling intents

Change-Id: I4a200a6df9fce048321846c6df9b9e79457f7dfd
......@@ -123,8 +123,9 @@ public class PathIntentInstaller implements IntentInstaller<PathIntent> {
while (links.hasNext()) {
builder.matchInport(prev.port());
Link link = links.next();
TrafficTreatment treatment = builder()
.setOutput(link.src().port()).build();
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,
123, appId, (short) (intent.id().fingerprint() & 0xffff), 0, true);
......