openconfig / gribi

A gRPC Interface to a Network Element RIB.
Apache License 2.0
57 stars 14 forks source link

Flush RPC: FlushResponseError.Reason when neither election id nor override are specified #23

Closed nandanarista closed 2 years ago

nandanarista commented 2 years ago

Today in the FlushRequest, if election doesn't specify a id nor override in single primary mode, there's no Reason enum for this error. Does it make sense to add a specific enum like NO_ELECTION_ID_OR_OVERRIDE to ModifyResponseError.Reason ?

robshakir commented 2 years ago

This sounds reasonable to me -- and covers some of the same concerns as #24.

robshakir commented 2 years ago

I suggest we also specify in the proto what the canonical code that is used is. Particularly, whilst implementing this, I thought: