Do not insert or delete default action entries in P4Runtime

Spec says:
the default entry for a table is always set. It can be set at
compile-time by the P4 programmer - or defaults to NoAction (which is a
no-op) otherwise - and assuming it is not declared as const, can be
modified by the P4Runtime client. Because the default entry is always
set, we do not allow INSERT and DELETE updates on the default entry and
the P4Runtime server must return an INVALID_ARGUMENT error code if the
client attempts one.

With this patch we convert insert or delete operations into modify ones
(unless specified by a driver property, to support non-compliant devices).
For delete, we use the interpreter to suggest a default action that is
the same as the one when the pipeline was originally deployed.

Also, we introduce the capability of synchronizing the device mirror
with the device state.

Change-Id: I3758fc11780eb0f1cf4ed5a295bd98b54b182e29
diff --git a/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/mirror/P4RuntimeMirror.java b/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/mirror/P4RuntimeMirror.java
index ab18c9d..d1c9cdd 100644
--- a/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/mirror/P4RuntimeMirror.java
+++ b/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/mirror/P4RuntimeMirror.java
@@ -22,6 +22,7 @@
 import org.onosproject.net.pi.runtime.PiHandle;
 
 import java.util.Collection;
+import java.util.Map;
 
 /**
  * Service to keep track of the device state for a given class of PI entities.
@@ -71,4 +72,12 @@
      * @param handle handle
      */
     void remove(H handle);
+
+    /**
+     * Synchronizes the state of the given device ID with the given handle map.
+     *
+     * @param deviceId  device ID
+     * @param handleMap handle map
+     */
+    void sync(DeviceId deviceId, Map<H, E> handleMap);
 }