[AETHER-599] Implement FabricPipelineTraceable

Core changes supporting fabric traceable implementation.
Includes minor fixes to the OFDPA traceable unit tests

Change-Id: I2f0d1172022a8fc725df9e96526092c59ddc0e0b
diff --git a/core/api/src/main/java/org/onosproject/net/flow/criteria/PiCriterion.java b/core/api/src/main/java/org/onosproject/net/flow/criteria/PiCriterion.java
index a346927..17d1270 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/criteria/PiCriterion.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/criteria/PiCriterion.java
@@ -108,6 +108,16 @@
     }
 
     /**
+     * Returns the PiCriterion builder initialized by the given PiCriterion.
+     *
+     * @param piCriterion the input PiCriterion
+     * @return PiCriterion builder
+     */
+    public static Builder builder(PiCriterion piCriterion) {
+        return new Builder(piCriterion);
+    }
+
+    /**
      * PiCriterion Builder.
      */
     @Beta
@@ -120,6 +130,21 @@
             // ban constructor.
         }
 
+        private Builder(PiCriterion piCriterion) {
+            piCriterion.fieldMatchMap.forEach(((piMatchFieldId, piFieldMatch) -> add(piFieldMatch)));
+        }
+
+        /**
+         * Adds a match field to the builder.
+         *
+         * @param field the field value
+         * @return this
+         */
+        public Builder add(PiFieldMatch field) {
+            fieldMatchMapBuilder.put(field.fieldId(), field);
+            return this;
+        }
+
         /**
          * Adds an exact field match for the given fieldId and value.
          *