Committed by
Gerrit Code Review
Making default single table pipeline accept SPECIFIC as well as VERSATILE flow objectives.
Changing flow objective intent compilers to use SPECIFIC flag. Change-Id: Ib275fe0fa38b66045fcdc225233a37ad0897bac6
Showing
3 changed files
with
3 additions
and
9 deletions
| ... | @@ -141,7 +141,7 @@ public class LinkCollectionIntentFlowObjectivesCompiler implements IntentCompile | ... | @@ -141,7 +141,7 @@ public class LinkCollectionIntentFlowObjectivesCompiler implements IntentCompile |
| 141 | .withPriority(intent.priority()) | 141 | .withPriority(intent.priority()) |
| 142 | .fromApp(appId) | 142 | .fromApp(appId) |
| 143 | .makePermanent() | 143 | .makePermanent() |
| 144 | - .withFlag(ForwardingObjective.Flag.VERSATILE) | 144 | + .withFlag(ForwardingObjective.Flag.SPECIFIC) |
| 145 | .add(); | 145 | .add(); |
| 146 | 146 | ||
| 147 | objectives.add(objective); | 147 | objectives.add(objective); | ... | ... |
core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentFlowObjectiveCompiler.java
| ... | @@ -122,9 +122,7 @@ public class PathIntentFlowObjectiveCompiler | ... | @@ -122,9 +122,7 @@ public class PathIntentFlowObjectiveCompiler |
| 122 | .withPriority(priority) | 122 | .withPriority(priority) |
| 123 | .fromApp(appId) | 123 | .fromApp(appId) |
| 124 | .makePermanent() | 124 | .makePermanent() |
| 125 | - // FIXME - reevaluate how to set this flag. | 125 | + .withFlag(ForwardingObjective.Flag.SPECIFIC) |
| 126 | - // Must be VERSATILE now because default pipeline only supports VERSATILE | ||
| 127 | - .withFlag(ForwardingObjective.Flag.VERSATILE) | ||
| 128 | .add()); | 126 | .add()); |
| 129 | devices.add(ingress.deviceId()); | 127 | devices.add(ingress.deviceId()); |
| 130 | } | 128 | } | ... | ... |
| ... | @@ -106,11 +106,7 @@ public class DefaultSingleTablePipeline extends AbstractHandlerBehaviour impleme | ... | @@ -106,11 +106,7 @@ public class DefaultSingleTablePipeline extends AbstractHandlerBehaviour impleme |
| 106 | 106 | ||
| 107 | @Override | 107 | @Override |
| 108 | public void forward(ForwardingObjective fwd) { | 108 | public void forward(ForwardingObjective fwd) { |
| 109 | - if (fwd.flag() != ForwardingObjective.Flag.VERSATILE) { | 109 | + // Deal with SPECIFIC and VERSATILE in the same manner. |
| 110 | - throw new UnsupportedOperationException( | ||
| 111 | - "Only VERSATILE is supported."); | ||
| 112 | - } | ||
| 113 | - | ||
| 114 | TrafficSelector selector = fwd.selector(); | 110 | TrafficSelector selector = fwd.selector(); |
| 115 | TrafficTreatment treatment = fwd.treatment(); | 111 | TrafficTreatment treatment = fwd.treatment(); |
| 116 | if ((fwd.treatment().deferred().size() == 0) && | 112 | if ((fwd.treatment().deferred().size() == 0) && | ... | ... |
-
Please register or login to post a comment