From 27efa0979a34b3b88f855202caeef0cce5b6b90c Mon Sep 17 00:00:00 2001 From: wenovus Date: Wed, 6 Jul 2022 15:02:40 -0700 Subject: [PATCH 1/7] Add behaviour tables for `GetResponse` and `SubscribeResponse` Fixes #142 and #155 --- rpc/gnmi/gnmi-specification.md | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/rpc/gnmi/gnmi-specification.md b/rpc/gnmi/gnmi-specification.md index e109c90..bef0ce5 100644 --- a/rpc/gnmi/gnmi-specification.md +++ b/rpc/gnmi/gnmi-specification.md @@ -38,8 +38,9 @@ April 28, 2022 * [3.2.2 The CapabilityResponse message](#322-the-capabilityresponse-message) * [3.3 Retrieving Snapshots of State Information](#33-retrieving-snapshots-of-state-information) * [3.3.1 The GetRequest Message](#331-the-getrequest-message) - * [3.3.2 The GetResponse message](#332-the-getresponse-message) + * [3.3.2 The GetResponse Message](#332-the-getresponse-message) * [3.3.3 Considerations for using Get](#333-considerations-for-using-get) + * [3.3.4 GetResponse Behaviour Table](#333-getresponse-behaviour-table) * [3.4 Modifying State](#34-modifying-state) * [3.4.1 The SetRequest Message](#341-the-setrequest-message) * [3.4.2 The SetResponse Message](#342-the-setresponse-message) @@ -53,7 +54,7 @@ April 28, 2022 * [3.5.1.1 The SubscribeRequest Message](#3511-the-subscriberequest-message) * [3.5.1.2 The SubscriptionList Message](#3512-the-subscriptionlist-message) * [3.5.1.3 The Subscription Message](#3513-the-subscription-message) - * [3.5.1.4 The SubscribeResponse Message](#3514-the-subscriberesponse-message) + * [3.5.1.4 The SubscribeResponse Message](#3514-the-subscriberesponse-message) * [3.5.1.5 Creating Subscriptions](#3515-creating-subscriptions) * [3.5.1.5.1 ONCE Subscriptions](#35151-once-subscriptions) * [3.5.1.5.2 STREAM Subscriptions](#35152-stream-subscriptions) @@ -61,6 +62,7 @@ April 28, 2022 * [3.5.2 Sending Telemetry Updates](#352-sending-telemetry-updates) * [3.5.2.1 Bundling of Telemetry Updates](#3521-bundling-of-telemetry-updates) * [3.5.2.3 Sending Telemetry Updates](#3523-sending-telemetry-updates) + * [3.5.2.4 SubscribeResponse Behaviour Table](#3523-subscriberesponse-behaviour-table) * [4 Appendix: Current Protobuf Message and Service Specification](#4-appendix-current-protobuf-message-and-service-specification) * [5 Appendix: Current Outstanding Issues/Future Features](#5-appendix-current-outstanding-issuesfuture-features) * [6 Copyright](#6-copyright) @@ -866,7 +868,7 @@ The types of data currently defined are: If the `type` field is not specified, the target MUST return CONFIG, STATE and OPERATIONAL data fields in the tree resulting from the client's query. -### 3.3.2 The GetResponse message +### 3.3.2 The GetResponse Message The `GetResponse` message consists of: @@ -898,6 +900,15 @@ accuracy for individual data items, the `Subscribe` RPC is recommended to request a telemetry stream (see [Section 3.5.2](#352-sending-telemetry-updates)). +### 3.3.4 GetResponse Behaviour Table + +| GetRequest Scenario | Target Behaviour | +| ----------------------------------------------------------------------------------------------------------------------- | ---------------- | +| Subscribed paths exist or a YANG default value is [in use](https://datatracker.ietf.org/doc/html/rfc7950#section-7.6.1) | Value is returned | +| Subscribed paths are syntactically correct but one or more paths do not (yet) exist | Return `NOT_FOUND` | +| Subscribed paths are syntactically correct but one or more paths is not implemented by the server | Return `UNIMPLEMENTED` | +| One or more subscribed paths is syntactically incorrect | Return `INVALID_ARGUMENT` | + ## 3.4 Modifying State Modifications to the state of the target are made through the `Set` RPC. A @@ -1535,6 +1546,15 @@ by any updates representing subsequent changes to current state. For a `POLL` or `updates_only` field allows a client to only watch for changes, e.g. an update to configuration. +#### 3.5.2.4 SubscribeResponse Behaviour Table + +| Subscription Scenario | ONCE | POLL | STREAM | +| ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | ---------------------------------------- | ------ | +| Subscribed paths exist or a YANG default value is [in use](https://datatracker.ietf.org/doc/html/rfc7950#section-7.6.1) | Value is returned | Value is returned | Value is returned | +| Subscribed paths are syntactically correct but one or more paths do not (yet) exist | No value returned for non-existent paths | No value returned for non-existent paths | nothing is sent for non-existent paths (yet), RPC is not closed | +| Subscribed paths are syntactically correct but one or more paths is not implemented by the server | Return `UNIMPLEMENTED` | Return `UNIMPLEMENTED` | Return `UNIMPLEMENTED` | +| One or more subscribed paths is syntactically incorrect | Return `INVALID_ARGUMENT` | Return `INVALID_ARGUMENT` | Return `INVALID_ARGUMENT` | + # 4 Appendix: Current Protobuf Message and Service Specification The latest Protobuf IDL gNMI specification is found in GitHub at From ebd8b5dc6765c9d08eb906ca3bb14dbefe2cc588 Mon Sep 17 00:00:00 2001 From: wenovus Date: Wed, 6 Jul 2022 15:09:31 -0700 Subject: [PATCH 2/7] fix links and add periods --- rpc/gnmi/gnmi-specification.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/rpc/gnmi/gnmi-specification.md b/rpc/gnmi/gnmi-specification.md index bef0ce5..e46c1d7 100644 --- a/rpc/gnmi/gnmi-specification.md +++ b/rpc/gnmi/gnmi-specification.md @@ -40,7 +40,7 @@ April 28, 2022 * [3.3.1 The GetRequest Message](#331-the-getrequest-message) * [3.3.2 The GetResponse Message](#332-the-getresponse-message) * [3.3.3 Considerations for using Get](#333-considerations-for-using-get) - * [3.3.4 GetResponse Behaviour Table](#333-getresponse-behaviour-table) + * [3.3.4 GetResponse Behaviour Table](#334-getresponse-behaviour-table) * [3.4 Modifying State](#34-modifying-state) * [3.4.1 The SetRequest Message](#341-the-setrequest-message) * [3.4.2 The SetResponse Message](#342-the-setresponse-message) @@ -62,7 +62,7 @@ April 28, 2022 * [3.5.2 Sending Telemetry Updates](#352-sending-telemetry-updates) * [3.5.2.1 Bundling of Telemetry Updates](#3521-bundling-of-telemetry-updates) * [3.5.2.3 Sending Telemetry Updates](#3523-sending-telemetry-updates) - * [3.5.2.4 SubscribeResponse Behaviour Table](#3523-subscriberesponse-behaviour-table) + * [3.5.2.4 SubscribeResponse Behaviour Table](#3524-subscriberesponse-behaviour-table) * [4 Appendix: Current Protobuf Message and Service Specification](#4-appendix-current-protobuf-message-and-service-specification) * [5 Appendix: Current Outstanding Issues/Future Features](#5-appendix-current-outstanding-issuesfuture-features) * [6 Copyright](#6-copyright) @@ -902,12 +902,12 @@ request a telemetry stream (see [Section ### 3.3.4 GetResponse Behaviour Table -| GetRequest Scenario | Target Behaviour | -| ----------------------------------------------------------------------------------------------------------------------- | ---------------- | -| Subscribed paths exist or a YANG default value is [in use](https://datatracker.ietf.org/doc/html/rfc7950#section-7.6.1) | Value is returned | -| Subscribed paths are syntactically correct but one or more paths do not (yet) exist | Return `NOT_FOUND` | -| Subscribed paths are syntactically correct but one or more paths is not implemented by the server | Return `UNIMPLEMENTED` | -| One or more subscribed paths is syntactically incorrect | Return `INVALID_ARGUMENT` | +| GetRequest Scenario | Target Behaviour | +| ------------------------------------------------------------------------------------------------------------------------ | ---------------- | +| Subscribed paths exist or a YANG default value is [in use](https://datatracker.ietf.org/doc/html/rfc7950#section-7.6.1). | Value is returned | +| Subscribed paths are syntactically correct but one or more paths do not (yet) exist. | Return `NOT_FOUND` | +| Subscribed paths are syntactically correct but one or more paths is not implemented by the server. | Return `UNIMPLEMENTED` | +| One or more subscribed paths is syntactically incorrect. | Return `INVALID_ARGUMENT` | ## 3.4 Modifying State @@ -1548,12 +1548,12 @@ to configuration. #### 3.5.2.4 SubscribeResponse Behaviour Table -| Subscription Scenario | ONCE | POLL | STREAM | -| ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | ---------------------------------------- | ------ | -| Subscribed paths exist or a YANG default value is [in use](https://datatracker.ietf.org/doc/html/rfc7950#section-7.6.1) | Value is returned | Value is returned | Value is returned | -| Subscribed paths are syntactically correct but one or more paths do not (yet) exist | No value returned for non-existent paths | No value returned for non-existent paths | nothing is sent for non-existent paths (yet), RPC is not closed | -| Subscribed paths are syntactically correct but one or more paths is not implemented by the server | Return `UNIMPLEMENTED` | Return `UNIMPLEMENTED` | Return `UNIMPLEMENTED` | -| One or more subscribed paths is syntactically incorrect | Return `INVALID_ARGUMENT` | Return `INVALID_ARGUMENT` | Return `INVALID_ARGUMENT` | +| Subscription Scenario | ONCE | POLL | STREAM | +| ------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------- | ---------------------------------------- | ------ | +| Subscribed paths exist or a YANG default value is [in use](https://datatracker.ietf.org/doc/html/rfc7950#section-7.6.1). | Value is returned | Value is returned | Value is returned | +| Subscribed paths are syntactically correct but one or more paths do not (yet) exist. | No value returned for non-existent paths | No value returned for non-existent paths | nothing is sent for non-existent paths (yet), RPC is not closed | +| Subscribed paths are syntactically correct but one or more paths is not implemented by the server. | Return `UNIMPLEMENTED` | Return `UNIMPLEMENTED` | Return `UNIMPLEMENTED` | +| One or more subscribed paths is syntactically incorrect. | Return `INVALID_ARGUMENT` | Return `INVALID_ARGUMENT` | Return `INVALID_ARGUMENT` | # 4 Appendix: Current Protobuf Message and Service Specification From 0e87546419a449fd2cf3ca9ed29069627a4e612d Mon Sep 17 00:00:00 2001 From: wenovus Date: Wed, 6 Jul 2022 15:09:31 -0700 Subject: [PATCH 3/7] fix links and add periods --- rpc/gnmi/gnmi-specification.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/rpc/gnmi/gnmi-specification.md b/rpc/gnmi/gnmi-specification.md index bef0ce5..e46c1d7 100644 --- a/rpc/gnmi/gnmi-specification.md +++ b/rpc/gnmi/gnmi-specification.md @@ -40,7 +40,7 @@ April 28, 2022 * [3.3.1 The GetRequest Message](#331-the-getrequest-message) * [3.3.2 The GetResponse Message](#332-the-getresponse-message) * [3.3.3 Considerations for using Get](#333-considerations-for-using-get) - * [3.3.4 GetResponse Behaviour Table](#333-getresponse-behaviour-table) + * [3.3.4 GetResponse Behaviour Table](#334-getresponse-behaviour-table) * [3.4 Modifying State](#34-modifying-state) * [3.4.1 The SetRequest Message](#341-the-setrequest-message) * [3.4.2 The SetResponse Message](#342-the-setresponse-message) @@ -62,7 +62,7 @@ April 28, 2022 * [3.5.2 Sending Telemetry Updates](#352-sending-telemetry-updates) * [3.5.2.1 Bundling of Telemetry Updates](#3521-bundling-of-telemetry-updates) * [3.5.2.3 Sending Telemetry Updates](#3523-sending-telemetry-updates) - * [3.5.2.4 SubscribeResponse Behaviour Table](#3523-subscriberesponse-behaviour-table) + * [3.5.2.4 SubscribeResponse Behaviour Table](#3524-subscriberesponse-behaviour-table) * [4 Appendix: Current Protobuf Message and Service Specification](#4-appendix-current-protobuf-message-and-service-specification) * [5 Appendix: Current Outstanding Issues/Future Features](#5-appendix-current-outstanding-issuesfuture-features) * [6 Copyright](#6-copyright) @@ -902,12 +902,12 @@ request a telemetry stream (see [Section ### 3.3.4 GetResponse Behaviour Table -| GetRequest Scenario | Target Behaviour | -| ----------------------------------------------------------------------------------------------------------------------- | ---------------- | -| Subscribed paths exist or a YANG default value is [in use](https://datatracker.ietf.org/doc/html/rfc7950#section-7.6.1) | Value is returned | -| Subscribed paths are syntactically correct but one or more paths do not (yet) exist | Return `NOT_FOUND` | -| Subscribed paths are syntactically correct but one or more paths is not implemented by the server | Return `UNIMPLEMENTED` | -| One or more subscribed paths is syntactically incorrect | Return `INVALID_ARGUMENT` | +| GetRequest Scenario | Target Behaviour | +| ------------------------------------------------------------------------------------------------------------------------ | ---------------- | +| Subscribed paths exist or a YANG default value is [in use](https://datatracker.ietf.org/doc/html/rfc7950#section-7.6.1). | Value is returned | +| Subscribed paths are syntactically correct but one or more paths do not (yet) exist. | Return `NOT_FOUND` | +| Subscribed paths are syntactically correct but one or more paths is not implemented by the server. | Return `UNIMPLEMENTED` | +| One or more subscribed paths is syntactically incorrect. | Return `INVALID_ARGUMENT` | ## 3.4 Modifying State @@ -1548,12 +1548,12 @@ to configuration. #### 3.5.2.4 SubscribeResponse Behaviour Table -| Subscription Scenario | ONCE | POLL | STREAM | -| ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | ---------------------------------------- | ------ | -| Subscribed paths exist or a YANG default value is [in use](https://datatracker.ietf.org/doc/html/rfc7950#section-7.6.1) | Value is returned | Value is returned | Value is returned | -| Subscribed paths are syntactically correct but one or more paths do not (yet) exist | No value returned for non-existent paths | No value returned for non-existent paths | nothing is sent for non-existent paths (yet), RPC is not closed | -| Subscribed paths are syntactically correct but one or more paths is not implemented by the server | Return `UNIMPLEMENTED` | Return `UNIMPLEMENTED` | Return `UNIMPLEMENTED` | -| One or more subscribed paths is syntactically incorrect | Return `INVALID_ARGUMENT` | Return `INVALID_ARGUMENT` | Return `INVALID_ARGUMENT` | +| Subscription Scenario | ONCE | POLL | STREAM | +| ------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------- | ---------------------------------------- | ------ | +| Subscribed paths exist or a YANG default value is [in use](https://datatracker.ietf.org/doc/html/rfc7950#section-7.6.1). | Value is returned | Value is returned | Value is returned | +| Subscribed paths are syntactically correct but one or more paths do not (yet) exist. | No value returned for non-existent paths | No value returned for non-existent paths | nothing is sent for non-existent paths (yet), RPC is not closed | +| Subscribed paths are syntactically correct but one or more paths is not implemented by the server. | Return `UNIMPLEMENTED` | Return `UNIMPLEMENTED` | Return `UNIMPLEMENTED` | +| One or more subscribed paths is syntactically incorrect. | Return `INVALID_ARGUMENT` | Return `INVALID_ARGUMENT` | Return `INVALID_ARGUMENT` | # 4 Appendix: Current Protobuf Message and Service Specification From 61ebb41be14fbf4d25576a65fc5469bb2d441858 Mon Sep 17 00:00:00 2001 From: wenovus Date: Wed, 6 Jul 2022 15:11:47 -0700 Subject: [PATCH 4/7] behaviour -> behavior --- rpc/gnmi/gnmi-specification.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rpc/gnmi/gnmi-specification.md b/rpc/gnmi/gnmi-specification.md index e46c1d7..0cab6e4 100644 --- a/rpc/gnmi/gnmi-specification.md +++ b/rpc/gnmi/gnmi-specification.md @@ -40,7 +40,7 @@ April 28, 2022 * [3.3.1 The GetRequest Message](#331-the-getrequest-message) * [3.3.2 The GetResponse Message](#332-the-getresponse-message) * [3.3.3 Considerations for using Get](#333-considerations-for-using-get) - * [3.3.4 GetResponse Behaviour Table](#334-getresponse-behaviour-table) + * [3.3.4 GetResponse Behavior Table](#334-getresponse-behavior-table) * [3.4 Modifying State](#34-modifying-state) * [3.4.1 The SetRequest Message](#341-the-setrequest-message) * [3.4.2 The SetResponse Message](#342-the-setresponse-message) @@ -62,7 +62,7 @@ April 28, 2022 * [3.5.2 Sending Telemetry Updates](#352-sending-telemetry-updates) * [3.5.2.1 Bundling of Telemetry Updates](#3521-bundling-of-telemetry-updates) * [3.5.2.3 Sending Telemetry Updates](#3523-sending-telemetry-updates) - * [3.5.2.4 SubscribeResponse Behaviour Table](#3524-subscriberesponse-behaviour-table) + * [3.5.2.4 SubscribeResponse Behavior Table](#3524-subscriberesponse-behavior-table) * [4 Appendix: Current Protobuf Message and Service Specification](#4-appendix-current-protobuf-message-and-service-specification) * [5 Appendix: Current Outstanding Issues/Future Features](#5-appendix-current-outstanding-issuesfuture-features) * [6 Copyright](#6-copyright) @@ -900,9 +900,9 @@ accuracy for individual data items, the `Subscribe` RPC is recommended to request a telemetry stream (see [Section 3.5.2](#352-sending-telemetry-updates)). -### 3.3.4 GetResponse Behaviour Table +### 3.3.4 GetResponse Behavior Table -| GetRequest Scenario | Target Behaviour | +| GetRequest Scenario | Target Behavior | | ------------------------------------------------------------------------------------------------------------------------ | ---------------- | | Subscribed paths exist or a YANG default value is [in use](https://datatracker.ietf.org/doc/html/rfc7950#section-7.6.1). | Value is returned | | Subscribed paths are syntactically correct but one or more paths do not (yet) exist. | Return `NOT_FOUND` | @@ -1546,7 +1546,7 @@ by any updates representing subsequent changes to current state. For a `POLL` or `updates_only` field allows a client to only watch for changes, e.g. an update to configuration. -#### 3.5.2.4 SubscribeResponse Behaviour Table +#### 3.5.2.4 SubscribeResponse Behavior Table | Subscription Scenario | ONCE | POLL | STREAM | | ------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------- | ---------------------------------------- | ------ | From 9e74f31592f0b949f7013f74f86fb064361e6729 Mon Sep 17 00:00:00 2001 From: wenovus Date: Wed, 6 Jul 2022 15:14:35 -0700 Subject: [PATCH 5/7] fix-ups --- rpc/gnmi/gnmi-specification.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rpc/gnmi/gnmi-specification.md b/rpc/gnmi/gnmi-specification.md index 0cab6e4..123ed57 100644 --- a/rpc/gnmi/gnmi-specification.md +++ b/rpc/gnmi/gnmi-specification.md @@ -904,7 +904,7 @@ request a telemetry stream (see [Section | GetRequest Scenario | Target Behavior | | ------------------------------------------------------------------------------------------------------------------------ | ---------------- | -| Subscribed paths exist or a YANG default value is [in use](https://datatracker.ietf.org/doc/html/rfc7950#section-7.6.1). | Value is returned | +| Subscribed paths exist or a YANG default value is [in use](https://datatracker.ietf.org/doc/html/rfc7950#section-7.6.1). | Value(s) are returned | | Subscribed paths are syntactically correct but one or more paths do not (yet) exist. | Return `NOT_FOUND` | | Subscribed paths are syntactically correct but one or more paths is not implemented by the server. | Return `UNIMPLEMENTED` | | One or more subscribed paths is syntactically incorrect. | Return `INVALID_ARGUMENT` | @@ -1548,12 +1548,12 @@ to configuration. #### 3.5.2.4 SubscribeResponse Behavior Table -| Subscription Scenario | ONCE | POLL | STREAM | -| ------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------- | ---------------------------------------- | ------ | -| Subscribed paths exist or a YANG default value is [in use](https://datatracker.ietf.org/doc/html/rfc7950#section-7.6.1). | Value is returned | Value is returned | Value is returned | -| Subscribed paths are syntactically correct but one or more paths do not (yet) exist. | No value returned for non-existent paths | No value returned for non-existent paths | nothing is sent for non-existent paths (yet), RPC is not closed | -| Subscribed paths are syntactically correct but one or more paths is not implemented by the server. | Return `UNIMPLEMENTED` | Return `UNIMPLEMENTED` | Return `UNIMPLEMENTED` | -| One or more subscribed paths is syntactically incorrect. | Return `INVALID_ARGUMENT` | Return `INVALID_ARGUMENT` | Return `INVALID_ARGUMENT` | +| Subscription Scenario | ONCE/POLL | STREAM | +| ------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------- | ------ | +| Subscribed paths exist or a YANG default value is [in use](https://datatracker.ietf.org/doc/html/rfc7950#section-7.6.1). | Value(s) are returned | Value(s) are returned | +| Subscribed paths are syntactically correct but one or more paths do not (yet) exist. | No value returned for non-existent paths | nothing is sent for non-existent paths (yet), RPC is not closed | +| Subscribed paths are syntactically correct but one or more paths is not implemented by the server. | Return `UNIMPLEMENTED` | Return `UNIMPLEMENTED` | +| One or more subscribed paths is syntactically incorrect. | Return `INVALID_ARGUMENT` | Return `INVALID_ARGUMENT` | # 4 Appendix: Current Protobuf Message and Service Specification From 16602286d3d546e1ecc9a5e64e8612d9c73d8f9f Mon Sep 17 00:00:00 2001 From: wenovus Date: Thu, 7 Jul 2022 10:13:22 -0700 Subject: [PATCH 6/7] Add sentences, fix indentation --- rpc/gnmi/gnmi-specification.md | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/rpc/gnmi/gnmi-specification.md b/rpc/gnmi/gnmi-specification.md index 123ed57..408ea94 100644 --- a/rpc/gnmi/gnmi-specification.md +++ b/rpc/gnmi/gnmi-specification.md @@ -54,7 +54,7 @@ April 28, 2022 * [3.5.1.1 The SubscribeRequest Message](#3511-the-subscriberequest-message) * [3.5.1.2 The SubscriptionList Message](#3512-the-subscriptionlist-message) * [3.5.1.3 The Subscription Message](#3513-the-subscription-message) - * [3.5.1.4 The SubscribeResponse Message](#3514-the-subscriberesponse-message) + * [3.5.1.4 The SubscribeResponse Message](#3514-the-subscriberesponse-message) * [3.5.1.5 Creating Subscriptions](#3515-creating-subscriptions) * [3.5.1.5.1 ONCE Subscriptions](#35151-once-subscriptions) * [3.5.1.5.2 STREAM Subscriptions](#35152-stream-subscriptions) @@ -902,12 +902,14 @@ request a telemetry stream (see [Section ### 3.3.4 GetResponse Behavior Table +The following table clarifies the target behaviors for `Get` for certain scenarios: + | GetRequest Scenario | Target Behavior | | ------------------------------------------------------------------------------------------------------------------------ | ---------------- | -| Subscribed paths exist or a YANG default value is [in use](https://datatracker.ietf.org/doc/html/rfc7950#section-7.6.1). | Value(s) are returned | -| Subscribed paths are syntactically correct but one or more paths do not (yet) exist. | Return `NOT_FOUND` | -| Subscribed paths are syntactically correct but one or more paths is not implemented by the server. | Return `UNIMPLEMENTED` | -| One or more subscribed paths is syntactically incorrect. | Return `INVALID_ARGUMENT` | +| Requested paths exist or a YANG default value is [in use](https://datatracker.ietf.org/doc/html/rfc7950#section-7.6.1). | Value(s) are returned | +| Requested paths are syntactically correct but one or more paths neither exist (yet) nor has a YANG default value in use. | Return `NOT_FOUND` | +| Requested paths are syntactically correct but one or more paths is not implemented by the server. | Return `UNIMPLEMENTED` | +| One or more requested paths is syntactically incorrect. | Return `INVALID_ARGUMENT` | ## 3.4 Modifying State @@ -1548,12 +1550,14 @@ to configuration. #### 3.5.2.4 SubscribeResponse Behavior Table -| Subscription Scenario | ONCE/POLL | STREAM | -| ------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------- | ------ | -| Subscribed paths exist or a YANG default value is [in use](https://datatracker.ietf.org/doc/html/rfc7950#section-7.6.1). | Value(s) are returned | Value(s) are returned | -| Subscribed paths are syntactically correct but one or more paths do not (yet) exist. | No value returned for non-existent paths | nothing is sent for non-existent paths (yet), RPC is not closed | -| Subscribed paths are syntactically correct but one or more paths is not implemented by the server. | Return `UNIMPLEMENTED` | Return `UNIMPLEMENTED` | -| One or more subscribed paths is syntactically incorrect. | Return `INVALID_ARGUMENT` | Return `INVALID_ARGUMENT` | +The following table clarifies the target behaviors for `Subscribe` for certain scenarios: + +| Subscription Scenario | ONCE/POLL | STREAM | +| ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | ------ | +| Subscribed paths exist or a YANG default value is [in use](https://datatracker.ietf.org/doc/html/rfc7950#section-7.6.1). | Value(s) are returned | Value(s) are returned | +| Subscribed paths are syntactically correct but one or more paths neither exist (yet) nor has a YANG default value in use. | No value returned for non-existent paths | nothing is sent for non-existent paths (yet), RPC is not closed | +| Subscribed paths are syntactically correct but one or more paths is not implemented by the server. | Return `UNIMPLEMENTED` | Return `UNIMPLEMENTED` | +| One or more subscribed paths is syntactically incorrect. | Return `INVALID_ARGUMENT` | Return `INVALID_ARGUMENT` | # 4 Appendix: Current Protobuf Message and Service Specification From af7a9bf353e5ff89262a39b8c3e10d53e861c2aa Mon Sep 17 00:00:00 2001 From: wenovus Date: Thu, 7 Jul 2022 16:31:37 -0700 Subject: [PATCH 7/7] Add to release note for v0.8.1 --- rpc/gnmi/gnmi-specification.md | 1 + 1 file changed, 1 insertion(+) diff --git a/rpc/gnmi/gnmi-specification.md b/rpc/gnmi/gnmi-specification.md index 9d4d146..d65e546 100644 --- a/rpc/gnmi/gnmi-specification.md +++ b/rpc/gnmi/gnmi-specification.md @@ -1610,6 +1610,7 @@ limitations under the License leaf must use `update` rather than just a `delete`. * Clarify that for `Set`, deleting configuration using `replace(nil)` is prohibited. + * Clarify target behavior for certain scenarios for `Get` and `Subscribe`. * v0.8.0: April 28, 2022 * Add 'double_val' in TypedValue message to replace both 'float_val' and