From d95a6c5132a026babfcf038d11f7666e2e3c9dc6 Mon Sep 17 00:00:00 2001 From: Roman Dodin Date: Tue, 9 Jan 2024 13:09:03 +0200 Subject: [PATCH 1/2] added CommitSetRollbackDuration action --- proto/gnmi_ext/gnmi_ext.proto | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/proto/gnmi_ext/gnmi_ext.proto b/proto/gnmi_ext/gnmi_ext.proto index ab70ee8..8daa42f 100644 --- a/proto/gnmi_ext/gnmi_ext.proto +++ b/proto/gnmi_ext/gnmi_ext.proto @@ -114,6 +114,10 @@ message Commit { // cancel action will cancel an on-going commit, the ID provided during cancel // should match the on-going commit ID. CommitCancel cancel = 4; + // set rollback duration action sets the rollback duration of an on-going commit + // to a new value. + // The ID provided with the Commit message should match the on-going commit ID. + CommitSetRollbackDuration set_rollback_duration = 5; } } @@ -131,3 +135,10 @@ message CommitConfirm {} // CommitCancel is used to cancel an on-going commit. It hold additional // parameter requried for cancel action. message CommitCancel {} + +// CommitSetRollbackDuration is used to set the existing rollback duration value +// of an on-going commit to a new desired value. +message CommitSetRollbackDuration { + // Maximum duration to wait for a confirmaton before reverting the commit. + google.protobuf.Duration rollback_duration = 1; +} From db08162dd76e1e741de9d3e9d9651f6cacf0bc25 Mon Sep 17 00:00:00 2001 From: Roman Dodin Date: Wed, 14 Feb 2024 21:52:51 +0200 Subject: [PATCH 2/2] added generated stubs --- proto/gnmi_ext/gnmi_ext.pb.go | 566 +++++++++++++++++++++++++++++---- proto/gnmi_ext/gnmi_ext_pb2.py | 53 +-- 2 files changed, 538 insertions(+), 81 deletions(-) diff --git a/proto/gnmi_ext/gnmi_ext.pb.go b/proto/gnmi_ext/gnmi_ext.pb.go index 54ce20c..f929f7b 100644 --- a/proto/gnmi_ext/gnmi_ext.pb.go +++ b/proto/gnmi_ext/gnmi_ext.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 +// protoc-gen-go v1.31.0 +// protoc v4.24.4 // source: proto/gnmi_ext/gnmi_ext.proto // Package gnmi_ext defines a set of extensions messages which can be optionally @@ -30,6 +30,7 @@ package gnmi_ext import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" reflect "reflect" sync "sync" ) @@ -102,6 +103,7 @@ type Extension struct { // *Extension_RegisteredExt // *Extension_MasterArbitration // *Extension_History + // *Extension_Commit Ext isExtension_Ext `protobuf_oneof:"ext"` } @@ -165,6 +167,13 @@ func (x *Extension) GetHistory() *History { return nil } +func (x *Extension) GetCommit() *Commit { + if x, ok := x.GetExt().(*Extension_Commit); ok { + return x.Commit + } + return nil +} + type isExtension_Ext interface { isExtension_Ext() } @@ -182,12 +191,18 @@ type Extension_History struct { History *History `protobuf:"bytes,3,opt,name=history,proto3,oneof"` // History extension. } +type Extension_Commit struct { + Commit *Commit `protobuf:"bytes,4,opt,name=commit,proto3,oneof"` // Commit confirmed extension. +} + func (*Extension_RegisteredExt) isExtension_Ext() {} func (*Extension_MasterArbitration) isExtension_Ext() {} func (*Extension_History) isExtension_Ext() {} +func (*Extension_Commit) isExtension_Ext() {} + // The RegisteredExtension message defines an extension which is defined outside // of this file. type RegisteredExtension struct { @@ -548,12 +563,329 @@ func (x *TimeRange) GetEnd() int64 { return 0 } +// Commit confirmed extension allows automated revert of the configuration after +// certain duration if an explicit confirmation is not issued. It allows explicit +// cancellation of the commit during the rollback window. There cannot be more +// than one commit active at a given time. +// The document about gNMI commit confirmed can be found at +// https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-commit-confirmed.md +type Commit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID is provided by the client during the commit request. During confirm and cancel + // actions the provided ID should match the ID provided during commit. + // If ID is not passed in any actions server shall return error. + // Required. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Types that are assignable to Action: + // + // *Commit_Commit + // *Commit_Confirm + // *Commit_Cancel + // *Commit_SetRollbackDuration + Action isCommit_Action `protobuf_oneof:"action"` +} + +func (x *Commit) Reset() { + *x = Commit{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_gnmi_ext_gnmi_ext_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Commit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Commit) ProtoMessage() {} + +func (x *Commit) ProtoReflect() protoreflect.Message { + mi := &file_proto_gnmi_ext_gnmi_ext_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Commit.ProtoReflect.Descriptor instead. +func (*Commit) Descriptor() ([]byte, []int) { + return file_proto_gnmi_ext_gnmi_ext_proto_rawDescGZIP(), []int{7} +} + +func (x *Commit) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (m *Commit) GetAction() isCommit_Action { + if m != nil { + return m.Action + } + return nil +} + +func (x *Commit) GetCommit() *CommitRequest { + if x, ok := x.GetAction().(*Commit_Commit); ok { + return x.Commit + } + return nil +} + +func (x *Commit) GetConfirm() *CommitConfirm { + if x, ok := x.GetAction().(*Commit_Confirm); ok { + return x.Confirm + } + return nil +} + +func (x *Commit) GetCancel() *CommitCancel { + if x, ok := x.GetAction().(*Commit_Cancel); ok { + return x.Cancel + } + return nil +} + +func (x *Commit) GetSetRollbackDuration() *CommitSetRollbackDuration { + if x, ok := x.GetAction().(*Commit_SetRollbackDuration); ok { + return x.SetRollbackDuration + } + return nil +} + +type isCommit_Action interface { + isCommit_Action() +} + +type Commit_Commit struct { + // commit action creates a new commit. If a commit is on-going, server returns error. + Commit *CommitRequest `protobuf:"bytes,2,opt,name=commit,proto3,oneof"` +} + +type Commit_Confirm struct { + // confirm action will confirm an on-going commit, the ID provided during confirm + // should match the on-going commit ID. + Confirm *CommitConfirm `protobuf:"bytes,3,opt,name=confirm,proto3,oneof"` +} + +type Commit_Cancel struct { + // cancel action will cancel an on-going commit, the ID provided during cancel + // should match the on-going commit ID. + Cancel *CommitCancel `protobuf:"bytes,4,opt,name=cancel,proto3,oneof"` +} + +type Commit_SetRollbackDuration struct { + // set rollback duration action sets the rollback duration of an on-going commit + // to a new value. + // The ID provided with the Commit message should match the on-going commit ID. + SetRollbackDuration *CommitSetRollbackDuration `protobuf:"bytes,5,opt,name=set_rollback_duration,json=setRollbackDuration,proto3,oneof"` +} + +func (*Commit_Commit) isCommit_Action() {} + +func (*Commit_Confirm) isCommit_Action() {} + +func (*Commit_Cancel) isCommit_Action() {} + +func (*Commit_SetRollbackDuration) isCommit_Action() {} + +// CommitRequest is used to create a new confirmed commit. It hold additional +// parameter requried for commit action. +type CommitRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Maximum duration to wait for a confirmaton before reverting the commit. + RollbackDuration *durationpb.Duration `protobuf:"bytes,1,opt,name=rollback_duration,json=rollbackDuration,proto3" json:"rollback_duration,omitempty"` +} + +func (x *CommitRequest) Reset() { + *x = CommitRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_gnmi_ext_gnmi_ext_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommitRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommitRequest) ProtoMessage() {} + +func (x *CommitRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_gnmi_ext_gnmi_ext_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommitRequest.ProtoReflect.Descriptor instead. +func (*CommitRequest) Descriptor() ([]byte, []int) { + return file_proto_gnmi_ext_gnmi_ext_proto_rawDescGZIP(), []int{8} +} + +func (x *CommitRequest) GetRollbackDuration() *durationpb.Duration { + if x != nil { + return x.RollbackDuration + } + return nil +} + +// CommitConfirm is used to confirm an on-going commit. It hold additional +// parameter requried for confirm action. +type CommitConfirm struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CommitConfirm) Reset() { + *x = CommitConfirm{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_gnmi_ext_gnmi_ext_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommitConfirm) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommitConfirm) ProtoMessage() {} + +func (x *CommitConfirm) ProtoReflect() protoreflect.Message { + mi := &file_proto_gnmi_ext_gnmi_ext_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommitConfirm.ProtoReflect.Descriptor instead. +func (*CommitConfirm) Descriptor() ([]byte, []int) { + return file_proto_gnmi_ext_gnmi_ext_proto_rawDescGZIP(), []int{9} +} + +// CommitCancel is used to cancel an on-going commit. It hold additional +// parameter requried for cancel action. +type CommitCancel struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CommitCancel) Reset() { + *x = CommitCancel{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_gnmi_ext_gnmi_ext_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommitCancel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommitCancel) ProtoMessage() {} + +func (x *CommitCancel) ProtoReflect() protoreflect.Message { + mi := &file_proto_gnmi_ext_gnmi_ext_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommitCancel.ProtoReflect.Descriptor instead. +func (*CommitCancel) Descriptor() ([]byte, []int) { + return file_proto_gnmi_ext_gnmi_ext_proto_rawDescGZIP(), []int{10} +} + +// CommitSetRollbackDuration is used to set the existing rollback duration value +// of an on-going commit to a new desired value. +type CommitSetRollbackDuration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Maximum duration to wait for a confirmaton before reverting the commit. + RollbackDuration *durationpb.Duration `protobuf:"bytes,1,opt,name=rollback_duration,json=rollbackDuration,proto3" json:"rollback_duration,omitempty"` +} + +func (x *CommitSetRollbackDuration) Reset() { + *x = CommitSetRollbackDuration{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_gnmi_ext_gnmi_ext_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommitSetRollbackDuration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommitSetRollbackDuration) ProtoMessage() {} + +func (x *CommitSetRollbackDuration) ProtoReflect() protoreflect.Message { + mi := &file_proto_gnmi_ext_gnmi_ext_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommitSetRollbackDuration.ProtoReflect.Descriptor instead. +func (*CommitSetRollbackDuration) Descriptor() ([]byte, []int) { + return file_proto_gnmi_ext_gnmi_ext_proto_rawDescGZIP(), []int{11} +} + +func (x *CommitSetRollbackDuration) GetRollbackDuration() *durationpb.Duration { + if x != nil { + return x.RollbackDuration + } + return nil +} + var File_proto_gnmi_ext_gnmi_ext_proto protoreflect.FileDescriptor var file_proto_gnmi_ext_gnmi_ext_proto_rawDesc = []byte{ 0x0a, 0x1d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, 0x74, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x08, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, 0x74, 0x22, 0xd7, 0x01, 0x0a, 0x09, 0x45, 0x78, + 0x08, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, 0x74, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x83, 0x02, 0x0a, 0x09, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, 0x74, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, @@ -566,41 +898,75 @@ var file_proto_gnmi_ext_gnmi_ext_proto_rawDesc = []byte{ 0x65, 0x72, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, 0x74, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, - 0x79, 0x48, 0x00, 0x52, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x05, 0x0a, 0x03, - 0x65, 0x78, 0x74, 0x22, 0x4e, 0x0a, 0x13, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, - 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, - 0x74, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, - 0x6d, 0x73, 0x67, 0x22, 0x6b, 0x0a, 0x11, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x41, 0x72, 0x62, - 0x69, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, - 0x74, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x32, 0x0a, 0x0b, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, 0x74, 0x2e, 0x55, 0x69, 0x6e, - 0x74, 0x31, 0x32, 0x38, 0x52, 0x0a, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x22, 0x2f, 0x0a, 0x07, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38, 0x12, 0x12, 0x0a, 0x04, 0x68, - 0x69, 0x67, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x68, 0x69, 0x67, 0x68, 0x12, - 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6c, 0x6f, - 0x77, 0x22, 0x16, 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x68, 0x0a, 0x07, 0x48, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x79, 0x12, 0x25, 0x0a, 0x0d, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0c, 0x73, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x72, - 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x6e, 0x6d, - 0x69, 0x5f, 0x65, 0x78, 0x74, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, - 0x00, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0x33, 0x0a, 0x09, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x2a, 0x33, 0x0a, 0x0b, 0x45, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x49, 0x44, 0x5f, 0x55, - 0x4e, 0x53, 0x45, 0x54, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x10, 0x45, 0x49, 0x44, 0x5f, 0x45, 0x58, - 0x50, 0x45, 0x52, 0x49, 0x4d, 0x45, 0x4e, 0x54, 0x41, 0x4c, 0x10, 0xe7, 0x07, 0x42, 0x2b, 0x5a, - 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x79, 0x48, 0x00, 0x52, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x2a, 0x0a, 0x06, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, + 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x48, 0x00, + 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x42, 0x05, 0x0a, 0x03, 0x65, 0x78, 0x74, 0x22, + 0x4e, 0x0a, 0x13, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, 0x74, 0x2e, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, + 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, + 0x6b, 0x0a, 0x11, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x41, 0x72, 0x62, 0x69, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, 0x74, 0x2e, 0x52, 0x6f, + 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x32, 0x0a, 0x0b, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, 0x74, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38, + 0x52, 0x0a, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x2f, 0x0a, 0x07, + 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x69, 0x67, 0x68, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x68, 0x69, 0x67, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x6c, + 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6c, 0x6f, 0x77, 0x22, 0x16, 0x0a, + 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x68, 0x0a, 0x07, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x12, 0x25, 0x0a, 0x0d, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, + 0x74, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, 0x52, 0x05, 0x72, + 0x61, 0x6e, 0x67, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0x33, 0x0a, 0x09, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x03, 0x65, 0x6e, 0x64, 0x22, 0x97, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x31, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x12, 0x33, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, 0x74, 0x2e, 0x43, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x48, 0x00, 0x52, 0x07, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x12, 0x30, 0x0a, 0x06, 0x63, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, + 0x78, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x48, + 0x00, 0x52, 0x06, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x59, 0x0a, 0x15, 0x73, 0x65, 0x74, + 0x5f, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x5f, + 0x65, 0x78, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6c, + 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, + 0x13, 0x73, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x57, + 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x46, 0x0a, 0x11, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x64, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x0f, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x22, 0x0e, 0x0a, 0x0c, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x22, 0x63, 0x0a, 0x19, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x11, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, + 0x6b, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x72, 0x6f, 0x6c, + 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x33, 0x0a, + 0x0b, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x0d, 0x0a, 0x09, + 0x45, 0x49, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x10, 0x45, + 0x49, 0x44, 0x5f, 0x45, 0x58, 0x50, 0x45, 0x52, 0x49, 0x4d, 0x45, 0x4e, 0x54, 0x41, 0x4c, 0x10, + 0xe7, 0x07, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, 0x6e, 0x6d, 0x69, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, 0x74, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -616,30 +982,43 @@ func file_proto_gnmi_ext_gnmi_ext_proto_rawDescGZIP() []byte { } var file_proto_gnmi_ext_gnmi_ext_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_proto_gnmi_ext_gnmi_ext_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_proto_gnmi_ext_gnmi_ext_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_proto_gnmi_ext_gnmi_ext_proto_goTypes = []interface{}{ - (ExtensionID)(0), // 0: gnmi_ext.ExtensionID - (*Extension)(nil), // 1: gnmi_ext.Extension - (*RegisteredExtension)(nil), // 2: gnmi_ext.RegisteredExtension - (*MasterArbitration)(nil), // 3: gnmi_ext.MasterArbitration - (*Uint128)(nil), // 4: gnmi_ext.Uint128 - (*Role)(nil), // 5: gnmi_ext.Role - (*History)(nil), // 6: gnmi_ext.History - (*TimeRange)(nil), // 7: gnmi_ext.TimeRange + (ExtensionID)(0), // 0: gnmi_ext.ExtensionID + (*Extension)(nil), // 1: gnmi_ext.Extension + (*RegisteredExtension)(nil), // 2: gnmi_ext.RegisteredExtension + (*MasterArbitration)(nil), // 3: gnmi_ext.MasterArbitration + (*Uint128)(nil), // 4: gnmi_ext.Uint128 + (*Role)(nil), // 5: gnmi_ext.Role + (*History)(nil), // 6: gnmi_ext.History + (*TimeRange)(nil), // 7: gnmi_ext.TimeRange + (*Commit)(nil), // 8: gnmi_ext.Commit + (*CommitRequest)(nil), // 9: gnmi_ext.CommitRequest + (*CommitConfirm)(nil), // 10: gnmi_ext.CommitConfirm + (*CommitCancel)(nil), // 11: gnmi_ext.CommitCancel + (*CommitSetRollbackDuration)(nil), // 12: gnmi_ext.CommitSetRollbackDuration + (*durationpb.Duration)(nil), // 13: google.protobuf.Duration } var file_proto_gnmi_ext_gnmi_ext_proto_depIdxs = []int32{ - 2, // 0: gnmi_ext.Extension.registered_ext:type_name -> gnmi_ext.RegisteredExtension - 3, // 1: gnmi_ext.Extension.master_arbitration:type_name -> gnmi_ext.MasterArbitration - 6, // 2: gnmi_ext.Extension.history:type_name -> gnmi_ext.History - 0, // 3: gnmi_ext.RegisteredExtension.id:type_name -> gnmi_ext.ExtensionID - 5, // 4: gnmi_ext.MasterArbitration.role:type_name -> gnmi_ext.Role - 4, // 5: gnmi_ext.MasterArbitration.election_id:type_name -> gnmi_ext.Uint128 - 7, // 6: gnmi_ext.History.range:type_name -> gnmi_ext.TimeRange - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 2, // 0: gnmi_ext.Extension.registered_ext:type_name -> gnmi_ext.RegisteredExtension + 3, // 1: gnmi_ext.Extension.master_arbitration:type_name -> gnmi_ext.MasterArbitration + 6, // 2: gnmi_ext.Extension.history:type_name -> gnmi_ext.History + 8, // 3: gnmi_ext.Extension.commit:type_name -> gnmi_ext.Commit + 0, // 4: gnmi_ext.RegisteredExtension.id:type_name -> gnmi_ext.ExtensionID + 5, // 5: gnmi_ext.MasterArbitration.role:type_name -> gnmi_ext.Role + 4, // 6: gnmi_ext.MasterArbitration.election_id:type_name -> gnmi_ext.Uint128 + 7, // 7: gnmi_ext.History.range:type_name -> gnmi_ext.TimeRange + 9, // 8: gnmi_ext.Commit.commit:type_name -> gnmi_ext.CommitRequest + 10, // 9: gnmi_ext.Commit.confirm:type_name -> gnmi_ext.CommitConfirm + 11, // 10: gnmi_ext.Commit.cancel:type_name -> gnmi_ext.CommitCancel + 12, // 11: gnmi_ext.Commit.set_rollback_duration:type_name -> gnmi_ext.CommitSetRollbackDuration + 13, // 12: gnmi_ext.CommitRequest.rollback_duration:type_name -> google.protobuf.Duration + 13, // 13: gnmi_ext.CommitSetRollbackDuration.rollback_duration:type_name -> google.protobuf.Duration + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_proto_gnmi_ext_gnmi_ext_proto_init() } @@ -732,23 +1111,90 @@ func file_proto_gnmi_ext_gnmi_ext_proto_init() { return nil } } + file_proto_gnmi_ext_gnmi_ext_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Commit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_gnmi_ext_gnmi_ext_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommitRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_gnmi_ext_gnmi_ext_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommitConfirm); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_gnmi_ext_gnmi_ext_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommitCancel); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_gnmi_ext_gnmi_ext_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommitSetRollbackDuration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_proto_gnmi_ext_gnmi_ext_proto_msgTypes[0].OneofWrappers = []interface{}{ (*Extension_RegisteredExt)(nil), (*Extension_MasterArbitration)(nil), (*Extension_History)(nil), + (*Extension_Commit)(nil), } file_proto_gnmi_ext_gnmi_ext_proto_msgTypes[5].OneofWrappers = []interface{}{ (*History_SnapshotTime)(nil), (*History_Range)(nil), } + file_proto_gnmi_ext_gnmi_ext_proto_msgTypes[7].OneofWrappers = []interface{}{ + (*Commit_Commit)(nil), + (*Commit_Confirm)(nil), + (*Commit_Cancel)(nil), + (*Commit_SetRollbackDuration)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_gnmi_ext_gnmi_ext_proto_rawDesc, NumEnums: 1, - NumMessages: 7, + NumMessages: 12, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/gnmi_ext/gnmi_ext_pb2.py b/proto/gnmi_ext/gnmi_ext_pb2.py index 5d0fd9a..c4c7ad5 100644 --- a/proto/gnmi_ext/gnmi_ext_pb2.py +++ b/proto/gnmi_ext/gnmi_ext_pb2.py @@ -2,39 +2,50 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: proto/gnmi_ext/gnmi_ext.proto """Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dproto/gnmi_ext/gnmi_ext.proto\x12\x08gnmi_ext\"\xac\x01\n\tExtension\x12\x37\n\x0eregistered_ext\x18\x01 \x01(\x0b\x32\x1d.gnmi_ext.RegisteredExtensionH\x00\x12\x39\n\x12master_arbitration\x18\x02 \x01(\x0b\x32\x1b.gnmi_ext.MasterArbitrationH\x00\x12$\n\x07history\x18\x03 \x01(\x0b\x32\x11.gnmi_ext.HistoryH\x00\x42\x05\n\x03\x65xt\"E\n\x13RegisteredExtension\x12!\n\x02id\x18\x01 \x01(\x0e\x32\x15.gnmi_ext.ExtensionID\x12\x0b\n\x03msg\x18\x02 \x01(\x0c\"Y\n\x11MasterArbitration\x12\x1c\n\x04role\x18\x01 \x01(\x0b\x32\x0e.gnmi_ext.Role\x12&\n\x0b\x65lection_id\x18\x02 \x01(\x0b\x32\x11.gnmi_ext.Uint128\"$\n\x07Uint128\x12\x0c\n\x04high\x18\x01 \x01(\x04\x12\x0b\n\x03low\x18\x02 \x01(\x04\"\x12\n\x04Role\x12\n\n\x02id\x18\x01 \x01(\t\"S\n\x07History\x12\x17\n\rsnapshot_time\x18\x01 \x01(\x03H\x00\x12$\n\x05range\x18\x02 \x01(\x0b\x32\x13.gnmi_ext.TimeRangeH\x00\x42\t\n\x07request\"\'\n\tTimeRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03*3\n\x0b\x45xtensionID\x12\r\n\tEID_UNSET\x10\x00\x12\x15\n\x10\x45ID_EXPERIMENTAL\x10\xe7\x07\x42+Z)github.com/openconfig/gnmi/proto/gnmi_extb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dproto/gnmi_ext/gnmi_ext.proto\x12\x08gnmi_ext\x1a\x1egoogle/protobuf/duration.proto\"\xd0\x01\n\tExtension\x12\x37\n\x0eregistered_ext\x18\x01 \x01(\x0b\x32\x1d.gnmi_ext.RegisteredExtensionH\x00\x12\x39\n\x12master_arbitration\x18\x02 \x01(\x0b\x32\x1b.gnmi_ext.MasterArbitrationH\x00\x12$\n\x07history\x18\x03 \x01(\x0b\x32\x11.gnmi_ext.HistoryH\x00\x12\"\n\x06\x63ommit\x18\x04 \x01(\x0b\x32\x10.gnmi_ext.CommitH\x00\x42\x05\n\x03\x65xt\"E\n\x13RegisteredExtension\x12!\n\x02id\x18\x01 \x01(\x0e\x32\x15.gnmi_ext.ExtensionID\x12\x0b\n\x03msg\x18\x02 \x01(\x0c\"Y\n\x11MasterArbitration\x12\x1c\n\x04role\x18\x01 \x01(\x0b\x32\x0e.gnmi_ext.Role\x12&\n\x0b\x65lection_id\x18\x02 \x01(\x0b\x32\x11.gnmi_ext.Uint128\"$\n\x07Uint128\x12\x0c\n\x04high\x18\x01 \x01(\x04\x12\x0b\n\x03low\x18\x02 \x01(\x04\"\x12\n\x04Role\x12\n\n\x02id\x18\x01 \x01(\t\"S\n\x07History\x12\x17\n\rsnapshot_time\x18\x01 \x01(\x03H\x00\x12$\n\x05range\x18\x02 \x01(\x0b\x32\x13.gnmi_ext.TimeRangeH\x00\x42\t\n\x07request\"\'\n\tTimeRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"\xe5\x01\n\x06\x43ommit\x12\n\n\x02id\x18\x01 \x01(\t\x12)\n\x06\x63ommit\x18\x02 \x01(\x0b\x32\x17.gnmi_ext.CommitRequestH\x00\x12*\n\x07\x63onfirm\x18\x03 \x01(\x0b\x32\x17.gnmi_ext.CommitConfirmH\x00\x12(\n\x06\x63\x61ncel\x18\x04 \x01(\x0b\x32\x16.gnmi_ext.CommitCancelH\x00\x12\x44\n\x15set_rollback_duration\x18\x05 \x01(\x0b\x32#.gnmi_ext.CommitSetRollbackDurationH\x00\x42\x08\n\x06\x61\x63tion\"E\n\rCommitRequest\x12\x34\n\x11rollback_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x0f\n\rCommitConfirm\"\x0e\n\x0c\x43ommitCancel\"Q\n\x19\x43ommitSetRollbackDuration\x12\x34\n\x11rollback_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration*3\n\x0b\x45xtensionID\x12\r\n\tEID_UNSET\x10\x00\x12\x15\n\x10\x45ID_EXPERIMENTAL\x10\xe7\x07\x42+Z)github.com/openconfig/gnmi/proto/gnmi_extb\x06proto3') -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.gnmi_ext.gnmi_ext_pb2', globals()) +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.gnmi_ext.gnmi_ext_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'Z)github.com/openconfig/gnmi/proto/gnmi_ext' - _EXTENSIONID._serialized_start=564 - _EXTENSIONID._serialized_end=615 - _EXTENSION._serialized_start=44 - _EXTENSION._serialized_end=216 - _REGISTEREDEXTENSION._serialized_start=218 - _REGISTEREDEXTENSION._serialized_end=287 - _MASTERARBITRATION._serialized_start=289 - _MASTERARBITRATION._serialized_end=378 - _UINT128._serialized_start=380 - _UINT128._serialized_end=416 - _ROLE._serialized_start=418 - _ROLE._serialized_end=436 - _HISTORY._serialized_start=438 - _HISTORY._serialized_end=521 - _TIMERANGE._serialized_start=523 - _TIMERANGE._serialized_end=562 + _globals['_EXTENSIONID']._serialized_start=1051 + _globals['_EXTENSIONID']._serialized_end=1102 + _globals['_EXTENSION']._serialized_start=76 + _globals['_EXTENSION']._serialized_end=284 + _globals['_REGISTEREDEXTENSION']._serialized_start=286 + _globals['_REGISTEREDEXTENSION']._serialized_end=355 + _globals['_MASTERARBITRATION']._serialized_start=357 + _globals['_MASTERARBITRATION']._serialized_end=446 + _globals['_UINT128']._serialized_start=448 + _globals['_UINT128']._serialized_end=484 + _globals['_ROLE']._serialized_start=486 + _globals['_ROLE']._serialized_end=504 + _globals['_HISTORY']._serialized_start=506 + _globals['_HISTORY']._serialized_end=589 + _globals['_TIMERANGE']._serialized_start=591 + _globals['_TIMERANGE']._serialized_end=630 + _globals['_COMMIT']._serialized_start=633 + _globals['_COMMIT']._serialized_end=862 + _globals['_COMMITREQUEST']._serialized_start=864 + _globals['_COMMITREQUEST']._serialized_end=933 + _globals['_COMMITCONFIRM']._serialized_start=935 + _globals['_COMMITCONFIRM']._serialized_end=950 + _globals['_COMMITCANCEL']._serialized_start=952 + _globals['_COMMITCANCEL']._serialized_end=966 + _globals['_COMMITSETROLLBACKDURATION']._serialized_start=968 + _globals['_COMMITSETROLLBACKDURATION']._serialized_end=1049 # @@protoc_insertion_point(module_scope)