diff --git a/go/gosdn/pnd/pnd.pb.go b/go/gosdn/pnd/pnd.pb.go index c9bb0e275367e840e75d1710a404cc45933da7a8..99b59c960317547b6e24982627f4f17140e4f1ab 100644 --- a/go/gosdn/pnd/pnd.pb.go +++ b/go/gosdn/pnd/pnd.pb.go @@ -217,6 +217,101 @@ func (SetResponseStatus) EnumDescriptor() ([]byte, []int) { return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{13, 0} } +type DeleteRequest_Type int32 + +const ( + DeleteRequest_OND DeleteRequest_Type = 0 + DeleteRequest_SBI DeleteRequest_Type = 1 + DeleteRequest_PND DeleteRequest_Type = 2 +) + +// Enum value maps for DeleteRequest_Type. +var ( + DeleteRequest_Type_name = map[int32]string{ + 0: "OND", + 1: "SBI", + 2: "PND", + } + DeleteRequest_Type_value = map[string]int32{ + "OND": 0, + "SBI": 1, + "PND": 2, + } +) + +func (x DeleteRequest_Type) Enum() *DeleteRequest_Type { + p := new(DeleteRequest_Type) + *p = x + return p +} + +func (x DeleteRequest_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DeleteRequest_Type) Descriptor() protoreflect.EnumDescriptor { + return file_gosdn_pnd_pnd_proto_enumTypes[4].Descriptor() +} + +func (DeleteRequest_Type) Type() protoreflect.EnumType { + return &file_gosdn_pnd_pnd_proto_enumTypes[4] +} + +func (x DeleteRequest_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DeleteRequest_Type.Descriptor instead. +func (DeleteRequest_Type) EnumDescriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{15, 0} +} + +type DeleteResponseStatus int32 + +const ( + DeleteResponse_OK DeleteResponseStatus = 0 + DeleteResponse_ERROR DeleteResponseStatus = 1 +) + +// Enum value maps for DeleteResponseStatus. +var ( + DeleteResponseStatus_name = map[int32]string{ + 0: "OK", + 1: "ERROR", + } + DeleteResponseStatus_value = map[string]int32{ + "OK": 0, + "ERROR": 1, + } +) + +func (x DeleteResponseStatus) Enum() *DeleteResponseStatus { + p := new(DeleteResponseStatus) + *p = x + return p +} + +func (x DeleteResponseStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DeleteResponseStatus) Descriptor() protoreflect.EnumDescriptor { + return file_gosdn_pnd_pnd_proto_enumTypes[5].Descriptor() +} + +func (DeleteResponseStatus) Type() protoreflect.EnumType { + return &file_gosdn_pnd_pnd_proto_enumTypes[5] +} + +func (x DeleteResponseStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DeleteResponseStatus.Descriptor instead. +func (DeleteResponseStatus) EnumDescriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{16, 0} +} + type GetRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1229,6 +1324,124 @@ func (x *ChangeRequest) GetApiOp() ApiOperation { return ApiOperation_UPDATE } +type DeleteRequest 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. + Type DeleteRequest_Type `protobuf:"varint,2,opt,name=type,proto3,enum=gosdn.pnd.DeleteRequest_Type" json:"type,omitempty"` + Uuid string `protobuf:"bytes,3,opt,name=uuid,proto3" json:"uuid,omitempty"` +} + +func (x *DeleteRequest) Reset() { + *x = DeleteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteRequest) ProtoMessage() {} + +func (x *DeleteRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[15] + 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 DeleteRequest.ProtoReflect.Descriptor instead. +func (*DeleteRequest) Descriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{15} +} + +func (x *DeleteRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *DeleteRequest) GetType() DeleteRequest_Type { + if x != nil { + return x.Type + } + return DeleteRequest_OND +} + +func (x *DeleteRequest) GetUuid() string { + if x != nil { + return x.Uuid + } + return "" +} + +type DeleteResponse 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. + Status DeleteResponseStatus `protobuf:"varint,2,opt,name=Status,proto3,enum=gosdn.pnd.DeleteResponseStatus" json:"Status,omitempty"` +} + +func (x *DeleteResponse) Reset() { + *x = DeleteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteResponse) ProtoMessage() {} + +func (x *DeleteResponse) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[16] + 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 DeleteResponse.ProtoReflect.Descriptor instead. +func (*DeleteResponse) Descriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{16} +} + +func (x *DeleteResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *DeleteResponse) GetStatus() DeleteResponseStatus { + if x != nil { + return x.Status + } + return DeleteResponse_OK +} + var File_gosdn_pnd_pnd_proto protoreflect.FileDescriptor var file_gosdn_pnd_pnd_proto_rawDesc = []byte{ @@ -1375,21 +1588,43 @@ var file_gosdn_pnd_pnd_proto_rawDesc = []byte{ 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x61, 0x70, 0x69, 0x4f, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x41, 0x70, 0x69, 0x4f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x61, 0x70, 0x69, 0x4f, 0x70, 0x2a, 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, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x61, 0x70, 0x69, 0x4f, 0x70, 0x22, 0x97, 0x01, + 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 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, 0x12, 0x31, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x75, 0x75, 0x69, 0x64, 0x22, 0x21, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, + 0x4f, 0x4e, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x42, 0x49, 0x10, 0x01, 0x12, 0x07, + 0x0a, 0x03, 0x50, 0x4e, 0x44, 0x10, 0x02, 0x22, 0x85, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 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, 0x38, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, + 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 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, 0x2a, + 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, 0xb0, 0x01, 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, 0x12, 0x3d, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x12, 0x18, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, + 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 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 ( @@ -1404,66 +1639,74 @@ func file_gosdn_pnd_pnd_proto_rawDescGZIP() []byte { return file_gosdn_pnd_pnd_proto_rawDescData } -var file_gosdn_pnd_pnd_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_gosdn_pnd_pnd_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_gosdn_pnd_pnd_proto_enumTypes = make([]protoimpl.EnumInfo, 6) +var file_gosdn_pnd_pnd_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_gosdn_pnd_pnd_proto_goTypes = []interface{}{ (ApiOperation)(0), // 0: gosdn.pnd.ApiOperation (Change_State)(0), // 1: gosdn.pnd.Change.State (SetChange_Operation)(0), // 2: gosdn.pnd.setChange.Operation (SetResponseStatus)(0), // 3: gosdn.pnd.SetResponse.status - (*GetRequest)(nil), // 4: gosdn.pnd.GetRequest - (*GetPnd)(nil), // 5: gosdn.pnd.getPnd - (*GetOnd)(nil), // 6: gosdn.pnd.getOnd - (*GetSbi)(nil), // 7: gosdn.pnd.getSbi - (*GetChange)(nil), // 8: gosdn.pnd.getChange - (*GetResponse)(nil), // 9: gosdn.pnd.GetResponse - (*PrincipalNetworkDomain)(nil), // 10: gosdn.pnd.PrincipalNetworkDomain - (*OrchestratedNetworkingDevice)(nil), // 11: gosdn.pnd.OrchestratedNetworkingDevice - (*Change)(nil), // 12: gosdn.pnd.Change - (*SetRequest)(nil), // 13: gosdn.pnd.SetRequest - (*SetOnd)(nil), // 14: gosdn.pnd.setOnd - (*SetSbi)(nil), // 15: gosdn.pnd.setSbi - (*SetChange)(nil), // 16: gosdn.pnd.setChange - (*SetResponse)(nil), // 17: gosdn.pnd.SetResponse - (*ChangeRequest)(nil), // 18: gosdn.pnd.ChangeRequest - (*southbound.SouthboundInterface)(nil), // 19: gosdn.southbound.SouthboundInterface - (*gnmi.Notification)(nil), // 20: gnmi.Notification - (*transport.TransportOption)(nil), // 21: gosdn.transport.TransportOption + (DeleteRequest_Type)(0), // 4: gosdn.pnd.DeleteRequest.Type + (DeleteResponseStatus)(0), // 5: gosdn.pnd.DeleteResponse.status + (*GetRequest)(nil), // 6: gosdn.pnd.GetRequest + (*GetPnd)(nil), // 7: gosdn.pnd.getPnd + (*GetOnd)(nil), // 8: gosdn.pnd.getOnd + (*GetSbi)(nil), // 9: gosdn.pnd.getSbi + (*GetChange)(nil), // 10: gosdn.pnd.getChange + (*GetResponse)(nil), // 11: gosdn.pnd.GetResponse + (*PrincipalNetworkDomain)(nil), // 12: gosdn.pnd.PrincipalNetworkDomain + (*OrchestratedNetworkingDevice)(nil), // 13: gosdn.pnd.OrchestratedNetworkingDevice + (*Change)(nil), // 14: gosdn.pnd.Change + (*SetRequest)(nil), // 15: gosdn.pnd.SetRequest + (*SetOnd)(nil), // 16: gosdn.pnd.setOnd + (*SetSbi)(nil), // 17: gosdn.pnd.setSbi + (*SetChange)(nil), // 18: gosdn.pnd.setChange + (*SetResponse)(nil), // 19: gosdn.pnd.SetResponse + (*ChangeRequest)(nil), // 20: gosdn.pnd.ChangeRequest + (*DeleteRequest)(nil), // 21: gosdn.pnd.DeleteRequest + (*DeleteResponse)(nil), // 22: gosdn.pnd.DeleteResponse + (*southbound.SouthboundInterface)(nil), // 23: gosdn.southbound.SouthboundInterface + (*gnmi.Notification)(nil), // 24: gnmi.Notification + (*transport.TransportOption)(nil), // 25: gosdn.transport.TransportOption } var file_gosdn_pnd_pnd_proto_depIdxs = []int32{ - 5, // 0: gosdn.pnd.GetRequest.pnd:type_name -> gosdn.pnd.getPnd - 6, // 1: gosdn.pnd.GetRequest.ond:type_name -> gosdn.pnd.getOnd - 7, // 2: gosdn.pnd.GetRequest.sbi:type_name -> gosdn.pnd.getSbi - 8, // 3: gosdn.pnd.GetRequest.change:type_name -> gosdn.pnd.getChange - 10, // 4: gosdn.pnd.GetResponse.pnd:type_name -> gosdn.pnd.PrincipalNetworkDomain - 11, // 5: gosdn.pnd.GetResponse.ond:type_name -> gosdn.pnd.OrchestratedNetworkingDevice - 19, // 6: gosdn.pnd.GetResponse.sbi:type_name -> gosdn.southbound.SouthboundInterface - 12, // 7: gosdn.pnd.GetResponse.change:type_name -> gosdn.pnd.Change - 11, // 8: gosdn.pnd.PrincipalNetworkDomain.ond:type_name -> gosdn.pnd.OrchestratedNetworkingDevice - 19, // 9: gosdn.pnd.PrincipalNetworkDomain.sbi:type_name -> gosdn.southbound.SouthboundInterface - 12, // 10: gosdn.pnd.PrincipalNetworkDomain.change:type_name -> gosdn.pnd.Change - 20, // 11: gosdn.pnd.OrchestratedNetworkingDevice.device:type_name -> gnmi.Notification - 19, // 12: gosdn.pnd.OrchestratedNetworkingDevice.sbi:type_name -> gosdn.southbound.SouthboundInterface + 7, // 0: gosdn.pnd.GetRequest.pnd:type_name -> gosdn.pnd.getPnd + 8, // 1: gosdn.pnd.GetRequest.ond:type_name -> gosdn.pnd.getOnd + 9, // 2: gosdn.pnd.GetRequest.sbi:type_name -> gosdn.pnd.getSbi + 10, // 3: gosdn.pnd.GetRequest.change:type_name -> gosdn.pnd.getChange + 12, // 4: gosdn.pnd.GetResponse.pnd:type_name -> gosdn.pnd.PrincipalNetworkDomain + 13, // 5: gosdn.pnd.GetResponse.ond:type_name -> gosdn.pnd.OrchestratedNetworkingDevice + 23, // 6: gosdn.pnd.GetResponse.sbi:type_name -> gosdn.southbound.SouthboundInterface + 14, // 7: gosdn.pnd.GetResponse.change:type_name -> gosdn.pnd.Change + 13, // 8: gosdn.pnd.PrincipalNetworkDomain.ond:type_name -> gosdn.pnd.OrchestratedNetworkingDevice + 23, // 9: gosdn.pnd.PrincipalNetworkDomain.sbi:type_name -> gosdn.southbound.SouthboundInterface + 14, // 10: gosdn.pnd.PrincipalNetworkDomain.change:type_name -> gosdn.pnd.Change + 24, // 11: gosdn.pnd.OrchestratedNetworkingDevice.device:type_name -> gnmi.Notification + 23, // 12: gosdn.pnd.OrchestratedNetworkingDevice.sbi:type_name -> gosdn.southbound.SouthboundInterface 1, // 13: gosdn.pnd.Change.state:type_name -> gosdn.pnd.Change.State - 14, // 14: gosdn.pnd.SetRequest.ond:type_name -> gosdn.pnd.setOnd - 15, // 15: gosdn.pnd.SetRequest.sbi:type_name -> gosdn.pnd.setSbi - 16, // 16: gosdn.pnd.SetRequest.change:type_name -> gosdn.pnd.setChange - 18, // 17: gosdn.pnd.SetRequest.changeRequest:type_name -> gosdn.pnd.ChangeRequest - 19, // 18: gosdn.pnd.setOnd.sbi:type_name -> gosdn.southbound.SouthboundInterface - 21, // 19: gosdn.pnd.setOnd.transportOption:type_name -> gosdn.transport.TransportOption + 16, // 14: gosdn.pnd.SetRequest.ond:type_name -> gosdn.pnd.setOnd + 17, // 15: gosdn.pnd.SetRequest.sbi:type_name -> gosdn.pnd.setSbi + 18, // 16: gosdn.pnd.SetRequest.change:type_name -> gosdn.pnd.setChange + 20, // 17: gosdn.pnd.SetRequest.changeRequest:type_name -> gosdn.pnd.ChangeRequest + 23, // 18: gosdn.pnd.setOnd.sbi:type_name -> gosdn.southbound.SouthboundInterface + 25, // 19: gosdn.pnd.setOnd.transportOption:type_name -> gosdn.transport.TransportOption 2, // 20: gosdn.pnd.setChange.op:type_name -> gosdn.pnd.setChange.Operation 3, // 21: gosdn.pnd.SetResponse.Status:type_name -> gosdn.pnd.SetResponse.status - 17, // 22: gosdn.pnd.SetResponse.responses:type_name -> gosdn.pnd.SetResponse + 19, // 22: gosdn.pnd.SetResponse.responses:type_name -> gosdn.pnd.SetResponse 0, // 23: gosdn.pnd.ChangeRequest.apiOp:type_name -> gosdn.pnd.ApiOperation - 4, // 24: gosdn.pnd.pnd.Get:input_type -> gosdn.pnd.GetRequest - 13, // 25: gosdn.pnd.pnd.Set:input_type -> gosdn.pnd.SetRequest - 9, // 26: gosdn.pnd.pnd.Get:output_type -> gosdn.pnd.GetResponse - 17, // 27: gosdn.pnd.pnd.Set:output_type -> gosdn.pnd.SetResponse - 26, // [26:28] is the sub-list for method output_type - 24, // [24:26] is the sub-list for method input_type - 24, // [24:24] is the sub-list for extension type_name - 24, // [24:24] is the sub-list for extension extendee - 0, // [0:24] is the sub-list for field type_name + 4, // 24: gosdn.pnd.DeleteRequest.type:type_name -> gosdn.pnd.DeleteRequest.Type + 5, // 25: gosdn.pnd.DeleteResponse.Status:type_name -> gosdn.pnd.DeleteResponse.status + 6, // 26: gosdn.pnd.pnd.Get:input_type -> gosdn.pnd.GetRequest + 15, // 27: gosdn.pnd.pnd.Set:input_type -> gosdn.pnd.SetRequest + 21, // 28: gosdn.pnd.pnd.Delete:input_type -> gosdn.pnd.DeleteRequest + 11, // 29: gosdn.pnd.pnd.Get:output_type -> gosdn.pnd.GetResponse + 19, // 30: gosdn.pnd.pnd.Set:output_type -> gosdn.pnd.SetResponse + 22, // 31: gosdn.pnd.pnd.Delete:output_type -> gosdn.pnd.DeleteResponse + 29, // [29:32] is the sub-list for method output_type + 26, // [26:29] is the sub-list for method input_type + 26, // [26:26] is the sub-list for extension type_name + 26, // [26:26] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name } func init() { file_gosdn_pnd_pnd_proto_init() } @@ -1652,6 +1895,30 @@ func file_gosdn_pnd_pnd_proto_init() { return nil } } + file_gosdn_pnd_pnd_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_pnd_pnd_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_gosdn_pnd_pnd_proto_msgTypes[0].OneofWrappers = []interface{}{ (*GetRequest_Pnd)(nil), @@ -1664,8 +1931,8 @@ func file_gosdn_pnd_pnd_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_gosdn_pnd_pnd_proto_rawDesc, - NumEnums: 4, - NumMessages: 15, + NumEnums: 6, + NumMessages: 17, NumExtensions: 0, NumServices: 1, }, diff --git a/go/gosdn/pnd/pnd_grpc.pb.go b/go/gosdn/pnd/pnd_grpc.pb.go index d32841f448dc0601ed56906336fbeebc610fa208..edfb8e5cf6c746a774eae0ad8cc50f855dd810ee 100644 --- a/go/gosdn/pnd/pnd_grpc.pb.go +++ b/go/gosdn/pnd/pnd_grpc.pb.go @@ -19,6 +19,7 @@ const _ = grpc.SupportPackageIsVersion6 type PndClient interface { Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, error) + Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) } type pndClient struct { @@ -47,12 +48,22 @@ func (c *pndClient) Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOp return out, nil } +func (c *pndClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) { + out := new(DeleteResponse) + err := c.cc.Invoke(ctx, "/gosdn.pnd.pnd/Delete", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // PndServer is the server API for Pnd service. // All implementations must embed UnimplementedPndServer // for forward compatibility type PndServer interface { Get(context.Context, *GetRequest) (*GetResponse, error) Set(context.Context, *SetRequest) (*SetResponse, error) + Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) mustEmbedUnimplementedPndServer() } @@ -66,6 +77,9 @@ func (*UnimplementedPndServer) Get(context.Context, *GetRequest) (*GetResponse, func (*UnimplementedPndServer) Set(context.Context, *SetRequest) (*SetResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Set not implemented") } +func (*UnimplementedPndServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} func (*UnimplementedPndServer) mustEmbedUnimplementedPndServer() {} func RegisterPndServer(s *grpc.Server, srv PndServer) { @@ -108,6 +122,24 @@ func _Pnd_Set_Handler(srv interface{}, ctx context.Context, dec func(interface{} return interceptor(ctx, in, info, handler) } +func _Pnd_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PndServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gosdn.pnd.pnd/Delete", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PndServer).Delete(ctx, req.(*DeleteRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Pnd_serviceDesc = grpc.ServiceDesc{ ServiceName: "gosdn.pnd.pnd", HandlerType: (*PndServer)(nil), @@ -120,6 +152,10 @@ var _Pnd_serviceDesc = grpc.ServiceDesc{ MethodName: "Set", Handler: _Pnd_Set_Handler, }, + { + MethodName: "Delete", + Handler: _Pnd_Delete_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "gosdn/pnd/pnd.proto", diff --git a/proto/gosdn/pnd/pnd.proto b/proto/gosdn/pnd/pnd.proto index 3f1d583aed1d3a3dc9977e46fcc08e0c07c57ffb..4e4f1a757d7283ddfcfcd89da67b3f7b6554259e 100644 --- a/proto/gosdn/pnd/pnd.proto +++ b/proto/gosdn/pnd/pnd.proto @@ -12,6 +12,7 @@ option go_package = "code.fbi.h-da.de/cocsn/api/go/gosdn/pnd"; service pnd { rpc Get(GetRequest) returns (GetResponse); rpc Set(SetRequest) returns (SetResponse); + rpc Delete(DeleteRequest) returns (DeleteResponse); } message GetRequest { @@ -128,4 +129,24 @@ enum ApiOperation { UPDATE = 0; REPLACE = 1; DELETE = 2; -} \ No newline at end of file +} + +message DeleteRequest { + enum Type { + OND = 0; + SBI = 1; + PND = 2; + } + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + Type type = 2; + string uuid = 3; +} + +message DeleteResponse { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + enum status { + OK = 0; + ERROR = 1; + } + status Status = 2; +}