[ONOS-7143] Add arbitration update support by P4RuntimeClient

Change-Id: I671275576018d50447f969166a7b42a28dd93b1d
diff --git a/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/AbstractP4RuntimePipelineProgrammable.java b/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/AbstractP4RuntimePipelineProgrammable.java
index 1272305..911c5ed 100644
--- a/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/AbstractP4RuntimePipelineProgrammable.java
+++ b/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/AbstractP4RuntimePipelineProgrammable.java
@@ -73,19 +73,6 @@
         }
 
         try {
-            if (!client.setPipelineConfig(pipeconf, deviceDataBuffer).get()) {
-                log.warn("Unable to deploy pipeconf {} to {}", pipeconf.id(), deviceId);
-                return false;
-            }
-        } catch (InterruptedException | ExecutionException e) {
-            log.error("Exception while deploying pipeconf to {}", deviceId, e);
-            return false;
-        }
-
-        try {
-            // It would make more sense to init the stream channel once the client
-            // is created, but P4runtime would reject any command if a P4info has
-            // not been set first.
             if (!client.initStreamChannel().get()) {
                 log.warn("Unable to init stream channel to {}.", deviceId);
                 return false;
@@ -95,6 +82,15 @@
             return false;
         }
 
+        try {
+            if (!client.setPipelineConfig(pipeconf, deviceDataBuffer).get()) {
+                log.warn("Unable to deploy pipeconf {} to {}", pipeconf.id(), deviceId);
+                return false;
+            }
+        } catch (InterruptedException | ExecutionException e) {
+            log.error("Exception while deploying pipeconf to {}", deviceId, e);
+            return false;
+        }
         return true;
     }