Committed by
Gerrit Code Review
adding specified treatments when uninstalling intents
Change-Id: I4a200a6df9fce048321846c6df9b9e79457f7dfd
Showing
1 changed file
with
2 additions
and
1 deletions
... | @@ -123,7 +123,8 @@ public class PathIntentInstaller implements IntentInstaller<PathIntent> { | ... | @@ -123,7 +123,8 @@ public class PathIntentInstaller implements IntentInstaller<PathIntent> { |
123 | while (links.hasNext()) { | 123 | while (links.hasNext()) { |
124 | builder.matchInport(prev.port()); | 124 | builder.matchInport(prev.port()); |
125 | Link link = links.next(); | 125 | Link link = links.next(); |
126 | - TrafficTreatment treatment = builder() | 126 | + TrafficTreatment treatment = // if this is the last flow rule, apply the intent's treatments |
127 | + (links.hasNext() ? builder() : builder(intent.treatment())) | ||
127 | .setOutput(link.src().port()).build(); | 128 | .setOutput(link.src().port()).build(); |
128 | FlowRule rule = new DefaultFlowRule(link.src().deviceId(), | 129 | FlowRule rule = new DefaultFlowRule(link.src().deviceId(), |
129 | builder.build(), treatment, | 130 | builder.build(), treatment, | ... | ... |
-
Please register or login to post a comment