Thomas Vachuska
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
......@@ -141,7 +141,7 @@ public class LinkCollectionIntentFlowObjectivesCompiler implements IntentCompile
.withPriority(intent.priority())
.fromApp(appId)
.makePermanent()
.withFlag(ForwardingObjective.Flag.VERSATILE)
.withFlag(ForwardingObjective.Flag.SPECIFIC)
.add();
objectives.add(objective);
......
......@@ -122,9 +122,7 @@ public class PathIntentFlowObjectiveCompiler
.withPriority(priority)
.fromApp(appId)
.makePermanent()
// FIXME - reevaluate how to set this flag.
// Must be VERSATILE now because default pipeline only supports VERSATILE
.withFlag(ForwardingObjective.Flag.VERSATILE)
.withFlag(ForwardingObjective.Flag.SPECIFIC)
.add());
devices.add(ingress.deviceId());
}
......
......@@ -106,11 +106,7 @@ public class DefaultSingleTablePipeline extends AbstractHandlerBehaviour impleme
@Override
public void forward(ForwardingObjective fwd) {
if (fwd.flag() != ForwardingObjective.Flag.VERSATILE) {
throw new UnsupportedOperationException(
"Only VERSATILE is supported.");
}
// Deal with SPECIFIC and VERSATILE in the same manner.
TrafficSelector selector = fwd.selector();
TrafficTreatment treatment = fwd.treatment();
if ((fwd.treatment().deferred().size() == 0) &&
......