From 237bce15845214f8b5a842b4dc1d6e52e8564ba7 Mon Sep 17 00:00:00 2001 From: Roman Dodin Date: Tue, 30 Jan 2024 12:56:52 +0200 Subject: [PATCH 1/5] config subscription extension init --- proto/gnmi_ext/gnmi_ext.proto | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/proto/gnmi_ext/gnmi_ext.proto b/proto/gnmi_ext/gnmi_ext.proto index ab70ee8..a24ed6a 100644 --- a/proto/gnmi_ext/gnmi_ext.proto +++ b/proto/gnmi_ext/gnmi_ext.proto @@ -28,11 +28,12 @@ option go_package = "github.com/openconfig/gnmi/proto/gnmi_ext"; // The Extension message contains a single gNMI extension. message Extension { oneof ext { - RegisteredExtension registered_ext = 1; // A registered extension. + RegisteredExtension registered_ext = 1; // A registered extension. // Well known extensions. - MasterArbitration master_arbitration = 2; // Master arbitration extension. - History history = 3; // History extension. - Commit commit = 4; // Commit confirmed extension. + MasterArbitration master_arbitration = 2; // Master arbitration extension. + History history = 3; // History extension. + Commit commit = 4; // Commit confirmed extension. + ConfigSubscription config_subscription = 6; // Config Subscription extension. } } @@ -131,3 +132,20 @@ message CommitConfirm {} // CommitCancel is used to cancel an on-going commit. It hold additional // parameter requried for cancel action. message CommitCancel {} + +// ConfigSubscription is used to indicate to a target that for a given set +// of paths in the SubscribeRequest, the client wishes to receive updates +// for the configuration schema nodes only. +message ConfigSubscription { +} + +// ConfigSubscriptionSyncDone is sent by the server in the SubscribeResponse +// after all the updates for the configuration schema nodes have been sent. +message ConfigSubscriptionSyncDone { + // ID of a commit confirm operation as assigned by the client + // see Commit Confirm extension for more details. + string commit_confirm_id = 1; + // ID of a commit as might be assigned by the server + // when registering a commit operation. + string server_commit_id = 2; +} \ No newline at end of file From b3e3473cfce0caa58f6337987bfb04b416c46cf0 Mon Sep 17 00:00:00 2001 From: Roman Dodin Date: Tue, 30 Jan 2024 13:37:37 +0200 Subject: [PATCH 2/5] added oneof action --- proto/gnmi_ext/gnmi_ext.proto | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/proto/gnmi_ext/gnmi_ext.proto b/proto/gnmi_ext/gnmi_ext.proto index a24ed6a..19bf1cc 100644 --- a/proto/gnmi_ext/gnmi_ext.proto +++ b/proto/gnmi_ext/gnmi_ext.proto @@ -133,12 +133,22 @@ message CommitConfirm {} // parameter requried for cancel action. message CommitCancel {} -// ConfigSubscription is used to indicate to a target that for a given set -// of paths in the SubscribeRequest, the client wishes to receive updates -// for the configuration schema nodes only. +// ConfigSubscription extension allows clients to subscribe to configuration +// schema nodes only. message ConfigSubscription { + oneof action { + // ConfigSubscriptionStart is sent by the server in the SubscribeRequest + ConfigSubscriptionStart start = 1; + // ConfigSubscriptionSyncDone is sent by the server in the SubscribeResponse + ConfigSubscriptionSyncDone sync_done = 2; + } } +// ConfigSubscriptionStart is used to indicate to a target that for a given set +// of paths in the SubscribeRequest, the client wishes to receive updates +// for the configuration schema nodes only. +message ConfigSubscriptionStart {} + // ConfigSubscriptionSyncDone is sent by the server in the SubscribeResponse // after all the updates for the configuration schema nodes have been sent. message ConfigSubscriptionSyncDone { From 43170f259fb47af0dde7b0c3de6f4f5b81024e6e Mon Sep 17 00:00:00 2001 From: Roman Dodin Date: Wed, 24 Jul 2024 14:43:20 +0200 Subject: [PATCH 3/5] fix server->client for start action --- proto/gnmi_ext/gnmi_ext.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/gnmi_ext/gnmi_ext.proto b/proto/gnmi_ext/gnmi_ext.proto index 9c7ba53..45a52fb 100644 --- a/proto/gnmi_ext/gnmi_ext.proto +++ b/proto/gnmi_ext/gnmi_ext.proto @@ -165,7 +165,7 @@ message Depth { // schema nodes only. message ConfigSubscription { oneof action { - // ConfigSubscriptionStart is sent by the server in the SubscribeRequest + // ConfigSubscriptionStart is sent by the client in the SubscribeRequest ConfigSubscriptionStart start = 1; // ConfigSubscriptionSyncDone is sent by the server in the SubscribeResponse ConfigSubscriptionSyncDone sync_done = 2; From 4b30c14713d8a9d47281049aa8c26269af99ec8a Mon Sep 17 00:00:00 2001 From: Roman Dodin Date: Mon, 9 Dec 2024 17:44:26 +0100 Subject: [PATCH 4/5] added done boolean --- proto/gnmi_ext/gnmi_ext.proto | 3 +++ 1 file changed, 3 insertions(+) diff --git a/proto/gnmi_ext/gnmi_ext.proto b/proto/gnmi_ext/gnmi_ext.proto index 45a52fb..966b1a7 100644 --- a/proto/gnmi_ext/gnmi_ext.proto +++ b/proto/gnmi_ext/gnmi_ext.proto @@ -186,4 +186,7 @@ message ConfigSubscriptionSyncDone { // ID of a commit as might be assigned by the server // when registering a commit operation. string server_commit_id = 2; + // If true indicates that the server is done processing the updates related to the + // commit_confirmed_id and/or server_commit_id. + bool done = 3; } From bc90aea9acbc53ca6b25b2156c8fa2cd3c3c3f2d Mon Sep 17 00:00:00 2001 From: Roman Dodin Date: Mon, 9 Dec 2024 17:53:19 +0100 Subject: [PATCH 5/5] typo fix --- proto/gnmi_ext/gnmi_ext.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/gnmi_ext/gnmi_ext.proto b/proto/gnmi_ext/gnmi_ext.proto index 966b1a7..6b02ca2 100644 --- a/proto/gnmi_ext/gnmi_ext.proto +++ b/proto/gnmi_ext/gnmi_ext.proto @@ -187,6 +187,6 @@ message ConfigSubscriptionSyncDone { // when registering a commit operation. string server_commit_id = 2; // If true indicates that the server is done processing the updates related to the - // commit_confirmed_id and/or server_commit_id. + // commit_confirm_id and/or server_commit_id. bool done = 3; }