More robust P4Runtime group handling
This patch solves the PENDING_UPDATE and PENDING_ADD_RETRY issue
observed on the ONS EU topology.
The P4Runtime action profile group handling has been re-implemented to
be robust against inconsistencies of the device mirror, which is now
periodically synchronized with the device state. Similarly, we implement
a routine in the P4RuntimeClient to cleanup unused action profile
members.
This patch includes also:
- Refactor PI handle classes to allow creating handles without the
entity instance
- Use list instead of collections in P4RuntimeClient methods, as order
of updates sent and/or entities received from the device is important
Change-Id: I2e7964ce90f43d66680131b47ab52aca32ab55d2
diff --git a/core/api/src/main/java/org/onosproject/net/pi/runtime/PiHandle.java b/core/api/src/main/java/org/onosproject/net/pi/runtime/PiHandle.java
index e8e70d1..eb74288 100644
--- a/core/api/src/main/java/org/onosproject/net/pi/runtime/PiHandle.java
+++ b/core/api/src/main/java/org/onosproject/net/pi/runtime/PiHandle.java
@@ -29,11 +29,9 @@
public abstract class PiHandle<E extends PiEntity> {
private final DeviceId deviceId;
- private final E piEntity;
- protected PiHandle(DeviceId deviceId, E piEntity) {
+ protected PiHandle(DeviceId deviceId) {
this.deviceId = checkNotNull(deviceId);
- this.piEntity = checkNotNull(piEntity);
}
/**
@@ -50,18 +48,7 @@
*
* @return PI entity type
*/
- public final PiEntityType entityType() {
- return piEntity.piEntityType();
- }
-
- /**
- * The entity to which this handle is associated.
- *
- * @return PI entity
- */
- public final E piEntity() {
- return piEntity;
- }
+ public abstract PiEntityType entityType();
@Override
public abstract int hashCode();