diff --git a/go/gosdn/pnd/pnd.pb.go b/go/gosdn/pnd/pnd.pb.go index 748b56d9770c2e28002182f87f874ec6e4b0566c..43fa157beffa2dec2d2a1eea4493da6926172d2f 100644 --- a/go/gosdn/pnd/pnd.pb.go +++ b/go/gosdn/pnd/pnd.pb.go @@ -81,107 +81,107 @@ func (ChangeState) EnumDescriptor() ([]byte, []int) { return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{0} } -type Operation int32 +type ApiOperation int32 const ( - Operation_OPERATION_UNSPECIFIED Operation = 0 - Operation_OPERATION_CREATE Operation = 1 - Operation_OPERATION_COMMIT Operation = 2 - Operation_OPERATION_CONFIRM Operation = 3 + ApiOperation_API_OPERATION_UNSPECIFIED ApiOperation = 0 + ApiOperation_API_OPERATION_UPDATE ApiOperation = 1 + ApiOperation_API_OPERATION_REPLACE ApiOperation = 2 + ApiOperation_API_OPERATION_DELETE ApiOperation = 3 ) -// Enum value maps for Operation. +// Enum value maps for ApiOperation. var ( - Operation_name = map[int32]string{ - 0: "OPERATION_UNSPECIFIED", - 1: "OPERATION_CREATE", - 2: "OPERATION_COMMIT", - 3: "OPERATION_CONFIRM", + ApiOperation_name = map[int32]string{ + 0: "API_OPERATION_UNSPECIFIED", + 1: "API_OPERATION_UPDATE", + 2: "API_OPERATION_REPLACE", + 3: "API_OPERATION_DELETE", } - Operation_value = map[string]int32{ - "OPERATION_UNSPECIFIED": 0, - "OPERATION_CREATE": 1, - "OPERATION_COMMIT": 2, - "OPERATION_CONFIRM": 3, + ApiOperation_value = map[string]int32{ + "API_OPERATION_UNSPECIFIED": 0, + "API_OPERATION_UPDATE": 1, + "API_OPERATION_REPLACE": 2, + "API_OPERATION_DELETE": 3, } ) -func (x Operation) Enum() *Operation { - p := new(Operation) +func (x ApiOperation) Enum() *ApiOperation { + p := new(ApiOperation) *p = x return p } -func (x Operation) String() string { +func (x ApiOperation) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (Operation) Descriptor() protoreflect.EnumDescriptor { +func (ApiOperation) Descriptor() protoreflect.EnumDescriptor { return file_gosdn_pnd_pnd_proto_enumTypes[1].Descriptor() } -func (Operation) Type() protoreflect.EnumType { +func (ApiOperation) Type() protoreflect.EnumType { return &file_gosdn_pnd_pnd_proto_enumTypes[1] } -func (x Operation) Number() protoreflect.EnumNumber { +func (x ApiOperation) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use Operation.Descriptor instead. -func (Operation) EnumDescriptor() ([]byte, []int) { +// Deprecated: Use ApiOperation.Descriptor instead. +func (ApiOperation) EnumDescriptor() ([]byte, []int) { return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{1} } -type ApiOperation int32 +type Operation int32 const ( - ApiOperation_API_OPERATION_UNSPECIFIED ApiOperation = 0 - ApiOperation_API_OPERATION_UPDATE ApiOperation = 1 - ApiOperation_API_OPERATION_REPLACE ApiOperation = 2 - ApiOperation_API_OPERATION_DELETE ApiOperation = 3 + Operation_OPERATION_UNSPECIFIED Operation = 0 + Operation_OPERATION_CREATE Operation = 1 + Operation_OPERATION_COMMIT Operation = 2 + Operation_OPERATION_CONFIRM Operation = 3 ) -// Enum value maps for ApiOperation. +// Enum value maps for Operation. var ( - ApiOperation_name = map[int32]string{ - 0: "API_OPERATION_UNSPECIFIED", - 1: "API_OPERATION_UPDATE", - 2: "API_OPERATION_REPLACE", - 3: "API_OPERATION_DELETE", + Operation_name = map[int32]string{ + 0: "OPERATION_UNSPECIFIED", + 1: "OPERATION_CREATE", + 2: "OPERATION_COMMIT", + 3: "OPERATION_CONFIRM", } - ApiOperation_value = map[string]int32{ - "API_OPERATION_UNSPECIFIED": 0, - "API_OPERATION_UPDATE": 1, - "API_OPERATION_REPLACE": 2, - "API_OPERATION_DELETE": 3, + Operation_value = map[string]int32{ + "OPERATION_UNSPECIFIED": 0, + "OPERATION_CREATE": 1, + "OPERATION_COMMIT": 2, + "OPERATION_CONFIRM": 3, } ) -func (x ApiOperation) Enum() *ApiOperation { - p := new(ApiOperation) +func (x Operation) Enum() *Operation { + p := new(Operation) *p = x return p } -func (x ApiOperation) String() string { +func (x Operation) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (ApiOperation) Descriptor() protoreflect.EnumDescriptor { +func (Operation) Descriptor() protoreflect.EnumDescriptor { return file_gosdn_pnd_pnd_proto_enumTypes[2].Descriptor() } -func (ApiOperation) Type() protoreflect.EnumType { +func (Operation) Type() protoreflect.EnumType { return &file_gosdn_pnd_pnd_proto_enumTypes[2] } -func (x ApiOperation) Number() protoreflect.EnumNumber { +func (x Operation) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use ApiOperation.Descriptor instead. -func (ApiOperation) EnumDescriptor() ([]byte, []int) { +// Deprecated: Use Operation.Descriptor instead. +func (Operation) EnumDescriptor() ([]byte, []int) { return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{2} } @@ -667,8 +667,8 @@ type GetOndResponse struct { Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. // TODO: Check if this is really needed. Perhaps a reference to the PND's ID // is also sufficient. - Pnd *PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` - Ond *OrchestratedNetworkingDevice `protobuf:"bytes,3,opt,name=ond,proto3" json:"ond,omitempty"` + Pnd *PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` + Ond []*OrchestratedNetworkingDevice `protobuf:"bytes,3,rep,name=ond,proto3" json:"ond,omitempty"` } func (x *GetOndResponse) Reset() { @@ -717,7 +717,7 @@ func (x *GetOndResponse) GetPnd() *PrincipalNetworkDomain { return nil } -func (x *GetOndResponse) GetOnd() *OrchestratedNetworkingDevice { +func (x *GetOndResponse) GetOnd() []*OrchestratedNetworkingDevice { if x != nil { return x.Ond } @@ -1571,6 +1571,70 @@ func (x *SetPathListRequest) GetPid() string { return "" } +//TODO: rename +type ChangeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + ApiOp ApiOperation `protobuf:"varint,3,opt,name=api_op,json=apiOp,proto3,enum=gosdn.pnd.ApiOperation" json:"api_op,omitempty"` +} + +func (x *ChangeRequest) Reset() { + *x = ChangeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChangeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeRequest) ProtoMessage() {} + +func (x *ChangeRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[21] + 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 ChangeRequest.ProtoReflect.Descriptor instead. +func (*ChangeRequest) Descriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{21} +} + +func (x *ChangeRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *ChangeRequest) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *ChangeRequest) GetApiOp() ApiOperation { + if x != nil { + return x.ApiOp + } + return ApiOperation_API_OPERATION_UNSPECIFIED +} + type SetOnd struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1585,7 +1649,7 @@ type SetOnd struct { func (x *SetOnd) Reset() { *x = SetOnd{} if protoimpl.UnsafeEnabled { - mi := &file_gosdn_pnd_pnd_proto_msgTypes[21] + mi := &file_gosdn_pnd_pnd_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1598,7 +1662,7 @@ func (x *SetOnd) String() string { func (*SetOnd) ProtoMessage() {} func (x *SetOnd) ProtoReflect() protoreflect.Message { - mi := &file_gosdn_pnd_pnd_proto_msgTypes[21] + mi := &file_gosdn_pnd_pnd_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1611,7 +1675,7 @@ func (x *SetOnd) ProtoReflect() protoreflect.Message { // Deprecated: Use SetOnd.ProtoReflect.Descriptor instead. func (*SetOnd) Descriptor() ([]byte, []int) { - return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{21} + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{22} } func (x *SetOnd) GetAddress() string { @@ -1651,7 +1715,7 @@ type SetSbi struct { func (x *SetSbi) Reset() { *x = SetSbi{} if protoimpl.UnsafeEnabled { - mi := &file_gosdn_pnd_pnd_proto_msgTypes[22] + mi := &file_gosdn_pnd_pnd_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1664,7 +1728,7 @@ func (x *SetSbi) String() string { func (*SetSbi) ProtoMessage() {} func (x *SetSbi) ProtoReflect() protoreflect.Message { - mi := &file_gosdn_pnd_pnd_proto_msgTypes[22] + mi := &file_gosdn_pnd_pnd_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1677,7 +1741,7 @@ func (x *SetSbi) ProtoReflect() protoreflect.Message { // Deprecated: Use SetSbi.ProtoReflect.Descriptor instead. func (*SetSbi) Descriptor() ([]byte, []int) { - return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{22} + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{23} } type SetChange struct { @@ -1692,7 +1756,7 @@ type SetChange struct { func (x *SetChange) Reset() { *x = SetChange{} if protoimpl.UnsafeEnabled { - mi := &file_gosdn_pnd_pnd_proto_msgTypes[23] + mi := &file_gosdn_pnd_pnd_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1705,7 +1769,7 @@ func (x *SetChange) String() string { func (*SetChange) ProtoMessage() {} func (x *SetChange) ProtoReflect() protoreflect.Message { - mi := &file_gosdn_pnd_pnd_proto_msgTypes[23] + mi := &file_gosdn_pnd_pnd_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1718,7 +1782,7 @@ func (x *SetChange) ProtoReflect() protoreflect.Message { // Deprecated: Use SetChange.ProtoReflect.Descriptor instead. func (*SetChange) Descriptor() ([]byte, []int) { - return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{23} + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{24} } func (x *SetChange) GetCuid() string { @@ -1735,70 +1799,6 @@ func (x *SetChange) GetOp() Operation { return Operation_OPERATION_UNSPECIFIED } -//TODO: rename -type ChangeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - ApiOp ApiOperation `protobuf:"varint,3,opt,name=api_op,json=apiOp,proto3,enum=gosdn.pnd.ApiOperation" json:"api_op,omitempty"` -} - -func (x *ChangeRequest) Reset() { - *x = ChangeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_gosdn_pnd_pnd_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChangeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChangeRequest) ProtoMessage() {} - -func (x *ChangeRequest) ProtoReflect() protoreflect.Message { - mi := &file_gosdn_pnd_pnd_proto_msgTypes[24] - 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 ChangeRequest.ProtoReflect.Descriptor instead. -func (*ChangeRequest) Descriptor() ([]byte, []int) { - return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{24} -} - -func (x *ChangeRequest) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *ChangeRequest) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -func (x *ChangeRequest) GetApiOp() ApiOperation { - if x != nil { - return x.ApiOp - } - return ApiOperation_API_OPERATION_UNSPECIFIED -} - type SetResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2340,7 +2340,7 @@ var file_gosdn_pnd_pnd_proto_rawDesc = []byte{ 0x33, 0x0a, 0x03, 0x70, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 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, 0x12, 0x39, 0x0a, 0x03, 0x6f, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x70, 0x6e, 0x64, 0x12, 0x39, 0x0a, 0x03, 0x6f, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x03, 0x6f, 0x6e, 0x64, 0x22, @@ -2454,32 +2454,32 @@ var file_gosdn_pnd_pnd_proto_rawDesc = []byte{ 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x70, - 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0xc9, 0x01, - 0x0a, 0x06, 0x53, 0x65, 0x74, 0x4f, 0x6e, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x37, 0x0a, 0x03, 0x73, 0x62, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x62, 0x6f, 0x75, - 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, 0x12, 0x1f, 0x0a, 0x0b, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x10, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x08, 0x0a, 0x06, 0x53, 0x65, 0x74, - 0x53, 0x62, 0x69, 0x22, 0x45, 0x0a, 0x09, 0x53, 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, 0x24, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x4f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x6f, 0x70, 0x22, 0x69, 0x0a, 0x0d, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x61, 0x70, 0x69, 0x5f, 0x6f, 0x70, 0x18, - 0x03, 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, 0x22, 0x56, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x69, 0x0a, + 0x0d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x61, 0x70, 0x69, 0x5f, + 0x6f, 0x70, 0x18, 0x03, 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, 0x22, 0xc9, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x74, + 0x4f, 0x6e, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x37, 0x0a, + 0x03, 0x73, 0x62, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x73, + 0x64, 0x6e, 0x2e, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x62, 0x6f, 0x75, 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, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x08, 0x0a, 0x06, 0x53, 0x65, 0x74, 0x53, 0x62, 0x69, 0x22, 0x45, + 0x0a, 0x09, 0x53, 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, + 0x24, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x02, 0x6f, 0x70, 0x22, 0x56, 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, 0x29, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, @@ -2549,22 +2549,22 @@ var file_gosdn_pnd_pnd_proto_rawDesc = []byte{ 0x1a, 0x0a, 0x16, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x03, 0x12, 0x1d, 0x0a, 0x19, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x49, 0x4e, 0x43, 0x4f, - 0x4e, 0x53, 0x49, 0x53, 0x54, 0x45, 0x4e, 0x54, 0x10, 0x04, 0x2a, 0x69, 0x0a, 0x09, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x15, 0x4f, 0x50, 0x45, 0x52, 0x41, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x50, 0x45, 0x52, - 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x02, 0x12, 0x15, - 0x0a, 0x11, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x4e, 0x46, - 0x49, 0x52, 0x4d, 0x10, 0x03, 0x2a, 0x7c, 0x0a, 0x0c, 0x41, 0x70, 0x69, 0x4f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x50, 0x49, 0x5f, 0x4f, 0x50, 0x45, - 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x50, 0x49, 0x5f, 0x4f, 0x50, 0x45, 0x52, - 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x19, - 0x0a, 0x15, 0x41, 0x50, 0x49, 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x52, 0x45, 0x50, 0x4c, 0x41, 0x43, 0x45, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x50, 0x49, - 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, - 0x45, 0x10, 0x03, 0x2a, 0x41, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, + 0x4e, 0x53, 0x49, 0x53, 0x54, 0x45, 0x4e, 0x54, 0x10, 0x04, 0x2a, 0x7c, 0x0a, 0x0c, 0x41, 0x70, + 0x69, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x50, + 0x49, 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x50, 0x49, + 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, + 0x45, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x50, 0x49, 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x50, 0x4c, 0x41, 0x43, 0x45, 0x10, 0x02, 0x12, 0x18, + 0x0a, 0x14, 0x41, 0x50, 0x49, 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x03, 0x2a, 0x69, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x15, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x52, + 0x45, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, + 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, + 0x4d, 0x10, 0x03, 0x2a, 0x41, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, @@ -2686,8 +2686,8 @@ var file_gosdn_pnd_pnd_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_gosdn_pnd_pnd_proto_msgTypes = make([]protoimpl.MessageInfo, 33) var file_gosdn_pnd_pnd_proto_goTypes = []interface{}{ (ChangeState)(0), // 0: gosdn.pnd.ChangeState - (Operation)(0), // 1: gosdn.pnd.Operation - (ApiOperation)(0), // 2: gosdn.pnd.ApiOperation + (ApiOperation)(0), // 1: gosdn.pnd.ApiOperation + (Operation)(0), // 2: gosdn.pnd.Operation (Status)(0), // 3: gosdn.pnd.Status (*GetOndListRequest)(nil), // 4: gosdn.pnd.GetOndListRequest (*GetOndRequest)(nil), // 5: gosdn.pnd.GetOndRequest @@ -2710,10 +2710,10 @@ var file_gosdn_pnd_pnd_proto_goTypes = []interface{}{ (*SetSbiListRequest)(nil), // 22: gosdn.pnd.SetSbiListRequest (*SetChangeListRequest)(nil), // 23: gosdn.pnd.SetChangeListRequest (*SetPathListRequest)(nil), // 24: gosdn.pnd.SetPathListRequest - (*SetOnd)(nil), // 25: gosdn.pnd.SetOnd - (*SetSbi)(nil), // 26: gosdn.pnd.SetSbi - (*SetChange)(nil), // 27: gosdn.pnd.SetChange - (*ChangeRequest)(nil), // 28: gosdn.pnd.ChangeRequest + (*ChangeRequest)(nil), // 25: gosdn.pnd.ChangeRequest + (*SetOnd)(nil), // 26: gosdn.pnd.SetOnd + (*SetSbi)(nil), // 27: gosdn.pnd.SetSbi + (*SetChange)(nil), // 28: gosdn.pnd.SetChange (*SetResponse)(nil), // 29: gosdn.pnd.SetResponse (*SetOndListResponse)(nil), // 30: gosdn.pnd.SetOndListResponse (*SetChangeListResponse)(nil), // 31: gosdn.pnd.SetChangeListResponse @@ -2744,14 +2744,14 @@ var file_gosdn_pnd_pnd_proto_depIdxs = []int32{ 38, // 14: gosdn.pnd.OrchestratedNetworkingDevice.device:type_name -> gnmi.Notification 37, // 15: gosdn.pnd.OrchestratedNetworkingDevice.sbi:type_name -> gosdn.southbound.SouthboundInterface 0, // 16: gosdn.pnd.Change.state:type_name -> gosdn.pnd.ChangeState - 25, // 17: gosdn.pnd.SetOndListRequest.ond:type_name -> gosdn.pnd.SetOnd - 26, // 18: gosdn.pnd.SetSbiListRequest.sbi:type_name -> gosdn.pnd.SetSbi - 27, // 19: gosdn.pnd.SetChangeListRequest.change:type_name -> gosdn.pnd.SetChange - 28, // 20: gosdn.pnd.SetPathListRequest.change_request:type_name -> gosdn.pnd.ChangeRequest - 37, // 21: gosdn.pnd.SetOnd.sbi:type_name -> gosdn.southbound.SouthboundInterface - 39, // 22: gosdn.pnd.SetOnd.transport_option:type_name -> gosdn.transport.TransportOption - 1, // 23: gosdn.pnd.SetChange.op:type_name -> gosdn.pnd.Operation - 2, // 24: gosdn.pnd.ChangeRequest.api_op:type_name -> gosdn.pnd.ApiOperation + 26, // 17: gosdn.pnd.SetOndListRequest.ond:type_name -> gosdn.pnd.SetOnd + 27, // 18: gosdn.pnd.SetSbiListRequest.sbi:type_name -> gosdn.pnd.SetSbi + 28, // 19: gosdn.pnd.SetChangeListRequest.change:type_name -> gosdn.pnd.SetChange + 25, // 20: gosdn.pnd.SetPathListRequest.change_request:type_name -> gosdn.pnd.ChangeRequest + 1, // 21: gosdn.pnd.ChangeRequest.api_op:type_name -> gosdn.pnd.ApiOperation + 37, // 22: gosdn.pnd.SetOnd.sbi:type_name -> gosdn.southbound.SouthboundInterface + 39, // 23: gosdn.pnd.SetOnd.transport_option:type_name -> gosdn.transport.TransportOption + 2, // 24: gosdn.pnd.SetChange.op:type_name -> gosdn.pnd.Operation 3, // 25: gosdn.pnd.SetResponse.status:type_name -> gosdn.pnd.Status 3, // 26: gosdn.pnd.SetOndListResponse.status:type_name -> gosdn.pnd.Status 29, // 27: gosdn.pnd.SetOndListResponse.responses:type_name -> gosdn.pnd.SetResponse @@ -3053,7 +3053,7 @@ func file_gosdn_pnd_pnd_proto_init() { } } file_gosdn_pnd_pnd_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetOnd); i { + switch v := v.(*ChangeRequest); i { case 0: return &v.state case 1: @@ -3065,7 +3065,7 @@ func file_gosdn_pnd_pnd_proto_init() { } } file_gosdn_pnd_pnd_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetSbi); i { + switch v := v.(*SetOnd); i { case 0: return &v.state case 1: @@ -3077,7 +3077,7 @@ func file_gosdn_pnd_pnd_proto_init() { } } file_gosdn_pnd_pnd_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetChange); i { + switch v := v.(*SetSbi); i { case 0: return &v.state case 1: @@ -3089,7 +3089,7 @@ func file_gosdn_pnd_pnd_proto_init() { } } file_gosdn_pnd_pnd_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeRequest); i { + switch v := v.(*SetChange); i { case 0: return &v.state case 1: diff --git a/openapiv2/gosdn_northbound.swagger.json b/openapiv2/gosdn_northbound.swagger.json index 0ac935cd8bc5dca8d591efcaaf29fc9feb925eb3..95afd09cac7f9aa984aa57e872acc7fa112e6300 100644 --- a/openapiv2/gosdn_northbound.swagger.json +++ b/openapiv2/gosdn_northbound.swagger.json @@ -23,14 +23,14 @@ { "name": "CsbiService" }, - { - "name": "CoreService" - }, { "name": "Collector" }, { "name": "AgentManager" + }, + { + "name": "CoreService" } ], "consumes": [ @@ -2143,7 +2143,10 @@ "description": "TODO: Check if this is really needed. Perhaps a reference to the PND's ID\nis also sufficient." }, "ond": { - "$ref": "#/definitions/pndOrchestratedNetworkingDevice" + "type": "array", + "items": { + "$ref": "#/definitions/pndOrchestratedNetworkingDevice" + } } } }, diff --git a/proto/gosdn/pnd/pnd.proto b/proto/gosdn/pnd/pnd.proto index 6aa9bf9ee4e9671e3d638ea78208cf1b0739c9da..b73ca6573a8f1a4698cddf2a4cff3d2d03e0d2ba 100644 --- a/proto/gosdn/pnd/pnd.proto +++ b/proto/gosdn/pnd/pnd.proto @@ -161,7 +161,7 @@ message GetOndResponse { // TODO: Check if this is really needed. Perhaps a reference to the PND's ID // is also sufficient. PrincipalNetworkDomain pnd = 2; - OrchestratedNetworkingDevice ond = 3; + repeated OrchestratedNetworkingDevice ond = 3; } message GetOndListResponse { @@ -265,6 +265,20 @@ message SetPathListRequest { string pid = 4; } +//TODO: rename +message ChangeRequest { + string path = 1; + string value = 2; + ApiOperation api_op = 3; +} + +enum ApiOperation { + API_OPERATION_UNSPECIFIED = 0; + API_OPERATION_UPDATE = 1; + API_OPERATION_REPLACE = 2; + API_OPERATION_DELETE = 3; +} + message SetOnd { string address = 1; .gosdn.southbound.SouthboundInterface sbi = 2; @@ -288,20 +302,6 @@ message SetChange { Operation op = 2; } -//TODO: rename -message ChangeRequest { - string path = 1; - string value = 2; - ApiOperation api_op = 3; -} - -enum ApiOperation { - API_OPERATION_UNSPECIFIED = 0; - API_OPERATION_UPDATE = 1; - API_OPERATION_REPLACE = 2; - API_OPERATION_DELETE = 3; -} - message SetResponse{ int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. Status status = 2;