Cavium-pro driver extends BMv2

Change-Id: I1377b321c4e9b66d01a5cca76122b1087775abf2
diff --git a/drivers/cavium-pro/BUCK b/drivers/cavium-pro/BUCK
index e082653..2a20b32 100644
--- a/drivers/cavium-pro/BUCK
+++ b/drivers/cavium-pro/BUCK
@@ -1,6 +1,7 @@
 COMPILE_DEPS = [
     '//lib:CORE_DEPS',
     '//drivers/p4runtime:onos-drivers-p4runtime',
+    '//drivers/bmv2:onos-drivers-bmv2',
 ]
 
 BUNDLES = [
@@ -19,7 +20,7 @@
     description = 'Adds support for Cavium XPliant-based devices using P4Runtime',
     included_bundles = BUNDLES,
     required_apps = [
-        'org.onosproject.drivers.p4runtime',
+        'org.onosproject.drivers.bmv2',
         'org.onosproject.pipelines.fabric',
     ],
 )
diff --git a/drivers/cavium-pro/src/main/java/org/onosproject/drivers/cavium/pro/XpliantProPipelineProgrammable.java b/drivers/cavium-pro/src/main/java/org/onosproject/drivers/cavium/pro/XpliantProPipelineProgrammable.java
index 5f21751..eb773e3 100644
--- a/drivers/cavium-pro/src/main/java/org/onosproject/drivers/cavium/pro/XpliantProPipelineProgrammable.java
+++ b/drivers/cavium-pro/src/main/java/org/onosproject/drivers/cavium/pro/XpliantProPipelineProgrammable.java
@@ -16,7 +16,7 @@
 
 package org.onosproject.drivers.cavium.pro;
 
-import org.onosproject.drivers.p4runtime.AbstractP4RuntimePipelineProgrammable;
+import org.onosproject.drivers.bmv2.Bmv2PipelineProgrammable;
 import org.onosproject.net.behaviour.PiPipelineProgrammable;
 import org.onosproject.net.pi.model.PiPipeconf;
 import org.onosproject.net.pi.model.PiPipeconfId;
@@ -32,8 +32,7 @@
  * Implementation of the PiPipelineProgrammable behaviour for a Xpliant-based
  * switch.
  */
-public class XpliantProPipelineProgrammable
-        extends AbstractP4RuntimePipelineProgrammable
+public class XpliantProPipelineProgrammable extends Bmv2PipelineProgrammable
         implements PiPipelineProgrammable {
 
     private static final PiPipeconfId FABRIC_PIPECONF_ID =
@@ -45,8 +44,7 @@
                       format("Cannot program XPliant device with a pipeconf " +
                                      "other than '%s' (found '%s')",
                              FABRIC_PIPECONF_ID, pipeconf.id()));
-        // [MWC-2018] Dummy value. The chip is already configured with fabric.p4
-        return ByteBuffer.allocate(1).put((byte) 1);
+        return super.createDeviceDataBuffer(pipeconf);
     }
 
     @Override
diff --git a/drivers/cavium-pro/src/main/resources/cavium-pro-drivers.xml b/drivers/cavium-pro/src/main/resources/cavium-pro-drivers.xml
index e9845a9..5dc2e6a 100644
--- a/drivers/cavium-pro/src/main/resources/cavium-pro-drivers.xml
+++ b/drivers/cavium-pro/src/main/resources/cavium-pro-drivers.xml
@@ -15,7 +15,7 @@
   ~ limitations under the License.
   -->
 <drivers>
-    <driver name="cavium-pro" manufacturer="Cavium" hwVersion="1.0" swVersion="1.0" extends="p4runtime">
+    <driver name="cavium-pro" manufacturer="Cavium" hwVersion="1.0" swVersion="1.0" extends="bmv2">
         <behaviour api="org.onosproject.net.behaviour.PiPipelineProgrammable"
                    impl="org.onosproject.drivers.cavium.pro.XpliantProPipelineProgrammable"/>
     </driver>