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
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentFlowObjectivesCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentFlowObjectivesCompiler.java
index 1ef3ee2..8490077 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentFlowObjectivesCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentFlowObjectivesCompiler.java
@@ -141,7 +141,7 @@
                     .withPriority(intent.priority())
                     .fromApp(appId)
                     .makePermanent()
-                    .withFlag(ForwardingObjective.Flag.VERSATILE)
+                    .withFlag(ForwardingObjective.Flag.SPECIFIC)
                     .add();
 
             objectives.add(objective);
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentFlowObjectiveCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentFlowObjectiveCompiler.java
index 6a95fd3..d1ab1cf 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentFlowObjectiveCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentFlowObjectiveCompiler.java
@@ -122,9 +122,7 @@
                   .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());
     }
diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/DefaultSingleTablePipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/DefaultSingleTablePipeline.java
index 2792791..a58aeff 100644
--- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/DefaultSingleTablePipeline.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/DefaultSingleTablePipeline.java
@@ -106,11 +106,7 @@
 
     @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) &&