Skip to content
Snippets Groups Projects
Commit ec840cb6 authored by Manuel Kieweg's avatar Manuel Kieweg
Browse files

add delete service to pnd

parent 255051ba
No related branches found
No related tags found
No related merge requests found
...@@ -217,6 +217,101 @@ func (SetResponseStatus) EnumDescriptor() ([]byte, []int) { ...@@ -217,6 +217,101 @@ func (SetResponseStatus) EnumDescriptor() ([]byte, []int) {
return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{13, 0} 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 { type GetRequest struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
...@@ -1229,6 +1324,124 @@ func (x *ChangeRequest) GetApiOp() ApiOperation { ...@@ -1229,6 +1324,124 @@ func (x *ChangeRequest) GetApiOp() ApiOperation {
return ApiOperation_UPDATE 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 protoreflect.FileDescriptor
var file_gosdn_pnd_pnd_proto_rawDesc = []byte{ var file_gosdn_pnd_pnd_proto_rawDesc = []byte{
...@@ -1375,21 +1588,43 @@ 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, 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, 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, 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, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x61, 0x70, 0x69, 0x4f, 0x70, 0x22, 0x97, 0x01,
0x0c, 0x41, 0x70, 0x69, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x06, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x50, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01,
0x4c, 0x41, 0x43, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x31, 0x0a,
0x10, 0x02, 0x32, 0x71, 0x0a, 0x03, 0x70, 0x6e, 0x64, 0x12, 0x34, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x67, 0x6f,
0x12, 0x15, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x34, 0x0a, 0x03, 0x53, 0x65, 0x74, 0x12, 0x15, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x75, 0x75, 0x69, 0x64, 0x22, 0x21, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03,
0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x4f, 0x4e, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x42, 0x49, 0x10, 0x01, 0x12, 0x07,
0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x0a, 0x03, 0x50, 0x4e, 0x44, 0x10, 0x02, 0x22, 0x85, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x29, 0x5a, 0x27, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69,
0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x63, 0x6f, 0x63, 0x73, 0x6e, 0x2f, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74,
0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6e, 0x64, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x38, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 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 ( var (
...@@ -1404,66 +1639,74 @@ func file_gosdn_pnd_pnd_proto_rawDescGZIP() []byte { ...@@ -1404,66 +1639,74 @@ func file_gosdn_pnd_pnd_proto_rawDescGZIP() []byte {
return file_gosdn_pnd_pnd_proto_rawDescData return file_gosdn_pnd_pnd_proto_rawDescData
} }
var file_gosdn_pnd_pnd_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_gosdn_pnd_pnd_proto_enumTypes = make([]protoimpl.EnumInfo, 6)
var file_gosdn_pnd_pnd_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_gosdn_pnd_pnd_proto_msgTypes = make([]protoimpl.MessageInfo, 17)
var file_gosdn_pnd_pnd_proto_goTypes = []interface{}{ var file_gosdn_pnd_pnd_proto_goTypes = []interface{}{
(ApiOperation)(0), // 0: gosdn.pnd.ApiOperation (ApiOperation)(0), // 0: gosdn.pnd.ApiOperation
(Change_State)(0), // 1: gosdn.pnd.Change.State (Change_State)(0), // 1: gosdn.pnd.Change.State
(SetChange_Operation)(0), // 2: gosdn.pnd.setChange.Operation (SetChange_Operation)(0), // 2: gosdn.pnd.setChange.Operation
(SetResponseStatus)(0), // 3: gosdn.pnd.SetResponse.status (SetResponseStatus)(0), // 3: gosdn.pnd.SetResponse.status
(*GetRequest)(nil), // 4: gosdn.pnd.GetRequest (DeleteRequest_Type)(0), // 4: gosdn.pnd.DeleteRequest.Type
(*GetPnd)(nil), // 5: gosdn.pnd.getPnd (DeleteResponseStatus)(0), // 5: gosdn.pnd.DeleteResponse.status
(*GetOnd)(nil), // 6: gosdn.pnd.getOnd (*GetRequest)(nil), // 6: gosdn.pnd.GetRequest
(*GetSbi)(nil), // 7: gosdn.pnd.getSbi (*GetPnd)(nil), // 7: gosdn.pnd.getPnd
(*GetChange)(nil), // 8: gosdn.pnd.getChange (*GetOnd)(nil), // 8: gosdn.pnd.getOnd
(*GetResponse)(nil), // 9: gosdn.pnd.GetResponse (*GetSbi)(nil), // 9: gosdn.pnd.getSbi
(*PrincipalNetworkDomain)(nil), // 10: gosdn.pnd.PrincipalNetworkDomain (*GetChange)(nil), // 10: gosdn.pnd.getChange
(*OrchestratedNetworkingDevice)(nil), // 11: gosdn.pnd.OrchestratedNetworkingDevice (*GetResponse)(nil), // 11: gosdn.pnd.GetResponse
(*Change)(nil), // 12: gosdn.pnd.Change (*PrincipalNetworkDomain)(nil), // 12: gosdn.pnd.PrincipalNetworkDomain
(*SetRequest)(nil), // 13: gosdn.pnd.SetRequest (*OrchestratedNetworkingDevice)(nil), // 13: gosdn.pnd.OrchestratedNetworkingDevice
(*SetOnd)(nil), // 14: gosdn.pnd.setOnd (*Change)(nil), // 14: gosdn.pnd.Change
(*SetSbi)(nil), // 15: gosdn.pnd.setSbi (*SetRequest)(nil), // 15: gosdn.pnd.SetRequest
(*SetChange)(nil), // 16: gosdn.pnd.setChange (*SetOnd)(nil), // 16: gosdn.pnd.setOnd
(*SetResponse)(nil), // 17: gosdn.pnd.SetResponse (*SetSbi)(nil), // 17: gosdn.pnd.setSbi
(*ChangeRequest)(nil), // 18: gosdn.pnd.ChangeRequest (*SetChange)(nil), // 18: gosdn.pnd.setChange
(*southbound.SouthboundInterface)(nil), // 19: gosdn.southbound.SouthboundInterface (*SetResponse)(nil), // 19: gosdn.pnd.SetResponse
(*gnmi.Notification)(nil), // 20: gnmi.Notification (*ChangeRequest)(nil), // 20: gosdn.pnd.ChangeRequest
(*transport.TransportOption)(nil), // 21: gosdn.transport.TransportOption (*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{ var file_gosdn_pnd_pnd_proto_depIdxs = []int32{
5, // 0: gosdn.pnd.GetRequest.pnd:type_name -> gosdn.pnd.getPnd 7, // 0: gosdn.pnd.GetRequest.pnd:type_name -> gosdn.pnd.getPnd
6, // 1: gosdn.pnd.GetRequest.ond:type_name -> gosdn.pnd.getOnd 8, // 1: gosdn.pnd.GetRequest.ond:type_name -> gosdn.pnd.getOnd
7, // 2: gosdn.pnd.GetRequest.sbi:type_name -> gosdn.pnd.getSbi 9, // 2: gosdn.pnd.GetRequest.sbi:type_name -> gosdn.pnd.getSbi
8, // 3: gosdn.pnd.GetRequest.change:type_name -> gosdn.pnd.getChange 10, // 3: gosdn.pnd.GetRequest.change:type_name -> gosdn.pnd.getChange
10, // 4: gosdn.pnd.GetResponse.pnd:type_name -> gosdn.pnd.PrincipalNetworkDomain 12, // 4: gosdn.pnd.GetResponse.pnd:type_name -> gosdn.pnd.PrincipalNetworkDomain
11, // 5: gosdn.pnd.GetResponse.ond:type_name -> gosdn.pnd.OrchestratedNetworkingDevice 13, // 5: gosdn.pnd.GetResponse.ond:type_name -> gosdn.pnd.OrchestratedNetworkingDevice
19, // 6: gosdn.pnd.GetResponse.sbi:type_name -> gosdn.southbound.SouthboundInterface 23, // 6: gosdn.pnd.GetResponse.sbi:type_name -> gosdn.southbound.SouthboundInterface
12, // 7: gosdn.pnd.GetResponse.change:type_name -> gosdn.pnd.Change 14, // 7: gosdn.pnd.GetResponse.change:type_name -> gosdn.pnd.Change
11, // 8: gosdn.pnd.PrincipalNetworkDomain.ond:type_name -> gosdn.pnd.OrchestratedNetworkingDevice 13, // 8: gosdn.pnd.PrincipalNetworkDomain.ond:type_name -> gosdn.pnd.OrchestratedNetworkingDevice
19, // 9: gosdn.pnd.PrincipalNetworkDomain.sbi:type_name -> gosdn.southbound.SouthboundInterface 23, // 9: gosdn.pnd.PrincipalNetworkDomain.sbi:type_name -> gosdn.southbound.SouthboundInterface
12, // 10: gosdn.pnd.PrincipalNetworkDomain.change:type_name -> gosdn.pnd.Change 14, // 10: gosdn.pnd.PrincipalNetworkDomain.change:type_name -> gosdn.pnd.Change
20, // 11: gosdn.pnd.OrchestratedNetworkingDevice.device:type_name -> gnmi.Notification 24, // 11: gosdn.pnd.OrchestratedNetworkingDevice.device:type_name -> gnmi.Notification
19, // 12: gosdn.pnd.OrchestratedNetworkingDevice.sbi:type_name -> gosdn.southbound.SouthboundInterface 23, // 12: gosdn.pnd.OrchestratedNetworkingDevice.sbi:type_name -> gosdn.southbound.SouthboundInterface
1, // 13: gosdn.pnd.Change.state:type_name -> gosdn.pnd.Change.State 1, // 13: gosdn.pnd.Change.state:type_name -> gosdn.pnd.Change.State
14, // 14: gosdn.pnd.SetRequest.ond:type_name -> gosdn.pnd.setOnd 16, // 14: gosdn.pnd.SetRequest.ond:type_name -> gosdn.pnd.setOnd
15, // 15: gosdn.pnd.SetRequest.sbi:type_name -> gosdn.pnd.setSbi 17, // 15: gosdn.pnd.SetRequest.sbi:type_name -> gosdn.pnd.setSbi
16, // 16: gosdn.pnd.SetRequest.change:type_name -> gosdn.pnd.setChange 18, // 16: gosdn.pnd.SetRequest.change:type_name -> gosdn.pnd.setChange
18, // 17: gosdn.pnd.SetRequest.changeRequest:type_name -> gosdn.pnd.ChangeRequest 20, // 17: gosdn.pnd.SetRequest.changeRequest:type_name -> gosdn.pnd.ChangeRequest
19, // 18: gosdn.pnd.setOnd.sbi:type_name -> gosdn.southbound.SouthboundInterface 23, // 18: gosdn.pnd.setOnd.sbi:type_name -> gosdn.southbound.SouthboundInterface
21, // 19: gosdn.pnd.setOnd.transportOption:type_name -> gosdn.transport.TransportOption 25, // 19: gosdn.pnd.setOnd.transportOption:type_name -> gosdn.transport.TransportOption
2, // 20: gosdn.pnd.setChange.op:type_name -> gosdn.pnd.setChange.Operation 2, // 20: gosdn.pnd.setChange.op:type_name -> gosdn.pnd.setChange.Operation
3, // 21: gosdn.pnd.SetResponse.Status:type_name -> gosdn.pnd.SetResponse.status 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 0, // 23: gosdn.pnd.ChangeRequest.apiOp:type_name -> gosdn.pnd.ApiOperation
4, // 24: gosdn.pnd.pnd.Get:input_type -> gosdn.pnd.GetRequest 4, // 24: gosdn.pnd.DeleteRequest.type:type_name -> gosdn.pnd.DeleteRequest.Type
13, // 25: gosdn.pnd.pnd.Set:input_type -> gosdn.pnd.SetRequest 5, // 25: gosdn.pnd.DeleteResponse.Status:type_name -> gosdn.pnd.DeleteResponse.status
9, // 26: gosdn.pnd.pnd.Get:output_type -> gosdn.pnd.GetResponse 6, // 26: gosdn.pnd.pnd.Get:input_type -> gosdn.pnd.GetRequest
17, // 27: gosdn.pnd.pnd.Set:output_type -> gosdn.pnd.SetResponse 15, // 27: gosdn.pnd.pnd.Set:input_type -> gosdn.pnd.SetRequest
26, // [26:28] is the sub-list for method output_type 21, // 28: gosdn.pnd.pnd.Delete:input_type -> gosdn.pnd.DeleteRequest
24, // [24:26] is the sub-list for method input_type 11, // 29: gosdn.pnd.pnd.Get:output_type -> gosdn.pnd.GetResponse
24, // [24:24] is the sub-list for extension type_name 19, // 30: gosdn.pnd.pnd.Set:output_type -> gosdn.pnd.SetResponse
24, // [24:24] is the sub-list for extension extendee 22, // 31: gosdn.pnd.pnd.Delete:output_type -> gosdn.pnd.DeleteResponse
0, // [0:24] is the sub-list for field type_name 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() } func init() { file_gosdn_pnd_pnd_proto_init() }
...@@ -1652,6 +1895,30 @@ func file_gosdn_pnd_pnd_proto_init() { ...@@ -1652,6 +1895,30 @@ func file_gosdn_pnd_pnd_proto_init() {
return nil 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{}{ file_gosdn_pnd_pnd_proto_msgTypes[0].OneofWrappers = []interface{}{
(*GetRequest_Pnd)(nil), (*GetRequest_Pnd)(nil),
...@@ -1664,8 +1931,8 @@ func file_gosdn_pnd_pnd_proto_init() { ...@@ -1664,8 +1931,8 @@ func file_gosdn_pnd_pnd_proto_init() {
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_gosdn_pnd_pnd_proto_rawDesc, RawDescriptor: file_gosdn_pnd_pnd_proto_rawDesc,
NumEnums: 4, NumEnums: 6,
NumMessages: 15, NumMessages: 17,
NumExtensions: 0, NumExtensions: 0,
NumServices: 1, NumServices: 1,
}, },
......
...@@ -19,6 +19,7 @@ const _ = grpc.SupportPackageIsVersion6 ...@@ -19,6 +19,7 @@ const _ = grpc.SupportPackageIsVersion6
type PndClient interface { type PndClient interface {
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, 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 { type pndClient struct {
...@@ -47,12 +48,22 @@ func (c *pndClient) Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOp ...@@ -47,12 +48,22 @@ func (c *pndClient) Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOp
return out, nil 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. // PndServer is the server API for Pnd service.
// All implementations must embed UnimplementedPndServer // All implementations must embed UnimplementedPndServer
// for forward compatibility // for forward compatibility
type PndServer interface { type PndServer interface {
Get(context.Context, *GetRequest) (*GetResponse, error) Get(context.Context, *GetRequest) (*GetResponse, error)
Set(context.Context, *SetRequest) (*SetResponse, error) Set(context.Context, *SetRequest) (*SetResponse, error)
Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
mustEmbedUnimplementedPndServer() mustEmbedUnimplementedPndServer()
} }
...@@ -66,6 +77,9 @@ func (*UnimplementedPndServer) Get(context.Context, *GetRequest) (*GetResponse, ...@@ -66,6 +77,9 @@ func (*UnimplementedPndServer) Get(context.Context, *GetRequest) (*GetResponse,
func (*UnimplementedPndServer) Set(context.Context, *SetRequest) (*SetResponse, error) { func (*UnimplementedPndServer) Set(context.Context, *SetRequest) (*SetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Set not implemented") 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 (*UnimplementedPndServer) mustEmbedUnimplementedPndServer() {}
func RegisterPndServer(s *grpc.Server, srv PndServer) { func RegisterPndServer(s *grpc.Server, srv PndServer) {
...@@ -108,6 +122,24 @@ func _Pnd_Set_Handler(srv interface{}, ctx context.Context, dec func(interface{} ...@@ -108,6 +122,24 @@ func _Pnd_Set_Handler(srv interface{}, ctx context.Context, dec func(interface{}
return interceptor(ctx, in, info, handler) 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{ var _Pnd_serviceDesc = grpc.ServiceDesc{
ServiceName: "gosdn.pnd.pnd", ServiceName: "gosdn.pnd.pnd",
HandlerType: (*PndServer)(nil), HandlerType: (*PndServer)(nil),
...@@ -120,6 +152,10 @@ var _Pnd_serviceDesc = grpc.ServiceDesc{ ...@@ -120,6 +152,10 @@ var _Pnd_serviceDesc = grpc.ServiceDesc{
MethodName: "Set", MethodName: "Set",
Handler: _Pnd_Set_Handler, Handler: _Pnd_Set_Handler,
}, },
{
MethodName: "Delete",
Handler: _Pnd_Delete_Handler,
},
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: "gosdn/pnd/pnd.proto", Metadata: "gosdn/pnd/pnd.proto",
......
...@@ -12,6 +12,7 @@ option go_package = "code.fbi.h-da.de/cocsn/api/go/gosdn/pnd"; ...@@ -12,6 +12,7 @@ option go_package = "code.fbi.h-da.de/cocsn/api/go/gosdn/pnd";
service pnd { service pnd {
rpc Get(GetRequest) returns (GetResponse); rpc Get(GetRequest) returns (GetResponse);
rpc Set(SetRequest) returns (SetResponse); rpc Set(SetRequest) returns (SetResponse);
rpc Delete(DeleteRequest) returns (DeleteResponse);
} }
message GetRequest { message GetRequest {
...@@ -128,4 +129,24 @@ enum ApiOperation { ...@@ -128,4 +129,24 @@ enum ApiOperation {
UPDATE = 0; UPDATE = 0;
REPLACE = 1; REPLACE = 1;
DELETE = 2; 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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment