diff --git a/go/gosdn/core/core.pb.go b/go/gosdn/core/core.pb.go index 19fc7378d474e1aa0c1c9126ea71ce3926382eb9..47251058ea303989abe461277654d2492e4a2637 100644 --- a/go/gosdn/core/core.pb.go +++ b/go/gosdn/core/core.pb.go @@ -64,7 +64,7 @@ func (x SetResponseStatus) Number() protoreflect.EnumNumber { // Deprecated: Use SetResponseStatus.Descriptor instead. func (SetResponseStatus) EnumDescriptor() ([]byte, []int) { - return file_gosdn_core_core_proto_rawDescGZIP(), []int{3, 0} + return file_gosdn_core_core_proto_rawDescGZIP(), []int{4, 0} } type GetRequest struct { @@ -190,7 +190,8 @@ type SetRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pnd []*SetPnd `protobuf:"bytes,2,rep,name=pnd,proto3" json:"pnd,omitempty"` } func (x *SetRequest) Reset() { @@ -232,18 +233,89 @@ func (x *SetRequest) GetTimestamp() int64 { return 0 } +func (x *SetRequest) GetPnd() []*SetPnd { + if x != nil { + return x.Pnd + } + return nil +} + +type SetPnd struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Sbi string `protobuf:"bytes,3,opt,name=sbi,proto3" json:"sbi,omitempty"` +} + +func (x *SetPnd) Reset() { + *x = SetPnd{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_core_core_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetPnd) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPnd) ProtoMessage() {} + +func (x *SetPnd) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_core_core_proto_msgTypes[3] + 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 SetPnd.ProtoReflect.Descriptor instead. +func (*SetPnd) Descriptor() ([]byte, []int) { + return file_gosdn_core_core_proto_rawDescGZIP(), []int{3} +} + +func (x *SetPnd) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SetPnd) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *SetPnd) GetSbi() string { + if x != nil { + return x.Sbi + } + return "" +} + type SetResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Status SetResponseStatus `protobuf:"varint,2,opt,name=Status,proto3,enum=gosdn.core.SetResponseStatus" json:"Status,omitempty"` } func (x *SetResponse) Reset() { *x = SetResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gosdn_core_core_proto_msgTypes[3] + mi := &file_gosdn_core_core_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -256,7 +328,7 @@ func (x *SetResponse) String() string { func (*SetResponse) ProtoMessage() {} func (x *SetResponse) ProtoReflect() protoreflect.Message { - mi := &file_gosdn_core_core_proto_msgTypes[3] + mi := &file_gosdn_core_core_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -269,7 +341,7 @@ func (x *SetResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetResponse.ProtoReflect.Descriptor instead. func (*SetResponse) Descriptor() ([]byte, []int) { - return file_gosdn_core_core_proto_rawDescGZIP(), []int{3} + return file_gosdn_core_core_proto_rawDescGZIP(), []int{4} } func (x *SetResponse) GetTimestamp() int64 { @@ -279,6 +351,13 @@ func (x *SetResponse) GetTimestamp() int64 { return 0 } +func (x *SetResponse) GetStatus() SetResponseStatus { + if x != nil { + return x.Status + } + return SetResponse_OK +} + var File_gosdn_core_core_proto protoreflect.FileDescriptor var file_gosdn_core_core_proto_rawDesc = []byte{ @@ -296,25 +375,36 @@ var file_gosdn_core_core_proto_rawDesc = []byte{ 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x33, 0x0a, 0x03, 0x70, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x44, - 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x03, 0x70, 0x6e, 0x64, 0x22, 0x2a, 0x0a, 0x0a, 0x53, 0x65, + 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x03, 0x70, 0x6e, 0x64, 0x22, 0x50, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x48, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x22, 0x1b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x06, 0x0a, - 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, - 0x32, 0x76, 0x0a, 0x04, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x36, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, - 0x16, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x36, 0x0a, 0x03, 0x53, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x17, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2a, 0x5a, 0x28, 0x63, 0x6f, 0x64, 0x65, - 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x63, 0x6f, 0x63, - 0x73, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, - 0x63, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x24, 0x0a, 0x03, 0x70, 0x6e, 0x64, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x73, 0x65, 0x74, 0x50, 0x6e, 0x64, 0x52, 0x03, 0x70, 0x6e, 0x64, 0x22, 0x50, 0x0a, 0x06, + 0x73, 0x65, 0x74, 0x50, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, + 0x73, 0x62, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x62, 0x69, 0x22, 0x80, + 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x36, 0x0a, 0x06, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x67, + 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x22, 0x1b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x06, + 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, + 0x01, 0x32, 0x76, 0x0a, 0x04, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x36, 0x0a, 0x03, 0x47, 0x65, 0x74, + 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x36, 0x0a, 0x03, 0x53, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x17, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2a, 0x5a, 0x28, 0x63, 0x6f, 0x64, + 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x63, 0x6f, + 0x63, 0x73, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, + 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -330,26 +420,29 @@ func file_gosdn_core_core_proto_rawDescGZIP() []byte { } var file_gosdn_core_core_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_gosdn_core_core_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_gosdn_core_core_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_gosdn_core_core_proto_goTypes = []interface{}{ (SetResponseStatus)(0), // 0: gosdn.core.SetResponse.status (*GetRequest)(nil), // 1: gosdn.core.GetRequest (*GetResponse)(nil), // 2: gosdn.core.GetResponse (*SetRequest)(nil), // 3: gosdn.core.SetRequest - (*SetResponse)(nil), // 4: gosdn.core.SetResponse - (*pnd.PrincipalNetworkDomain)(nil), // 5: gosdn.pnd.PrincipalNetworkDomain + (*SetPnd)(nil), // 4: gosdn.core.setPnd + (*SetResponse)(nil), // 5: gosdn.core.SetResponse + (*pnd.PrincipalNetworkDomain)(nil), // 6: gosdn.pnd.PrincipalNetworkDomain } var file_gosdn_core_core_proto_depIdxs = []int32{ - 5, // 0: gosdn.core.GetResponse.pnd:type_name -> gosdn.pnd.PrincipalNetworkDomain - 1, // 1: gosdn.core.core.Get:input_type -> gosdn.core.GetRequest - 3, // 2: gosdn.core.core.Set:input_type -> gosdn.core.SetRequest - 2, // 3: gosdn.core.core.Get:output_type -> gosdn.core.GetResponse - 4, // 4: gosdn.core.core.Set:output_type -> gosdn.core.SetResponse - 3, // [3:5] is the sub-list for method output_type - 1, // [1:3] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 6, // 0: gosdn.core.GetResponse.pnd:type_name -> gosdn.pnd.PrincipalNetworkDomain + 4, // 1: gosdn.core.SetRequest.pnd:type_name -> gosdn.core.setPnd + 0, // 2: gosdn.core.SetResponse.Status:type_name -> gosdn.core.SetResponse.status + 1, // 3: gosdn.core.core.Get:input_type -> gosdn.core.GetRequest + 3, // 4: gosdn.core.core.Set:input_type -> gosdn.core.SetRequest + 2, // 5: gosdn.core.core.Get:output_type -> gosdn.core.GetResponse + 5, // 6: gosdn.core.core.Set:output_type -> gosdn.core.SetResponse + 5, // [5:7] is the sub-list for method output_type + 3, // [3:5] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_gosdn_core_core_proto_init() } @@ -395,6 +488,18 @@ func file_gosdn_core_core_proto_init() { } } file_gosdn_core_core_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetPnd); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_core_core_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SetResponse); i { case 0: return &v.state @@ -413,7 +518,7 @@ func file_gosdn_core_core_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_gosdn_core_core_proto_rawDesc, NumEnums: 1, - NumMessages: 4, + NumMessages: 5, NumExtensions: 0, NumServices: 1, }, diff --git a/go/gosdn/pnd/pnd.pb.go b/go/gosdn/pnd/pnd.pb.go index 743db733ae87ba013af7c8b1e08badddbc95403f..0bbe1e2494b584dae53cc3cda88b154f80ae3895 100644 --- a/go/gosdn/pnd/pnd.pb.go +++ b/go/gosdn/pnd/pnd.pb.go @@ -71,99 +71,99 @@ func (Change_State) EnumDescriptor() ([]byte, []int) { return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{9, 0} } -type SetResponseStatus int32 +type SetChange_Operation int32 const ( - SetResponse_OK SetResponseStatus = 0 - SetResponse_ERROR SetResponseStatus = 1 + SetChange_CREATE SetChange_Operation = 0 + SetChange_COMMIT SetChange_Operation = 1 + SetChange_CONFIRM SetChange_Operation = 2 ) -// Enum value maps for SetResponseStatus. +// Enum value maps for SetChange_Operation. var ( - SetResponseStatus_name = map[int32]string{ - 0: "OK", - 1: "ERROR", + SetChange_Operation_name = map[int32]string{ + 0: "CREATE", + 1: "COMMIT", + 2: "CONFIRM", } - SetResponseStatus_value = map[string]int32{ - "OK": 0, - "ERROR": 1, + SetChange_Operation_value = map[string]int32{ + "CREATE": 0, + "COMMIT": 1, + "CONFIRM": 2, } ) -func (x SetResponseStatus) Enum() *SetResponseStatus { - p := new(SetResponseStatus) +func (x SetChange_Operation) Enum() *SetChange_Operation { + p := new(SetChange_Operation) *p = x return p } -func (x SetResponseStatus) String() string { +func (x SetChange_Operation) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (SetResponseStatus) Descriptor() protoreflect.EnumDescriptor { +func (SetChange_Operation) Descriptor() protoreflect.EnumDescriptor { return file_gosdn_pnd_pnd_proto_enumTypes[1].Descriptor() } -func (SetResponseStatus) Type() protoreflect.EnumType { +func (SetChange_Operation) Type() protoreflect.EnumType { return &file_gosdn_pnd_pnd_proto_enumTypes[1] } -func (x SetResponseStatus) Number() protoreflect.EnumNumber { +func (x SetChange_Operation) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use SetResponseStatus.Descriptor instead. -func (SetResponseStatus) EnumDescriptor() ([]byte, []int) { - return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{14, 0} +// Deprecated: Use SetChange_Operation.Descriptor instead. +func (SetChange_Operation) EnumDescriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{13, 0} } -type ChangeRequest_Operation int32 +type SetResponseStatus int32 const ( - ChangeRequest_CREATE ChangeRequest_Operation = 0 - ChangeRequest_COMMIT ChangeRequest_Operation = 1 - ChangeRequest_CONFIRM ChangeRequest_Operation = 2 + SetResponse_OK SetResponseStatus = 0 + SetResponse_ERROR SetResponseStatus = 1 ) -// Enum value maps for ChangeRequest_Operation. +// Enum value maps for SetResponseStatus. var ( - ChangeRequest_Operation_name = map[int32]string{ - 0: "CREATE", - 1: "COMMIT", - 2: "CONFIRM", + SetResponseStatus_name = map[int32]string{ + 0: "OK", + 1: "ERROR", } - ChangeRequest_Operation_value = map[string]int32{ - "CREATE": 0, - "COMMIT": 1, - "CONFIRM": 2, + SetResponseStatus_value = map[string]int32{ + "OK": 0, + "ERROR": 1, } ) -func (x ChangeRequest_Operation) Enum() *ChangeRequest_Operation { - p := new(ChangeRequest_Operation) +func (x SetResponseStatus) Enum() *SetResponseStatus { + p := new(SetResponseStatus) *p = x return p } -func (x ChangeRequest_Operation) String() string { +func (x SetResponseStatus) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (ChangeRequest_Operation) Descriptor() protoreflect.EnumDescriptor { +func (SetResponseStatus) Descriptor() protoreflect.EnumDescriptor { return file_gosdn_pnd_pnd_proto_enumTypes[2].Descriptor() } -func (ChangeRequest_Operation) Type() protoreflect.EnumType { +func (SetResponseStatus) Type() protoreflect.EnumType { return &file_gosdn_pnd_pnd_proto_enumTypes[2] } -func (x ChangeRequest_Operation) Number() protoreflect.EnumNumber { +func (x SetResponseStatus) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use ChangeRequest_Operation.Descriptor instead. -func (ChangeRequest_Operation) EnumDescriptor() ([]byte, []int) { - return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{15, 0} +// Deprecated: Use SetResponseStatus.Descriptor instead. +func (SetResponseStatus) EnumDescriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{14, 0} } type ChangeRequest_ApiOperation int32 @@ -212,7 +212,7 @@ func (x ChangeRequest_ApiOperation) Number() protoreflect.EnumNumber { // Deprecated: Use ChangeRequest_ApiOperation.Descriptor instead. func (ChangeRequest_ApiOperation) EnumDescriptor() ([]byte, []int) { - return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{15, 1} + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{15, 0} } type GetRequest struct { @@ -1097,6 +1097,9 @@ type SetChange struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Cuid string `protobuf:"bytes,1,opt,name=cuid,proto3" json:"cuid,omitempty"` + Op SetChange_Operation `protobuf:"varint,2,opt,name=op,proto3,enum=gosdn.pnd.SetChange_Operation" json:"op,omitempty"` } func (x *SetChange) Reset() { @@ -1131,12 +1134,28 @@ func (*SetChange) Descriptor() ([]byte, []int) { return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{13} } +func (x *SetChange) GetCuid() string { + if x != nil { + return x.Cuid + } + return "" +} + +func (x *SetChange) GetOp() SetChange_Operation { + if x != nil { + return x.Op + } + return SetChange_CREATE +} + type SetResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Status SetResponseStatus `protobuf:"varint,2,opt,name=Status,proto3,enum=gosdn.pnd.SetResponseStatus" json:"Status,omitempty"` + Responses []*SetResponse `protobuf:"bytes,3,rep,name=responses,proto3" json:"responses,omitempty"` } func (x *SetResponse) Reset() { @@ -1178,6 +1197,20 @@ func (x *SetResponse) GetTimestamp() int64 { return 0 } +func (x *SetResponse) GetStatus() SetResponseStatus { + if x != nil { + return x.Status + } + return SetResponse_OK +} + +func (x *SetResponse) GetResponses() []*SetResponse { + if x != nil { + return x.Responses + } + return nil +} + type ChangeRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1187,7 +1220,6 @@ type ChangeRequest struct { Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` ApiOp ChangeRequest_ApiOperation `protobuf:"varint,4,opt,name=apiOp,proto3,enum=gosdn.pnd.ChangeRequest_ApiOperation" json:"apiOp,omitempty"` - Op ChangeRequest_Operation `protobuf:"varint,5,opt,name=op,proto3,enum=gosdn.pnd.ChangeRequest_Operation" json:"op,omitempty"` } func (x *ChangeRequest) Reset() { @@ -1250,13 +1282,6 @@ func (x *ChangeRequest) GetApiOp() ChangeRequest_ApiOperation { return ChangeRequest_UPDATE } -func (x *ChangeRequest) GetOp() ChangeRequest_Operation { - if x != nil { - return x.Op - } - return ChangeRequest_CREATE -} - var File_gosdn_pnd_pnd_proto protoreflect.FileDescriptor var file_gosdn_pnd_pnd_proto_rawDesc = []byte{ @@ -1370,41 +1395,49 @@ var file_gosdn_pnd_pnd_proto_rawDesc = []byte{ 0x72, 0x64, 0x12, 0x30, 0x0a, 0x03, 0x73, 0x62, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x52, - 0x03, 0x73, 0x62, 0x69, 0x22, 0x08, 0x0a, 0x06, 0x73, 0x65, 0x74, 0x53, 0x62, 0x69, 0x22, 0x0b, - 0x0a, 0x09, 0x73, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x48, 0x0a, 0x0b, 0x53, - 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x1b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, - 0x52, 0x4f, 0x52, 0x10, 0x01, 0x22, 0xa1, 0x02, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x61, 0x70, 0x69, 0x4f, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x70, 0x69, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x61, 0x70, 0x69, 0x4f, 0x70, 0x12, 0x32, - 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x73, - 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, - 0x6f, 0x70, 0x22, 0x30, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x0a, 0x0a, 0x06, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, - 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x4e, 0x46, 0x49, - 0x52, 0x4d, 0x10, 0x02, 0x22, 0x33, 0x0a, 0x0c, 0x41, 0x70, 0x69, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x00, - 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x50, 0x4c, 0x41, 0x43, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, - 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x02, 0x32, 0x71, 0x0a, 0x03, 0x70, 0x6e, 0x64, - 0x12, 0x34, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x15, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, - 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, - 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x03, 0x53, 0x65, 0x74, 0x12, 0x15, 0x2e, - 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, - 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x29, 0x5a, 0x27, - 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, - 0x2f, 0x63, 0x6f, 0x63, 0x73, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, - 0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x03, 0x73, 0x62, 0x69, 0x22, 0x08, 0x0a, 0x06, 0x73, 0x65, 0x74, 0x53, 0x62, 0x69, 0x22, 0x81, + 0x01, 0x0a, 0x09, 0x73, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x63, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x75, 0x69, 0x64, + 0x12, 0x2e, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x67, + 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x6f, 0x70, + 0x22, 0x30, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, + 0x06, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4f, 0x4d, + 0x4d, 0x49, 0x54, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, + 0x10, 0x02, 0x22, 0xb5, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x12, 0x35, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x34, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x73, + 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x1b, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, + 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x22, 0xbb, 0x01, 0x0a, 0x0d, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x61, 0x70, 0x69, 0x4f, 0x70, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, + 0x64, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, + 0x41, 0x70, 0x69, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x61, 0x70, + 0x69, 0x4f, 0x70, 0x22, 0x33, 0x0a, 0x0c, 0x41, 0x70, 0x69, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, + 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x50, 0x4c, 0x41, 0x43, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, + 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x02, 0x32, 0x71, 0x0a, 0x03, 0x70, 0x6e, 0x64, 0x12, + 0x34, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x15, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, + 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x03, 0x53, 0x65, 0x74, 0x12, 0x15, 0x2e, 0x67, + 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, + 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x29, 0x5a, 0x27, 0x63, + 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, + 0x63, 0x6f, 0x63, 0x73, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, + 0x64, 0x6e, 0x2f, 0x70, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1423,8 +1456,8 @@ var file_gosdn_pnd_pnd_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_gosdn_pnd_pnd_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_gosdn_pnd_pnd_proto_goTypes = []interface{}{ (Change_State)(0), // 0: gosdn.pnd.Change.State - (SetResponseStatus)(0), // 1: gosdn.pnd.SetResponse.status - (ChangeRequest_Operation)(0), // 2: gosdn.pnd.ChangeRequest.Operation + (SetChange_Operation)(0), // 1: gosdn.pnd.setChange.Operation + (SetResponseStatus)(0), // 2: gosdn.pnd.SetResponse.status (ChangeRequest_ApiOperation)(0), // 3: gosdn.pnd.ChangeRequest.ApiOperation (*GetRequest)(nil), // 4: gosdn.pnd.GetRequest (*GetPnd)(nil), // 5: gosdn.pnd.getPnd @@ -1464,17 +1497,19 @@ var file_gosdn_pnd_pnd_proto_depIdxs = []int32{ 17, // 16: gosdn.pnd.SetRequest.change:type_name -> gosdn.pnd.setChange 19, // 17: gosdn.pnd.SetRequest.changeRequest:type_name -> gosdn.pnd.ChangeRequest 11, // 18: gosdn.pnd.setOnd.sbi:type_name -> gosdn.pnd.SouthboundInterface - 3, // 19: gosdn.pnd.ChangeRequest.apiOp:type_name -> gosdn.pnd.ChangeRequest.ApiOperation - 2, // 20: gosdn.pnd.ChangeRequest.op:type_name -> gosdn.pnd.ChangeRequest.Operation - 4, // 21: gosdn.pnd.pnd.Get:input_type -> gosdn.pnd.GetRequest - 14, // 22: gosdn.pnd.pnd.Set:input_type -> gosdn.pnd.SetRequest - 9, // 23: gosdn.pnd.pnd.Get:output_type -> gosdn.pnd.GetResponse - 18, // 24: gosdn.pnd.pnd.Set:output_type -> gosdn.pnd.SetResponse - 23, // [23:25] is the sub-list for method output_type - 21, // [21:23] is the sub-list for method input_type - 21, // [21:21] is the sub-list for extension type_name - 21, // [21:21] is the sub-list for extension extendee - 0, // [0:21] is the sub-list for field type_name + 1, // 19: gosdn.pnd.setChange.op:type_name -> gosdn.pnd.setChange.Operation + 2, // 20: gosdn.pnd.SetResponse.Status:type_name -> gosdn.pnd.SetResponse.status + 18, // 21: gosdn.pnd.SetResponse.responses:type_name -> gosdn.pnd.SetResponse + 3, // 22: gosdn.pnd.ChangeRequest.apiOp:type_name -> gosdn.pnd.ChangeRequest.ApiOperation + 4, // 23: gosdn.pnd.pnd.Get:input_type -> gosdn.pnd.GetRequest + 14, // 24: gosdn.pnd.pnd.Set:input_type -> gosdn.pnd.SetRequest + 9, // 25: gosdn.pnd.pnd.Get:output_type -> gosdn.pnd.GetResponse + 18, // 26: gosdn.pnd.pnd.Set:output_type -> gosdn.pnd.SetResponse + 25, // [25:27] is the sub-list for method output_type + 23, // [23:25] is the sub-list for method input_type + 23, // [23:23] is the sub-list for extension type_name + 23, // [23:23] is the sub-list for extension extendee + 0, // [0:23] is the sub-list for field type_name } func init() { file_gosdn_pnd_pnd_proto_init() } diff --git a/proto/gosdn/core/core.proto b/proto/gosdn/core/core.proto index f9555f86c1c1acea33b31fbf0a6cfdeb661280b2..54db20c35f6ab7ffcce4721ce588307a139bef8c 100644 --- a/proto/gosdn/core/core.proto +++ b/proto/gosdn/core/core.proto @@ -22,6 +22,13 @@ message GetResponse { } message SetRequest { int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + repeated setPnd pnd = 2; +} + +message setPnd { + string name = 1; + string description = 2; + string sbi = 3; } message SetResponse { @@ -30,4 +37,5 @@ message SetResponse { OK = 0; ERROR = 1; } -} \ No newline at end of file + status Status = 2; +} diff --git a/proto/gosdn/pnd/pnd.proto b/proto/gosdn/pnd/pnd.proto index 4ce94c5b5e7f69120cb8cc4b2bcf1051276092ae..26eeeca72e4f636b356f7c3dfa46ddd16bd6db99 100644 --- a/proto/gosdn/pnd/pnd.proto +++ b/proto/gosdn/pnd/pnd.proto @@ -101,7 +101,13 @@ message setSbi { } message setChange { - + enum Operation { + CREATE = 0; + COMMIT = 1; + CONFIRM = 2; + } + string cuid = 1; + Operation op = 2; } message SetResponse{ @@ -110,14 +116,11 @@ message SetResponse{ OK = 0; ERROR = 1; } + status Status = 2; + repeated SetResponse responses = 3; } message ChangeRequest { - enum Operation { - CREATE = 0; - COMMIT = 1; - CONFIRM = 2; - } enum ApiOperation { UPDATE = 0; REPLACE = 1; @@ -127,5 +130,4 @@ message ChangeRequest { string path = 2; string value = 3; ApiOperation apiOp = 4; - Operation op = 5; } \ No newline at end of file