[CORD-801] OFDPA pipeline for OpenvSwitch

Drops TTL_IN, TTL_OUT and MPLS_BOS instructions which are not supported by OpenvSwitch.
This will allow us to run OFDPA pipeline with OpenvSwitch >= 2.6.0

Change-Id: Icfa6f2fdaa857877a57ae4c719354483b24c5816
diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa2GroupHandler.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa2GroupHandler.java
index 7da0be5..f116c71 100644
--- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa2GroupHandler.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa2GroupHandler.java
@@ -80,7 +80,7 @@
 import static org.slf4j.LoggerFactory.getLogger;
 
 /**
- * Group handler for OFDPA2 pipeline.
+ * Group handler that emulates Broadcom OF-DPA TTP on CpqD.
  */
 public class Ofdpa2GroupHandler {
     /*
@@ -129,6 +129,24 @@
     protected ConcurrentHashMap<Integer, NextObjective> pendingBuckets =
             new ConcurrentHashMap<>();
 
+    /**
+     * Determines whether this pipeline support copy ttl instructions or not.
+     *
+     * @return true if copy ttl instructions are supported
+     */
+    protected boolean supportCopyTtl() {
+        return true;
+    }
+
+    /**
+     * Determines whether this pipeline support set mpls bos instruction or not.
+     *
+     * @return true if set mpls bos instruction is supported
+     */
+    protected boolean supportSetMplsBos() {
+        return true;
+    }
+
     protected void init(DeviceId deviceId, PipelinerContext context) {
         this.deviceId = deviceId;
         this.flowObjectiveStore = context.store();
@@ -844,10 +862,14 @@
                 TrafficTreatment.Builder l3vpnTtb = DefaultTrafficTreatment.builder();
                 l3vpnTtb.pushMpls()
                         .setMpls(innermostLabel)
-                        .setMplsBos(true)
-                        .copyTtlOut()
-                        .group(new DefaultGroupId(
-                                onelabelGroupInfo.nextGroupDesc.givenGroupId()));
+                        .group(new DefaultGroupId(onelabelGroupInfo.nextGroupDesc.givenGroupId()));
+                if (supportCopyTtl()) {
+                    l3vpnTtb.copyTtlOut();
+                }
+                if (supportSetMplsBos()) {
+                    l3vpnTtb.setMplsBos(true);
+                }
+
                 GroupBucket l3vpnGrpBkt  =
                         DefaultGroupBucket.createIndirectGroupBucket(l3vpnTtb.build());
                 int l3vpnIndex = getNextAvailableIndex();