cisco-ie / gnmi

gRPC Network Management Interface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SubscribeRequest prefix is required against specification

remingtonc opened this issue · comments

gnmi/client/query.go

Lines 235 to 237 in f490526

if s.Subscribe.Prefix == nil {
return q, errors.New("Prefix field in SubscriptionList is nil")
}

SubscribeRequest implementation requires prefix despite language such as "The default prefix is null." and "This field MUST only ever be present on prefix paths in the corresponding request and response messages. This field is optional for clients."

Foolishly did not copy comment from fork (re-created this fork due to being messy), but previously there was commentary by maintainers stating that this was largely to accommodate a collector implementation vs a client implementation so that a collector would not attempt to collect for all potential targets. It appears there is, informally, a separation between a collector versus a client which has tainted some of the client aspects.