From b421fd4fc2cba97cbe0dfb87f0be79979b9eb7d0 Mon Sep 17 00:00:00 2001 From: Ebben Aries Date: Mon, 20 Oct 2025 17:06:09 -0700 Subject: [PATCH 1/2] Commence deprecation of use_models --- proto/gnmi/gnmi.proto | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/proto/gnmi/gnmi.proto b/proto/gnmi/gnmi.proto index da0fed3f..c56347fd 100644 --- a/proto/gnmi/gnmi.proto +++ b/proto/gnmi/gnmi.proto @@ -38,7 +38,7 @@ extend google.protobuf.FileOptions { // gNMI_service is the current version of the gNMI service, returned through // the Capabilities RPC. -option (gnmi_service) = "0.10.0"; +option (gnmi_service) = "0.11.0"; option go_package = "github.com/openconfig/gnmi/proto/gnmi"; option java_multiple_files = true; @@ -277,7 +277,7 @@ message SubscriptionList { bool allow_aggregation = 6; // The set of schemas that define the elements of the data tree that should // be sent by the target. - repeated ModelData use_models = 7; + repeated ModelData use_models = 7 [deprecated = true]; // The encoding that the target should use within the Notifications generated // corresponding to the SubscriptionList. Encoding encoding = 8; @@ -398,9 +398,7 @@ message UpdateResult { // GetRequest is sent when a client initiates a Get RPC. It is used to specify // the set of data elements for which the target should return a snapshot of -// data. The use_models field specifies the set of schema modules that are to -// be used by the target - where use_models is not specified then the target -// must use all schema models that it has. +// data. // Reference: gNMI Specification Section 3.3.1 message GetRequest { Path prefix = 1; // Prefix used for paths. @@ -417,7 +415,7 @@ message GetRequest { } DataType type = 3; // The type of data being requested. Encoding encoding = 5; // Encoding to be used. - repeated ModelData use_models = 6; // The schema models to be used. + repeated ModelData use_models = 6 [deprecated = true]; // The schema models to be used. // Extension messages associated with the GetRequest. See the // gNMI extension specification for further definition. repeated gnmi_ext.Extension extension = 7; From 8eb9a7995a6e27dd465df926ff446a462b0d3bf6 Mon Sep 17 00:00:00 2001 From: Ebben Aries Date: Mon, 20 Oct 2025 17:11:58 -0700 Subject: [PATCH 2/2] Regenerate stubs --- MODULE.bazel.lock | 35 +++----------------------- proto/collector/collector.pb.go | 2 +- proto/gnmi/gnmi.pb.go | 44 ++++++++++++++++++--------------- proto/gnmi_ext/gnmi_ext.pb.go | 2 +- proto/target/target.pb.go | 2 +- testing/fake/proto/fake.pb.go | 2 +- 6 files changed, 31 insertions(+), 56 deletions(-) diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 68dedf91..3ce16809 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -22,7 +22,8 @@ "https://bcr.bazel.build/modules/apple_support/1.13.0/MODULE.bazel": "7c8cdea7e031b7f9f67f0b497adf6d2c6a2675e9304ca93a9af6ed84eef5a524", "https://bcr.bazel.build/modules/apple_support/1.15.1/MODULE.bazel": "a0556fefca0b1bb2de8567b8827518f94db6a6e7e7d632b4c48dc5f865bc7c85", "https://bcr.bazel.build/modules/apple_support/1.17.1/MODULE.bazel": "655c922ab1209978a94ef6ca7d9d43e940cd97d9c172fb55f94d91ac53f8610b", - "https://bcr.bazel.build/modules/apple_support/1.17.1/source.json": "6b2b8c74d14e8d485528a938e44bdb72a5ba17632b9e14ef6e68a5ee96c8347f", + "https://bcr.bazel.build/modules/apple_support/1.23.1/MODULE.bazel": "53763fed456a968cf919b3240427cf3a9d5481ec5466abc9d5dc51bc70087442", + "https://bcr.bazel.build/modules/apple_support/1.23.1/source.json": "d888b44312eb0ad2c21a91d026753f330caa48a25c9b2102fae75eb2b0dcfdd2", "https://bcr.bazel.build/modules/aspect_bazel_lib/1.31.2/MODULE.bazel": "7bee702b4862612f29333590f4b658a5832d433d6f8e4395f090e8f4e85d442f", "https://bcr.bazel.build/modules/aspect_bazel_lib/1.38.0/MODULE.bazel": "6307fec451ba9962c1c969eb516ebfe1e46528f7fa92e1c9ac8646bef4cdaa3f", "https://bcr.bazel.build/modules/aspect_bazel_lib/1.40.3/MODULE.bazel": "668e6bcb4d957fc0e284316dba546b705c8d43c857f87119619ee83c4555b859", @@ -40,6 +41,7 @@ "https://bcr.bazel.build/modules/bazel_features/1.19.0/MODULE.bazel": "59adcdf28230d220f0067b1f435b8537dd033bfff8db21335ef9217919c7fb58", "https://bcr.bazel.build/modules/bazel_features/1.21.0/MODULE.bazel": "675642261665d8eea09989aa3b8afb5c37627f1be178382c320d1b46afba5e3b", "https://bcr.bazel.build/modules/bazel_features/1.23.0/MODULE.bazel": "fd1ac84bc4e97a5a0816b7fd7d4d4f6d837b0047cf4cbd81652d616af3a6591a", + "https://bcr.bazel.build/modules/bazel_features/1.27.0/MODULE.bazel": "621eeee06c4458a9121d1f104efb80f39d34deff4984e778359c60eaf1a8cb65", "https://bcr.bazel.build/modules/bazel_features/1.3.0/MODULE.bazel": "cdcafe83ec318cda34e02948e81d790aab8df7a929cec6f6969f13a489ccecd9", "https://bcr.bazel.build/modules/bazel_features/1.30.0/MODULE.bazel": "a14b62d05969a293b80257e72e597c2da7f717e1e69fa8b339703ed6731bec87", "https://bcr.bazel.build/modules/bazel_features/1.30.0/source.json": "b07e17f067fe4f69f90b03b36ef1e08fe0d1f3cac254c1241a1818773e3423bc", @@ -340,37 +342,6 @@ }, "selectedYankedVersions": {}, "moduleExtensions": { - "@@apple_support+//crosstool:setup.bzl%apple_cc_configure_extension": { - "general": { - "bzlTransitiveDigest": "xcBTf2+GaloFpg7YEh/Bv+1yAczRkiCt3DGws4K7kSk=", - "usagesDigest": "ypfdsRT1Lze/3i07sp0fc1st5t9vrHXgYeCPQdYKeDo=", - "recordedFileInputs": {}, - "recordedDirentsInputs": {}, - "envVariables": {}, - "generatedRepoSpecs": { - "local_config_apple_cc_toolchains": { - "repoRuleId": "@@apple_support+//crosstool:setup.bzl%_apple_cc_autoconf_toolchains", - "attributes": {} - }, - "local_config_apple_cc": { - "repoRuleId": "@@apple_support+//crosstool:setup.bzl%_apple_cc_autoconf", - "attributes": {} - } - }, - "recordedRepoMappingEntries": [ - [ - "apple_support+", - "bazel_tools", - "bazel_tools" - ], - [ - "bazel_tools", - "rules_cc", - "rules_cc+" - ] - ] - } - }, "@@cel-spec+//:extensions.bzl%non_module_dependencies": { "general": { "bzlTransitiveDigest": "8nZQmgB3HxICOnyv0klog1TNWAs02cNK3ZCw7EjqZMc=", diff --git a/proto/collector/collector.pb.go b/proto/collector/collector.pb.go index ae476163..80195f56 100644 --- a/proto/collector/collector.pb.go +++ b/proto/collector/collector.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 +// protoc-gen-go v1.36.9 // protoc v6.32.0 // source: github.com/openconfig/gnmi/proto/collector/collector.proto diff --git a/proto/gnmi/gnmi.pb.go b/proto/gnmi/gnmi.pb.go index 0413011e..68dfc62c 100644 --- a/proto/gnmi/gnmi.pb.go +++ b/proto/gnmi/gnmi.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 +// protoc-gen-go v1.36.9 // protoc v6.32.0 // source: github.com/openconfig/gnmi/proto/gnmi/gnmi.proto @@ -1282,11 +1282,12 @@ type SubscriptionList struct { Qos *QOSMarking `protobuf:"bytes,4,opt,name=qos,proto3" json:"qos,omitempty"` Mode SubscriptionList_Mode `protobuf:"varint,5,opt,name=mode,proto3,enum=gnmi.SubscriptionList_Mode" json:"mode,omitempty"` AllowAggregation bool `protobuf:"varint,6,opt,name=allow_aggregation,json=allowAggregation,proto3" json:"allow_aggregation,omitempty"` - UseModels []*ModelData `protobuf:"bytes,7,rep,name=use_models,json=useModels,proto3" json:"use_models,omitempty"` - Encoding Encoding `protobuf:"varint,8,opt,name=encoding,proto3,enum=gnmi.Encoding" json:"encoding,omitempty"` - UpdatesOnly bool `protobuf:"varint,9,opt,name=updates_only,json=updatesOnly,proto3" json:"updates_only,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // Deprecated: Marked as deprecated in github.com/openconfig/gnmi/proto/gnmi/gnmi.proto. + UseModels []*ModelData `protobuf:"bytes,7,rep,name=use_models,json=useModels,proto3" json:"use_models,omitempty"` + Encoding Encoding `protobuf:"varint,8,opt,name=encoding,proto3,enum=gnmi.Encoding" json:"encoding,omitempty"` + UpdatesOnly bool `protobuf:"varint,9,opt,name=updates_only,json=updatesOnly,proto3" json:"updates_only,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SubscriptionList) Reset() { @@ -1354,6 +1355,7 @@ func (x *SubscriptionList) GetAllowAggregation() bool { return false } +// Deprecated: Marked as deprecated in github.com/openconfig/gnmi/proto/gnmi/gnmi.proto. func (x *SubscriptionList) GetUseModels() []*ModelData { if x != nil { return x.UseModels @@ -1730,13 +1732,14 @@ func (x *UpdateResult) GetOp() UpdateResult_Operation { } type GetRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Prefix *Path `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` - Path []*Path `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"` - Type GetRequest_DataType `protobuf:"varint,3,opt,name=type,proto3,enum=gnmi.GetRequest_DataType" json:"type,omitempty"` - Encoding Encoding `protobuf:"varint,5,opt,name=encoding,proto3,enum=gnmi.Encoding" json:"encoding,omitempty"` - UseModels []*ModelData `protobuf:"bytes,6,rep,name=use_models,json=useModels,proto3" json:"use_models,omitempty"` - Extension []*gnmi_ext.Extension `protobuf:"bytes,7,rep,name=extension,proto3" json:"extension,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Prefix *Path `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` + Path []*Path `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"` + Type GetRequest_DataType `protobuf:"varint,3,opt,name=type,proto3,enum=gnmi.GetRequest_DataType" json:"type,omitempty"` + Encoding Encoding `protobuf:"varint,5,opt,name=encoding,proto3,enum=gnmi.Encoding" json:"encoding,omitempty"` + // Deprecated: Marked as deprecated in github.com/openconfig/gnmi/proto/gnmi/gnmi.proto. + UseModels []*ModelData `protobuf:"bytes,6,rep,name=use_models,json=useModels,proto3" json:"use_models,omitempty"` + Extension []*gnmi_ext.Extension `protobuf:"bytes,7,rep,name=extension,proto3" json:"extension,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1799,6 +1802,7 @@ func (x *GetRequest) GetEncoding() Encoding { return Encoding_JSON } +// Deprecated: Marked as deprecated in github.com/openconfig/gnmi/proto/gnmi/gnmi.proto. func (x *GetRequest) GetUseModels() []*ModelData { if x != nil { return x.UseModels @@ -2143,16 +2147,16 @@ const file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc = "" + "\x05error\x18\x04 \x01(\v2\v.gnmi.ErrorB\x02\x18\x01H\x00R\x05error\x121\n" + "\textension\x18\x05 \x03(\v2\x13.gnmi_ext.ExtensionR\textensionB\n" + "\n" + - "\bresponse\"\xaa\x03\n" + + "\bresponse\"\xae\x03\n" + "\x10SubscriptionList\x12\"\n" + "\x06prefix\x18\x01 \x01(\v2\n" + ".gnmi.PathR\x06prefix\x126\n" + "\fsubscription\x18\x02 \x03(\v2\x12.gnmi.SubscriptionR\fsubscription\x12\"\n" + "\x03qos\x18\x04 \x01(\v2\x10.gnmi.QOSMarkingR\x03qos\x12/\n" + "\x04mode\x18\x05 \x01(\x0e2\x1b.gnmi.SubscriptionList.ModeR\x04mode\x12+\n" + - "\x11allow_aggregation\x18\x06 \x01(\bR\x10allowAggregation\x12.\n" + + "\x11allow_aggregation\x18\x06 \x01(\bR\x10allowAggregation\x122\n" + "\n" + - "use_models\x18\a \x03(\v2\x0f.gnmi.ModelDataR\tuseModels\x12*\n" + + "use_models\x18\a \x03(\v2\x0f.gnmi.ModelDataB\x02\x18\x01R\tuseModels\x12*\n" + "\bencoding\x18\b \x01(\x0e2\x0e.gnmi.EncodingR\bencoding\x12!\n" + "\fupdates_only\x18\t \x01(\bR\vupdatesOnly\"&\n" + "\x04Mode\x12\n" + @@ -2200,7 +2204,7 @@ const file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc = "" + "\aREPLACE\x10\x02\x12\n" + "\n" + "\x06UPDATE\x10\x03\x12\x11\n" + - "\rUNION_REPLACE\x10\x04\"\xcb\x02\n" + + "\rUNION_REPLACE\x10\x04\"\xcf\x02\n" + "\n" + "GetRequest\x12\"\n" + "\x06prefix\x18\x01 \x01(\v2\n" + @@ -2208,9 +2212,9 @@ const file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc = "" + "\x04path\x18\x02 \x03(\v2\n" + ".gnmi.PathR\x04path\x12-\n" + "\x04type\x18\x03 \x01(\x0e2\x19.gnmi.GetRequest.DataTypeR\x04type\x12*\n" + - "\bencoding\x18\x05 \x01(\x0e2\x0e.gnmi.EncodingR\bencoding\x12.\n" + + "\bencoding\x18\x05 \x01(\x0e2\x0e.gnmi.EncodingR\bencoding\x122\n" + "\n" + - "use_models\x18\x06 \x03(\v2\x0f.gnmi.ModelDataR\tuseModels\x121\n" + + "use_models\x18\x06 \x03(\v2\x0f.gnmi.ModelDataB\x02\x18\x01R\tuseModels\x121\n" + "\textension\x18\a \x03(\v2\x13.gnmi_ext.ExtensionR\textension\";\n" + "\bDataType\x12\a\n" + "\x03ALL\x10\x00\x12\n" + @@ -2249,7 +2253,7 @@ const file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc = "" + "\x03Get\x12\x10.gnmi.GetRequest\x1a\x11.gnmi.GetResponse\x12*\n" + "\x03Set\x12\x10.gnmi.SetRequest\x1a\x11.gnmi.SetResponse\x12@\n" + "\tSubscribe\x12\x16.gnmi.SubscribeRequest\x1a\x17.gnmi.SubscribeResponse(\x010\x01:@\n" + - "\fgnmi_service\x12\x1c.google.protobuf.FileOptions\x18\xe9\a \x01(\tR\vgnmiServiceBT\xca>\x060.10.0\n" + + "\fgnmi_service\x12\x1c.google.protobuf.FileOptions\x18\xe9\a \x01(\tR\vgnmiServiceBT\xca>\x060.11.0\n" + "\x15com.github.gnmi.protoB\tGnmiProtoP\x01Z%github.com/openconfig/gnmi/proto/gnmib\x06proto3" var ( diff --git a/proto/gnmi_ext/gnmi_ext.pb.go b/proto/gnmi_ext/gnmi_ext.pb.go index ae191af3..b429c082 100644 --- a/proto/gnmi_ext/gnmi_ext.pb.go +++ b/proto/gnmi_ext/gnmi_ext.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 +// protoc-gen-go v1.36.9 // protoc v6.32.0 // source: github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.proto diff --git a/proto/target/target.pb.go b/proto/target/target.pb.go index 6635eb9f..33178886 100644 --- a/proto/target/target.pb.go +++ b/proto/target/target.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 +// protoc-gen-go v1.36.9 // protoc v6.32.0 // source: github.com/openconfig/gnmi/proto/target/target.proto diff --git a/testing/fake/proto/fake.pb.go b/testing/fake/proto/fake.pb.go index a4a97ad5..09e972fd 100644 --- a/testing/fake/proto/fake.pb.go +++ b/testing/fake/proto/fake.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 +// protoc-gen-go v1.36.9 // protoc v6.32.0 // source: github.com/openconfig/gnmi/testing/fake/proto/fake.proto