Closed konne88 closed 3 years ago
@antoninbas @stefanheule What do you think about this idea? If this seems reasonable, I'm happy to send out the PR to change the spec.
Seems very reasonable, I'm a big fan of making things easier to debug/understand. If someone still prefers an integer as the role, they can still do that by encoding it as a byte-string (or even a regular string), so this is not limiting any prior usecases either.
It appears that performance concerns are less of an issue for the role, since it is only once per WriteRequest as probably the most frequent message it appears in.
This might tread into "number of angels that can dance on the head of a pin" kinds of discussion, but does this mean that a P4Runtime server must continue to support role_id until and unless it upgrades to a version of P4Runtime API that explicitly breaks backwards compatibility and drops role_id completely?
Let's discuss this in tomorrow's meeting. In general, the way we've handled this is by returning UNIMPLEMENTED for any feature that we don't support (of which there are many).
Could we add string based roles to P4Runtime. The idea is that a string is much more readable (e.g. "tunnel manager") than to use an id (e.g. 1).