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/PiTableEntry.java b/core/api/src/main/java/org/onosproject/net/pi/runtime/PiTableEntry.java
index 04b2528..f8a1460 100644
--- a/core/api/src/main/java/org/onosproject/net/pi/runtime/PiTableEntry.java
+++ b/core/api/src/main/java/org/onosproject/net/pi/runtime/PiTableEntry.java
@@ -135,6 +135,7 @@
}
PiTableEntry that = (PiTableEntry) o;
return priority == that.priority &&
+ cookie == that.cookie &&
Double.compare(that.timeout, timeout) == 0 &&
Objects.equal(tableId, that.tableId) &&
Objects.equal(matchKey, that.matchKey) &&
@@ -145,7 +146,7 @@
@Override
public int hashCode() {
return Objects.hashCode(tableId, matchKey, isDefaultAction, tableAction,
- priority, timeout);
+ priority, cookie, timeout);
}
@Override