Hi, I am not sure why a GET response is not OneOf "repeated notifcations" and "Error"?
Observation 1: if the intention is to return an error to a GET request, the GetResponse structure will have no notifications. However, subscribe response is clear on either send a list of notifications OR an error.
_message GetResponse {
repeated Notification notification = 1; // Data values.
Error error = 2 [deprecated = true]; // Errors that occurred in the Get.
// Extension messages associated with the GetResponse. See the
// gNMI extension specification for further definition.
repeated gnmi_ext.Extension extension = 3;
}
message SubscribeResponse {
oneof response {
Notification update = 1; // Changed or sampled value for a path.
// Indicate target has sent all values associated with the subscription
// at least once.
bool sync_response = 3;
// Deprecated in favour of google.golang.org/genproto/googleapis/rpc/status
Error error = 4 [deprecated = true];
}
// Extension messages associated with the SubscribeResponse. See the
// gNMI extension specification for further definition.
repeated gnmi_ext.Extension extension = 5;
}_
Observation 2: The deprecation comment to use grpc::Status is also missing in the GetResponse message.
Can someone explain why GetResponse message is designed so?
Thanks,
Hi, I am not sure why a GET response is not OneOf "repeated notifcations" and "Error"?
Observation 1: if the intention is to return an error to a GET request, the GetResponse structure will have no notifications. However, subscribe response is clear on either send a list of notifications OR an error.
_message GetResponse {
repeated Notification notification = 1; // Data values.
Error error = 2 [deprecated = true]; // Errors that occurred in the Get.
// Extension messages associated with the GetResponse. See the
// gNMI extension specification for further definition.
repeated gnmi_ext.Extension extension = 3;
}
message SubscribeResponse {
oneof response {
Notification update = 1; // Changed or sampled value for a path.
// Indicate target has sent all values associated with the subscription
// at least once.
bool sync_response = 3;
// Deprecated in favour of google.golang.org/genproto/googleapis/rpc/status
Error error = 4 [deprecated = true];
}
// Extension messages associated with the SubscribeResponse. See the
// gNMI extension specification for further definition.
repeated gnmi_ext.Extension extension = 5;
}_
Observation 2: The deprecation comment to use grpc::Status is also missing in the GetResponse message.
Can someone explain why GetResponse message is designed so?
Thanks,