diff --git a/README.md b/README.md index 6e5152c15cc58cc3f4bd0432fbcbe471206a9555..ce2d4c028c2dbd6644703245aae9343b096c4761 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ to get all submodules. network using one unified controller. `goSDN` provides: -* Model driven device representation +* Model driven device/network element representation * Native multi vendor support * Multi controller environments diff --git a/api/go/gosdn/networkelement/networkelement.pb.go b/api/go/gosdn/networkelement/networkelement.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..51cdb0ca7ca994a3fdb35e55e1f070cee0ced70b --- /dev/null +++ b/api/go/gosdn/networkelement/networkelement.pb.go @@ -0,0 +1,1202 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: gosdn/networkelement/networkelement.proto + +package networkelement + +import ( + _ "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/pnd" + southbound "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/southbound" + transport "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/transport" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "github.com/openconfig/gnmi/proto/gnmi" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Status int32 + +const ( + Status_STATUS_UNSPECIFIED Status = 0 + Status_STATUS_OK Status = 1 + Status_STATUS_ERROR Status = 2 +) + +// Enum value maps for Status. +var ( + Status_name = map[int32]string{ + 0: "STATUS_UNSPECIFIED", + 1: "STATUS_OK", + 2: "STATUS_ERROR", + } + Status_value = map[string]int32{ + "STATUS_UNSPECIFIED": 0, + "STATUS_OK": 1, + "STATUS_ERROR": 2, + } +) + +func (x Status) Enum() *Status { + p := new(Status) + *p = x + return p +} + +func (x Status) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Status) Descriptor() protoreflect.EnumDescriptor { + return file_gosdn_networkelement_networkelement_proto_enumTypes[0].Descriptor() +} + +func (Status) Type() protoreflect.EnumType { + return &file_gosdn_networkelement_networkelement_proto_enumTypes[0] +} + +func (x Status) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Status.Descriptor instead. +func (Status) EnumDescriptor() ([]byte, []int) { + return file_gosdn_networkelement_networkelement_proto_rawDescGZIP(), []int{0} +} + +type NetworkElement struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Model string `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"` + TransportAddress string `protobuf:"bytes,4,opt,name=transport_address,json=transportAddress,proto3" json:"transport_address,omitempty"` +} + +func (x *NetworkElement) Reset() { + *x = NetworkElement{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_networkelement_networkelement_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkElement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkElement) ProtoMessage() {} + +func (x *NetworkElement) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_networkelement_networkelement_proto_msgTypes[0] + 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 NetworkElement.ProtoReflect.Descriptor instead. +func (*NetworkElement) Descriptor() ([]byte, []int) { + return file_gosdn_networkelement_networkelement_proto_rawDescGZIP(), []int{0} +} + +func (x *NetworkElement) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *NetworkElement) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *NetworkElement) GetModel() string { + if x != nil { + return x.Model + } + return "" +} + +func (x *NetworkElement) GetTransportAddress() string { + if x != nil { + return x.TransportAddress + } + return "" +} + +type AddNetworkElementConfiguration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Sbi *southbound.SouthboundInterface `protobuf:"bytes,2,opt,name=sbi,proto3" json:"sbi,omitempty"` + NetworkElementName string `protobuf:"bytes,3,opt,name=network_element_name,json=networkElementName,proto3" json:"network_element_name,omitempty"` + TransportOption *transport.TransportOption `protobuf:"bytes,4,opt,name=transport_option,json=transportOption,proto3" json:"transport_option,omitempty"` +} + +func (x *AddNetworkElementConfiguration) Reset() { + *x = AddNetworkElementConfiguration{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_networkelement_networkelement_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddNetworkElementConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddNetworkElementConfiguration) ProtoMessage() {} + +func (x *AddNetworkElementConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_networkelement_networkelement_proto_msgTypes[1] + 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 AddNetworkElementConfiguration.ProtoReflect.Descriptor instead. +func (*AddNetworkElementConfiguration) Descriptor() ([]byte, []int) { + return file_gosdn_networkelement_networkelement_proto_rawDescGZIP(), []int{1} +} + +func (x *AddNetworkElementConfiguration) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *AddNetworkElementConfiguration) GetSbi() *southbound.SouthboundInterface { + if x != nil { + return x.Sbi + } + return nil +} + +func (x *AddNetworkElementConfiguration) GetNetworkElementName() string { + if x != nil { + return x.NetworkElementName + } + return "" +} + +func (x *AddNetworkElementConfiguration) GetTransportOption() *transport.TransportOption { + if x != nil { + return x.TransportOption + } + return nil +} + +type AddNetworkElementRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + NetworkElement *AddNetworkElementConfiguration `protobuf:"bytes,2,opt,name=network_element,json=networkElement,proto3" json:"network_element,omitempty"` + Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` +} + +func (x *AddNetworkElementRequest) Reset() { + *x = AddNetworkElementRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_networkelement_networkelement_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddNetworkElementRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddNetworkElementRequest) ProtoMessage() {} + +func (x *AddNetworkElementRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_networkelement_networkelement_proto_msgTypes[2] + 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 AddNetworkElementRequest.ProtoReflect.Descriptor instead. +func (*AddNetworkElementRequest) Descriptor() ([]byte, []int) { + return file_gosdn_networkelement_networkelement_proto_rawDescGZIP(), []int{2} +} + +func (x *AddNetworkElementRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *AddNetworkElementRequest) GetNetworkElement() *AddNetworkElementConfiguration { + if x != nil { + return x.NetworkElement + } + return nil +} + +func (x *AddNetworkElementRequest) GetPid() string { + if x != nil { + return x.Pid + } + return "" +} + +type AddNetworkElementResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=gosdn.networkelement.Status" json:"status,omitempty"` + NetworkElementId string `protobuf:"bytes,3,opt,name=network_element_id,json=networkElementId,proto3" json:"network_element_id,omitempty"` +} + +func (x *AddNetworkElementResponse) Reset() { + *x = AddNetworkElementResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_networkelement_networkelement_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddNetworkElementResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddNetworkElementResponse) ProtoMessage() {} + +func (x *AddNetworkElementResponse) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_networkelement_networkelement_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 AddNetworkElementResponse.ProtoReflect.Descriptor instead. +func (*AddNetworkElementResponse) Descriptor() ([]byte, []int) { + return file_gosdn_networkelement_networkelement_proto_rawDescGZIP(), []int{3} +} + +func (x *AddNetworkElementResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *AddNetworkElementResponse) GetStatus() Status { + if x != nil { + return x.Status + } + return Status_STATUS_UNSPECIFIED +} + +func (x *AddNetworkElementResponse) GetNetworkElementId() string { + if x != nil { + return x.NetworkElementId + } + return "" +} + +type GetNetworkElementRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + NetworkElementId string `protobuf:"bytes,2,opt,name=network_element_id,json=networkElementId,proto3" json:"network_element_id,omitempty"` +} + +func (x *GetNetworkElementRequest) Reset() { + *x = GetNetworkElementRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_networkelement_networkelement_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNetworkElementRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNetworkElementRequest) ProtoMessage() {} + +func (x *GetNetworkElementRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_networkelement_networkelement_proto_msgTypes[4] + 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 GetNetworkElementRequest.ProtoReflect.Descriptor instead. +func (*GetNetworkElementRequest) Descriptor() ([]byte, []int) { + return file_gosdn_networkelement_networkelement_proto_rawDescGZIP(), []int{4} +} + +func (x *GetNetworkElementRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *GetNetworkElementRequest) GetNetworkElementId() string { + if x != nil { + return x.NetworkElementId + } + return "" +} + +type GetNetworkElementResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=gosdn.networkelement.Status" json:"status,omitempty"` + NetworkElement *NetworkElement `protobuf:"bytes,3,opt,name=network_element,json=networkElement,proto3" json:"network_element,omitempty"` +} + +func (x *GetNetworkElementResponse) Reset() { + *x = GetNetworkElementResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_networkelement_networkelement_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNetworkElementResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNetworkElementResponse) ProtoMessage() {} + +func (x *GetNetworkElementResponse) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_networkelement_networkelement_proto_msgTypes[5] + 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 GetNetworkElementResponse.ProtoReflect.Descriptor instead. +func (*GetNetworkElementResponse) Descriptor() ([]byte, []int) { + return file_gosdn_networkelement_networkelement_proto_rawDescGZIP(), []int{5} +} + +func (x *GetNetworkElementResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *GetNetworkElementResponse) GetStatus() Status { + if x != nil { + return x.Status + } + return Status_STATUS_UNSPECIFIED +} + +func (x *GetNetworkElementResponse) GetNetworkElement() *NetworkElement { + if x != nil { + return x.NetworkElement + } + return nil +} + +type GetAllNetworkElementRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *GetAllNetworkElementRequest) Reset() { + *x = GetAllNetworkElementRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_networkelement_networkelement_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAllNetworkElementRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAllNetworkElementRequest) ProtoMessage() {} + +func (x *GetAllNetworkElementRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_networkelement_networkelement_proto_msgTypes[6] + 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 GetAllNetworkElementRequest.ProtoReflect.Descriptor instead. +func (*GetAllNetworkElementRequest) Descriptor() ([]byte, []int) { + return file_gosdn_networkelement_networkelement_proto_rawDescGZIP(), []int{6} +} + +func (x *GetAllNetworkElementRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +type GetAllNetworkElementResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=gosdn.networkelement.Status" json:"status,omitempty"` + NetworkElement []*NetworkElement `protobuf:"bytes,3,rep,name=network_element,json=networkElement,proto3" json:"network_element,omitempty"` +} + +func (x *GetAllNetworkElementResponse) Reset() { + *x = GetAllNetworkElementResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_networkelement_networkelement_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAllNetworkElementResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAllNetworkElementResponse) ProtoMessage() {} + +func (x *GetAllNetworkElementResponse) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_networkelement_networkelement_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAllNetworkElementResponse.ProtoReflect.Descriptor instead. +func (*GetAllNetworkElementResponse) Descriptor() ([]byte, []int) { + return file_gosdn_networkelement_networkelement_proto_rawDescGZIP(), []int{7} +} + +func (x *GetAllNetworkElementResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *GetAllNetworkElementResponse) GetStatus() Status { + if x != nil { + return x.Status + } + return Status_STATUS_UNSPECIFIED +} + +func (x *GetAllNetworkElementResponse) GetNetworkElement() []*NetworkElement { + if x != nil { + return x.NetworkElement + } + return nil +} + +type UpdateNetworkElementRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + NetworkElement *NetworkElement `protobuf:"bytes,2,opt,name=network_element,json=networkElement,proto3" json:"network_element,omitempty"` +} + +func (x *UpdateNetworkElementRequest) Reset() { + *x = UpdateNetworkElementRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_networkelement_networkelement_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateNetworkElementRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateNetworkElementRequest) ProtoMessage() {} + +func (x *UpdateNetworkElementRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_networkelement_networkelement_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateNetworkElementRequest.ProtoReflect.Descriptor instead. +func (*UpdateNetworkElementRequest) Descriptor() ([]byte, []int) { + return file_gosdn_networkelement_networkelement_proto_rawDescGZIP(), []int{8} +} + +func (x *UpdateNetworkElementRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *UpdateNetworkElementRequest) GetNetworkElement() *NetworkElement { + if x != nil { + return x.NetworkElement + } + return nil +} + +type UpdateNetworkElementResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=gosdn.networkelement.Status" json:"status,omitempty"` +} + +func (x *UpdateNetworkElementResponse) Reset() { + *x = UpdateNetworkElementResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_networkelement_networkelement_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateNetworkElementResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateNetworkElementResponse) ProtoMessage() {} + +func (x *UpdateNetworkElementResponse) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_networkelement_networkelement_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateNetworkElementResponse.ProtoReflect.Descriptor instead. +func (*UpdateNetworkElementResponse) Descriptor() ([]byte, []int) { + return file_gosdn_networkelement_networkelement_proto_rawDescGZIP(), []int{9} +} + +func (x *UpdateNetworkElementResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *UpdateNetworkElementResponse) GetStatus() Status { + if x != nil { + return x.Status + } + return Status_STATUS_UNSPECIFIED +} + +type DeleteNetworkElementRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + NetworkElementId string `protobuf:"bytes,2,opt,name=network_element_id,json=networkElementId,proto3" json:"network_element_id,omitempty"` +} + +func (x *DeleteNetworkElementRequest) Reset() { + *x = DeleteNetworkElementRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_networkelement_networkelement_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteNetworkElementRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteNetworkElementRequest) ProtoMessage() {} + +func (x *DeleteNetworkElementRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_networkelement_networkelement_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteNetworkElementRequest.ProtoReflect.Descriptor instead. +func (*DeleteNetworkElementRequest) Descriptor() ([]byte, []int) { + return file_gosdn_networkelement_networkelement_proto_rawDescGZIP(), []int{10} +} + +func (x *DeleteNetworkElementRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *DeleteNetworkElementRequest) GetNetworkElementId() string { + if x != nil { + return x.NetworkElementId + } + return "" +} + +type DeleteNetworkElementResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=gosdn.networkelement.Status" json:"status,omitempty"` +} + +func (x *DeleteNetworkElementResponse) Reset() { + *x = DeleteNetworkElementResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_networkelement_networkelement_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteNetworkElementResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteNetworkElementResponse) ProtoMessage() {} + +func (x *DeleteNetworkElementResponse) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_networkelement_networkelement_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteNetworkElementResponse.ProtoReflect.Descriptor instead. +func (*DeleteNetworkElementResponse) Descriptor() ([]byte, []int) { + return file_gosdn_networkelement_networkelement_proto_rawDescGZIP(), []int{11} +} + +func (x *DeleteNetworkElementResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *DeleteNetworkElementResponse) GetStatus() Status { + if x != nil { + return x.Status + } + return Status_STATUS_UNSPECIFIED +} + +var File_gosdn_networkelement_networkelement_proto protoreflect.FileDescriptor + +var file_gosdn_networkelement_networkelement_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, + 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x67, 0x6f, 0x73, + 0x64, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, + 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6e, 0x64, 0x2f, 0x70, + 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x67, 0x6f, 0x73, 0x64, 0x6e, + 0x2f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x73, 0x6f, 0x75, 0x74, + 0x68, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x77, 0x0a, 0x0e, + 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xf2, 0x01, 0x0a, 0x1e, 0x41, 0x64, 0x64, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x30, 0x0a, 0x14, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 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, 0xa9, 0x01, 0x0a, 0x18, 0x41, + 0x64, 0x64, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 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, 0x12, 0x5d, 0x0a, 0x0f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x5f, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, + 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x64, 0x64, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x9d, 0x01, 0x0a, 0x19, 0x41, 0x64, 0x64, 0x4e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 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, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x5f, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x66, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 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, + 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x65, 0x6c, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xbe, + 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 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, 0x34, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x73, + 0x64, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x4d, 0x0a, 0x0f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x65, 0x6c, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x73, 0x64, + 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x0e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x22, + 0x3b, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 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, 0xc1, 0x01, 0x0a, + 0x1c, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, + 0x65, 0x6d, 0x65, 0x6e, 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, 0x34, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x4d, 0x0a, 0x0f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x65, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x73, + 0x64, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x0e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x22, 0x8a, 0x01, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 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, 0x12, 0x4d, + 0x0a, 0x0f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x72, 0x0a, + 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, + 0x65, 0x6d, 0x65, 0x6e, 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, 0x34, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x22, 0x69, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 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, 0x12, 0x2c, + 0x0a, 0x12, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x72, 0x0a, 0x1c, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 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, 0x34, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x73, + 0x64, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 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, 0x52, 0x52, 0x4f, + 0x52, 0x10, 0x02, 0x32, 0xcd, 0x04, 0x0a, 0x15, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x45, + 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8a, 0x01, + 0x0a, 0x03, 0x41, 0x64, 0x64, 0x12, 0x2e, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x64, 0x64, + 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x64, 0x64, + 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, + 0x2a, 0x22, 0x17, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2d, 0x65, 0x6c, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x03, 0x47, + 0x65, 0x74, 0x12, 0x2e, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2d, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x8d, 0x01, + 0x0a, 0x06, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x12, 0x31, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, + 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2d, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x6c, 0x6c, 0x12, 0x93, 0x01, + 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x31, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2d, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x42, 0x3a, 0x5a, 0x38, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, + 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, + 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_gosdn_networkelement_networkelement_proto_rawDescOnce sync.Once + file_gosdn_networkelement_networkelement_proto_rawDescData = file_gosdn_networkelement_networkelement_proto_rawDesc +) + +func file_gosdn_networkelement_networkelement_proto_rawDescGZIP() []byte { + file_gosdn_networkelement_networkelement_proto_rawDescOnce.Do(func() { + file_gosdn_networkelement_networkelement_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_networkelement_networkelement_proto_rawDescData) + }) + return file_gosdn_networkelement_networkelement_proto_rawDescData +} + +var file_gosdn_networkelement_networkelement_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_gosdn_networkelement_networkelement_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_gosdn_networkelement_networkelement_proto_goTypes = []interface{}{ + (Status)(0), // 0: gosdn.networkelement.Status + (*NetworkElement)(nil), // 1: gosdn.networkelement.NetworkElement + (*AddNetworkElementConfiguration)(nil), // 2: gosdn.networkelement.AddNetworkElementConfiguration + (*AddNetworkElementRequest)(nil), // 3: gosdn.networkelement.AddNetworkElementRequest + (*AddNetworkElementResponse)(nil), // 4: gosdn.networkelement.AddNetworkElementResponse + (*GetNetworkElementRequest)(nil), // 5: gosdn.networkelement.GetNetworkElementRequest + (*GetNetworkElementResponse)(nil), // 6: gosdn.networkelement.GetNetworkElementResponse + (*GetAllNetworkElementRequest)(nil), // 7: gosdn.networkelement.GetAllNetworkElementRequest + (*GetAllNetworkElementResponse)(nil), // 8: gosdn.networkelement.GetAllNetworkElementResponse + (*UpdateNetworkElementRequest)(nil), // 9: gosdn.networkelement.UpdateNetworkElementRequest + (*UpdateNetworkElementResponse)(nil), // 10: gosdn.networkelement.UpdateNetworkElementResponse + (*DeleteNetworkElementRequest)(nil), // 11: gosdn.networkelement.DeleteNetworkElementRequest + (*DeleteNetworkElementResponse)(nil), // 12: gosdn.networkelement.DeleteNetworkElementResponse + (*southbound.SouthboundInterface)(nil), // 13: gosdn.southbound.SouthboundInterface + (*transport.TransportOption)(nil), // 14: gosdn.transport.TransportOption +} +var file_gosdn_networkelement_networkelement_proto_depIdxs = []int32{ + 13, // 0: gosdn.networkelement.AddNetworkElementConfiguration.sbi:type_name -> gosdn.southbound.SouthboundInterface + 14, // 1: gosdn.networkelement.AddNetworkElementConfiguration.transport_option:type_name -> gosdn.transport.TransportOption + 2, // 2: gosdn.networkelement.AddNetworkElementRequest.network_element:type_name -> gosdn.networkelement.AddNetworkElementConfiguration + 0, // 3: gosdn.networkelement.AddNetworkElementResponse.status:type_name -> gosdn.networkelement.Status + 0, // 4: gosdn.networkelement.GetNetworkElementResponse.status:type_name -> gosdn.networkelement.Status + 1, // 5: gosdn.networkelement.GetNetworkElementResponse.network_element:type_name -> gosdn.networkelement.NetworkElement + 0, // 6: gosdn.networkelement.GetAllNetworkElementResponse.status:type_name -> gosdn.networkelement.Status + 1, // 7: gosdn.networkelement.GetAllNetworkElementResponse.network_element:type_name -> gosdn.networkelement.NetworkElement + 1, // 8: gosdn.networkelement.UpdateNetworkElementRequest.network_element:type_name -> gosdn.networkelement.NetworkElement + 0, // 9: gosdn.networkelement.UpdateNetworkElementResponse.status:type_name -> gosdn.networkelement.Status + 0, // 10: gosdn.networkelement.DeleteNetworkElementResponse.status:type_name -> gosdn.networkelement.Status + 3, // 11: gosdn.networkelement.NetworkElementService.Add:input_type -> gosdn.networkelement.AddNetworkElementRequest + 5, // 12: gosdn.networkelement.NetworkElementService.Get:input_type -> gosdn.networkelement.GetNetworkElementRequest + 7, // 13: gosdn.networkelement.NetworkElementService.GetAll:input_type -> gosdn.networkelement.GetAllNetworkElementRequest + 9, // 14: gosdn.networkelement.NetworkElementService.Update:input_type -> gosdn.networkelement.UpdateNetworkElementRequest + 4, // 15: gosdn.networkelement.NetworkElementService.Add:output_type -> gosdn.networkelement.AddNetworkElementResponse + 6, // 16: gosdn.networkelement.NetworkElementService.Get:output_type -> gosdn.networkelement.GetNetworkElementResponse + 8, // 17: gosdn.networkelement.NetworkElementService.GetAll:output_type -> gosdn.networkelement.GetAllNetworkElementResponse + 10, // 18: gosdn.networkelement.NetworkElementService.Update:output_type -> gosdn.networkelement.UpdateNetworkElementResponse + 15, // [15:19] is the sub-list for method output_type + 11, // [11:15] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_gosdn_networkelement_networkelement_proto_init() } +func file_gosdn_networkelement_networkelement_proto_init() { + if File_gosdn_networkelement_networkelement_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_gosdn_networkelement_networkelement_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NetworkElement); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_networkelement_networkelement_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddNetworkElementConfiguration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_networkelement_networkelement_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddNetworkElementRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_networkelement_networkelement_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddNetworkElementResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_networkelement_networkelement_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetNetworkElementRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_networkelement_networkelement_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetNetworkElementResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_networkelement_networkelement_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAllNetworkElementRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_networkelement_networkelement_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAllNetworkElementResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_networkelement_networkelement_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateNetworkElementRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_networkelement_networkelement_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateNetworkElementResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_networkelement_networkelement_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteNetworkElementRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_networkelement_networkelement_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteNetworkElementResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_gosdn_networkelement_networkelement_proto_rawDesc, + NumEnums: 1, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_gosdn_networkelement_networkelement_proto_goTypes, + DependencyIndexes: file_gosdn_networkelement_networkelement_proto_depIdxs, + EnumInfos: file_gosdn_networkelement_networkelement_proto_enumTypes, + MessageInfos: file_gosdn_networkelement_networkelement_proto_msgTypes, + }.Build() + File_gosdn_networkelement_networkelement_proto = out.File + file_gosdn_networkelement_networkelement_proto_rawDesc = nil + file_gosdn_networkelement_networkelement_proto_goTypes = nil + file_gosdn_networkelement_networkelement_proto_depIdxs = nil +} diff --git a/api/go/gosdn/networkelement/networkelement.pb.gw.go b/api/go/gosdn/networkelement/networkelement.pb.gw.go new file mode 100644 index 0000000000000000000000000000000000000000..2ad35433b955d2d19cbad6d7c0e48de1f746e27d --- /dev/null +++ b/api/go/gosdn/networkelement/networkelement.pb.gw.go @@ -0,0 +1,414 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: gosdn/networkelement/networkelement.proto + +/* +Package networkelement is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package networkelement + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_NetworkElementService_Add_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddNetworkElementRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Add(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_NetworkElementService_Add_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddNetworkElementRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Add(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_NetworkElementService_Get_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_NetworkElementService_Get_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetNetworkElementRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_Get_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Get(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_NetworkElementService_Get_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetNetworkElementRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_Get_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Get(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_NetworkElementService_GetAll_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_NetworkElementService_GetAll_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetAllNetworkElementRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_GetAll_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_NetworkElementService_GetAll_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetAllNetworkElementRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_GetAll_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetAll(ctx, &protoReq) + return msg, metadata, err + +} + +func request_NetworkElementService_Update_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateNetworkElementRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Update(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_NetworkElementService_Update_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateNetworkElementRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Update(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterNetworkElementServiceHandlerServer registers the http handlers for service NetworkElementService to "mux". +// UnaryRPC :call NetworkElementServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNetworkElementServiceHandlerFromEndpoint instead. +func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NetworkElementServiceServer) error { + + mux.Handle("POST", pattern_NetworkElementService_Add_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Add", runtime.WithHTTPPathPattern("/network-element/create")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_NetworkElementService_Add_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NetworkElementService_Add_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_NetworkElementService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Get", runtime.WithHTTPPathPattern("/network-element")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_NetworkElementService_Get_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NetworkElementService_Get_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_NetworkElementService_GetAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetAll", runtime.WithHTTPPathPattern("/network-element/all")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_NetworkElementService_GetAll_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NetworkElementService_GetAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_NetworkElementService_Update_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Update", runtime.WithHTTPPathPattern("/network-element/update")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_NetworkElementService_Update_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NetworkElementService_Update_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterNetworkElementServiceHandlerFromEndpoint is same as RegisterNetworkElementServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterNetworkElementServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterNetworkElementServiceHandler(ctx, mux, conn) +} + +// RegisterNetworkElementServiceHandler registers the http handlers for service NetworkElementService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterNetworkElementServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterNetworkElementServiceHandlerClient(ctx, mux, NewNetworkElementServiceClient(conn)) +} + +// RegisterNetworkElementServiceHandlerClient registers the http handlers for service NetworkElementService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NetworkElementServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NetworkElementServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "NetworkElementServiceClient" to call the correct interceptors. +func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NetworkElementServiceClient) error { + + mux.Handle("POST", pattern_NetworkElementService_Add_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Add", runtime.WithHTTPPathPattern("/network-element/create")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_NetworkElementService_Add_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NetworkElementService_Add_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_NetworkElementService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Get", runtime.WithHTTPPathPattern("/network-element")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_NetworkElementService_Get_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NetworkElementService_Get_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_NetworkElementService_GetAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetAll", runtime.WithHTTPPathPattern("/network-element/all")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_NetworkElementService_GetAll_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NetworkElementService_GetAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_NetworkElementService_Update_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Update", runtime.WithHTTPPathPattern("/network-element/update")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_NetworkElementService_Update_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NetworkElementService_Update_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_NetworkElementService_Add_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"network-element", "create"}, "")) + + pattern_NetworkElementService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"network-element"}, "")) + + pattern_NetworkElementService_GetAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"network-element", "all"}, "")) + + pattern_NetworkElementService_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"network-element", "update"}, "")) +) + +var ( + forward_NetworkElementService_Add_0 = runtime.ForwardResponseMessage + + forward_NetworkElementService_Get_0 = runtime.ForwardResponseMessage + + forward_NetworkElementService_GetAll_0 = runtime.ForwardResponseMessage + + forward_NetworkElementService_Update_0 = runtime.ForwardResponseMessage +) diff --git a/api/go/gosdn/networkelement/networkelement_grpc.pb.go b/api/go/gosdn/networkelement/networkelement_grpc.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..c73b569e984108d4922b5e7bdbad421b90dff3b5 --- /dev/null +++ b/api/go/gosdn/networkelement/networkelement_grpc.pb.go @@ -0,0 +1,209 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package networkelement + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// NetworkElementServiceClient is the client API for NetworkElementService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type NetworkElementServiceClient interface { + Add(ctx context.Context, in *AddNetworkElementRequest, opts ...grpc.CallOption) (*AddNetworkElementResponse, error) + Get(ctx context.Context, in *GetNetworkElementRequest, opts ...grpc.CallOption) (*GetNetworkElementResponse, error) + GetAll(ctx context.Context, in *GetAllNetworkElementRequest, opts ...grpc.CallOption) (*GetAllNetworkElementResponse, error) + Update(ctx context.Context, in *UpdateNetworkElementRequest, opts ...grpc.CallOption) (*UpdateNetworkElementResponse, error) +} + +type networkElementServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewNetworkElementServiceClient(cc grpc.ClientConnInterface) NetworkElementServiceClient { + return &networkElementServiceClient{cc} +} + +func (c *networkElementServiceClient) Add(ctx context.Context, in *AddNetworkElementRequest, opts ...grpc.CallOption) (*AddNetworkElementResponse, error) { + out := new(AddNetworkElementResponse) + err := c.cc.Invoke(ctx, "/gosdn.networkelement.NetworkElementService/Add", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *networkElementServiceClient) Get(ctx context.Context, in *GetNetworkElementRequest, opts ...grpc.CallOption) (*GetNetworkElementResponse, error) { + out := new(GetNetworkElementResponse) + err := c.cc.Invoke(ctx, "/gosdn.networkelement.NetworkElementService/Get", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *networkElementServiceClient) GetAll(ctx context.Context, in *GetAllNetworkElementRequest, opts ...grpc.CallOption) (*GetAllNetworkElementResponse, error) { + out := new(GetAllNetworkElementResponse) + err := c.cc.Invoke(ctx, "/gosdn.networkelement.NetworkElementService/GetAll", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *networkElementServiceClient) Update(ctx context.Context, in *UpdateNetworkElementRequest, opts ...grpc.CallOption) (*UpdateNetworkElementResponse, error) { + out := new(UpdateNetworkElementResponse) + err := c.cc.Invoke(ctx, "/gosdn.networkelement.NetworkElementService/Update", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// NetworkElementServiceServer is the server API for NetworkElementService service. +// All implementations must embed UnimplementedNetworkElementServiceServer +// for forward compatibility +type NetworkElementServiceServer interface { + Add(context.Context, *AddNetworkElementRequest) (*AddNetworkElementResponse, error) + Get(context.Context, *GetNetworkElementRequest) (*GetNetworkElementResponse, error) + GetAll(context.Context, *GetAllNetworkElementRequest) (*GetAllNetworkElementResponse, error) + Update(context.Context, *UpdateNetworkElementRequest) (*UpdateNetworkElementResponse, error) + mustEmbedUnimplementedNetworkElementServiceServer() +} + +// UnimplementedNetworkElementServiceServer must be embedded to have forward compatible implementations. +type UnimplementedNetworkElementServiceServer struct { +} + +func (UnimplementedNetworkElementServiceServer) Add(context.Context, *AddNetworkElementRequest) (*AddNetworkElementResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Add not implemented") +} +func (UnimplementedNetworkElementServiceServer) Get(context.Context, *GetNetworkElementRequest) (*GetNetworkElementResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedNetworkElementServiceServer) GetAll(context.Context, *GetAllNetworkElementRequest) (*GetAllNetworkElementResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAll not implemented") +} +func (UnimplementedNetworkElementServiceServer) Update(context.Context, *UpdateNetworkElementRequest) (*UpdateNetworkElementResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedNetworkElementServiceServer) mustEmbedUnimplementedNetworkElementServiceServer() {} + +// UnsafeNetworkElementServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to NetworkElementServiceServer will +// result in compilation errors. +type UnsafeNetworkElementServiceServer interface { + mustEmbedUnimplementedNetworkElementServiceServer() +} + +func RegisterNetworkElementServiceServer(s grpc.ServiceRegistrar, srv NetworkElementServiceServer) { + s.RegisterService(&NetworkElementService_ServiceDesc, srv) +} + +func _NetworkElementService_Add_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddNetworkElementRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NetworkElementServiceServer).Add(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gosdn.networkelement.NetworkElementService/Add", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NetworkElementServiceServer).Add(ctx, req.(*AddNetworkElementRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NetworkElementService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNetworkElementRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NetworkElementServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gosdn.networkelement.NetworkElementService/Get", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NetworkElementServiceServer).Get(ctx, req.(*GetNetworkElementRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NetworkElementService_GetAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAllNetworkElementRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NetworkElementServiceServer).GetAll(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gosdn.networkelement.NetworkElementService/GetAll", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NetworkElementServiceServer).GetAll(ctx, req.(*GetAllNetworkElementRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NetworkElementService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateNetworkElementRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NetworkElementServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gosdn.networkelement.NetworkElementService/Update", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NetworkElementServiceServer).Update(ctx, req.(*UpdateNetworkElementRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// NetworkElementService_ServiceDesc is the grpc.ServiceDesc for NetworkElementService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var NetworkElementService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "gosdn.networkelement.NetworkElementService", + HandlerType: (*NetworkElementServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Add", + Handler: _NetworkElementService_Add_Handler, + }, + { + MethodName: "Get", + Handler: _NetworkElementService_Get_Handler, + }, + { + MethodName: "GetAll", + Handler: _NetworkElementService_GetAll_Handler, + }, + { + MethodName: "Update", + Handler: _NetworkElementService_Update_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "gosdn/networkelement/networkelement.proto", +} diff --git a/api/go/gosdn/pnd/pnd.pb.go b/api/go/gosdn/pnd/pnd.pb.go index e8244a25bb1ba7432750d863bb18ff43177dd5a7..312077b0b9a59afc919ff3353be6573ff089fde3 100644 --- a/api/go/gosdn/pnd/pnd.pb.go +++ b/api/go/gosdn/pnd/pnd.pb.go @@ -451,7 +451,7 @@ type GetMneRequest struct { unknownFields protoimpl.UnknownFields Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"` + Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` } @@ -494,9 +494,9 @@ func (x *GetMneRequest) GetTimestamp() int64 { return 0 } -func (x *GetMneRequest) GetDid() string { +func (x *GetMneRequest) GetMneid() string { if x != nil { - return x.Did + return x.Mneid } return "" } @@ -750,7 +750,7 @@ type GetPathRequest struct { unknownFields protoimpl.UnknownFields Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"` + Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` Pid string `protobuf:"bytes,4,opt,name=pid,proto3" json:"pid,omitempty"` } @@ -794,9 +794,9 @@ func (x *GetPathRequest) GetTimestamp() int64 { return 0 } -func (x *GetPathRequest) GetDid() string { +func (x *GetPathRequest) GetMneid() string { if x != nil { - return x.Did + return x.Mneid } return "" } @@ -823,8 +823,8 @@ type GetMneResponse 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"` - Mne *OrchestratedNetworkingDevice `protobuf:"bytes,3,opt,name=mne,proto3" json:"mne,omitempty"` + Pnd *PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` + Mne *ManagedNetworkElement `protobuf:"bytes,3,opt,name=mne,proto3" json:"mne,omitempty"` } func (x *GetMneResponse) Reset() { @@ -873,7 +873,7 @@ func (x *GetMneResponse) GetPnd() *PrincipalNetworkDomain { return nil } -func (x *GetMneResponse) GetMne() *OrchestratedNetworkingDevice { +func (x *GetMneResponse) GetMne() *ManagedNetworkElement { if x != nil { return x.Mne } @@ -888,8 +888,8 @@ type GetMneListResponse 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"` - Mne []*OrchestratedNetworkingDevice `protobuf:"bytes,3,rep,name=mne,proto3" json:"mne,omitempty"` + Pnd *PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` + Mne []*ManagedNetworkElement `protobuf:"bytes,3,rep,name=mne,proto3" json:"mne,omitempty"` } func (x *GetMneListResponse) Reset() { @@ -938,7 +938,7 @@ func (x *GetMneListResponse) GetPnd() *PrincipalNetworkDomain { return nil } -func (x *GetMneListResponse) GetMne() []*OrchestratedNetworkingDevice { +func (x *GetMneListResponse) GetMne() []*ManagedNetworkElement { if x != nil { return x.Mne } @@ -953,8 +953,8 @@ type GetFlattenedMneListResponse 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"` - Mne []*FlattenedOrchestratedNetworkingDevice `protobuf:"bytes,3,rep,name=mne,proto3" json:"mne,omitempty"` + Pnd *PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` + Mne []*FlattenedManagedNetworkElement `protobuf:"bytes,3,rep,name=mne,proto3" json:"mne,omitempty"` } func (x *GetFlattenedMneListResponse) Reset() { @@ -1003,7 +1003,7 @@ func (x *GetFlattenedMneListResponse) GetPnd() *PrincipalNetworkDomain { return nil } -func (x *GetFlattenedMneListResponse) GetMne() []*FlattenedOrchestratedNetworkingDevice { +func (x *GetFlattenedMneListResponse) GetMne() []*FlattenedManagedNetworkElement { if x != nil { return x.Mne } @@ -1148,8 +1148,8 @@ type GetPathResponse 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"` - Device []*gnmi.Notification `protobuf:"bytes,3,rep,name=device,proto3" json:"device,omitempty"` + Pnd *PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` + MneNotification []*gnmi.Notification `protobuf:"bytes,3,rep,name=mne_notification,json=mneNotification,proto3" json:"mne_notification,omitempty"` } func (x *GetPathResponse) Reset() { @@ -1198,9 +1198,9 @@ func (x *GetPathResponse) GetPnd() *PrincipalNetworkDomain { return nil } -func (x *GetPathResponse) GetDevice() []*gnmi.Notification { +func (x *GetPathResponse) GetMneNotification() []*gnmi.Notification { if x != nil { - return x.Device + return x.MneNotification } return nil } @@ -1398,19 +1398,19 @@ func (x *PrincipalNetworkDomain) GetDescription() string { return "" } -type OrchestratedNetworkingDevice struct { +type ManagedNetworkElement struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Device []*gnmi.Notification `protobuf:"bytes,3,rep,name=device,proto3" json:"device,omitempty"` - Sbi *southbound.SouthboundInterface `protobuf:"bytes,4,opt,name=sbi,proto3" json:"sbi,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + MneNotification []*gnmi.Notification `protobuf:"bytes,3,rep,name=mne_notification,json=mneNotification,proto3" json:"mne_notification,omitempty"` + Sbi *southbound.SouthboundInterface `protobuf:"bytes,4,opt,name=sbi,proto3" json:"sbi,omitempty"` } -func (x *OrchestratedNetworkingDevice) Reset() { - *x = OrchestratedNetworkingDevice{} +func (x *ManagedNetworkElement) Reset() { + *x = ManagedNetworkElement{} if protoimpl.UnsafeEnabled { mi := &file_gosdn_pnd_pnd_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1418,13 +1418,13 @@ func (x *OrchestratedNetworkingDevice) Reset() { } } -func (x *OrchestratedNetworkingDevice) String() string { +func (x *ManagedNetworkElement) String() string { return protoimpl.X.MessageStringOf(x) } -func (*OrchestratedNetworkingDevice) ProtoMessage() {} +func (*ManagedNetworkElement) ProtoMessage() {} -func (x *OrchestratedNetworkingDevice) ProtoReflect() protoreflect.Message { +func (x *ManagedNetworkElement) ProtoReflect() protoreflect.Message { mi := &file_gosdn_pnd_pnd_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1436,40 +1436,40 @@ func (x *OrchestratedNetworkingDevice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use OrchestratedNetworkingDevice.ProtoReflect.Descriptor instead. -func (*OrchestratedNetworkingDevice) Descriptor() ([]byte, []int) { +// Deprecated: Use ManagedNetworkElement.ProtoReflect.Descriptor instead. +func (*ManagedNetworkElement) Descriptor() ([]byte, []int) { return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{16} } -func (x *OrchestratedNetworkingDevice) GetId() string { +func (x *ManagedNetworkElement) GetId() string { if x != nil { return x.Id } return "" } -func (x *OrchestratedNetworkingDevice) GetName() string { +func (x *ManagedNetworkElement) GetName() string { if x != nil { return x.Name } return "" } -func (x *OrchestratedNetworkingDevice) GetDevice() []*gnmi.Notification { +func (x *ManagedNetworkElement) GetMneNotification() []*gnmi.Notification { if x != nil { - return x.Device + return x.MneNotification } return nil } -func (x *OrchestratedNetworkingDevice) GetSbi() *southbound.SouthboundInterface { +func (x *ManagedNetworkElement) GetSbi() *southbound.SouthboundInterface { if x != nil { return x.Sbi } return nil } -type FlattenedOrchestratedNetworkingDevice struct { +type FlattenedManagedNetworkElement struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1479,8 +1479,8 @@ type FlattenedOrchestratedNetworkingDevice struct { Sbi string `protobuf:"bytes,3,opt,name=sbi,proto3" json:"sbi,omitempty"` } -func (x *FlattenedOrchestratedNetworkingDevice) Reset() { - *x = FlattenedOrchestratedNetworkingDevice{} +func (x *FlattenedManagedNetworkElement) Reset() { + *x = FlattenedManagedNetworkElement{} if protoimpl.UnsafeEnabled { mi := &file_gosdn_pnd_pnd_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1488,13 +1488,13 @@ func (x *FlattenedOrchestratedNetworkingDevice) Reset() { } } -func (x *FlattenedOrchestratedNetworkingDevice) String() string { +func (x *FlattenedManagedNetworkElement) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlattenedOrchestratedNetworkingDevice) ProtoMessage() {} +func (*FlattenedManagedNetworkElement) ProtoMessage() {} -func (x *FlattenedOrchestratedNetworkingDevice) ProtoReflect() protoreflect.Message { +func (x *FlattenedManagedNetworkElement) ProtoReflect() protoreflect.Message { mi := &file_gosdn_pnd_pnd_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1506,26 +1506,26 @@ func (x *FlattenedOrchestratedNetworkingDevice) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use FlattenedOrchestratedNetworkingDevice.ProtoReflect.Descriptor instead. -func (*FlattenedOrchestratedNetworkingDevice) Descriptor() ([]byte, []int) { +// Deprecated: Use FlattenedManagedNetworkElement.ProtoReflect.Descriptor instead. +func (*FlattenedManagedNetworkElement) Descriptor() ([]byte, []int) { return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{17} } -func (x *FlattenedOrchestratedNetworkingDevice) GetId() string { +func (x *FlattenedManagedNetworkElement) GetId() string { if x != nil { return x.Id } return "" } -func (x *FlattenedOrchestratedNetworkingDevice) GetName() string { +func (x *FlattenedManagedNetworkElement) GetName() string { if x != nil { return x.Name } return "" } -func (x *FlattenedOrchestratedNetworkingDevice) GetSbi() string { +func (x *FlattenedManagedNetworkElement) GetSbi() string { if x != nil { return x.Sbi } @@ -1861,7 +1861,7 @@ type ChangeRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` + Mneid string `protobuf:"bytes,1,opt,name=mneid,proto3" json:"mneid,omitempty"` 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 ApiOperation `protobuf:"varint,4,opt,name=api_op,json=apiOp,proto3,enum=gosdn.pnd.ApiOperation" json:"api_op,omitempty"` @@ -1899,9 +1899,9 @@ func (*ChangeRequest) Descriptor() ([]byte, []int) { return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{23} } -func (x *ChangeRequest) GetDid() string { +func (x *ChangeRequest) GetMneid() string { if x != nil { - return x.Did + return x.Mneid } return "" } @@ -1934,7 +1934,7 @@ type SetMne struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Sbi *southbound.SouthboundInterface `protobuf:"bytes,2,opt,name=sbi,proto3" json:"sbi,omitempty"` - DeviceName string `protobuf:"bytes,3,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"` + MneName string `protobuf:"bytes,3,opt,name=mne_name,json=mneName,proto3" json:"mne_name,omitempty"` TransportOption *transport.TransportOption `protobuf:"bytes,4,opt,name=transport_option,json=transportOption,proto3" json:"transport_option,omitempty"` } @@ -1984,9 +1984,9 @@ func (x *SetMne) GetSbi() *southbound.SouthboundInterface { return nil } -func (x *SetMne) GetDeviceName() string { +func (x *SetMne) GetMneName() string { if x != nil { - return x.DeviceName + return x.MneName } return "" } @@ -2477,7 +2477,7 @@ type DeleteMneRequest struct { Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` - Did string `protobuf:"bytes,3,opt,name=did,proto3" json:"did,omitempty"` + Mneid string `protobuf:"bytes,3,opt,name=mneid,proto3" json:"mneid,omitempty"` } func (x *DeleteMneRequest) Reset() { @@ -2526,9 +2526,9 @@ func (x *DeleteMneRequest) GetPid() string { return "" } -func (x *DeleteMneRequest) GetDid() string { +func (x *DeleteMneRequest) GetMneid() string { if x != nil { - return x.Did + return x.Mneid } return "" } @@ -2594,7 +2594,7 @@ type SubscribePathRequest struct { unknownFields protoimpl.UnknownFields Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"` + Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` Sublist *SubscriptionList `protobuf:"bytes,4,opt,name=sublist,proto3" json:"sublist,omitempty"` } @@ -2638,9 +2638,9 @@ func (x *SubscribePathRequest) GetTimestamp() int64 { return 0 } -func (x *SubscribePathRequest) GetDid() string { +func (x *SubscribePathRequest) GetMneid() string { if x != nil { - return x.Did + return x.Mneid } return "" } @@ -2784,9 +2784,9 @@ type SubscribePathResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=gosdn.pnd.Status" json:"status,omitempty"` - Device []*gnmi.Notification `protobuf:"bytes,3,rep,name=device,proto3" json:"device,omitempty"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=gosdn.pnd.Status" json:"status,omitempty"` + MneNotification []*gnmi.Notification `protobuf:"bytes,3,rep,name=mne_notification,json=mneNotification,proto3" json:"mne_notification,omitempty"` } func (x *SubscribePathResponse) Reset() { @@ -2835,9 +2835,9 @@ func (x *SubscribePathResponse) GetStatus() Status { return Status_STATUS_UNSPECIFIED } -func (x *SubscribePathResponse) GetDevice() []*gnmi.Notification { +func (x *SubscribePathResponse) GetMneNotification() []*gnmi.Notification { if x != nil { - return x.Device + return x.MneNotification } return nil } @@ -2865,223 +2865,214 @@ var file_gosdn_pnd_pnd_proto_rawDesc = []byte{ 0x4c, 0x69, 0x73, 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, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x51, 0x0a, 0x0d, 0x47, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x55, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4d, 0x6e, 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, 0x10, 0x0a, 0x03, 0x64, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, - 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x43, - 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x62, 0x69, 0x4c, 0x69, 0x73, 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, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x70, 0x69, 0x64, 0x22, 0x51, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x53, 0x62, 0x69, 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, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x73, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x46, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 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, 0x12, 0x10, 0x0a, 0x03, - 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x56, - 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6e, + 0x65, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6e, 0x65, 0x69, 0x64, + 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, + 0x69, 0x64, 0x22, 0x43, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x62, 0x69, 0x4c, 0x69, 0x73, 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, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x51, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x53, 0x62, + 0x69, 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, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x46, 0x0a, 0x14, 0x47, 0x65, + 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 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, - 0x12, 0x12, 0x0a, 0x04, 0x63, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, - 0x63, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x66, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, - 0x68, 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, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x10, 0x0a, 0x03, - 0x70, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x9e, - 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4d, 0x6e, 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, - 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, 0x6d, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 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, 0x6d, 0x6e, 0x65, 0x22, - 0xa2, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4d, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, + 0x69, 0x64, 0x22, 0x56, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 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, 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, 0x6d, 0x6e, 0x65, - 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, 0x6d, 0x6e, 0x65, 0x22, 0xb4, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x74, - 0x74, 0x65, 0x6e, 0x65, 0x64, 0x4d, 0x6e, 0x65, 0x4c, 0x69, 0x73, 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, 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, 0x42, 0x0a, 0x03, 0x6d, 0x6e, 0x65, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, - 0x2e, 0x46, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x65, 0x64, 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, 0x6d, 0x6e, 0x65, 0x22, 0x9c, 0x01, 0x0a, 0x0e, - 0x47, 0x65, 0x74, 0x53, 0x62, 0x69, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, + 0x74, 0x61, 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x04, 0x63, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x6a, 0x0a, 0x0e, 0x47, 0x65, + 0x74, 0x50, 0x61, 0x74, 0x68, 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, 0x14, 0x0a, 0x05, 0x6d, 0x6e, + 0x65, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6e, 0x65, 0x69, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x70, 0x61, 0x74, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x97, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4d, 0x6e, + 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, 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, 0x32, 0x0a, 0x03, + 0x6d, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x73, 0x64, + 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x03, 0x6d, 0x6e, 0x65, + 0x22, 0x9b, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4d, 0x6e, 0x65, 0x4c, 0x69, 0x73, 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, 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, 0x32, 0x0a, 0x03, 0x6d, 0x6e, + 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, + 0x70, 0x6e, 0x64, 0x2e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x03, 0x6d, 0x6e, 0x65, 0x22, 0xad, + 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x65, 0x64, 0x4d, + 0x6e, 0x65, 0x4c, 0x69, 0x73, 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, 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, 0x37, 0x0a, 0x03, 0x73, 0x62, 0x69, 0x18, 0x03, 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, 0x22, 0xa0, 0x01, 0x0a, 0x12, 0x47, - 0x65, 0x74, 0x53, 0x62, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x64, 0x12, 0x3b, 0x0a, 0x03, 0x6d, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, + 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x46, 0x6c, 0x61, 0x74, 0x74, + 0x65, 0x6e, 0x65, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x03, 0x6d, 0x6e, 0x65, 0x22, 0x9c, + 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, 0x62, 0x69, 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, 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, 0x37, 0x0a, 0x03, 0x73, 0x62, 0x69, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x03, 0x70, 0x6e, 0x64, 0x12, 0x37, 0x0a, 0x03, 0x73, 0x62, 0x69, 0x18, 0x03, 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, 0x22, 0x90, 0x01, - 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 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, - 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, 0x2a, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x4e, 0x6f, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x22, 0x91, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 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, 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, 0x29, 0x0a, 0x06, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x73, 0x64, - 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x06, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x4c, 0x69, 0x73, 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, 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, 0x29, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x5e, 0x0a, 0x16, - 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 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, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa7, 0x01, 0x0a, - 0x1c, 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, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x52, 0x03, 0x73, 0x62, 0x69, 0x22, 0xa0, 0x01, + 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, 0x62, 0x69, 0x4c, 0x69, 0x73, 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, 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, 0x37, 0x0a, 0x03, 0x73, 0x62, 0x69, 0x18, 0x03, + 0x20, 0x03, 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, + 0x22, 0xa3, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 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, 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, 0x3d, 0x0a, 0x10, 0x6d, 0x6e, 0x65, 0x5f, 0x6e, + 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x37, 0x0a, - 0x03, 0x73, 0x62, 0x69, 0x18, 0x04, 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, 0x22, 0x5d, 0x0a, 0x25, 0x46, 0x6c, 0x61, 0x74, 0x74, 0x65, - 0x6e, 0x65, 0x64, 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, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x62, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x73, 0x62, 0x69, 0x22, 0x80, 0x01, 0x0a, 0x06, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x61, - 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x26, 0x0a, 0x04, 0x64, 0x69, 0x66, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x69, 0x66, 0x66, 0x22, 0x68, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x4d, - 0x6e, 0x65, 0x4c, 0x69, 0x73, 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, 0x12, 0x23, 0x0a, 0x03, 0x6d, - 0x6e, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, - 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x6e, 0x65, 0x52, 0x03, 0x6d, 0x6e, 0x65, - 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, - 0x69, 0x64, 0x22, 0x68, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x53, 0x62, 0x69, 0x4c, 0x69, 0x73, 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, 0x12, 0x23, 0x0a, 0x03, 0x73, 0x62, 0x69, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, - 0x65, 0x74, 0x53, 0x62, 0x69, 0x52, 0x03, 0x73, 0x62, 0x69, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x74, 0x0a, 0x14, - 0x53, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x6d, 0x6e, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x91, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x68, + 0x61, 0x6e, 0x67, 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, 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, + 0x29, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x11, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x15, 0x47, + 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 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, 0x2c, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, - 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, - 0x69, 0x64, 0x22, 0x85, 0x01, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x4c, 0x69, - 0x73, 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, 0x12, 0x3f, 0x0a, 0x0e, 0x63, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x18, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x43, 0x68, 0x61, 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, 0x70, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x7b, 0x0a, 0x0d, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 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, 0x2e, 0x0a, 0x06, 0x61, 0x70, 0x69, 0x5f, 0x6f, - 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, 0x22, 0xc9, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x74, 0x4d, - 0x6e, 0x65, 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, 0x37, 0x0a, 0x06, 0x53, 0x65, 0x74, 0x53, 0x62, 0x69, 0x12, 0x2d, 0x0a, - 0x08, 0x73, 0x62, 0x69, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x12, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x62, 0x69, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x07, 0x73, 0x62, 0x69, 0x54, 0x79, 0x70, 0x65, 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, 0x66, 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, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x29, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x93, 0x01, 0x0a, 0x12, - 0x53, 0x65, 0x74, 0x4d, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x6d, 0x70, 0x12, 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, 0x29, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, + 0x70, 0x6e, 0x64, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x22, 0x5e, 0x0a, 0x16, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 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, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0xb3, 0x01, 0x0a, 0x15, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x4e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x3d, 0x0a, 0x10, 0x6d, 0x6e, 0x65, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6e, 0x6d, + 0x69, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, + 0x6d, 0x6e, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x37, 0x0a, 0x03, 0x73, 0x62, 0x69, 0x18, 0x04, 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, 0x22, 0x56, 0x0a, 0x1e, 0x46, 0x6c, 0x61, 0x74, + 0x74, 0x65, 0x6e, 0x65, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, + 0x0a, 0x03, 0x73, 0x62, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x62, 0x69, + 0x22, 0x80, 0x01, 0x0a, 0x06, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x61, + 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x2c, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x67, + 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x64, + 0x69, 0x66, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6e, 0x6d, 0x69, + 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, + 0x69, 0x66, 0x66, 0x22, 0x68, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x4d, 0x6e, 0x65, 0x4c, 0x69, 0x73, + 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, 0x12, 0x23, 0x0a, 0x03, 0x6d, 0x6e, 0x65, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, + 0x53, 0x65, 0x74, 0x4d, 0x6e, 0x65, 0x52, 0x03, 0x6d, 0x6e, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x70, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x68, 0x0a, + 0x11, 0x53, 0x65, 0x74, 0x53, 0x62, 0x69, 0x4c, 0x69, 0x73, 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, - 0x12, 0x29, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 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, 0x96, 0x01, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, + 0x12, 0x23, 0x0a, 0x03, 0x73, 0x62, 0x69, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x62, 0x69, + 0x52, 0x03, 0x73, 0x62, 0x69, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x74, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 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, 0x12, 0x2c, 0x0a, + 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x70, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x85, 0x01, + 0x0a, 0x12, 0x53, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x4c, 0x69, 0x73, 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, 0x12, 0x3f, 0x0a, 0x0e, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x73, + 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x43, 0x68, 0x61, 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, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x7f, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6e, 0x65, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6e, 0x65, 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, 0x2e, 0x0a, 0x06, 0x61, 0x70, 0x69, 0x5f, 0x6f, 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, 0x22, 0xc3, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x74, 0x4d, 0x6e, + 0x65, 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, 0x19, 0x0a, 0x08, 0x6d, 0x6e, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x6e, 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, 0x37, 0x0a, 0x06, + 0x53, 0x65, 0x74, 0x53, 0x62, 0x69, 0x12, 0x2d, 0x0a, 0x08, 0x73, 0x62, 0x69, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, + 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x62, 0x69, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x73, 0x62, + 0x69, 0x54, 0x79, 0x70, 0x65, 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, 0x66, 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, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x73, 0x64, + 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x22, 0x93, 0x01, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4d, 0x6e, 0x65, 0x4c, 0x69, 0x73, 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, @@ -3090,14 +3081,33 @@ var file_gosdn_pnd_pnd_proto_rawDesc = []byte{ 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, 0x5c, 0x0a, 0x11, 0x53, 0x65, - 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 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, 0x29, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, - 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x93, 0x01, 0x0a, 0x12, 0x53, 0x65, 0x74, - 0x53, 0x62, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x96, 0x01, 0x0a, 0x15, 0x53, + 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 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, + 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 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, 0x5c, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 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, 0x29, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, + 0x6e, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x22, 0x93, 0x01, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x53, 0x62, 0x69, 0x4c, 0x69, 0x73, 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, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, + 0x6e, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 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, 0x94, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x50, + 0x61, 0x74, 0x68, 0x4c, 0x69, 0x73, 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, 0x28, 0x0e, 0x32, 0x11, 0x2e, @@ -3105,226 +3115,218 @@ var file_gosdn_pnd_pnd_proto_rawDesc = []byte{ 0x52, 0x06, 0x73, 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, 0x94, - 0x01, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x4c, 0x69, 0x73, 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, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 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, 0x54, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, - 0x6e, 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, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x22, 0x5c, 0x0a, 0x11, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x6e, 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, 0x29, - 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, - 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x8f, 0x01, 0x0a, 0x14, 0x53, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x6e, 0x73, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x58, + 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x6e, 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, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, - 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x70, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, - 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x80, 0x01, 0x0a, 0x10, - 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, - 0x12, 0x3b, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, - 0x6e, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0c, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, - 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x67, 0x6f, - 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x83, - 0x01, 0x0a, 0x0c, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x12, 0x36, 0x0a, 0x0b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x6d, 0x6f, - 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, - 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x52, - 0x0a, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x73, - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x22, 0x8c, 0x01, 0x0a, 0x15, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x62, 0x65, 0x50, 0x61, 0x74, 0x68, 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, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x67, - 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x4e, - 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x64, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x2a, 0x9c, 0x01, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x45, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x43, - 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, - 0x49, 0x54, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 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, 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, 0x6d, 0x0a, 0x07, 0x53, 0x62, 0x69, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x53, - 0x42, 0x49, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x42, 0x49, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x10, 0x01, 0x12, 0x1a, - 0x0a, 0x16, 0x53, 0x42, 0x49, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, - 0x49, 0x4e, 0x45, 0x52, 0x49, 0x53, 0x45, 0x44, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x42, - 0x49, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 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, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x2a, 0x8b, 0x01, - 0x0a, 0x10, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, - 0x64, 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, - 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4f, 0x4e, 0x43, 0x45, 0x10, - 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x10, 0x02, 0x12, - 0x1a, 0x0a, 0x16, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x4c, 0x10, 0x03, 0x2a, 0x7c, 0x0a, 0x0a, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x54, 0x52, - 0x45, 0x41, 0x4d, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, - 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x44, 0x45, 0x46, - 0x49, 0x4e, 0x45, 0x44, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, - 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4f, 0x4e, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x10, - 0x02, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x4d, 0x4f, 0x44, 0x45, - 0x5f, 0x53, 0x41, 0x4d, 0x50, 0x4c, 0x45, 0x10, 0x03, 0x32, 0xb1, 0x0b, 0x0a, 0x0a, 0x50, 0x6e, - 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x4d, - 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, - 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, - 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x74, 0x74, 0x65, - 0x6e, 0x65, 0x64, 0x4d, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x73, + 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, + 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6e, 0x65, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x6d, 0x6e, 0x65, 0x69, 0x64, 0x22, 0x5c, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x4d, 0x6e, 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, 0x29, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x93, 0x01, 0x0a, 0x14, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x50, 0x61, 0x74, 0x68, 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, 0x14, 0x0a, + 0x05, 0x6d, 0x6e, 0x65, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6e, + 0x65, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x70, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, + 0x6e, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x80, 0x01, 0x0a, + 0x10, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, + 0x74, 0x12, 0x3b, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, + 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0c, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, + 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x67, + 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x22, + 0x83, 0x01, 0x0a, 0x0c, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x70, 0x61, 0x74, 0x68, 0x12, 0x36, 0x0a, 0x0b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x6d, + 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x73, 0x64, + 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x6f, 0x64, 0x65, + 0x52, 0x0a, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x0a, 0x0f, + 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x9f, 0x01, 0x0a, 0x15, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, + 0x69, 0x62, 0x65, 0x50, 0x61, 0x74, 0x68, 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, 0x28, 0x0e, 0x32, 0x11, 0x2e, + 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3d, 0x0a, 0x10, 0x6d, 0x6e, 0x65, 0x5f, + 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x6d, 0x6e, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x9c, 0x01, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x48, 0x41, 0x4e, 0x47, + 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, + 0x1a, 0x0a, 0x16, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 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, 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, 0x6d, 0x0a, 0x07, 0x53, 0x62, 0x69, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x18, 0x0a, 0x14, 0x53, 0x42, 0x49, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x42, 0x49, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, + 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x42, 0x49, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, + 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x49, 0x53, 0x45, 0x44, 0x10, 0x02, 0x12, 0x13, + 0x0a, 0x0f, 0x53, 0x42, 0x49, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, + 0x4e, 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, 0x52, 0x52, 0x4f, 0x52, 0x10, + 0x02, 0x2a, 0x8b, 0x01, 0x0a, 0x10, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, + 0x49, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x55, 0x42, + 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4f, + 0x4e, 0x43, 0x45, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, + 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x45, 0x41, + 0x4d, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x4c, 0x10, 0x03, 0x2a, + 0x7c, 0x0a, 0x0a, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, + 0x17, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x53, 0x54, + 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, + 0x5f, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x54, + 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4f, 0x4e, 0x5f, 0x43, 0x48, 0x41, + 0x4e, 0x47, 0x45, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, + 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x41, 0x4d, 0x50, 0x4c, 0x45, 0x10, 0x03, 0x32, 0xb7, 0x0b, + 0x0a, 0x0a, 0x50, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x0a, + 0x47, 0x65, 0x74, 0x4d, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x6e, 0x65, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, - 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x65, - 0x64, 0x4d, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x70, 0x6e, 0x64, 0x73, 0x2f, - 0x7b, 0x70, 0x69, 0x64, 0x7d, 0x2f, 0x6d, 0x6e, 0x65, 0x73, 0x12, 0x5c, 0x0a, 0x06, 0x47, 0x65, - 0x74, 0x4d, 0x6e, 0x65, 0x12, 0x18, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, - 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, + 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x46, 0x6c, + 0x61, 0x74, 0x74, 0x65, 0x6e, 0x65, 0x64, 0x4d, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x6e, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x17, 0x12, 0x15, 0x2f, 0x70, 0x6e, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x64, 0x7d, 0x2f, 0x6d, - 0x6e, 0x65, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x12, 0x66, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x4d, - 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, - 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, - 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, - 0x2f, 0x70, 0x6e, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x64, 0x7d, 0x2f, 0x6d, 0x6e, 0x65, 0x73, - 0x12, 0x63, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x62, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, - 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x62, - 0x69, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, - 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x62, 0x69, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x70, 0x6e, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x64, 0x7d, - 0x2f, 0x73, 0x62, 0x69, 0x73, 0x12, 0x5d, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x53, 0x62, 0x69, 0x12, - 0x18, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x53, - 0x62, 0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x73, 0x64, - 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x62, 0x69, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x70, - 0x6e, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x62, 0x69, 0x73, 0x2f, 0x7b, - 0x73, 0x69, 0x64, 0x7d, 0x12, 0x66, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x53, 0x62, 0x69, 0x4c, 0x69, - 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, - 0x65, 0x74, 0x53, 0x62, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, - 0x53, 0x62, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x70, 0x6e, 0x64, - 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x62, 0x69, 0x73, 0x12, 0x6f, 0x0a, 0x0d, - 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1f, 0x2e, + 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, + 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x74, + 0x74, 0x65, 0x6e, 0x65, 0x64, 0x4d, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x70, + 0x6e, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x64, 0x7d, 0x2f, 0x6d, 0x6e, 0x65, 0x73, 0x12, 0x5e, + 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4d, 0x6e, 0x65, 0x12, 0x18, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, + 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, + 0x65, 0x74, 0x4d, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x70, 0x6e, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x69, + 0x64, 0x7d, 0x2f, 0x6d, 0x6e, 0x65, 0x2f, 0x7b, 0x6d, 0x6e, 0x65, 0x69, 0x64, 0x7d, 0x12, 0x66, + 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x4d, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x67, + 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x6e, 0x65, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x73, + 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x6e, 0x65, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x70, 0x6e, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x64, + 0x7d, 0x2f, 0x6d, 0x6e, 0x65, 0x73, 0x12, 0x63, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x62, 0x69, + 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x62, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, + 0x65, 0x74, 0x53, 0x62, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x70, 0x6e, 0x64, 0x73, + 0x2f, 0x7b, 0x70, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x62, 0x69, 0x73, 0x12, 0x5d, 0x0a, 0x06, 0x47, + 0x65, 0x74, 0x53, 0x62, 0x69, 0x12, 0x18, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, + 0x64, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x62, 0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x19, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x53, + 0x62, 0x69, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x18, 0x12, 0x16, 0x2f, 0x70, 0x6e, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x64, 0x7d, 0x2f, + 0x73, 0x62, 0x69, 0x73, 0x2f, 0x7b, 0x73, 0x69, 0x64, 0x7d, 0x12, 0x66, 0x0a, 0x0a, 0x53, 0x65, + 0x74, 0x53, 0x62, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, + 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x62, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, + 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x62, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, + 0x22, 0x10, 0x2f, 0x70, 0x6e, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x62, + 0x69, 0x73, 0x12, 0x6f, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, + 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, + 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, + 0x2f, 0x70, 0x6e, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x12, 0x6a, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x12, 0x1b, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, - 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x70, 0x6e, 0x64, 0x73, 0x2f, - 0x7b, 0x70, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x6a, 0x0a, - 0x09, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1b, 0x2e, 0x67, 0x6f, 0x73, - 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, - 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, - 0x70, 0x6e, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x73, 0x2f, 0x7b, 0x63, 0x75, 0x69, 0x64, 0x7d, 0x12, 0x72, 0x0a, 0x0d, 0x53, 0x65, 0x74, - 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x73, - 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x6f, - 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x70, 0x6e, 0x64, 0x73, 0x2f, - 0x7b, 0x70, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x6d, 0x0a, - 0x07, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x19, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, - 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, - 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x70, 0x6e, 0x64, 0x73, 0x2f, 0x7b, - 0x70, 0x69, 0x64, 0x7d, 0x2f, 0x6d, 0x6e, 0x65, 0x73, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x2f, - 0x70, 0x61, 0x74, 0x68, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x7d, 0x12, 0x6f, 0x0a, 0x0b, - 0x53, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1d, 0x2e, 0x67, 0x6f, - 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x6f, 0x73, - 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x70, 0x6e, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x69, - 0x64, 0x7d, 0x2f, 0x6d, 0x6e, 0x65, 0x73, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x73, 0x12, 0x66, 0x0a, - 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x6e, 0x65, 0x12, 0x1b, 0x2e, 0x67, 0x6f, 0x73, - 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x6e, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, - 0x70, 0x6e, 0x64, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x6e, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, + 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x70, 0x6e, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x64, 0x7d, + 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x2f, 0x7b, 0x63, 0x75, 0x69, 0x64, 0x7d, 0x12, + 0x72, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, + 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, + 0x2f, 0x70, 0x6e, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x12, 0x6f, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x19, + 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, + 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x6f, 0x73, 0x64, + 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, + 0x70, 0x6e, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x64, 0x7d, 0x2f, 0x6d, 0x6e, 0x65, 0x73, 0x2f, + 0x7b, 0x6d, 0x6e, 0x65, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x73, 0x2f, 0x7b, 0x70, + 0x61, 0x74, 0x68, 0x7d, 0x12, 0x6f, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, + 0x53, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, + 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x70, 0x6e, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x64, 0x7d, 0x2f, 0x6d, 0x6e, 0x65, 0x73, 0x2f, - 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x12, 0x56, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x62, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, - 0x6e, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x50, 0x61, 0x74, 0x68, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, - 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x50, 0x61, 0x74, - 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0xae, 0x02, - 0x5a, 0x2d, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, - 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6e, 0x64, 0x92, - 0x41, 0xfb, 0x01, 0x12, 0xf8, 0x01, 0x0a, 0x10, 0x67, 0x6f, 0x53, 0x44, 0x4e, 0x20, 0x4e, 0x6f, - 0x72, 0x74, 0x68, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x4d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x20, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x47, 0x6f, 0x20, - 0x63, 0x6f, 0x64, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x6f, 0x53, - 0x44, 0x4e, 0x20, 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x22, 0x3e, 0x0a, 0x18, 0x67, 0x6f, 0x53, 0x44, 0x4e, - 0x20, 0x4e, 0x6f, 0x72, 0x74, 0x68, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x12, 0x22, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x63, 0x6f, 0x64, - 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, - 0x6e, 0x65, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2a, 0x50, 0x0a, 0x14, 0x42, 0x53, 0x44, 0x20, 0x33, - 0x2d, 0x43, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, - 0x38, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, - 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x2d, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, - 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x03, 0x30, 0x2e, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x61, 0x74, 0x68, 0x73, 0x12, 0x68, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, + 0x6e, 0x65, 0x12, 0x1b, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1c, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x4d, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x2a, 0x18, 0x2f, 0x70, 0x6e, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x69, + 0x64, 0x7d, 0x2f, 0x6d, 0x6e, 0x65, 0x73, 0x2f, 0x7b, 0x6d, 0x6e, 0x65, 0x69, 0x64, 0x7d, 0x12, + 0x56, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x50, 0x61, 0x74, 0x68, + 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0xae, 0x02, 0x5a, 0x2d, 0x63, 0x6f, 0x64, 0x65, + 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, + 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, + 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6e, 0x64, 0x92, 0x41, 0xfb, 0x01, 0x12, 0xf8, 0x01, + 0x0a, 0x10, 0x67, 0x6f, 0x53, 0x44, 0x4e, 0x20, 0x4e, 0x6f, 0x72, 0x74, 0x68, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x12, 0x4d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x42, 0x75, 0x66, + 0x66, 0x65, 0x72, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x47, 0x6f, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x66, + 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x6f, 0x53, 0x44, 0x4e, 0x20, 0x6e, 0x6f, 0x72, + 0x74, 0x68, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, + 0x65, 0x22, 0x3e, 0x0a, 0x18, 0x67, 0x6f, 0x53, 0x44, 0x4e, 0x20, 0x4e, 0x6f, 0x72, 0x74, 0x68, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x22, 0x68, + 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, + 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x61, 0x70, + 0x69, 0x2a, 0x50, 0x0a, 0x14, 0x42, 0x53, 0x44, 0x20, 0x33, 0x2d, 0x43, 0x6c, 0x61, 0x75, 0x73, + 0x65, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x68, 0x74, 0x74, 0x70, 0x73, + 0x3a, 0x2f, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, + 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x2d, 0x2f, + 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, + 0x4e, 0x53, 0x45, 0x32, 0x03, 0x30, 0x2e, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3342,75 +3344,75 @@ func file_gosdn_pnd_pnd_proto_rawDescGZIP() []byte { var file_gosdn_pnd_pnd_proto_enumTypes = make([]protoimpl.EnumInfo, 7) var file_gosdn_pnd_pnd_proto_msgTypes = make([]protoimpl.MessageInfo, 39) var file_gosdn_pnd_pnd_proto_goTypes = []interface{}{ - (ChangeState)(0), // 0: gosdn.pnd.ChangeState - (ApiOperation)(0), // 1: gosdn.pnd.ApiOperation - (SbiType)(0), // 2: gosdn.pnd.SbiType - (Operation)(0), // 3: gosdn.pnd.Operation - (Status)(0), // 4: gosdn.pnd.Status - (SubscriptionMode)(0), // 5: gosdn.pnd.SubscriptionMode - (StreamMode)(0), // 6: gosdn.pnd.StreamMode - (*GetMneListRequest)(nil), // 7: gosdn.pnd.GetMneListRequest - (*GetMneRequest)(nil), // 8: gosdn.pnd.GetMneRequest - (*GetSbiListRequest)(nil), // 9: gosdn.pnd.GetSbiListRequest - (*GetSbiRequest)(nil), // 10: gosdn.pnd.GetSbiRequest - (*GetChangeListRequest)(nil), // 11: gosdn.pnd.GetChangeListRequest - (*GetChangeRequest)(nil), // 12: gosdn.pnd.GetChangeRequest - (*GetPathRequest)(nil), // 13: gosdn.pnd.GetPathRequest - (*GetMneResponse)(nil), // 14: gosdn.pnd.GetMneResponse - (*GetMneListResponse)(nil), // 15: gosdn.pnd.GetMneListResponse - (*GetFlattenedMneListResponse)(nil), // 16: gosdn.pnd.GetFlattenedMneListResponse - (*GetSbiResponse)(nil), // 17: gosdn.pnd.GetSbiResponse - (*GetSbiListResponse)(nil), // 18: gosdn.pnd.GetSbiListResponse - (*GetPathResponse)(nil), // 19: gosdn.pnd.GetPathResponse - (*GetChangeResponse)(nil), // 20: gosdn.pnd.GetChangeResponse - (*GetChangeListResponse)(nil), // 21: gosdn.pnd.GetChangeListResponse - (*PrincipalNetworkDomain)(nil), // 22: gosdn.pnd.PrincipalNetworkDomain - (*OrchestratedNetworkingDevice)(nil), // 23: gosdn.pnd.OrchestratedNetworkingDevice - (*FlattenedOrchestratedNetworkingDevice)(nil), // 24: gosdn.pnd.FlattenedOrchestratedNetworkingDevice - (*Change)(nil), // 25: gosdn.pnd.Change - (*SetMneListRequest)(nil), // 26: gosdn.pnd.SetMneListRequest - (*SetSbiListRequest)(nil), // 27: gosdn.pnd.SetSbiListRequest - (*SetChangeListRequest)(nil), // 28: gosdn.pnd.SetChangeListRequest - (*SetPathListRequest)(nil), // 29: gosdn.pnd.SetPathListRequest - (*ChangeRequest)(nil), // 30: gosdn.pnd.ChangeRequest - (*SetMne)(nil), // 31: gosdn.pnd.SetMne - (*SetSbi)(nil), // 32: gosdn.pnd.SetSbi - (*SetChange)(nil), // 33: gosdn.pnd.SetChange - (*SetResponse)(nil), // 34: gosdn.pnd.SetResponse - (*SetMneListResponse)(nil), // 35: gosdn.pnd.SetMneListResponse - (*SetChangeListResponse)(nil), // 36: gosdn.pnd.SetChangeListResponse - (*SetChangeResponse)(nil), // 37: gosdn.pnd.SetChangeResponse - (*SetSbiListResponse)(nil), // 38: gosdn.pnd.SetSbiListResponse - (*SetPathListResponse)(nil), // 39: gosdn.pnd.SetPathListResponse - (*DeleteMneRequest)(nil), // 40: gosdn.pnd.DeleteMneRequest - (*DeleteMneResponse)(nil), // 41: gosdn.pnd.DeleteMneResponse - (*SubscribePathRequest)(nil), // 42: gosdn.pnd.SubscribePathRequest - (*SubscriptionList)(nil), // 43: gosdn.pnd.SubscriptionList - (*Subscription)(nil), // 44: gosdn.pnd.Subscription - (*SubscribePathResponse)(nil), // 45: gosdn.pnd.SubscribePathResponse - (*southbound.SouthboundInterface)(nil), // 46: gosdn.southbound.SouthboundInterface - (*gnmi.Notification)(nil), // 47: gnmi.Notification - (*transport.TransportOption)(nil), // 48: gosdn.transport.TransportOption + (ChangeState)(0), // 0: gosdn.pnd.ChangeState + (ApiOperation)(0), // 1: gosdn.pnd.ApiOperation + (SbiType)(0), // 2: gosdn.pnd.SbiType + (Operation)(0), // 3: gosdn.pnd.Operation + (Status)(0), // 4: gosdn.pnd.Status + (SubscriptionMode)(0), // 5: gosdn.pnd.SubscriptionMode + (StreamMode)(0), // 6: gosdn.pnd.StreamMode + (*GetMneListRequest)(nil), // 7: gosdn.pnd.GetMneListRequest + (*GetMneRequest)(nil), // 8: gosdn.pnd.GetMneRequest + (*GetSbiListRequest)(nil), // 9: gosdn.pnd.GetSbiListRequest + (*GetSbiRequest)(nil), // 10: gosdn.pnd.GetSbiRequest + (*GetChangeListRequest)(nil), // 11: gosdn.pnd.GetChangeListRequest + (*GetChangeRequest)(nil), // 12: gosdn.pnd.GetChangeRequest + (*GetPathRequest)(nil), // 13: gosdn.pnd.GetPathRequest + (*GetMneResponse)(nil), // 14: gosdn.pnd.GetMneResponse + (*GetMneListResponse)(nil), // 15: gosdn.pnd.GetMneListResponse + (*GetFlattenedMneListResponse)(nil), // 16: gosdn.pnd.GetFlattenedMneListResponse + (*GetSbiResponse)(nil), // 17: gosdn.pnd.GetSbiResponse + (*GetSbiListResponse)(nil), // 18: gosdn.pnd.GetSbiListResponse + (*GetPathResponse)(nil), // 19: gosdn.pnd.GetPathResponse + (*GetChangeResponse)(nil), // 20: gosdn.pnd.GetChangeResponse + (*GetChangeListResponse)(nil), // 21: gosdn.pnd.GetChangeListResponse + (*PrincipalNetworkDomain)(nil), // 22: gosdn.pnd.PrincipalNetworkDomain + (*ManagedNetworkElement)(nil), // 23: gosdn.pnd.ManagedNetworkElement + (*FlattenedManagedNetworkElement)(nil), // 24: gosdn.pnd.FlattenedManagedNetworkElement + (*Change)(nil), // 25: gosdn.pnd.Change + (*SetMneListRequest)(nil), // 26: gosdn.pnd.SetMneListRequest + (*SetSbiListRequest)(nil), // 27: gosdn.pnd.SetSbiListRequest + (*SetChangeListRequest)(nil), // 28: gosdn.pnd.SetChangeListRequest + (*SetPathListRequest)(nil), // 29: gosdn.pnd.SetPathListRequest + (*ChangeRequest)(nil), // 30: gosdn.pnd.ChangeRequest + (*SetMne)(nil), // 31: gosdn.pnd.SetMne + (*SetSbi)(nil), // 32: gosdn.pnd.SetSbi + (*SetChange)(nil), // 33: gosdn.pnd.SetChange + (*SetResponse)(nil), // 34: gosdn.pnd.SetResponse + (*SetMneListResponse)(nil), // 35: gosdn.pnd.SetMneListResponse + (*SetChangeListResponse)(nil), // 36: gosdn.pnd.SetChangeListResponse + (*SetChangeResponse)(nil), // 37: gosdn.pnd.SetChangeResponse + (*SetSbiListResponse)(nil), // 38: gosdn.pnd.SetSbiListResponse + (*SetPathListResponse)(nil), // 39: gosdn.pnd.SetPathListResponse + (*DeleteMneRequest)(nil), // 40: gosdn.pnd.DeleteMneRequest + (*DeleteMneResponse)(nil), // 41: gosdn.pnd.DeleteMneResponse + (*SubscribePathRequest)(nil), // 42: gosdn.pnd.SubscribePathRequest + (*SubscriptionList)(nil), // 43: gosdn.pnd.SubscriptionList + (*Subscription)(nil), // 44: gosdn.pnd.Subscription + (*SubscribePathResponse)(nil), // 45: gosdn.pnd.SubscribePathResponse + (*southbound.SouthboundInterface)(nil), // 46: gosdn.southbound.SouthboundInterface + (*gnmi.Notification)(nil), // 47: gnmi.Notification + (*transport.TransportOption)(nil), // 48: gosdn.transport.TransportOption } var file_gosdn_pnd_pnd_proto_depIdxs = []int32{ 22, // 0: gosdn.pnd.GetMneResponse.pnd:type_name -> gosdn.pnd.PrincipalNetworkDomain - 23, // 1: gosdn.pnd.GetMneResponse.mne:type_name -> gosdn.pnd.OrchestratedNetworkingDevice + 23, // 1: gosdn.pnd.GetMneResponse.mne:type_name -> gosdn.pnd.ManagedNetworkElement 22, // 2: gosdn.pnd.GetMneListResponse.pnd:type_name -> gosdn.pnd.PrincipalNetworkDomain - 23, // 3: gosdn.pnd.GetMneListResponse.mne:type_name -> gosdn.pnd.OrchestratedNetworkingDevice + 23, // 3: gosdn.pnd.GetMneListResponse.mne:type_name -> gosdn.pnd.ManagedNetworkElement 22, // 4: gosdn.pnd.GetFlattenedMneListResponse.pnd:type_name -> gosdn.pnd.PrincipalNetworkDomain - 24, // 5: gosdn.pnd.GetFlattenedMneListResponse.mne:type_name -> gosdn.pnd.FlattenedOrchestratedNetworkingDevice + 24, // 5: gosdn.pnd.GetFlattenedMneListResponse.mne:type_name -> gosdn.pnd.FlattenedManagedNetworkElement 22, // 6: gosdn.pnd.GetSbiResponse.pnd:type_name -> gosdn.pnd.PrincipalNetworkDomain 46, // 7: gosdn.pnd.GetSbiResponse.sbi:type_name -> gosdn.southbound.SouthboundInterface 22, // 8: gosdn.pnd.GetSbiListResponse.pnd:type_name -> gosdn.pnd.PrincipalNetworkDomain 46, // 9: gosdn.pnd.GetSbiListResponse.sbi:type_name -> gosdn.southbound.SouthboundInterface 22, // 10: gosdn.pnd.GetPathResponse.pnd:type_name -> gosdn.pnd.PrincipalNetworkDomain - 47, // 11: gosdn.pnd.GetPathResponse.device:type_name -> gnmi.Notification + 47, // 11: gosdn.pnd.GetPathResponse.mne_notification:type_name -> gnmi.Notification 22, // 12: gosdn.pnd.GetChangeResponse.pnd:type_name -> gosdn.pnd.PrincipalNetworkDomain 25, // 13: gosdn.pnd.GetChangeResponse.change:type_name -> gosdn.pnd.Change 22, // 14: gosdn.pnd.GetChangeListResponse.pnd:type_name -> gosdn.pnd.PrincipalNetworkDomain 25, // 15: gosdn.pnd.GetChangeListResponse.change:type_name -> gosdn.pnd.Change - 47, // 16: gosdn.pnd.OrchestratedNetworkingDevice.device:type_name -> gnmi.Notification - 46, // 17: gosdn.pnd.OrchestratedNetworkingDevice.sbi:type_name -> gosdn.southbound.SouthboundInterface + 47, // 16: gosdn.pnd.ManagedNetworkElement.mne_notification:type_name -> gnmi.Notification + 46, // 17: gosdn.pnd.ManagedNetworkElement.sbi:type_name -> gosdn.southbound.SouthboundInterface 0, // 18: gosdn.pnd.Change.state:type_name -> gosdn.pnd.ChangeState 47, // 19: gosdn.pnd.Change.diff:type_name -> gnmi.Notification 31, // 20: gosdn.pnd.SetMneListRequest.mne:type_name -> gosdn.pnd.SetMne @@ -3438,7 +3440,7 @@ var file_gosdn_pnd_pnd_proto_depIdxs = []int32{ 5, // 42: gosdn.pnd.SubscriptionList.mode:type_name -> gosdn.pnd.SubscriptionMode 6, // 43: gosdn.pnd.Subscription.stream_mode:type_name -> gosdn.pnd.StreamMode 4, // 44: gosdn.pnd.SubscribePathResponse.status:type_name -> gosdn.pnd.Status - 47, // 45: gosdn.pnd.SubscribePathResponse.device:type_name -> gnmi.Notification + 47, // 45: gosdn.pnd.SubscribePathResponse.mne_notification:type_name -> gnmi.Notification 7, // 46: gosdn.pnd.PndService.GetMneList:input_type -> gosdn.pnd.GetMneListRequest 7, // 47: gosdn.pnd.PndService.GetFlattenedMneList:input_type -> gosdn.pnd.GetMneListRequest 8, // 48: gosdn.pnd.PndService.GetMne:input_type -> gosdn.pnd.GetMneRequest @@ -3673,7 +3675,7 @@ func file_gosdn_pnd_pnd_proto_init() { } } file_gosdn_pnd_pnd_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrchestratedNetworkingDevice); i { + switch v := v.(*ManagedNetworkElement); i { case 0: return &v.state case 1: @@ -3685,7 +3687,7 @@ func file_gosdn_pnd_pnd_proto_init() { } } file_gosdn_pnd_pnd_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlattenedOrchestratedNetworkingDevice); i { + switch v := v.(*FlattenedManagedNetworkElement); i { case 0: return &v.state case 1: diff --git a/api/go/gosdn/pnd/pnd.pb.gw.go b/api/go/gosdn/pnd/pnd.pb.gw.go index 72ba3a55b8ba322128931c36b5306c5742347595..e5e2f606336dc1e5a0e6a91096757aaecbb6fbda 100644 --- a/api/go/gosdn/pnd/pnd.pb.gw.go +++ b/api/go/gosdn/pnd/pnd.pb.gw.go @@ -102,7 +102,7 @@ func local_request_PndService_GetFlattenedMneList_0(ctx context.Context, marshal } var ( - filter_PndService_GetMne_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0, "did": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} + filter_PndService_GetMne_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0, "mneid": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} ) func request_PndService_GetMne_0(ctx context.Context, marshaler runtime.Marshaler, client PndServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -126,14 +126,14 @@ func request_PndService_GetMne_0(ctx context.Context, marshaler runtime.Marshale return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err) } - val, ok = pathParams["did"] + val, ok = pathParams["mneid"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Did, err = runtime.String(val) + protoReq.Mneid, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } if err := req.ParseForm(); err != nil { @@ -169,14 +169,14 @@ func local_request_PndService_GetMne_0(ctx context.Context, marshaler runtime.Ma return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err) } - val, ok = pathParams["did"] + val, ok = pathParams["mneid"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Did, err = runtime.String(val) + protoReq.Mneid, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } if err := req.ParseForm(); err != nil { @@ -716,7 +716,7 @@ func local_request_PndService_SetChangeList_0(ctx context.Context, marshaler run } var ( - filter_PndService_GetPath_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0, "did": 1, "path": 2}, Base: []int{1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 1, 1, 2, 3, 4}} + filter_PndService_GetPath_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0, "mneid": 1, "path": 2}, Base: []int{1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 1, 1, 2, 3, 4}} ) func request_PndService_GetPath_0(ctx context.Context, marshaler runtime.Marshaler, client PndServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -740,14 +740,14 @@ func request_PndService_GetPath_0(ctx context.Context, marshaler runtime.Marshal return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err) } - val, ok = pathParams["did"] + val, ok = pathParams["mneid"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Did, err = runtime.String(val) + protoReq.Mneid, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } val, ok = pathParams["path"] @@ -793,14 +793,14 @@ func local_request_PndService_GetPath_0(ctx context.Context, marshaler runtime.M return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err) } - val, ok = pathParams["did"] + val, ok = pathParams["mneid"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Did, err = runtime.String(val) + protoReq.Mneid, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } val, ok = pathParams["path"] @@ -894,7 +894,7 @@ func local_request_PndService_SetPathList_0(ctx context.Context, marshaler runti } var ( - filter_PndService_DeleteMne_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0, "did": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} + filter_PndService_DeleteMne_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0, "mneid": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} ) func request_PndService_DeleteMne_0(ctx context.Context, marshaler runtime.Marshaler, client PndServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -918,14 +918,14 @@ func request_PndService_DeleteMne_0(ctx context.Context, marshaler runtime.Marsh return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err) } - val, ok = pathParams["did"] + val, ok = pathParams["mneid"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Did, err = runtime.String(val) + protoReq.Mneid, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } if err := req.ParseForm(); err != nil { @@ -961,14 +961,14 @@ func local_request_PndService_DeleteMne_0(ctx context.Context, marshaler runtime return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err) } - val, ok = pathParams["did"] + val, ok = pathParams["mneid"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Did, err = runtime.String(val) + protoReq.Mneid, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } if err := req.ParseForm(); err != nil { @@ -1018,7 +1018,7 @@ func RegisterPndServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.pnd.PndService/GetMne", runtime.WithHTTPPathPattern("/pnds/{pid}/mne/{did}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.pnd.PndService/GetMne", runtime.WithHTTPPathPattern("/pnds/{pid}/mne/{mneid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1202,7 +1202,7 @@ func RegisterPndServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.pnd.PndService/GetPath", runtime.WithHTTPPathPattern("/pnds/{pid}/mnes/{did}/paths/{path}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.pnd.PndService/GetPath", runtime.WithHTTPPathPattern("/pnds/{pid}/mnes/{mneid}/paths/{path}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1248,7 +1248,7 @@ func RegisterPndServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.pnd.PndService/DeleteMne", runtime.WithHTTPPathPattern("/pnds/{pid}/mnes/{did}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.pnd.PndService/DeleteMne", runtime.WithHTTPPathPattern("/pnds/{pid}/mnes/{mneid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1330,7 +1330,7 @@ func RegisterPndServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.pnd.PndService/GetMne", runtime.WithHTTPPathPattern("/pnds/{pid}/mne/{did}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.pnd.PndService/GetMne", runtime.WithHTTPPathPattern("/pnds/{pid}/mne/{mneid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1490,7 +1490,7 @@ func RegisterPndServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.pnd.PndService/GetPath", runtime.WithHTTPPathPattern("/pnds/{pid}/mnes/{did}/paths/{path}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.pnd.PndService/GetPath", runtime.WithHTTPPathPattern("/pnds/{pid}/mnes/{mneid}/paths/{path}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1530,7 +1530,7 @@ func RegisterPndServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.pnd.PndService/DeleteMne", runtime.WithHTTPPathPattern("/pnds/{pid}/mnes/{did}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.pnd.PndService/DeleteMne", runtime.WithHTTPPathPattern("/pnds/{pid}/mnes/{mneid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1552,7 +1552,7 @@ func RegisterPndServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, var ( pattern_PndService_GetFlattenedMneList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"pnds", "pid", "mnes"}, "")) - pattern_PndService_GetMne_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"pnds", "pid", "mne", "did"}, "")) + pattern_PndService_GetMne_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"pnds", "pid", "mne", "mneid"}, "")) pattern_PndService_SetMneList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"pnds", "pid", "mnes"}, "")) @@ -1568,11 +1568,11 @@ var ( pattern_PndService_SetChangeList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"pnds", "pid", "changes"}, "")) - pattern_PndService_GetPath_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"pnds", "pid", "mnes", "did", "paths", "path"}, "")) + pattern_PndService_GetPath_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"pnds", "pid", "mnes", "mneid", "paths", "path"}, "")) pattern_PndService_SetPathList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2, 2, 3}, []string{"pnds", "pid", "mnes", "paths"}, "")) - pattern_PndService_DeleteMne_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"pnds", "pid", "mnes", "did"}, "")) + pattern_PndService_DeleteMne_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"pnds", "pid", "mnes", "mneid"}, "")) ) var ( diff --git a/api/openapiv2/gosdn_northbound.swagger.json b/api/openapiv2/gosdn_northbound.swagger.json index f5e536a3c464e8fb6e11285c55990f8166d9458a..1e83ff86a42e2c5caa0874196388e5bccc5a3fc2 100644 --- a/api/openapiv2/gosdn_northbound.swagger.json +++ b/api/openapiv2/gosdn_northbound.swagger.json @@ -39,7 +39,7 @@ "name": "CsbiService" }, { - "name": "DeviceService" + "name": "NetworkElementService" }, { "name": "AuthService" @@ -97,14 +97,15 @@ ] } }, - "/device": { - "get": { - "operationId": "DeviceService_Get", + "/login": { + "post": { + "summary": "Allows a user to login creating a session for further actions.", + "operationId": "AuthService_Login", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/deviceGetDeviceResponse" + "$ref": "#/definitions/rbacLoginResponse" } }, "default": { @@ -116,32 +117,28 @@ }, "parameters": [ { - "name": "timestamp", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "deviceID", - "in": "query", - "required": false, - "type": "string" + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/rbacLoginRequest" + } } ], "tags": [ - "DeviceService" + "AuthService" ] } }, - "/device/all": { - "get": { - "operationId": "DeviceService_GetAll", + "/logout/{username}": { + "post": { + "summary": "Allows a user to log out from an existing session.", + "operationId": "AuthService_Logout", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/deviceGetAllDeviceResponse" + "$ref": "#/definitions/rbacLogoutResponse" } }, "default": { @@ -152,6 +149,12 @@ } }, "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "type": "string" + }, { "name": "timestamp", "in": "query", @@ -161,18 +164,18 @@ } ], "tags": [ - "DeviceService" + "AuthService" ] } }, - "/device/create": { - "post": { - "operationId": "DeviceService_Add", + "/network-element": { + "get": { + "operationId": "NetworkElementService_Get", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/deviceAddDeviceResponse" + "$ref": "#/definitions/networkelementGetNetworkElementResponse" } }, "default": { @@ -184,27 +187,32 @@ }, "parameters": [ { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/deviceAddDeviceRequest" - } + "name": "timestamp", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "networkElementId", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ - "DeviceService" + "NetworkElementService" ] } }, - "/device/update": { - "post": { - "operationId": "DeviceService_Update", + "/network-element/all": { + "get": { + "operationId": "NetworkElementService_GetAll", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/deviceUpdateDeviceResponse" + "$ref": "#/definitions/networkelementGetAllNetworkElementResponse" } }, "default": { @@ -216,28 +224,26 @@ }, "parameters": [ { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/deviceUpdateDeviceRequest" - } + "name": "timestamp", + "in": "query", + "required": false, + "type": "string", + "format": "int64" } ], "tags": [ - "DeviceService" + "NetworkElementService" ] } }, - "/login": { + "/network-element/create": { "post": { - "summary": "Allows a user to login creating a session for further actions.", - "operationId": "AuthService_Login", + "operationId": "NetworkElementService_Add", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/rbacLoginResponse" + "$ref": "#/definitions/networkelementAddNetworkElementResponse" } }, "default": { @@ -253,24 +259,23 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/rbacLoginRequest" + "$ref": "#/definitions/networkelementAddNetworkElementRequest" } } ], "tags": [ - "AuthService" + "NetworkElementService" ] } }, - "/logout/{username}": { + "/network-element/update": { "post": { - "summary": "Allows a user to log out from an existing session.", - "operationId": "AuthService_Logout", + "operationId": "NetworkElementService_Update", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/rbacLogoutResponse" + "$ref": "#/definitions/networkelementUpdateNetworkElementResponse" } }, "default": { @@ -282,21 +287,16 @@ }, "parameters": [ { - "name": "username", - "in": "path", + "name": "body", + "in": "body", "required": true, - "type": "string" - }, - { - "name": "timestamp", - "in": "query", - "required": false, - "type": "string", - "format": "int64" + "schema": { + "$ref": "#/definitions/networkelementUpdateNetworkElementRequest" + } } ], "tags": [ - "AuthService" + "NetworkElementService" ] } }, @@ -575,7 +575,7 @@ ] } }, - "/pnds/{pid}/mne/{did}": { + "/pnds/{pid}/mne/{mneid}": { "get": { "summary": "Allows to request a specific Managed Network Element which is managed by a\nspecific Principal Network Domain.", "operationId": "PndService_GetMne", @@ -601,7 +601,7 @@ "type": "string" }, { - "name": "did", + "name": "mneid", "in": "path", "required": true, "type": "string" @@ -757,7 +757,7 @@ ] } }, - "/pnds/{pid}/mnes/{did}": { + "/pnds/{pid}/mnes/{mneid}": { "delete": { "summary": "Allows to delete a specific Managed Network Element which is managed by a\nspecific Principal Network Domain.", "operationId": "PndService_DeleteMne", @@ -783,7 +783,7 @@ "type": "string" }, { - "name": "did", + "name": "mneid", "in": "path", "required": true, "type": "string" @@ -801,7 +801,7 @@ ] } }, - "/pnds/{pid}/mnes/{did}/paths/{path}": { + "/pnds/{pid}/mnes/{mneid}/paths/{path}": { "get": { "summary": "Allows to request a specific Path of a Managed Network Element,\nmanaged by a specific Principal Network Domain.", "operationId": "PndService_GetPath", @@ -827,7 +827,7 @@ "type": "string" }, { - "name": "did", + "name": "mneid", "in": "path", "required": true, "type": "string" @@ -1892,127 +1892,6 @@ } } }, - "deviceAddDeviceConfiguration": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "sbi": { - "$ref": "#/definitions/southboundSouthboundInterface" - }, - "deviceName": { - "type": "string" - }, - "transportOption": { - "$ref": "#/definitions/transportTransportOption" - } - } - }, - "deviceAddDeviceRequest": { - "type": "object", - "properties": { - "timestamp": { - "type": "string", - "format": "int64" - }, - "device": { - "$ref": "#/definitions/deviceAddDeviceConfiguration" - }, - "pid": { - "type": "string" - } - } - }, - "deviceAddDeviceResponse": { - "type": "object", - "properties": { - "timestamp": { - "type": "string", - "format": "int64" - }, - "status": { - "$ref": "#/definitions/gosdndeviceStatus" - }, - "deviceId": { - "type": "string" - } - } - }, - "deviceDevice": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "model": { - "type": "string" - }, - "transportAddress": { - "type": "string" - } - } - }, - "deviceGetAllDeviceResponse": { - "type": "object", - "properties": { - "timestamp": { - "type": "string", - "format": "int64" - }, - "status": { - "$ref": "#/definitions/gosdndeviceStatus" - }, - "device": { - "type": "array", - "items": { - "$ref": "#/definitions/deviceDevice" - } - } - } - }, - "deviceGetDeviceResponse": { - "type": "object", - "properties": { - "timestamp": { - "type": "string", - "format": "int64" - }, - "status": { - "$ref": "#/definitions/gosdndeviceStatus" - }, - "device": { - "$ref": "#/definitions/deviceDevice" - } - } - }, - "deviceUpdateDeviceRequest": { - "type": "object", - "properties": { - "timestamp": { - "type": "string", - "format": "int64" - }, - "device": { - "$ref": "#/definitions/deviceDevice" - } - } - }, - "deviceUpdateDeviceResponse": { - "type": "object", - "properties": { - "timestamp": { - "type": "string", - "format": "int64" - }, - "status": { - "$ref": "#/definitions/gosdndeviceStatus" - } - } - }, "fakeBoolList": { "type": "object", "properties": { @@ -3087,7 +2966,7 @@ ], "default": "STATE_UNSPECIFIED" }, - "gosdndeviceStatus": { + "gosdnnetworkelementStatus": { "type": "string", "enum": [ "STATUS_UNSPECIFIED", @@ -3240,6 +3119,127 @@ ], "default": "STATUS_UNSPECIFIED" }, + "networkelementAddNetworkElementConfiguration": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "sbi": { + "$ref": "#/definitions/southboundSouthboundInterface" + }, + "networkElementName": { + "type": "string" + }, + "transportOption": { + "$ref": "#/definitions/transportTransportOption" + } + } + }, + "networkelementAddNetworkElementRequest": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "int64" + }, + "networkElement": { + "$ref": "#/definitions/networkelementAddNetworkElementConfiguration" + }, + "pid": { + "type": "string" + } + } + }, + "networkelementAddNetworkElementResponse": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "int64" + }, + "status": { + "$ref": "#/definitions/gosdnnetworkelementStatus" + }, + "networkElementId": { + "type": "string" + } + } + }, + "networkelementGetAllNetworkElementResponse": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "int64" + }, + "status": { + "$ref": "#/definitions/gosdnnetworkelementStatus" + }, + "networkElement": { + "type": "array", + "items": { + "$ref": "#/definitions/networkelementNetworkElement" + } + } + } + }, + "networkelementGetNetworkElementResponse": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "int64" + }, + "status": { + "$ref": "#/definitions/gosdnnetworkelementStatus" + }, + "networkElement": { + "$ref": "#/definitions/networkelementNetworkElement" + } + } + }, + "networkelementNetworkElement": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "model": { + "type": "string" + }, + "transportAddress": { + "type": "string" + } + } + }, + "networkelementUpdateNetworkElementRequest": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "int64" + }, + "networkElement": { + "$ref": "#/definitions/networkelementNetworkElement" + } + } + }, + "networkelementUpdateNetworkElementResponse": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "int64" + }, + "status": { + "$ref": "#/definitions/gosdnnetworkelementStatus" + } + } + }, "pndApiOperation": { "type": "string", "enum": [ @@ -3271,7 +3271,7 @@ "pndChangeRequest": { "type": "object", "properties": { - "did": { + "mneid": { "type": "string" }, "path": { @@ -3309,7 +3309,7 @@ } } }, - "pndFlattenedOrchestratedNetworkingDevice": { + "pndFlattenedManagedNetworkElement": { "type": "object", "properties": { "id": { @@ -3375,7 +3375,7 @@ "mne": { "type": "array", "items": { - "$ref": "#/definitions/pndFlattenedOrchestratedNetworkingDevice" + "$ref": "#/definitions/pndFlattenedManagedNetworkElement" } } } @@ -3394,7 +3394,7 @@ "mne": { "type": "array", "items": { - "$ref": "#/definitions/pndOrchestratedNetworkingDevice" + "$ref": "#/definitions/pndManagedNetworkElement" } } } @@ -3411,7 +3411,7 @@ "description": "TODO: Check if this is really needed. Perhaps a reference to the PND's ID\nis also sufficient." }, "mne": { - "$ref": "#/definitions/pndOrchestratedNetworkingDevice" + "$ref": "#/definitions/pndManagedNetworkElement" } } }, @@ -3426,7 +3426,7 @@ "$ref": "#/definitions/pndPrincipalNetworkDomain", "description": "TODO: Check if this is really needed. Perhaps a reference to the PND's ID\nis also sufficient." }, - "device": { + "mneNotification": { "type": "array", "items": { "$ref": "#/definitions/gnmiNotification" @@ -3469,7 +3469,7 @@ } } }, - "pndOrchestratedNetworkingDevice": { + "pndManagedNetworkElement": { "type": "object", "properties": { "id": { @@ -3478,7 +3478,7 @@ "name": { "type": "string" }, - "device": { + "mneNotification": { "type": "array", "items": { "$ref": "#/definitions/gnmiNotification" @@ -3551,7 +3551,7 @@ "sbi": { "$ref": "#/definitions/southboundSouthboundInterface" }, - "deviceName": { + "mneName": { "type": "string" }, "transportOption": { @@ -3641,7 +3641,7 @@ "status": { "$ref": "#/definitions/gosdnpndStatus" }, - "device": { + "mneNotification": { "type": "array", "items": { "$ref": "#/definitions/gnmiNotification" diff --git a/api/proto/buf.lock b/api/proto/buf.lock index 2465567c883f4786345200473e6eb5fae9f36f1e..dbc02de2fba97b76f486b10b966958fce3a6c42f 100644 --- a/api/proto/buf.lock +++ b/api/proto/buf.lock @@ -4,7 +4,7 @@ deps: - remote: buf.build owner: googleapis repository: googleapis - commit: e9fcfb66f77242e5b8fd4564d7a01033 + commit: d1263fe26f8e430a967dc22a4d0cad18 - remote: buf.build owner: grpc-ecosystem repository: grpc-gateway diff --git a/api/proto/gosdn/device/device.proto b/api/proto/gosdn/device/device.proto deleted file mode 100644 index a54738aa23c7be74b7ef87292e1f307f8bd3aaf2..0000000000000000000000000000000000000000 --- a/api/proto/gosdn/device/device.proto +++ /dev/null @@ -1,122 +0,0 @@ -syntax = "proto3"; - -package gosdn.device; - -import "google/api/annotations.proto"; -import "google/protobuf/descriptor.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; -import "github.com/openconfig/gnmi/proto/gnmi/gnmi.proto"; - -import "gosdn/pnd/pnd.proto"; -import "gosdn/transport/transport.proto"; -import "gosdn/southbound/southbound.proto"; - -option go_package = "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/device"; - -service DeviceService { - rpc Add(AddDeviceRequest) returns (AddDeviceResponse) { - option (google.api.http) = { - post: "/device/create" - body: "*" - }; - } - - rpc Get(GetDeviceRequest) returns (GetDeviceResponse) { - option (google.api.http) = { - get: "/device" - }; - } - - rpc GetAll(GetAllDeviceRequest) returns (GetAllDeviceResponse) { - option (google.api.http) = { - get: "/device/all" - }; - } - - rpc Update(UpdateDeviceRequest) returns (UpdateDeviceResponse) { - option (google.api.http) = { - post: "/device/update" - body: "*" - }; - } - - // TODO: not implemented yet! - // rpc Delete(DeleteDeviceRequest) returns (DeleteDeviceRequest) { - // option (google.api.http) = { - // delete: "/device" - // }; - // } -} - -enum Status { - STATUS_UNSPECIFIED = 0; - STATUS_OK = 1; - STATUS_ERROR = 2; -} - -message Device { - string id = 1; - string name = 2; - string model = 3; - string transportAddress = 4; -} - -message AddDeviceConfiguration { - string address = 1; - .gosdn.southbound.SouthboundInterface sbi = 2; - string device_name = 3; - .gosdn.transport.TransportOption transport_option = 4; -} - -message AddDeviceRequest { - int64 timestamp = 1; - AddDeviceConfiguration device = 2; - string pid = 3; -} - -message AddDeviceResponse { - int64 timestamp = 1; - Status status = 2; - string deviceId = 3; -} - -message GetDeviceRequest { - int64 timestamp = 1; - string deviceID = 2; -} - -message GetDeviceResponse { - int64 timestamp = 1; - Status status = 2; - Device device = 3; -} - -message GetAllDeviceRequest { - int64 timestamp = 1; -} - -message GetAllDeviceResponse { - int64 timestamp = 1; - Status status = 2; - repeated Device device = 3; -} - -message UpdateDeviceRequest { - int64 timestamp = 1; - Device device = 2; -} - -message UpdateDeviceResponse { - int64 timestamp = 1; - Status status = 2; -} - -message DeleteDeviceRequest { - int64 timestamp = 1; - string deviceID = 2; -} - -message DeleteDeviceResponse { - int64 timestamp = 1; - Status status = 2; -} diff --git a/api/proto/gosdn/networkelement/networkelement.proto b/api/proto/gosdn/networkelement/networkelement.proto new file mode 100644 index 0000000000000000000000000000000000000000..6885b8b587e2458d2fac53b0cc5660ad683d592f --- /dev/null +++ b/api/proto/gosdn/networkelement/networkelement.proto @@ -0,0 +1,122 @@ +syntax = "proto3"; + +package gosdn.networkelement; + +import "google/api/annotations.proto"; +import "google/protobuf/descriptor.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "github.com/openconfig/gnmi/proto/gnmi/gnmi.proto"; + +import "gosdn/pnd/pnd.proto"; +import "gosdn/transport/transport.proto"; +import "gosdn/southbound/southbound.proto"; + +option go_package = "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/networkelement"; + +service NetworkElementService { + rpc Add(AddNetworkElementRequest) returns (AddNetworkElementResponse) { + option (google.api.http) = { + post: "/network-element/create" + body: "*" + }; + } + + rpc Get(GetNetworkElementRequest) returns (GetNetworkElementResponse) { + option (google.api.http) = { + get: "/network-element" + }; + } + + rpc GetAll(GetAllNetworkElementRequest) returns (GetAllNetworkElementResponse) { + option (google.api.http) = { + get: "/network-element/all" + }; + } + + rpc Update(UpdateNetworkElementRequest) returns (UpdateNetworkElementResponse) { + option (google.api.http) = { + post: "/network-element/update" + body: "*" + }; + } + + // TODO: not implemented yet! + // rpc Delete(DeleteNetworkElementRequest) returns (DeleteNetworkElementRequest) { + // option (google.api.http) = { + // delete: "/network-element" + // }; + // } +} + +enum Status { + STATUS_UNSPECIFIED = 0; + STATUS_OK = 1; + STATUS_ERROR = 2; +} + +message NetworkElement { + string id = 1; + string name = 2; + string model = 3; + string transport_address = 4; +} + +message AddNetworkElementConfiguration { + string address = 1; + .gosdn.southbound.SouthboundInterface sbi = 2; + string network_element_name = 3; + .gosdn.transport.TransportOption transport_option = 4; +} + +message AddNetworkElementRequest { + int64 timestamp = 1; + AddNetworkElementConfiguration network_element = 2; + string pid = 3; +} + +message AddNetworkElementResponse { + int64 timestamp = 1; + Status status = 2; + string network_element_id = 3; +} + +message GetNetworkElementRequest { + int64 timestamp = 1; + string network_element_id = 2; +} + +message GetNetworkElementResponse { + int64 timestamp = 1; + Status status = 2; + NetworkElement network_element = 3; +} + +message GetAllNetworkElementRequest { + int64 timestamp = 1; +} + +message GetAllNetworkElementResponse { + int64 timestamp = 1; + Status status = 2; + repeated NetworkElement network_element = 3; +} + +message UpdateNetworkElementRequest { + int64 timestamp = 1; + NetworkElement network_element = 2; +} + +message UpdateNetworkElementResponse { + int64 timestamp = 1; + Status status = 2; +} + +message DeleteNetworkElementRequest { + int64 timestamp = 1; + string network_element_id = 2; +} + +message DeleteNetworkElementResponse { + int64 timestamp = 1; + Status status = 2; +} diff --git a/api/proto/gosdn/pnd/pnd.proto b/api/proto/gosdn/pnd/pnd.proto index e88dcfa202874ba6a6c45f87bacf02a168a4f756..8f8ae50b0d65f9b2f6dacaaf0f30537071c18433 100644 --- a/api/proto/gosdn/pnd/pnd.proto +++ b/api/proto/gosdn/pnd/pnd.proto @@ -48,7 +48,7 @@ service PndService { // specific Principal Network Domain. rpc GetMne(GetMneRequest) returns (GetMneResponse) { option (google.api.http) = { - get: "/pnds/{pid}/mne/{did}" + get: "/pnds/{pid}/mne/{mneid}" }; } // Allows to add multiple Managed Network Elements to be managed by a @@ -104,7 +104,7 @@ service PndService { // managed by a specific Principal Network Domain. rpc GetPath(GetPathRequest) returns (GetPathResponse) { option (google.api.http) = { - get: "/pnds/{pid}/mnes/{did}/paths/{path}" + get: "/pnds/{pid}/mnes/{mneid}/paths/{path}" }; } // Allows to set a specific Path of a Managed Network Element, @@ -119,7 +119,7 @@ service PndService { // specific Principal Network Domain. rpc DeleteMne(DeleteMneRequest) returns (DeleteMneResponse) { option (google.api.http) = { - delete: "/pnds/{pid}/mnes/{did}" + delete: "/pnds/{pid}/mnes/{mneid}" }; } // Allows to subscribe to multiple paths of a Managed Network Element which is @@ -135,7 +135,7 @@ message GetMneListRequest { message GetMneRequest { int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. - string did = 2; + string mneid = 2; string pid = 3; } @@ -163,7 +163,7 @@ message GetChangeRequest { message GetPathRequest { int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. - string did = 2; + string mneid = 2; string path = 3; string pid = 4; } @@ -173,7 +173,7 @@ message GetMneResponse { // TODO: Check if this is really needed. Perhaps a reference to the PND's ID // is also sufficient. PrincipalNetworkDomain pnd = 2; - OrchestratedNetworkingDevice mne = 3; + ManagedNetworkElement mne = 3; } message GetMneListResponse { @@ -181,7 +181,7 @@ message GetMneListResponse { // TODO: Check if this is really needed. Perhaps a reference to the PND's ID // is also sufficient. PrincipalNetworkDomain pnd = 2; - repeated OrchestratedNetworkingDevice mne = 3; + repeated ManagedNetworkElement mne = 3; } message GetFlattenedMneListResponse { @@ -189,7 +189,7 @@ message GetFlattenedMneListResponse { // TODO: Check if this is really needed. Perhaps a reference to the PND's ID // is also sufficient. PrincipalNetworkDomain pnd = 2; - repeated FlattenedOrchestratedNetworkingDevice mne = 3; + repeated FlattenedManagedNetworkElement mne = 3; } message GetSbiResponse { @@ -213,7 +213,7 @@ message GetPathResponse { // TODO: Check if this is really needed. Perhaps a reference to the PND's ID // is also sufficient. PrincipalNetworkDomain pnd = 2; - repeated gnmi.Notification device = 3; + repeated gnmi.Notification mne_notification = 3; } message GetChangeResponse { @@ -238,14 +238,14 @@ message PrincipalNetworkDomain { string description = 3; } -message OrchestratedNetworkingDevice { +message ManagedNetworkElement { string id = 1; string name = 2; - repeated gnmi.Notification device = 3; + repeated gnmi.Notification mne_notification = 3; .gosdn.southbound.SouthboundInterface sbi = 4; } -message FlattenedOrchestratedNetworkingDevice { +message FlattenedManagedNetworkElement { string id = 1; string name = 2; string sbi = 3; @@ -292,7 +292,7 @@ message SetPathListRequest { //TODO: rename message ChangeRequest { - string did = 1; + string mneid = 1; string path = 2; string value = 3; ApiOperation api_op = 4; @@ -308,7 +308,7 @@ enum ApiOperation { message SetMne { string address = 1; .gosdn.southbound.SouthboundInterface sbi = 2; - string device_name = 3; + string mne_name = 3; .gosdn.transport.TransportOption transport_option = 4; } @@ -373,7 +373,7 @@ message SetPathListResponse{ message DeleteMneRequest { int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. string pid = 2; - string did = 3; + string mneid = 3; } message DeleteMneResponse { @@ -389,7 +389,7 @@ enum Status { message SubscribePathRequest { int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. - string did = 2; + string mneid = 2; string pid = 3; SubscriptionList sublist = 4; } @@ -425,5 +425,5 @@ enum StreamMode { message SubscribePathResponse { int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. Status status = 2; - repeated gnmi.Notification device = 3; + repeated gnmi.Notification mne_notification = 3; } diff --git a/applications/venv-manager/venv-manager/venv-manager.go b/applications/venv-manager/venv-manager/venv-manager.go index fd550db42c79c4a6108d88fb75edd31dff1987e5..535a47adbe1a18b9330cd1c9877b7ac1c02e2770 100644 --- a/applications/venv-manager/venv-manager/venv-manager.go +++ b/applications/venv-manager/venv-manager/venv-manager.go @@ -9,7 +9,7 @@ import ( "time" corePb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/core" - devicePb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/device" + networkelementPb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/networkelement" pndPb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/pnd" topologyPb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/topology" "code.fbi.h-da.de/danet/gosdn/applications/venv-manager/containerlab" @@ -190,7 +190,7 @@ func (v *VenvManager) parseTopologyDataIntoStructs(topologyData *topologyPb.GetT return &topology, nil } -func (v *VenvManager) loadDeviceModelPathsIntoGosdn(ctx context.Context, conn *grpc.ClientConn, nodes *[]node.Node) error { +func (v *VenvManager) loadNetworkElementModelPathsIntoGosdn(ctx context.Context, conn *grpc.ClientConn, nodes *[]node.Node) error { pndService := pndPb.NewPndServiceClient(conn) for _, node := range *nodes { @@ -219,27 +219,27 @@ func (v *VenvManager) getAndAddMoreData(topologyData *topology.GoSdnTopology) (* } // just to load model data into goSDN to have newest data available for get request - err = v.loadDeviceModelPathsIntoGosdn(ctx, conn, &topologyData.Nodes) + err = v.loadNetworkElementModelPathsIntoGosdn(ctx, conn, &topologyData.Nodes) if err != nil { return nil, err } - deviceService := devicePb.NewDeviceServiceClient(conn) + networkElementService := networkelementPb.NewNetworkElementServiceClient(conn) for iterator, node := range topologyData.Nodes { - getDeviceResponse, _ := deviceService.Get(ctx, &devicePb.GetDeviceRequest{DeviceID: node.ID}) + getNetworkElementResponse, _ := networkElementService.Get(ctx, &networkelementPb.GetNetworkElementRequest{NetworkElementId: node.ID}) if err != nil { return nil, err } var marshalledYangData openconfig.Device - err = yangparser.Unmarshal([]byte(getDeviceResponse.Device.Model), path, &marshalledYangData) + err = yangparser.Unmarshal([]byte(getNetworkElementResponse.NetworkElement.Model), path, &marshalledYangData) if err != nil { return nil, err } - mgmntAddress := strings.Split(getDeviceResponse.Device.TransportAddress, ":") + mgmntAddress := strings.Split(getNetworkElementResponse.NetworkElement.TransportAddress, ":") topologyData.Nodes[iterator].MgmtIpv4 = mgmntAddress[0] topologyData.Nodes[iterator].YangData = marshalledYangData topologyData.Nodes[iterator].FillAllFields(v.containerRegistryURL) diff --git a/cli/adapter/PndAdapter.go b/cli/adapter/PndAdapter.go index 4b5e771ccbb42d1f68637ebc7cfeb001596c2c10..0634fc43089671fb986cc1841b8eb3db5b920bf3 100644 --- a/cli/adapter/PndAdapter.go +++ b/cli/adapter/PndAdapter.go @@ -48,7 +48,7 @@ func (p *PndAdapter) RemoveSbi(uuid.UUID) error { // AddDevice adds a new device to the controller. The device name is optional. // If no name is provided a name will be generated upon device creation. func (p *PndAdapter) AddDevice(ctx context.Context, name string, opts *tpb.TransportOption, sid uuid.UUID) (*ppb.SetMneListResponse, error) { - resp, err := api.AddDevice(ctx, p.endpoint, name, opts, sid, p.ID()) + resp, err := api.AddNetworkElement(ctx, p.endpoint, name, opts, sid, p.ID()) if err != nil { return nil, err } @@ -67,7 +67,7 @@ func (p *PndAdapter) GetSbiSchemaTree(ctx context.Context, sid uuid.UUID) (map[s // GetDevice requests one or multiple devices belonging to a given // PrincipalNetworkDomain from the controller. func (p *PndAdapter) GetDevice(ctx context.Context, identifier string) (*ppb.GetMneResponse, error) { - resp, err := api.GetDevice(ctx, p.endpoint, p.id.String(), identifier) + resp, err := api.GetNetworkElement(ctx, p.endpoint, p.id.String(), identifier) if err != nil { return nil, err } @@ -78,7 +78,7 @@ func (p *PndAdapter) GetDevice(ctx context.Context, identifier string) (*ppb.Get // attached to this adapter. The requested devices also contain their config // information as gNMI notifications. func (p *PndAdapter) GetFlattenedDevices(ctx context.Context) (*ppb.GetFlattenedMneListResponse, error) { - resp, err := api.GetFlattenedDevices(ctx, p.endpoint, p.id.String()) + resp, err := api.GetFlattenedNetworkElements(ctx, p.endpoint, p.id.String()) if err != nil { return nil, err } @@ -87,7 +87,7 @@ func (p *PndAdapter) GetFlattenedDevices(ctx context.Context) (*ppb.GetFlattened // RemoveDevice removes a device from the controller. func (p *PndAdapter) RemoveDevice(ctx context.Context, did uuid.UUID) (*ppb.DeleteMneResponse, error) { - resp, err := api.DeleteDevice(ctx, p.endpoint, p.id.String(), did.String()) + resp, err := api.DeleteNetworkElement(ctx, p.endpoint, p.id.String(), did.String()) if err != nil { return nil, err } @@ -141,7 +141,7 @@ func (p *PndAdapter) SubscribeMNEPath(ctx context.Context, did uuid.UUID, slist // RequestAll sends an API call to the controller requesting the specified path // for all registered devices. Not yet implemented. func (p *PndAdapter) RequestAll(ctx context.Context, path string) ([]proto.Message, error) { - resp, err := api.GetFlattenedDevices(ctx, p.Endpoint(), p.ID().String()) + resp, err := api.GetFlattenedNetworkElements(ctx, p.Endpoint(), p.ID().String()) if err != nil { return []proto.Message{}, err } diff --git a/cli/adapter/PndAdapter_test.go b/cli/adapter/PndAdapter_test.go index 096a881458e9ac0da89937f41eec0352ba98d6ff..5998d4d818dfc2622117c38aa31755b3cd54ff13 100644 --- a/cli/adapter/PndAdapter_test.go +++ b/cli/adapter/PndAdapter_test.go @@ -5,10 +5,10 @@ import ( "reflect" "testing" + mnepb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/networkelement" ppb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/pnd" tpb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/transport" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/change" - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkdomain" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/southbound" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/store" @@ -143,7 +143,7 @@ func TestPndAdapter_GetDevice(t *testing.T) { name string fields fields args args - want device.Device + want mnepb.NetworkElement wantErr bool }{ // TODO: Add test cases. diff --git a/cli/cmd/deviceGet.go b/cli/cmd/deviceGet.go index dc47ec9a2f25b75d5042813fd58e7e08fee357d2..cddccf18d53274843a379c3c324e881f10742736 100644 --- a/cli/cmd/deviceGet.go +++ b/cli/cmd/deviceGet.go @@ -64,7 +64,7 @@ The device UUID and request path must be specified as a positional arguments.`, return err } - for _, n := range res.Device { + for _, n := range res.MneNotification { var panel3 string panel1 := pterm.DefaultBox.WithTitle("Timestamp:").Sprint(n.GetTimestamp()) panel2 := pterm.DefaultBox.WithTitle("Requested Path:").Sprint(args[1]) diff --git a/cli/cmd/list.go b/cli/cmd/list.go index 41aa9e0113a63decf33fb207f2557488546cc8d1..df58a41b77a4908782d3a372b768d79966e635dc 100644 --- a/cli/cmd/list.go +++ b/cli/cmd/list.go @@ -54,7 +54,7 @@ var listCmd = &cobra.Command{ return err } for i, pnd := range resp { - mneResp, err := api.GetFlattenedDevices(createContextWithAuthorization(), addr, pnd.GetId()) + mneResp, err := api.GetFlattenedNetworkElements(createContextWithAuthorization(), addr, pnd.GetId()) if err != nil { return err } diff --git a/controller/api/apiIntegration_test.go b/controller/api/apiIntegration_test.go index 295c1afc8ae2000405822f75b5f14092ebf51380..fa88b2b6dc9d1776213855adc436cd57b7225d73 100644 --- a/controller/api/apiIntegration_test.go +++ b/controller/api/apiIntegration_test.go @@ -57,7 +57,7 @@ func TestApiIntegration(t *testing.T) { GnmiTransportOption: &tpb.GnmiTransportOption{}, }, } - if _, err := AddDevice( + if _, err := AddNetworkElement( context.TODO(), testAPIEndpoint, "test-device", @@ -70,7 +70,7 @@ func TestApiIntegration(t *testing.T) { } did := viper.GetString("LAST_DEVICE_UUID") - _, err = GetDevice( + _, err = GetNetworkElement( context.TODO(), testAPIEndpoint, cliPnd, @@ -81,7 +81,7 @@ func TestApiIntegration(t *testing.T) { return } - _, err = GetDevice( + _, err = GetNetworkElement( context.TODO(), testAPIEndpoint, cliPnd, @@ -107,7 +107,7 @@ func TestApiIntegration(t *testing.T) { return } - resp, err := GetDevice(context.TODO(), testAddress, testUsername, testPassword) + resp, err := GetNetworkElement(context.TODO(), testAddress, testUsername, testPassword) if err != nil { if !tt.wantErr { t.Errorf("Get() error = %v, wantErr %v", err, tt.wantErr) diff --git a/controller/api/api_test.go b/controller/api/api_test.go index cac043617fbed7e08bfb3d41cf120b08ad73ff00..42e98d52d508d9215377c23ff84d6e4d044087a5 100644 --- a/controller/api/api_test.go +++ b/controller/api/api_test.go @@ -117,7 +117,7 @@ func Test_AddDevice(t *testing.T) { GnmiTransportOption: &tpb.GnmiTransportOption{}, }, } - resp, err := AddDevice(context.TODO(), bufnet, "test", opt, sbiUUID, pndUUID) + resp, err := AddNetworkElement(context.TODO(), bufnet, "test", opt, sbiUUID, pndUUID) if err != nil { t.Error(err) return @@ -126,7 +126,7 @@ func Test_AddDevice(t *testing.T) { } func Test_GetDevice(t *testing.T) { - resp, err := GetDevice(context.TODO(), bufnet, pndID, mneID) + resp, err := GetNetworkElement(context.TODO(), bufnet, pndID, mneID) if err != nil { t.Error(err) return diff --git a/controller/api/device.go b/controller/api/device.go index e3a80af8060428f5680d46a3a641eb1c14ecc107..4456118b4e5faa297780cc2a0e53fc1d912a0950 100644 --- a/controller/api/device.go +++ b/controller/api/device.go @@ -17,9 +17,9 @@ import ( log "github.com/sirupsen/logrus" ) -// AddDevice adds a new device to the controller. The device name is optional. -// If no name is provided a name will be generated upon device creation. -func AddDevice(ctx context.Context, addr, deviceName string, opt *tpb.TransportOption, sid, pid uuid.UUID) (*ppb.SetMneListResponse, error) { +// AddNetworkElement adds a new network element to the controller. The network element name is optional. +// If no name is provided a name will be generated upon network element creation. +func AddNetworkElement(ctx context.Context, addr, mneName string, opt *tpb.TransportOption, sid, pid uuid.UUID) (*ppb.SetMneListResponse, error) { pndClient, err := nbi.PndClient(addr, dialOptions...) if err != nil { return nil, err @@ -33,7 +33,7 @@ func AddDevice(ctx context.Context, addr, deviceName string, opt *tpb.TransportO Sbi: &spb.SouthboundInterface{ Id: sid.String(), }, - DeviceName: deviceName, + MneName: mneName, TransportOption: opt, }, }, @@ -50,10 +50,10 @@ func AddDevice(ctx context.Context, addr, deviceName string, opt *tpb.TransportO return pndClient.SetMneList(ctx, req) } -// GetDevice requests one device belonging to a given -// PrincipalNetworkDomain from the controller. If no device identifier +// GetNetworkElement requests one network element belonging to a given +// PrincipalNetworkDomain from the controller. If no network element identifier // is provided, an error is thrown. -func GetDevice(ctx context.Context, addr, pid string, did string) (*ppb.GetMneResponse, error) { +func GetNetworkElement(ctx context.Context, addr, pid string, did string) (*ppb.GetMneResponse, error) { pndClient, err := nbi.PndClient(addr, dialOptions...) if err != nil { return nil, err @@ -120,9 +120,9 @@ func GetSbiSchemaTree(ctx context.Context, addr string, pid, sid uuid.UUID) (map return sTreeMap, nil } -// GetFlattenedDevices requests all devices belonging to a given +// GetFlattenedNetworkElements requests all network elements belonging to a given // PrincipalNetworkDomain from the controller. -func GetFlattenedDevices(ctx context.Context, addr, pid string) (*ppb.GetFlattenedMneListResponse, error) { +func GetFlattenedNetworkElements(ctx context.Context, addr, pid string) (*ppb.GetFlattenedMneListResponse, error) { pndClient, err := nbi.PndClient(addr, dialOptions...) if err != nil { return nil, err @@ -153,7 +153,7 @@ func GetPath(ctx context.Context, addr, pid, did, path string) (*ppb.GetPathResp return pndClient.GetPath(ctx, req) } -// SubscribePath subscribes to paths on a device. +// SubscribePath subscribes to paths on a network element. func SubscribePath(ctx context.Context, addr, pid, did string, slist *ppb.SubscriptionList) (ppb.PndService_SubscribePathClient, error) { log.Println("subscribePath called") pndClient, err := nbi.PndClient(addr, dialOptions...) @@ -171,8 +171,8 @@ func SubscribePath(ctx context.Context, addr, pid, did string, slist *ppb.Subscr return pndClient.SubscribePath(ctx, req) } -// DeleteDevice deletes a device. -func DeleteDevice(ctx context.Context, addr, pid, did string) (*ppb.DeleteMneResponse, error) { +// DeleteNetworkElement deletes a network element. +func DeleteNetworkElement(ctx context.Context, addr, pid, did string) (*ppb.DeleteMneResponse, error) { pndClient, err := nbi.PndClient(addr, dialOptions...) if err != nil { return nil, err diff --git a/controller/api/initialise_test.go b/controller/api/initialise_test.go index 9e98767990c0647db4c1fe3dc0703fa38fbc6586..436151403d1571a2d0d7b0886b2f600ea809954e 100644 --- a/controller/api/initialise_test.go +++ b/controller/api/initialise_test.go @@ -9,14 +9,15 @@ import ( "time" cpb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/core" + "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/networkelement" ppb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/pnd" apb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/rbac" tpb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/transport" "code.fbi.h-da.de/danet/gosdn/controller/app" "code.fbi.h-da.de/danet/gosdn/controller/config" eventservice "code.fbi.h-da.de/danet/gosdn/controller/eventService" - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkdomain" + "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/rbac" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/southbound" "code.fbi.h-da.de/danet/gosdn/controller/mocks" @@ -84,7 +85,7 @@ func bootstrapUnitTest() { log.Fatal(err) } - deviceUUID, err := uuid.Parse(mneID) + mneUUID, err := uuid.Parse(mneID) if err != nil { log.Fatal(err) } @@ -124,7 +125,7 @@ func bootstrapUnitTest() { mockDevice := &mocks.Device{} mockDevice.On("SBI").Return(sbi) - mockDevice.On("ID").Return(deviceUUID) + mockDevice.On("ID").Return(mneUUID) mockDevice.On("GetModel").Return(sbi.Schema().Root) mockDevice.On("Name").Return("openconfig") mockDevice.On("TransportAddress").Return("127.0.0.1:6030") @@ -140,9 +141,9 @@ func bootstrapUnitTest() { mockPnd.On("GetDevice", mock.Anything).Return(mockDevice, nil) mockPnd.On("Commit", mock.Anything).Return(nil) mockPnd.On("Confirm", mock.Anything).Return(nil) - mockPnd.On("Devices").Return([]device.Device{ - &nucleus.CommonDevice{ - UUID: deviceUUID, + mockPnd.On("Devices").Return([]networkelement.NetworkElement{ + &nucleus.CommonNetworkElement{ + UUID: mneUUID, Model: &openconfig.Device{}, }, }) diff --git a/controller/controller.go b/controller/controller.go index 6268a200bf5612d4bfa3496b41a7ac62bd62701a..777f312d258dbe77112a3780bba38aa124532af1 100644 --- a/controller/controller.go +++ b/controller/controller.go @@ -22,7 +22,7 @@ import ( apppb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/app" pb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/core" cpb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/csbi" - dpb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/device" + mnepb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/networkelement" ppb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/pnd" apb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/rbac" spb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/southbound" @@ -33,8 +33,8 @@ import ( "code.fbi.h-da.de/danet/gosdn/controller/config" eventservice "code.fbi.h-da.de/danet/gosdn/controller/eventService" - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkdomain" + "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/rbac" "code.fbi.h-da.de/danet/gosdn/controller/northbound/server" nbi "code.fbi.h-da.de/danet/gosdn/controller/northbound/server" @@ -55,20 +55,20 @@ var coreOnce sync.Once // Core is the representation of the controller's core. type Core struct { - pndStore networkdomain.PndStore - userService rbac.UserService - roleService rbac.RoleService - topologyService topology.Service - nodeService nodes.Service - portService ports.Service - routeService routingtables.Service - httpServer *http.Server - grpcServer *grpc.Server - nbi *nbi.NorthboundInterface - eventService eventInterfaces.Service - appService app.ManagementService - deviceWatcher *nucleus.DeviceWatcher - stopChan chan os.Signal + pndStore networkdomain.PndStore + userService rbac.UserService + roleService rbac.RoleService + topologyService topology.Service + nodeService nodes.Service + portService ports.Service + routeService routingtables.Service + httpServer *http.Server + grpcServer *grpc.Server + nbi *nbi.NorthboundInterface + eventService eventInterfaces.Service + appService app.ManagementService + networkElementWatcher *nucleus.NetworkElementWatcher + stopChan chan os.Signal csbiClient cpb.CsbiServiceClient } @@ -84,7 +84,7 @@ func initialize() error { err = config.ReadGnmiSubscriptionPaths() if err != nil { - log.Error("Error reading in gNMI subscription paths, can not watch devices automatically: ", err) + log.Error("Error reading in gNMI subscription paths, can not watch network elements automatically: ", err) } eventService, err := eventservice.NewEventService() @@ -127,8 +127,8 @@ func initialize() error { return err } - c.deviceWatcher = nucleus.NewDeviceWatcher(c.pndStore) - c.deviceWatcher.SubToDevices(config.GetGnmiSubscriptionPaths(), nil) + c.networkElementWatcher = nucleus.NewDeviceWatcher(c.pndStore) + c.networkElementWatcher.SubToDevices(config.GetGnmiSubscriptionPaths(), nil) err = ensureDefaultRoleExists() if err != nil { @@ -189,7 +189,7 @@ func startGrpc() error { apb.RegisterRoleServiceServer(c.grpcServer, c.nbi.Role) apppb.RegisterAppServiceServer(c.grpcServer, c.nbi.App) tpb.RegisterTopologyServiceServer(c.grpcServer, c.nbi.Topology) - dpb.RegisterDeviceServiceServer(c.grpcServer, c.nbi.Device) + mnepb.RegisterNetworkElementServiceServer(c.grpcServer, c.nbi.NetworkElement) tpb.RegisterRoutingTableServiceServer(c.grpcServer, c.nbi.Routes) go func() { @@ -345,7 +345,7 @@ func shutdown() error { return stopHttpServer() } -func callback(id uuid.UUID, ch chan device.Details) { +func callback(id uuid.UUID, ch chan networkelement.Details) { if ch != nil { c.pndStore.AddPendingChannel(id, ch) log.Infof("pending channel %v added", id) diff --git a/controller/interfaces/device/deviceService.go b/controller/interfaces/device/deviceService.go deleted file mode 100644 index 525678bd95e5349d67c10b77415aaf87b2f826cf..0000000000000000000000000000000000000000 --- a/controller/interfaces/device/deviceService.go +++ /dev/null @@ -1,16 +0,0 @@ -package device - -import ( - "code.fbi.h-da.de/danet/gosdn/controller/store" -) - -// Service describes an interface for device service implementations. -type Service interface { - Add(Device) error - Update(Device) error - UpdateModel(Device, string) error - Delete(Device) error - Get(store.Query) (Device, error) - GetAll() ([]Device, error) - GetAllAsLoaded() ([]LoadedDevice, error) -} diff --git a/controller/interfaces/device/deviceStore.go b/controller/interfaces/device/deviceStore.go deleted file mode 100644 index 6fba480e52fc2f6f0af030c6f69b0cf42c8804bb..0000000000000000000000000000000000000000 --- a/controller/interfaces/device/deviceStore.go +++ /dev/null @@ -1,14 +0,0 @@ -package device - -import ( - "code.fbi.h-da.de/danet/gosdn/controller/store" -) - -// Store describes an interface for device store implementations. -type Store interface { - Add(Device) error - Update(Device) error - Delete(Device) error - Get(store.Query) (LoadedDevice, error) - GetAll() ([]LoadedDevice, error) -} diff --git a/controller/interfaces/networkdomain/pnd.go b/controller/interfaces/networkdomain/pnd.go index 3f3edac73101c7e9387c219853aab4f51305063e..58e62256d28d95e4ef38add37b6d2257a1bc09da 100644 --- a/controller/interfaces/networkdomain/pnd.go +++ b/controller/interfaces/networkdomain/pnd.go @@ -4,7 +4,7 @@ import ( ppb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/pnd" tpb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/transport" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/change" - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" + "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/southbound" "github.com/google/uuid" "google.golang.org/protobuf/proto" @@ -16,18 +16,18 @@ type NetworkDomain interface { Destroy() error AddSbi(s southbound.SouthboundInterface) error RemoveSbi(uuid.UUID) error - AddDevice(name string, opts *tpb.TransportOption, sid uuid.UUID) (uuid.UUID, error) - GetDevice(identifier string) (device.Device, error) - RemoveDevice(uuid.UUID) error - UpdateDevice(device.Device, string) error - Devices() []device.Device - FlattenedDevices() []device.LoadedDevice + AddNetworkElement(name string, opts *tpb.TransportOption, sid uuid.UUID) (uuid.UUID, error) + GetNetworkElement(identifier string) (networkelement.NetworkElement, error) + RemoveNetworkElement(uuid.UUID) error + UpdateNetworkElement(networkelement.NetworkElement, string) error + NetworkElements() []networkelement.NetworkElement + FlattenedNetworkElements() []networkelement.LoadedNetworkElement ChangeMNE(uuid uuid.UUID, operation ppb.ApiOperation, path string, value ...string) (uuid.UUID, error) Request(uuid.UUID, string) (proto.Message, error) RequestAll(string) error GetName() string GetDescription() string - MarshalDevice(string) (string, error) + MarshalNetworkElement(string) (string, error) GetSBIs() ([]southbound.SouthboundInterface, error) GetSBI(uuid.UUID) (southbound.SouthboundInterface, error) ID() uuid.UUID @@ -37,5 +37,5 @@ type NetworkDomain interface { Commit(uuid.UUID) error Confirm(uuid.UUID) error SubscribePath(uuid.UUID, *ppb.SubscriptionList) error - UpdateDeviceAfterSubscribeResponse(device.Device) error + UpdateNetworkElementAfterSubscribeResponse(networkelement.NetworkElement) error } diff --git a/controller/interfaces/networkdomain/pndStore.go b/controller/interfaces/networkdomain/pndStore.go index cb0c1b4820696e7604b41e917f88ed8983cff455..aca76af93577510fd0b1bc412a7f34500229957e 100644 --- a/controller/interfaces/networkdomain/pndStore.go +++ b/controller/interfaces/networkdomain/pndStore.go @@ -1,7 +1,7 @@ package networkdomain import ( - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" + "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" "code.fbi.h-da.de/danet/gosdn/controller/store" "github.com/google/uuid" ) @@ -12,7 +12,7 @@ type PndStore interface { Delete(NetworkDomain) error Get(store.Query) (NetworkDomain, error) GetAll() ([]NetworkDomain, error) - PendingChannels(id uuid.UUID, parseErrors ...error) (chan device.Details, error) - AddPendingChannel(id uuid.UUID, ch chan device.Details) + PendingChannels(id uuid.UUID, parseErrors ...error) (chan networkelement.Details, error) + AddPendingChannel(id uuid.UUID, ch chan networkelement.Details) RemovePendingChannel(id uuid.UUID) } diff --git a/controller/interfaces/device/device.go b/controller/interfaces/networkelement/device.go similarity index 71% rename from controller/interfaces/device/device.go rename to controller/interfaces/networkelement/device.go index 719a8522af452db947cee3e9fa08ad3fc4a43a1b..840cf072a82ec6b37438fa12b5945547024dd786 100644 --- a/controller/interfaces/device/device.go +++ b/controller/interfaces/networkelement/device.go @@ -1,4 +1,4 @@ -package device +package networkelement import ( "code.fbi.h-da.de/danet/gosdn/controller/interfaces/southbound" @@ -10,9 +10,9 @@ import ( tpb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/transport" ) -// Device represents an Managed Network Element (MNE) which is managed by +// NetworkElement represents an Managed Network Element (MNE) which is managed by // nucleus. -type Device interface { +type NetworkElement interface { ID() uuid.UUID GetModel() ygot.GoStruct CreateModelCopy() (ygot.ValidatedGoStruct, error) @@ -25,23 +25,23 @@ type Device interface { TransportAddress() string } -// Details contains details of a device used by the cSBI mechanism. +// Details contains details of a network element used by the cSBI mechanism. type Details struct { ID string Address string TransportOption *tpb.TransportOption } -// LoadedDevice represents a Orchestrated Networking Device that was loaeded -// by using the Load() method of the DeviceStore. -type LoadedDevice struct { - // ID represents the UUID of the LoadedDevice. +// LoadedNetworkElement represents a Managed Network Element that was loaeded +// by using the Load() method of the NetworkElementStore. +type LoadedNetworkElement struct { + // ID represents the UUID of the LoadedNetworkElement. ID string `json:"id" bson:"_id"` - // Name represents the name of the LoadedDevice. + // Name represents the name of the LoadedNetworkElement. Name string `json:"name,omitempty"` - // TransportType represent the type of the transport in use of the LoadedDevice. + // TransportType represent the type of the transport in use of the LoadedNetworkElement. TransportType string `json:"transport_type,omitempty" bson:"transport_type,omitempty"` - // TransportAddress represents the address from which the device can be reached via the transport method. + // TransportAddress represents the address from which the network element can be reached via the transport method. TransportAddress string `json:"transport_address,omitempty" bson:"transport_address,omitempty"` // TransportUsername is used for authentication via the transport method in use. TransportUsername string `json:"transport_username,omitempty" bson:"transport_username,omitempty"` @@ -49,7 +49,7 @@ type LoadedDevice struct { TransportPassword string `json:"transport_password,omitempty" bson:"transport_password,omitempty"` TransportOptionCsbi bool `json:"transport_option_csbi,omitempty" bson:"transport_option_csbi,omitempty"` - // SBI indicates the southbound interface, which is used by this device as UUID. + // SBI indicates the southbound interface, which is used by this network element as UUID. SBI string `json:"sbi"` Model string `json:"model,omitempty" bson:"model,omitempty"` } diff --git a/controller/interfaces/networkelement/deviceService.go b/controller/interfaces/networkelement/deviceService.go new file mode 100644 index 0000000000000000000000000000000000000000..4d34937d1aaa7d9ae899aeb5cd532b995358648c --- /dev/null +++ b/controller/interfaces/networkelement/deviceService.go @@ -0,0 +1,16 @@ +package networkelement + +import ( + "code.fbi.h-da.de/danet/gosdn/controller/store" +) + +// Service describes an interface for network element service implementations. +type Service interface { + Add(NetworkElement) error + Update(NetworkElement) error + UpdateModel(NetworkElement, string) error + Delete(NetworkElement) error + Get(store.Query) (NetworkElement, error) + GetAll() ([]NetworkElement, error) + GetAllAsLoaded() ([]LoadedNetworkElement, error) +} diff --git a/controller/interfaces/networkelement/deviceStore.go b/controller/interfaces/networkelement/deviceStore.go new file mode 100644 index 0000000000000000000000000000000000000000..e2a136105e3d817db19ff8eb6a21ff1f462b92c9 --- /dev/null +++ b/controller/interfaces/networkelement/deviceStore.go @@ -0,0 +1,14 @@ +package networkelement + +import ( + "code.fbi.h-da.de/danet/gosdn/controller/store" +) + +// Store describes an interface for network element store implementations. +type Store interface { + Add(NetworkElement) error + Update(NetworkElement) error + Delete(NetworkElement) error + Get(store.Query) (LoadedNetworkElement, error) + GetAll() ([]LoadedNetworkElement, error) +} diff --git a/controller/mocks/NetworkDomain.go b/controller/mocks/NetworkDomain.go index c9066ddb50df4515318f73906631545c336f313f..cd21d78c221f27c8c040b1130f8c1916261c513d 100644 --- a/controller/mocks/NetworkDomain.go +++ b/controller/mocks/NetworkDomain.go @@ -4,10 +4,10 @@ package mocks import ( change "code.fbi.h-da.de/danet/gosdn/controller/interfaces/change" - device "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" - mock "github.com/stretchr/testify/mock" + networkelement "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" + pnd "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/pnd" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -150,15 +150,15 @@ func (_m *NetworkDomain) Destroy() error { } // Devices provides a mock function with given fields: -func (_m *NetworkDomain) Devices() []device.Device { +func (_m *NetworkDomain) Devices() []networkelement.NetworkElement { ret := _m.Called() - var r0 []device.Device - if rf, ok := ret.Get(0).(func() []device.Device); ok { + var r0 []networkelement.NetworkElement + if rf, ok := ret.Get(0).(func() []networkelement.NetworkElement); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).([]device.Device) + r0 = ret.Get(0).([]networkelement.NetworkElement) } } @@ -166,15 +166,15 @@ func (_m *NetworkDomain) Devices() []device.Device { } // FlattenedDevices provides a mock function with given fields: -func (_m *NetworkDomain) FlattenedDevices() []device.LoadedDevice { +func (_m *NetworkDomain) FlattenedDevices() []networkelement.LoadedNetworkElement { ret := _m.Called() - var r0 []device.LoadedDevice - if rf, ok := ret.Get(0).(func() []device.LoadedDevice); ok { + var r0 []networkelement.LoadedNetworkElement + if rf, ok := ret.Get(0).(func() []networkelement.LoadedNetworkElement); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).([]device.LoadedDevice) + r0 = ret.Get(0).([]networkelement.LoadedNetworkElement) } } @@ -219,15 +219,15 @@ func (_m *NetworkDomain) GetDescription() string { } // GetDevice provides a mock function with given fields: identifier -func (_m *NetworkDomain) GetDevice(identifier string) (device.Device, error) { +func (_m *NetworkDomain) GetDevice(identifier string) (networkelement.NetworkElement, error) { ret := _m.Called(identifier) - var r0 device.Device - if rf, ok := ret.Get(0).(func(string) device.Device); ok { + var r0 networkelement.NetworkElement + if rf, ok := ret.Get(0).(func(string) networkelement.NetworkElement); ok { r0 = rf(identifier) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(device.Device) + r0 = ret.Get(0).(networkelement.NetworkElement) } } @@ -434,11 +434,11 @@ func (_m *NetworkDomain) SubscribePath(_a0 uuid.UUID, _a1 *pnd.SubscriptionList) } // UpdateDevice provides a mock function with given fields: _a0, _a1 -func (_m *NetworkDomain) UpdateDevice(_a0 device.Device, _a1 string) error { +func (_m *NetworkDomain) UpdateDevice(_a0 networkelement.NetworkElement, _a1 string) error { ret := _m.Called(_a0, _a1) var r0 error - if rf, ok := ret.Get(0).(func(device.Device, string) error); ok { + if rf, ok := ret.Get(0).(func(networkelement.NetworkElement, string) error); ok { r0 = rf(_a0, _a1) } else { r0 = ret.Error(0) @@ -448,11 +448,11 @@ func (_m *NetworkDomain) UpdateDevice(_a0 device.Device, _a1 string) error { } // UpdateDeviceAfterSubscribeResponse provides a mock function with given fields: _a0 -func (_m *NetworkDomain) UpdateDeviceAfterSubscribeResponse(_a0 device.Device) error { +func (_m *NetworkDomain) UpdateDeviceAfterSubscribeResponse(_a0 networkelement.NetworkElement) error { ret := _m.Called(_a0) var r0 error - if rf, ok := ret.Get(0).(func(device.Device) error); ok { + if rf, ok := ret.Get(0).(func(networkelement.NetworkElement) error); ok { r0 = rf(_a0) } else { r0 = ret.Error(0) diff --git a/controller/mocks/NetworkElement.go b/controller/mocks/NetworkElement.go new file mode 100644 index 0000000000000000000000000000000000000000..ce25e76b28ad19880adc31b9fa5a6cc8bb5be0af --- /dev/null +++ b/controller/mocks/NetworkElement.go @@ -0,0 +1,201 @@ +// Code generated by mockery v2.14.0. DO NOT EDIT. + +package mocks + +import ( + mock "github.com/stretchr/testify/mock" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + + southbound "code.fbi.h-da.de/danet/gosdn/controller/interfaces/southbound" + + transport "code.fbi.h-da.de/danet/gosdn/controller/interfaces/transport" + + uuid "github.com/google/uuid" + + ygot "github.com/openconfig/ygot/ygot" +) + +// NetworkElement is an autogenerated mock type for the NetworkElement type +type NetworkElement struct { + mock.Mock +} + +// CreateModelCopy provides a mock function with given fields: +func (_m *NetworkElement) CreateModelCopy() (ygot.ValidatedGoStruct, error) { + ret := _m.Called() + + var r0 ygot.ValidatedGoStruct + if rf, ok := ret.Get(0).(func() ygot.ValidatedGoStruct); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(ygot.ValidatedGoStruct) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetModel provides a mock function with given fields: +func (_m *NetworkElement) GetModel() ygot.GoStruct { + ret := _m.Called() + + var r0 ygot.GoStruct + if rf, ok := ret.Get(0).(func() ygot.GoStruct); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(ygot.GoStruct) + } + } + + return r0 +} + +// GetModelAsString provides a mock function with given fields: +func (_m *NetworkElement) GetModelAsString() (string, error) { + ret := _m.Called() + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + var r1 error + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ID provides a mock function with given fields: +func (_m *NetworkElement) ID() uuid.UUID { + ret := _m.Called() + + var r0 uuid.UUID + if rf, ok := ret.Get(0).(func() uuid.UUID); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(uuid.UUID) + } + } + + return r0 +} + +// IsTransportValid provides a mock function with given fields: +func (_m *NetworkElement) IsTransportValid() bool { + ret := _m.Called() + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// Name provides a mock function with given fields: +func (_m *NetworkElement) Name() string { + ret := _m.Called() + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// ProcessResponse provides a mock function with given fields: _a0 +func (_m *NetworkElement) ProcessResponse(_a0 protoreflect.ProtoMessage) error { + ret := _m.Called(_a0) + + var r0 error + if rf, ok := ret.Get(0).(func(protoreflect.ProtoMessage) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// SBI provides a mock function with given fields: +func (_m *NetworkElement) SBI() southbound.SouthboundInterface { + ret := _m.Called() + + var r0 southbound.SouthboundInterface + if rf, ok := ret.Get(0).(func() southbound.SouthboundInterface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(southbound.SouthboundInterface) + } + } + + return r0 +} + +// Transport provides a mock function with given fields: +func (_m *NetworkElement) Transport() transport.Transport { + ret := _m.Called() + + var r0 transport.Transport + if rf, ok := ret.Get(0).(func() transport.Transport); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(transport.Transport) + } + } + + return r0 +} + +// TransportAddress provides a mock function with given fields: +func (_m *NetworkElement) TransportAddress() string { + ret := _m.Called() + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +type mockConstructorTestingTNewNetworkElement interface { + mock.TestingT + Cleanup(func()) +} + +// NewNetworkElement creates a new instance of NetworkElement. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewNetworkElement(t mockConstructorTestingTNewNetworkElement) *NetworkElement { + mock := &NetworkElement{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/controller/mocks/PndStore.go b/controller/mocks/PndStore.go index 9081553cade0fe767c309789befab0de0ee901db..ba943d8d39cd5254621abf22e08fe6ced7530443 100644 --- a/controller/mocks/PndStore.go +++ b/controller/mocks/PndStore.go @@ -3,10 +3,9 @@ package mocks import ( - device "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" - mock "github.com/stretchr/testify/mock" - networkdomain "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkdomain" + networkelement "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" + mock "github.com/stretchr/testify/mock" store "code.fbi.h-da.de/danet/gosdn/controller/store" @@ -33,7 +32,7 @@ func (_m *PndStore) Add(_a0 networkdomain.NetworkDomain) error { } // AddPendingChannel provides a mock function with given fields: id, ch -func (_m *PndStore) AddPendingChannel(id uuid.UUID, ch chan device.Details) { +func (_m *PndStore) AddPendingChannel(id uuid.UUID, ch chan networkelement.Details) { _m.Called(id, ch) } @@ -98,7 +97,7 @@ func (_m *PndStore) GetAll() ([]networkdomain.NetworkDomain, error) { } // PendingChannels provides a mock function with given fields: id, parseErrors -func (_m *PndStore) PendingChannels(id uuid.UUID, parseErrors ...error) (chan device.Details, error) { +func (_m *PndStore) PendingChannels(id uuid.UUID, parseErrors ...error) (chan networkelement.Details, error) { _va := make([]interface{}, len(parseErrors)) for _i := range parseErrors { _va[_i] = parseErrors[_i] @@ -108,12 +107,12 @@ func (_m *PndStore) PendingChannels(id uuid.UUID, parseErrors ...error) (chan de _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 chan device.Details - if rf, ok := ret.Get(0).(func(uuid.UUID, ...error) chan device.Details); ok { + var r0 chan networkelement.Details + if rf, ok := ret.Get(0).(func(uuid.UUID, ...error) chan networkelement.Details); ok { r0 = rf(id, parseErrors...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(chan device.Details) + r0 = ret.Get(0).(chan networkelement.Details) } } diff --git a/controller/northbound/server/core_test.go b/controller/northbound/server/core_test.go index 307a9591796ffcd91d30397811cbb1d9c8ec1a16..ca949afc288f05a4f40a6968bd850455e010ba87 100644 --- a/controller/northbound/server/core_test.go +++ b/controller/northbound/server/core_test.go @@ -43,7 +43,7 @@ func getTestCoreServer(t *testing.T) *CoreServer { t.Fatal(err) } - mockDevice = &nucleus.CommonDevice{ + mockDevice = &nucleus.CommonNetworkElement{ Model: &openconfig.Device{ System: &openconfig.OpenconfigSystem_System{ Config: &openconfig.OpenconfigSystem_System_Config{ diff --git a/controller/northbound/server/csbi.go b/controller/northbound/server/csbi.go index 77cb9b7fb0becefcf2bac234c52ab8bc8b2cfe3b..803f1dc52b3a2f0199486430146927c30f61f49b 100644 --- a/controller/northbound/server/csbi.go +++ b/controller/northbound/server/csbi.go @@ -10,8 +10,8 @@ import ( log "github.com/sirupsen/logrus" cpb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/csbi" - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkdomain" + "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" "code.fbi.h-da.de/danet/gosdn/controller/metrics" "code.fbi.h-da.de/danet/gosdn/controller/store" "google.golang.org/grpc/codes" @@ -51,7 +51,7 @@ func (s CsbiServer) Hello(ctx context.Context, syn *cpb.Syn) (*cpb.Ack, error) { log.Error(err) return nil, status.Errorf(codes.Aborted, "%v", err) } - ch <- device.Details{ + ch <- networkelement.Details{ ID: syn.Id, Address: net.JoinHostPort(csbiAddress, syn.Address), } diff --git a/controller/northbound/server/device.go b/controller/northbound/server/device.go index 258d431a3ff15de5c3f6905dcd2e07f332c469e3..fcbf1a443265332f956f1da67a4b07a59828a894 100644 --- a/controller/northbound/server/device.go +++ b/controller/northbound/server/device.go @@ -4,7 +4,7 @@ import ( "context" "time" - dpb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/device" + mnepb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/networkelement" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkdomain" "github.com/google/uuid" log "github.com/sirupsen/logrus" @@ -12,47 +12,47 @@ import ( "google.golang.org/grpc/status" ) -// DeviceServer represents a deviceServer. -type DeviceServer struct { - dpb.UnimplementedDeviceServiceServer +// NetworkElementServer represents a NetworkElementServer. +type NetworkElementServer struct { + mnepb.UnimplementedNetworkElementServiceServer networkDomain networkdomain.NetworkDomain } -// NewDeviceServer returns a new DeviceServer. -func NewDeviceServer(networkDomain networkdomain.NetworkDomain) *DeviceServer { - return &DeviceServer{ +// NewNetworkElementServer returns a new NetWorkElementServer. +func NewNetworkElementServer(networkDomain networkdomain.NetworkDomain) *NetworkElementServer { + return &NetworkElementServer{ networkDomain: networkDomain, } } // Add adds a new device. -func (d *DeviceServer) Add(ctx context.Context, request *dpb.AddDeviceRequest) (*dpb.AddDeviceResponse, error) { - sbiID, err := uuid.Parse(request.Device.Sbi.Id) +func (d *NetworkElementServer) Add(ctx context.Context, request *mnepb.AddNetworkElementRequest) (*mnepb.AddNetworkElementResponse, error) { + sbiID, err := uuid.Parse(request.NetworkElement.Sbi.Id) if err != nil { return nil, status.Errorf(codes.Aborted, "%v", err) } - id, err := d.networkDomain.AddDevice( - request.Device.DeviceName, - request.Device.TransportOption, + id, err := d.networkDomain.AddNetworkElement( + request.NetworkElement.NetworkElementName, + request.NetworkElement.TransportOption, sbiID, ) if err != nil { return nil, status.Errorf(codes.Aborted, "%v", err) } - return &dpb.AddDeviceResponse{ - Timestamp: time.Now().UnixNano(), - Status: dpb.Status_STATUS_OK, - DeviceId: id.String(), + return &mnepb.AddNetworkElementResponse{ + Timestamp: time.Now().UnixNano(), + Status: mnepb.Status_STATUS_OK, + NetworkElementId: id.String(), }, nil } // GetAll returns all stored devices. -func (d *DeviceServer) GetAll(ctx context.Context, request *dpb.GetAllDeviceRequest) (*dpb.GetAllDeviceResponse, error) { - devices := d.networkDomain.Devices() +func (d *NetworkElementServer) GetAll(ctx context.Context, request *mnepb.GetAllNetworkElementRequest) (*mnepb.GetAllNetworkElementResponse, error) { + devices := d.networkDomain.NetworkElements() - onds := []*dpb.Device{} + mnes := []*mnepb.NetworkElement{} for _, device := range devices { ygotStructAsJSON, err := device.GetModelAsString() if err != nil { @@ -60,23 +60,23 @@ func (d *DeviceServer) GetAll(ctx context.Context, request *dpb.GetAllDeviceRequ return nil, status.Errorf(codes.Aborted, "%v", err) } - onds = append(onds, &dpb.Device{ + mnes = append(mnes, &mnepb.NetworkElement{ Id: device.ID().String(), Name: device.Name(), Model: ygotStructAsJSON, }) } - return &dpb.GetAllDeviceResponse{ - Timestamp: time.Now().UnixNano(), - Status: dpb.Status_STATUS_OK, - Device: onds, + return &mnepb.GetAllNetworkElementResponse{ + Timestamp: time.Now().UnixNano(), + Status: mnepb.Status_STATUS_OK, + NetworkElement: mnes, }, nil } // Get returns a device. -func (d *DeviceServer) Get(ctx context.Context, request *dpb.GetDeviceRequest) (*dpb.GetDeviceResponse, error) { - device, err := d.networkDomain.GetDevice(request.DeviceID) +func (d *NetworkElementServer) Get(ctx context.Context, request *mnepb.GetNetworkElementRequest) (*mnepb.GetNetworkElementResponse, error) { + device, err := d.networkDomain.GetNetworkElement(request.NetworkElementId) if err != nil { return nil, status.Errorf(codes.Aborted, "%v", err) } @@ -87,47 +87,47 @@ func (d *DeviceServer) Get(ctx context.Context, request *dpb.GetDeviceRequest) ( return nil, status.Errorf(codes.Aborted, "%v", err) } - mne := &dpb.Device{ + mne := &mnepb.NetworkElement{ Id: device.ID().String(), Name: device.Name(), Model: ygotStructAsJSON, TransportAddress: device.TransportAddress(), } - return &dpb.GetDeviceResponse{ - Timestamp: time.Now().UnixNano(), - Status: dpb.Status_STATUS_OK, - Device: mne, + return &mnepb.GetNetworkElementResponse{ + Timestamp: time.Now().UnixNano(), + Status: mnepb.Status_STATUS_OK, + NetworkElement: mne, }, nil } // Update updates a device. -func (d *DeviceServer) Update(ctx context.Context, request *dpb.UpdateDeviceRequest) (*dpb.UpdateDeviceResponse, error) { - deviceID, err := uuid.Parse(request.Device.Id) +func (d *NetworkElementServer) Update(ctx context.Context, request *mnepb.UpdateNetworkElementRequest) (*mnepb.UpdateNetworkElementResponse, error) { + deviceID, err := uuid.Parse(request.NetworkElement.Id) if err != nil { - return &dpb.UpdateDeviceResponse{ + return &mnepb.UpdateNetworkElementResponse{ Timestamp: time.Now().UnixNano(), - Status: dpb.Status_STATUS_OK, + Status: mnepb.Status_STATUS_OK, }, err } - device, err := d.networkDomain.GetDevice(deviceID.String()) + device, err := d.networkDomain.GetNetworkElement(deviceID.String()) if err != nil { - return &dpb.UpdateDeviceResponse{ + return &mnepb.UpdateNetworkElementResponse{ Timestamp: time.Now().UnixNano(), - Status: dpb.Status_STATUS_OK, + Status: mnepb.Status_STATUS_OK, }, err } - err = d.networkDomain.UpdateDevice(device, request.Device.Model) + err = d.networkDomain.UpdateNetworkElement(device, request.NetworkElement.Model) if err != nil { - return &dpb.UpdateDeviceResponse{ + return &mnepb.UpdateNetworkElementResponse{ Timestamp: time.Now().UnixNano(), - Status: dpb.Status_STATUS_OK, + Status: mnepb.Status_STATUS_OK, }, err } - return &dpb.UpdateDeviceResponse{ + return &mnepb.UpdateNetworkElementResponse{ Timestamp: time.Now().UnixNano(), - Status: dpb.Status_STATUS_OK, + Status: mnepb.Status_STATUS_OK, }, nil } diff --git a/controller/northbound/server/nbi.go b/controller/northbound/server/nbi.go index 38a42f9e39a09460ce9ae13d8c89bccb8972e854..a9314781ade93b3a30f465992236633c949001d1 100644 --- a/controller/northbound/server/nbi.go +++ b/controller/northbound/server/nbi.go @@ -20,17 +20,17 @@ import ( // NorthboundInterface is the representation of the // gRPC services used provided. type NorthboundInterface struct { - Pnd *PndServer - Core *CoreServer - Csbi *CsbiServer - Sbi *SbiServer - Auth *AuthServer - User *UserServer - Role *RoleServer - Topology *TopologyServer - App *AppServer - Device *DeviceServer - Routes *RoutingTableServiceServer + Pnd *PndServer + Core *CoreServer + Csbi *CsbiServer + Sbi *SbiServer + Auth *AuthServer + User *UserServer + Role *RoleServer + Topology *TopologyServer + App *AppServer + NetworkElement *NetworkElementServer + Routes *RoutingTableServiceServer } // NewNBI receives a PndStore and returns a new gRPC *NorthboundInterface. @@ -48,17 +48,17 @@ func NewNBI( ) *NorthboundInterface { return &NorthboundInterface{ - Pnd: NewPndServer(pnds), - Core: NewCoreServer(pnds), - Csbi: NewCsbiServer(pnds), - Sbi: NewSbiServer(pnds), - Auth: NewAuthServer(&jwt, users), - User: NewUserServer(&jwt, users), - Role: NewRoleServer(&jwt, roles), - Topology: NewTopologyServer(topologyService, nodeService, portService), - App: NewAppServer(apps), - Device: NewDeviceServer(networkDomain), - Routes: NewRoutingTableServiceServer(routeService, nodeService, portService), + Pnd: NewPndServer(pnds), + Core: NewCoreServer(pnds), + Csbi: NewCsbiServer(pnds), + Sbi: NewSbiServer(pnds), + Auth: NewAuthServer(&jwt, users), + User: NewUserServer(&jwt, users), + Role: NewRoleServer(&jwt, roles), + Topology: NewTopologyServer(topologyService, nodeService, portService), + App: NewAppServer(apps), + NetworkElement: NewNetworkElementServer(networkDomain), + Routes: NewRoutingTableServiceServer(routeService, nodeService, portService), } } diff --git a/controller/northbound/server/pnd.go b/controller/northbound/server/pnd.go index 847c2e251178bf610f5695edbba29e480ddac902..989f5f15ff53a2cf3af5aba11d1d4a4d2ac6c790 100644 --- a/controller/northbound/server/pnd.go +++ b/controller/northbound/server/pnd.go @@ -8,8 +8,8 @@ import ( ppb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/pnd" spb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/southbound" "code.fbi.h-da.de/danet/gosdn/controller/customerrs" - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkdomain" + "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" "code.fbi.h-da.de/danet/gosdn/controller/metrics" "code.fbi.h-da.de/danet/gosdn/controller/nucleus" "code.fbi.h-da.de/danet/gosdn/controller/store" @@ -52,13 +52,13 @@ func (p PndServer) GetMne(ctx context.Context, request *ppb.GetMneRequest) (*ppb return nil, status.Errorf(codes.Aborted, "%v", err) } - device, err := pnd.GetDevice(request.Did) + networkElement, err := pnd.GetNetworkElement(request.Mneid) if err != nil { log.Error(err) return nil, status.Errorf(codes.Aborted, "%v", err) } - mne, err := fillMneBySpecificPath(device, "/") + mne, err := fillMneBySpecificPath(networkElement, "/") if err != nil { log.Error(err) return nil, status.Errorf(codes.Aborted, "%v", err) @@ -75,7 +75,7 @@ func (p PndServer) GetMne(ctx context.Context, request *ppb.GetMneRequest) (*ppb }, nil } -// GetMneList returns a list of existing onds. +// GetMneList returns a list of existing mnes. func (p PndServer) GetMneList(ctx context.Context, request *ppb.GetMneListRequest) (*ppb.GetMneListResponse, error) { labels := prometheus.Labels{"service": "pnd", "rpc": "get"} start := metrics.StartHook(labels, grpcRequestsTotal) @@ -91,14 +91,14 @@ func (p PndServer) GetMneList(ctx context.Context, request *ppb.GetMneListReques return nil, status.Errorf(codes.Aborted, "%v", err) } - onds := make([]*ppb.OrchestratedNetworkingDevice, len(pnd.Devices())) - for i, device := range pnd.Devices() { - mne, err := fillMneBySpecificPath(device, "/") + mnes := make([]*ppb.ManagedNetworkElement, len(pnd.NetworkElements())) + for i, networkElement := range pnd.NetworkElements() { + mne, err := fillMneBySpecificPath(networkElement, "/") if err != nil { log.Error(err) return nil, status.Errorf(codes.Aborted, "%v", err) } - onds[i] = mne + mnes[i] = mne } return &ppb.GetMneListResponse{ @@ -108,11 +108,11 @@ func (p PndServer) GetMneList(ctx context.Context, request *ppb.GetMneListReques Name: pnd.GetName(), Description: pnd.GetDescription(), }, - Mne: onds, + Mne: mnes, }, nil } -// GetFlattenedMneList returns a list of existing onds. +// GetFlattenedMneList returns a list of existing mnes. func (p PndServer) GetFlattenedMneList(ctx context.Context, request *ppb.GetMneListRequest) (*ppb.GetFlattenedMneListResponse, error) { labels := prometheus.Labels{"service": "pnd", "rpc": "get"} start := metrics.StartHook(labels, grpcRequestsTotal) @@ -128,10 +128,10 @@ func (p PndServer) GetFlattenedMneList(ctx context.Context, request *ppb.GetMneL return nil, status.Errorf(codes.Aborted, "%v", err) } - onds := pnd.FlattenedDevices() - flattenedMnes := make([]*ppb.FlattenedOrchestratedNetworkingDevice, len(onds)) - for i, mne := range onds { - mne := &ppb.FlattenedOrchestratedNetworkingDevice{ + mnes := pnd.FlattenedNetworkElements() + flattenedMnes := make([]*ppb.FlattenedManagedNetworkElement, len(mnes)) + for i, mne := range mnes { + mne := &ppb.FlattenedManagedNetworkElement{ Id: mne.ID, Name: mne.Name, @@ -151,7 +151,7 @@ func (p PndServer) GetFlattenedMneList(ctx context.Context, request *ppb.GetMneL }, nil } -func fillMneBySpecificPath(d device.Device, path string) (*ppb.OrchestratedNetworkingDevice, error) { +func fillMneBySpecificPath(nme networkelement.NetworkElement, path string) (*ppb.ManagedNetworkElement, error) { gnmiPath, err := ygot.StringToStructuredPath(path) if err != nil { log.Error(err) @@ -162,34 +162,34 @@ func fillMneBySpecificPath(d device.Device, path string) (*ppb.OrchestratedNetwo &ytypes.GetHandleWildcards{}, &ytypes.GetPartialKeyMatch{}, } - nodes, err := ytypes.GetNode(d.SBI().Schema().RootSchema(), d.GetModel(), gnmiPath, opts...) + nodes, err := ytypes.GetNode(nme.SBI().Schema().RootSchema(), nme.GetModel(), gnmiPath, opts...) if err != nil { log.Error(err) return nil, status.Errorf(codes.Aborted, "%v", err) } - devices := make([]*gnmi.Notification, len(nodes)) + notifications := make([]*gnmi.Notification, len(nodes)) for i, node := range nodes { - dev, err := genGnmiNotification(gnmiPath, node.Data) + mneNotification, err := genGnmiNotification(gnmiPath, node.Data) if err != nil { log.Error(err) return nil, status.Errorf(codes.Aborted, "%v", err) } - devices[i] = dev + notifications[i] = mneNotification } sbi := spb.SouthboundInterface{} - if d.SBI() != nil { - sbi.Id = d.SBI().ID().String() - sbi.Type = d.SBI().Type() + if nme.SBI() != nil { + sbi.Id = nme.SBI().ID().String() + sbi.Type = nme.SBI().Type() } - mne := &ppb.OrchestratedNetworkingDevice{ - Id: d.ID().String(), - Name: d.Name(), - Device: devices, - Sbi: &sbi, + mne := &ppb.ManagedNetworkElement{ + Id: nme.ID().String(), + Name: nme.Name(), + MneNotification: notifications, + Sbi: &sbi, } return mne, nil @@ -330,12 +330,12 @@ func (p PndServer) GetPath(ctx context.Context, request *ppb.GetPathRequest) (*p return nil, status.Errorf(codes.Aborted, "%v", err) } - device, err := pnd.GetDevice(request.Did) + networkElement, err := pnd.GetNetworkElement(request.Mneid) if err != nil { log.Error(err) return nil, status.Errorf(codes.Aborted, "%v", err) } - duid, err := uuid.Parse(request.Did) + mneuid, err := uuid.Parse(request.Mneid) if err != nil { log.Error(err) return nil, status.Errorf(codes.Aborted, "%v", err) @@ -344,13 +344,13 @@ func (p PndServer) GetPath(ctx context.Context, request *ppb.GetPathRequest) (*p // In case we get the path from grpc-gateway we have to replace path := strings.ReplaceAll(request.Path, "||", "/") - _, err = pnd.Request(duid, path) + _, err = pnd.Request(mneuid, path) if err != nil { log.Error(err) return nil, status.Errorf(codes.Aborted, "%v", err) } - mne, err := fillMneBySpecificPath(device, path) + mne, err := fillMneBySpecificPath(networkElement, path) if err != nil { log.Error(err) return nil, status.Errorf(codes.Aborted, "%v", err) @@ -363,7 +363,7 @@ func (p PndServer) GetPath(ctx context.Context, request *ppb.GetPathRequest) (*p Name: pnd.GetName(), Description: pnd.GetDescription(), }, - Device: mne.Device, + MneNotification: mne.MneNotification, }, nil } @@ -441,7 +441,7 @@ func fillChanges(pnd networkdomain.NetworkDomain, all bool, cuid ...string) ([]* if len(cuid) == 0 { return nil, &customerrs.InvalidParametersError{ Func: fillChanges, - Param: "length of 'did' cannot be '0' when 'all' is set to 'false'", + Param: "length of 'mneID' cannot be '0' when 'all' is set to 'false'", } } changeList, err = stringArrayToUUIDs(cuid) @@ -475,7 +475,7 @@ func fillChanges(pnd networkdomain.NetworkDomain, all bool, cuid ...string) ([]* return changes, nil } -// SetMneList updates the list of onds. +// SetMneList updates the list of mnes. func (p PndServer) SetMneList(ctx context.Context, request *ppb.SetMneListRequest) (*ppb.SetMneListResponse, error) { labels := prometheus.Labels{"service": "pnd", "rpc": "set"} start := metrics.StartHook(labels, grpcRequestsTotal) @@ -490,24 +490,24 @@ func (p PndServer) SetMneList(ctx context.Context, request *ppb.SetMneListReques return nil, handleRPCError(labels, err) } - deviceIDs := make([]uuid.UUID, 0, len(request.Mne)) + networkElementIDs := make([]uuid.UUID, 0, len(request.Mne)) for _, r := range request.Mne { sid, err := uuid.Parse(r.Sbi.Id) if err != nil { log.Error(err) return nil, status.Errorf(codes.Aborted, "%v", err) } - did, err := pnd.AddDevice(r.DeviceName, r.TransportOption, sid) + mneID, err := pnd.AddNetworkElement(r.MneName, r.TransportOption, sid) if err != nil { log.Error(err) return nil, status.Errorf(codes.Aborted, "%v", err) } - deviceIDs = append(deviceIDs, did) + networkElementIDs = append(networkElementIDs, mneID) } - r := make([]*ppb.SetResponse, len(deviceIDs)) - for i, did := range deviceIDs { - r[i] = &ppb.SetResponse{Id: did.String(), Status: ppb.Status_STATUS_OK} + r := make([]*ppb.SetResponse, len(networkElementIDs)) + for i, mneID := range networkElementIDs { + r[i] = &ppb.SetResponse{Id: mneID.String(), Status: ppb.Status_STATUS_OK} } return &ppb.SetMneListResponse{ @@ -587,12 +587,12 @@ func (p PndServer) SetPathList(ctx context.Context, request *ppb.SetPathListRequ responses := make([]*ppb.SetResponse, len(request.ChangeRequest)) for i, r := range request.ChangeRequest { - did, err := uuid.Parse(r.Did) + mneID, err := uuid.Parse(r.Mneid) if err != nil { log.Error(err) return nil, status.Errorf(codes.Aborted, "%v", err) } - cid, err := pnd.ChangeMNE(did, r.ApiOp, r.Path, r.Value) + cid, err := pnd.ChangeMNE(mneID, r.ApiOp, r.Path, r.Value) if err != nil { log.Error(err) return nil, status.Errorf(codes.Aborted, "%v", err) @@ -679,12 +679,12 @@ func (p PndServer) DeleteMne(ctx context.Context, request *ppb.DeleteMneRequest) return nil, status.Errorf(codes.Aborted, "%v", err) } - did, err := uuid.Parse(request.Did) + mneID, err := uuid.Parse(request.Mneid) if err != nil { log.Error(err) return nil, status.Errorf(codes.Aborted, "%v", err) } - if err := pnd.RemoveDevice(did); err != nil { + if err := pnd.RemoveNetworkElement(mneID); err != nil { log.Error(err) return nil, status.Errorf(codes.Aborted, "%v", err) } @@ -706,12 +706,12 @@ func (p PndServer) SubscribePath(request *ppb.SubscribePathRequest, stream ppb.P return err } - did, err := uuid.Parse(request.Did) + mneID, err := uuid.Parse(request.Mneid) if err != nil { return err } - if err := pnd.SubscribePath(did, request.Sublist); err != nil { + if err := pnd.SubscribePath(mneID, request.Sublist); err != nil { return err } diff --git a/controller/northbound/server/pnd_test.go b/controller/northbound/server/pnd_test.go index 1067bc5d3a470a3ca6c57ebeb71b8d94fbea57b9..90a878f1d4f301809a2875ddf8b34fd8fde3dd17 100644 --- a/controller/northbound/server/pnd_test.go +++ b/controller/northbound/server/pnd_test.go @@ -45,7 +45,7 @@ func getTestPndServer(t *testing.T) *PndServer { t.Fatal(err) } - mockDevice = &nucleus.CommonDevice{ + mockDevice = &nucleus.CommonNetworkElement{ Model: &openconfig.Device{ System: &openconfig.OpenconfigSystem_System{ Config: &openconfig.OpenconfigSystem_System_Config{ diff --git a/controller/northbound/server/test_util_test.go b/controller/northbound/server/test_util_test.go index 0e72f8646882f576c3a39c858878857d6116cbca..21037ae482255dbc0203f508a2d49f59ce81e03d 100644 --- a/controller/northbound/server/test_util_test.go +++ b/controller/northbound/server/test_util_test.go @@ -206,7 +206,7 @@ func createHashedAndSaltedPassword(plainPWD, salt string) string { } func getMockPnd(t *testing.T) networkdomain.NetworkDomain { - mockDevice = &nucleus.CommonDevice{ + mockDevice = &nucleus.CommonNetworkElement{ Model: &openconfig.Device{ System: &openconfig.OpenconfigSystem_System{ Config: &openconfig.OpenconfigSystem_System_Config{ diff --git a/controller/nucleus/change_test.go b/controller/nucleus/change_test.go index 19f96e7eca06080c5da9e4066ca22033151a2031..cdfae361add283fd4257d12583299763d11cd41a 100644 --- a/controller/nucleus/change_test.go +++ b/controller/nucleus/change_test.go @@ -37,7 +37,7 @@ func TestChange_CommitRollback(t *testing.T) { callback := make(chan string) c := &Change{ cuid: cuid, - duid: did, + duid: mneid, timestamp: time.Now(), previousState: rollbackDevice, intendedState: commitDevice, @@ -82,7 +82,7 @@ func TestChange_CommitRollbackError(t *testing.T) { rollbackErrChannel := make(chan error) c := &Change{ cuid: cuid, - duid: did, + duid: mneid, timestamp: time.Now(), previousState: rollbackDevice, intendedState: commitDevice, @@ -123,7 +123,7 @@ func TestChange_CommitError(t *testing.T) { want := ppb.ChangeState_CHANGE_STATE_INCONSISTENT c := &Change{ cuid: cuid, - duid: did, + duid: mneid, timestamp: time.Now(), previousState: rollbackDevice, intendedState: commitDevice, @@ -153,7 +153,7 @@ func TestChange_Commit(t *testing.T) { want := ppb.ChangeState_CHANGE_STATE_COMMITTED c := &Change{ cuid: cuid, - duid: did, + duid: mneid, timestamp: time.Now(), previousState: rollbackDevice, intendedState: commitDevice, @@ -285,7 +285,7 @@ func TestChange_State(t *testing.T) { t.Logf("callback in test %v", testName) return nil } - c := NewChange(did, rollbackDevice, commitDevice, callback) + c := NewChange(mneid, rollbackDevice, commitDevice, callback) if tt.name != "pending" { if err := c.Commit(); err != nil { t.Errorf("Commit() error = %v", err) diff --git a/controller/nucleus/databaseDeviceStore.go b/controller/nucleus/databaseDeviceStore.go index b2d8feef18e71820dc24f038597c88b07830fe8a..0297e80c3daecdd615584a4eb1c15d5a5af1bb36 100644 --- a/controller/nucleus/databaseDeviceStore.go +++ b/controller/nucleus/databaseDeviceStore.go @@ -4,7 +4,7 @@ import ( "fmt" "code.fbi.h-da.de/danet/gosdn/controller/customerrs" - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" + "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" "code.fbi.h-da.de/danet/gosdn/controller/nucleus/database" "code.fbi.h-da.de/danet/gosdn/controller/store" "go.mongodb.org/mongo-driver/bson" @@ -15,40 +15,40 @@ import ( log "github.com/sirupsen/logrus" ) -// DatabaseDeviceStore is used to store Devices. -type DatabaseDeviceStore struct { +// DatabaseNetworkElementStore is used to store Network Elements. +type DatabaseNetworkElementStore struct { storeName string } // NewDatabaseDeviceStore returns a DeviceStore. -func NewDatabaseDeviceStore(pndUUID uuid.UUID) device.Store { - return &DatabaseDeviceStore{ - storeName: fmt.Sprintf("device-store-%s.json", pndUUID.String()), +func NewDatabaseNetworkElementStore(pndUUID uuid.UUID) networkelement.Store { + return &DatabaseNetworkElementStore{ + storeName: fmt.Sprintf("networkElement-store-%s.json", pndUUID.String()), } } -// Get takes a Device's UUID or name and returns the Device. -func (s *DatabaseDeviceStore) Get(query store.Query) (device.LoadedDevice, error) { - var loadedDevice device.LoadedDevice +// Get takes a NetworkElement's UUID or name and returns the NetworkElement. +func (s *DatabaseNetworkElementStore) Get(query store.Query) (networkelement.LoadedNetworkElement, error) { + var loadedNetworkElement networkelement.LoadedNetworkElement if query.ID.String() != "" { - loadedDevice, err := s.getByID(query.ID) + loadedNetworkElement, err := s.getByID(query.ID) if err != nil { - return loadedDevice, err + return loadedNetworkElement, err } - return loadedDevice, nil + return loadedNetworkElement, nil } - loadedDevice, err := s.getByName(query.Name) + loadedNetworkElement, err := s.getByName(query.Name) if err != nil { - return loadedDevice, err + return loadedNetworkElement, err } - return loadedDevice, nil + return loadedNetworkElement, nil } -func (s *DatabaseDeviceStore) getByID(idOfDevice uuid.UUID) (loadedDevice device.LoadedDevice, err error) { +func (s *DatabaseNetworkElementStore) getByID(idOfDevice uuid.UUID) (loadedNetworkElement networkelement.LoadedNetworkElement, err error) { client, ctx, cancel := database.GetMongoConnection() defer cancel() defer func() { @@ -61,19 +61,19 @@ func (s *DatabaseDeviceStore) getByID(idOfDevice uuid.UUID) (loadedDevice device collection := db.Collection(s.storeName) result := collection.FindOne(ctx, bson.D{primitive.E{Key: "_id", Value: idOfDevice.String()}}) if result == nil { - return loadedDevice, customerrs.CouldNotFindError{ID: idOfDevice} + return loadedNetworkElement, customerrs.CouldNotFindError{ID: idOfDevice} } - err = result.Decode(&loadedDevice) + err = result.Decode(&loadedNetworkElement) if err != nil { log.Printf("Failed marshalling %v", err) - return loadedDevice, customerrs.CouldNotMarshallError{Identifier: idOfDevice, Type: loadedDevice, Err: err} + return loadedNetworkElement, customerrs.CouldNotMarshallError{Identifier: idOfDevice, Type: loadedNetworkElement, Err: err} } - return loadedDevice, nil + return loadedNetworkElement, nil } -func (s *DatabaseDeviceStore) getByName(nameOfDevice string) (loadedDevice device.LoadedDevice, err error) { +func (s *DatabaseNetworkElementStore) getByName(nameOfDevice string) (loadedNetworkElement networkelement.LoadedNetworkElement, err error) { client, ctx, cancel := database.GetMongoConnection() defer cancel() defer func() { @@ -86,20 +86,20 @@ func (s *DatabaseDeviceStore) getByName(nameOfDevice string) (loadedDevice devic collection := db.Collection(s.storeName) result := collection.FindOne(ctx, bson.D{primitive.E{Key: "name", Value: nameOfDevice}}) if result == nil { - return loadedDevice, customerrs.CouldNotFindError{Name: nameOfDevice} + return loadedNetworkElement, customerrs.CouldNotFindError{Name: nameOfDevice} } - err = result.Decode(&loadedDevice) + err = result.Decode(&loadedNetworkElement) if err != nil { log.Printf("Failed marshalling %v", err) - return loadedDevice, customerrs.CouldNotMarshallError{Identifier: nameOfDevice, Type: loadedDevice, Err: err} + return loadedNetworkElement, customerrs.CouldNotMarshallError{Identifier: nameOfDevice, Type: loadedNetworkElement, Err: err} } - return loadedDevice, nil + return loadedNetworkElement, nil } -// GetAll returns all stored devices. -func (s *DatabaseDeviceStore) GetAll() (loadedDevices []device.LoadedDevice, err error) { +// GetAll returns all stored network elements. +func (s *DatabaseNetworkElementStore) GetAll() (loadedNetworkElements []networkelement.LoadedNetworkElement, err error) { client, ctx, cancel := database.GetMongoConnection() defer cancel() defer func() { @@ -123,18 +123,18 @@ func (s *DatabaseDeviceStore) GetAll() (loadedDevices []device.LoadedDevice, err } }() - err = cursor.All(ctx, &loadedDevices) + err = cursor.All(ctx, &loadedNetworkElements) if err != nil { log.Printf("Failed marshalling %v", err) - return nil, customerrs.CouldNotMarshallError{Type: loadedDevices, Err: err} + return nil, customerrs.CouldNotMarshallError{Type: loadedNetworkElements, Err: err} } - return loadedDevices, nil + return loadedNetworkElements, nil } -// Add adds a device to the device store. -func (s *DatabaseDeviceStore) Add(deviceToAdd device.Device) (err error) { +// Add adds a network element to the network element store. +func (s *DatabaseNetworkElementStore) Add(networkElementToAdd networkelement.NetworkElement) (err error) { client, ctx, cancel := database.GetMongoConnection() defer cancel() defer func() { @@ -146,18 +146,18 @@ func (s *DatabaseDeviceStore) Add(deviceToAdd device.Device) (err error) { _, err = client.Database(database.DatabaseName). Collection(s.storeName). - InsertOne(ctx, deviceToAdd) + InsertOne(ctx, networkElementToAdd) if err != nil { - log.Printf("Could not create Device: %v", err) - return customerrs.CouldNotCreateError{Identifier: deviceToAdd.ID(), Type: deviceToAdd, Err: err} + log.Printf("Could not create NetworkElement: %v", err) + return customerrs.CouldNotCreateError{Identifier: networkElementToAdd.ID(), Type: networkElementToAdd, Err: err} } return nil } -// Update updates a existing device. -func (s *DatabaseDeviceStore) Update(deviceToUpdate device.Device) (err error) { - var updatedLoadedDevice device.LoadedDevice +// Update updates a existing network element. +func (s *DatabaseNetworkElementStore) Update(networkElementToUpdate networkelement.NetworkElement) (err error) { + var updatedLoadedDevice networkelement.LoadedNetworkElement client, ctx, cancel := database.GetMongoConnection() defer cancel() @@ -168,7 +168,7 @@ func (s *DatabaseDeviceStore) Update(deviceToUpdate device.Device) (err error) { } }() - update := bson.D{primitive.E{Key: "$set", Value: deviceToUpdate}} + update := bson.D{primitive.E{Key: "$set", Value: networkElementToUpdate}} upsert := false after := options.After @@ -180,19 +180,19 @@ func (s *DatabaseDeviceStore) Update(deviceToUpdate device.Device) (err error) { err = client.Database(database.DatabaseName). Collection(s.storeName). FindOneAndUpdate( - ctx, bson.M{"_id": deviceToUpdate.ID().String()}, update, &opt). + ctx, bson.M{"_id": networkElementToUpdate.ID().String()}, update, &opt). Decode(&updatedLoadedDevice) if err != nil { - log.Printf("Could not update Device: %v", err) + log.Printf("Could not update NetworkElement: %v", err) - return customerrs.CouldNotUpdateError{Identifier: deviceToUpdate.ID(), Type: deviceToUpdate, Err: err} + return customerrs.CouldNotUpdateError{Identifier: networkElementToUpdate.ID(), Type: networkElementToUpdate, Err: err} } return nil } -// Delete deletes a device from the device store. -func (s *DatabaseDeviceStore) Delete(deviceToDelete device.Device) (err error) { +// Delete deletes a network element from the network element store. +func (s *DatabaseNetworkElementStore) Delete(networkElementToDelete networkelement.NetworkElement) (err error) { client, ctx, cancel := database.GetMongoConnection() defer cancel() defer func() { @@ -204,9 +204,9 @@ func (s *DatabaseDeviceStore) Delete(deviceToDelete device.Device) (err error) { db := client.Database(database.DatabaseName) collection := db.Collection(s.storeName) - _, err = collection.DeleteOne(ctx, bson.D{primitive.E{Key: deviceToDelete.ID().String()}}) + _, err = collection.DeleteOne(ctx, bson.D{primitive.E{Key: networkElementToDelete.ID().String()}}) if err != nil { - return customerrs.CouldNotDeleteError{Identifier: deviceToDelete.ID(), Type: deviceToDelete, Err: err} + return customerrs.CouldNotDeleteError{Identifier: networkElementToDelete.ID(), Type: networkElementToDelete, Err: err} } return nil diff --git a/controller/nucleus/databasePndStore.go b/controller/nucleus/databasePndStore.go index d04262e963035e260666a74c57b81884cab26302..e79b73f651ab91c3e086544d135d5f95fcbda46b 100644 --- a/controller/nucleus/databasePndStore.go +++ b/controller/nucleus/databasePndStore.go @@ -3,8 +3,8 @@ package nucleus import ( "fmt" - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkdomain" + "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" cpb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/csbi" "code.fbi.h-da.de/danet/gosdn/controller/customerrs" @@ -22,7 +22,7 @@ import ( // DatabasePndStore is used to store PrincipalNetworkDomains. type DatabasePndStore struct { pndStoreName string - pendingChannels map[uuid.UUID]chan device.Details + pendingChannels map[uuid.UUID]chan networkelement.Details csbiClient cpb.CsbiServiceClient } @@ -175,7 +175,7 @@ func (s *DatabasePndStore) Delete(pndToDelete networkdomain.NetworkDomain) (err // PendingChannels holds channels used communicate with pending // cSBI deployments. -func (s *DatabasePndStore) PendingChannels(id uuid.UUID, parseErrors ...error) (chan device.Details, error) { +func (s *DatabasePndStore) PendingChannels(id uuid.UUID, parseErrors ...error) (chan networkelement.Details, error) { ch, ok := s.pendingChannels[id] if !ok { return nil, &customerrs.CouldNotFindError{ID: id} @@ -184,7 +184,7 @@ func (s *DatabasePndStore) PendingChannels(id uuid.UUID, parseErrors ...error) ( } // AddPendingChannel adds a pending channel to the map. -func (s *DatabasePndStore) AddPendingChannel(id uuid.UUID, ch chan device.Details) { +func (s *DatabasePndStore) AddPendingChannel(id uuid.UUID, ch chan networkelement.Details) { s.pendingChannels[id] = ch } @@ -193,7 +193,7 @@ func (s *DatabasePndStore) RemovePendingChannel(id uuid.UUID) { delete(s.pendingChannels, id) } -func (s *DatabasePndStore) callback(id uuid.UUID, ch chan device.Details) { +func (s *DatabasePndStore) callback(id uuid.UUID, ch chan networkelement.Details) { if ch != nil { s.AddPendingChannel(id, ch) log.Infof("pending channel %v added", id) diff --git a/controller/nucleus/device.go b/controller/nucleus/device.go index 400d5fdb6bdd11d78a473d5793b9c7365962a0cf..379c468589bf53be840edc01dfa9fcaef39c6293 100644 --- a/controller/nucleus/device.go +++ b/controller/nucleus/device.go @@ -6,7 +6,7 @@ import ( spb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/southbound" tpb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/transport" "code.fbi.h-da.de/danet/gosdn/controller/customerrs" - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" + "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/southbound" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/transport" "github.com/docker/docker/pkg/namesgenerator" @@ -16,8 +16,8 @@ import ( "google.golang.org/protobuf/proto" ) -// NewDevice creates a Device. -func NewDevice(name string, uuidInput uuid.UUID, opt *tpb.TransportOption, sbi southbound.SouthboundInterface) (device.Device, error) { +// NewNetworkElement creates a network element. +func NewNetworkElement(name string, uuidInput uuid.UUID, opt *tpb.TransportOption, sbi southbound.SouthboundInterface) (networkelement.NetworkElement, error) { t, err := NewTransport(opt, sbi) if err != nil { return nil, err @@ -35,7 +35,7 @@ func NewDevice(name string, uuidInput uuid.UUID, opt *tpb.TransportOption, sbi s // We want a representation of the MNE's config (the SBI-schema's root created through ygot), // but do not want to work on the sbi.Schema() directly. - // So the root of sbi.Schema() is never changed when a set or get on a device will be called. + // So the root of sbi.Schema() is never changed when a set or get on a network element will be called. root, err := ygot.DeepCopy(sbi.Schema().Root) if err != nil { return nil, err @@ -49,8 +49,8 @@ func NewDevice(name string, uuidInput uuid.UUID, opt *tpb.TransportOption, sbi s } if opt.Type == spb.Type_TYPE_CONTAINERISED { - return &CsbiDevice{ - CommonDevice: CommonDevice{ + return &CsbiNetworkElement{ + CommonNetworkElement: CommonNetworkElement{ UUID: uuidInput, Model: ygotDeepCopy, sbi: sbi, @@ -61,7 +61,7 @@ func NewDevice(name string, uuidInput uuid.UUID, opt *tpb.TransportOption, sbi s }, nil } - return &CommonDevice{ + return &CommonNetworkElement{ UUID: uuidInput, Model: ygotDeepCopy, sbi: sbi, @@ -71,133 +71,133 @@ func NewDevice(name string, uuidInput uuid.UUID, opt *tpb.TransportOption, sbi s }, nil } -// CommonDevice represents an MNE. -type CommonDevice struct { - // UUID represents the Devices UUID +// CommonNetworkElement represents an MNE. +type CommonNetworkElement struct { + // UUID represents the Network Elements UUID UUID uuid.UUID - // Device embeds a ygot.GoStruct containing the device details + // Network Element embeds a ygot.GoStruct containing the network element details Model ygot.GoStruct - // SBI is the device's southbound interface implementation + // SBI is the network element's southbound interface implementation sbi southbound.SouthboundInterface - // Transport is the device's Transport implementation + // Transport is the network element's Transport implementation transport transport.Transport - // Name is the device's human readable name + // Name is the network element's human readable name name string transportOptions *tpb.TransportOption } -// ID returns the UUID of the Device. -func (d *CommonDevice) ID() uuid.UUID { - return d.UUID +// ID returns the UUID of the Network Element. +func (n *CommonNetworkElement) ID() uuid.UUID { + return n.UUID } -// GetModel returns the ygot representation of the Device. -func (d *CommonDevice) GetModel() ygot.GoStruct { - return d.Model +// GetModel returns the ygot representation of the Network Element. +func (n *CommonNetworkElement) GetModel() ygot.GoStruct { + return n.Model } -// CreateModelCopy returns a copy of the ygot representation of the Device. -func (d *CommonDevice) CreateModelCopy() (ygot.ValidatedGoStruct, error) { - return createValidatedCopy(d) +// CreateModelCopy returns a copy of the ygot representation of the Network Element. +func (n *CommonNetworkElement) CreateModelCopy() (ygot.ValidatedGoStruct, error) { + return createValidatedCopy(n) } -// Transport returns the Transport of the device. -func (d *CommonDevice) Transport() transport.Transport { - return d.transport +// Transport returns the Transport of the network element. +func (n *CommonNetworkElement) Transport() transport.Transport { + return n.transport } -// TransportAddress returns the TransportAddress of the device. -func (d *CommonDevice) TransportAddress() string { - return d.transportOptions.Address +// TransportAddress returns the TransportAddress of the network element. +func (n *CommonNetworkElement) TransportAddress() string { + return n.transportOptions.Address } -// Name returns the name of the device. -func (d *CommonDevice) Name() string { - return d.name +// Name returns the name of the network element. +func (n *CommonNetworkElement) Name() string { + return n.name } -// SBI returns the sbi of the Device. -func (d *CommonDevice) SBI() southbound.SouthboundInterface { - return d.sbi +// SBI returns the sbi of the Network Element. +func (n *CommonNetworkElement) SBI() southbound.SouthboundInterface { + return n.sbi } -// SetTransport sets the Device's Transport. -func (d *CommonDevice) SetTransport(t transport.Transport) { - d.transport = t +// SetTransport sets the Network Element's Transport. +func (n *CommonNetworkElement) SetTransport(t transport.Transport) { + n.transport = t } -// SetName sets the Device's name. -func (d *CommonDevice) SetName(n string) { - d.name = n +// SetName sets the Network Element's name. +func (n *CommonNetworkElement) SetName(name string) { + n.name = name } -// SetSBI sets the Device's SBI. -func (d *CommonDevice) SetSBI(sbi southbound.SouthboundInterface) { - d.sbi = sbi +// SetSBI sets the Network Element's SBI. +func (n *CommonNetworkElement) SetSBI(sbi southbound.SouthboundInterface) { + n.sbi = sbi } -// ProcessResponse processes a response for the Device. -func (d *CommonDevice) ProcessResponse(resp proto.Message) error { - return d.transport.ProcessResponse(resp, d.Model, d.sbi.Schema()) +// ProcessResponse processes a response for the Network Element. +func (n *CommonNetworkElement) ProcessResponse(resp proto.Message) error { + return n.transport.ProcessResponse(resp, n.Model, n.sbi.Schema()) } -// IsTransportValid returns a boolean if the transport of a device is valid. -func (d *CommonDevice) IsTransportValid() bool { - if d.transportOptions != nil && d.transportOptions.Address != "" { +// IsTransportValid returns a boolean if the transport of a network element is valid. +func (n *CommonNetworkElement) IsTransportValid() bool { + if n.transportOptions != nil && n.transportOptions.Address != "" { return true } return false } -// CsbiDevice is used for the cSBI functionality. -type CsbiDevice struct { - CommonDevice +// CsbiNetworkElement is used for the cSBI functionality. +type CsbiNetworkElement struct { + CommonNetworkElement } -// ID returns the UUID of the Device. -func (d *CsbiDevice) ID() uuid.UUID { - return d.UUID +// ID returns the UUID of the Network Element. +func (n *CsbiNetworkElement) ID() uuid.UUID { + return n.UUID } -// GetModel returns the ygot representation of the Device. -func (d *CsbiDevice) GetModel() ygot.GoStruct { - return d.Model +// GetModel returns the ygot representation of the Network Element. +func (n *CsbiNetworkElement) GetModel() ygot.GoStruct { + return n.Model } -// CreateModelCopy returns a copy of the ygot representation of the Device. -func (d *CsbiDevice) CreateModelCopy() (ygot.ValidatedGoStruct, error) { - return createValidatedCopy(d) +// CreateModelCopy returns a copy of the ygot representation of the Network Element. +func (n *CsbiNetworkElement) CreateModelCopy() (ygot.ValidatedGoStruct, error) { + return createValidatedCopy(n) } -// Transport returns the Transport of the device. -func (d *CsbiDevice) Transport() transport.Transport { - return d.transport +// Transport returns the Transport of the network element. +func (n *CsbiNetworkElement) Transport() transport.Transport { + return n.transport } -// Name returns the name of the device. -func (d *CsbiDevice) Name() string { - return d.name +// Name returns the name of the network element. +func (n *CsbiNetworkElement) Name() string { + return n.name } -// SBI returns the sbi of the Device. -func (d *CsbiDevice) SBI() southbound.SouthboundInterface { - return d.sbi +// SBI returns the sbi of the Network Element. +func (n *CsbiNetworkElement) SBI() southbound.SouthboundInterface { + return n.sbi } -// ProcessResponse processes a response for the Device. -func (d *CsbiDevice) ProcessResponse(resp proto.Message) error { +// ProcessResponse processes a response for the Network Element. +func (n *CsbiNetworkElement) ProcessResponse(resp proto.Message) error { // TODO: callback to send response to caller - return d.transport.ProcessResponse(resp, d.Model, d.sbi.Schema()) + return n.transport.ProcessResponse(resp, n.Model, n.sbi.Schema()) } -func createValidatedCopy(d device.Device) (ygot.ValidatedGoStruct, error) { - cpy, err := ygot.DeepCopy(d.GetModel()) +func createValidatedCopy(n networkelement.NetworkElement) (ygot.ValidatedGoStruct, error) { + cpy, err := ygot.DeepCopy(n.GetModel()) ygot.BuildEmptyTree(cpy) if err != nil { return nil, err @@ -214,49 +214,49 @@ func createValidatedCopy(d device.Device) (ygot.ValidatedGoStruct, error) { return validatedCpy, nil } -// IsTransportValid returns a boolean if the transport of a device is valid. -func (d *CsbiDevice) IsTransportValid() bool { - if d.transportOptions != nil && d.transportOptions.Address != "" { +// IsTransportValid returns a boolean if the transport of a network element is valid. +func (n *CsbiNetworkElement) IsTransportValid() bool { + if n.transportOptions != nil && n.transportOptions.Address != "" { return true } return false } -// MarshalJSON implements the MarshalJSON interface to store a device as JSON. -func (d *CommonDevice) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the MarshalJSON interface to store a network element as JSON. +func (n *CommonNetworkElement) MarshalJSON() ([]byte, error) { var transportType string var transportAddress string var transportUsername string var transportPassword string var transportOptionType spb.Type - // Handling of these cases is necessary as we use partial devices for testing. + // Handling of these cases is necessary as we use partial network elements for testing. // eg. in most tests no transport or sbi is defined. // The marshaller will crash if we want to access a nil field. - if d.transport == nil || d.transportOptions == nil { + if n.transport == nil || n.transportOptions == nil { transportType = "testing" transportAddress = "testing" transportUsername = "testing" transportPassword = "testing" transportOptionType = spb.Type_TYPE_OPENCONFIG } else { - transportType = d.transport.Type() - transportAddress = d.transportOptions.Address - transportUsername = d.transportOptions.Username - transportPassword = d.transportOptions.Password - transportOptionType = d.transportOptions.Type + transportType = n.transport.Type() + transportAddress = n.transportOptions.Address + transportUsername = n.transportOptions.Username + transportPassword = n.transportOptions.Password + transportOptionType = n.transportOptions.Type } var sbiUUID uuid.UUID - if d.sbi == nil { + if n.sbi == nil { sbiUUID = uuid.UUID{} } else { - sbiUUID = d.sbi.ID() + sbiUUID = n.sbi.ID() } - modelAsString, err := ygot.EmitJSON(d.Model, d.getYgotEmitJSONConfig()) + modelAsString, err := ygot.EmitJSON(n.Model, n.getYgotEmitJSONConfig()) if err != nil { return []byte{}, err } @@ -272,8 +272,8 @@ func (d *CommonDevice) MarshalJSON() ([]byte, error) { SBI uuid.UUID `json:"sbi,omitempty"` Model string `bson:"model,omitempty"` }{ - ID: d.ID(), - Name: d.Name(), + ID: n.ID(), + Name: n.Name(), TransportType: transportType, TransportAddress: transportAddress, TransportUsername: transportUsername, @@ -284,32 +284,32 @@ func (d *CommonDevice) MarshalJSON() ([]byte, error) { }) } -// MarshalBSON implements the MarshalBSON interface to store a device as BSON. -func (d *CommonDevice) MarshalBSON() ([]byte, error) { +// MarshalBSON implements the MarshalBSON interface to store a network element as BSON. +func (n *CommonNetworkElement) MarshalBSON() ([]byte, error) { var transportType string var transportAddress string var transportUsername string var transportPassword string var transportOptionType spb.Type - // Handling of these cases is necessary as we use partial devices for testing. + // Handling of these cases is necessary as we use partial network elements for testing. // eg. in most tests no transport or sbi is defined. // The marshaller will crash if we want to access a nil field. - if d.transport == nil || d.transportOptions == nil { + if n.transport == nil || n.transportOptions == nil { transportType = "testing" transportAddress = "testing" transportUsername = "testing" transportPassword = "testing" transportOptionType = spb.Type_TYPE_OPENCONFIG } else { - transportType = d.transport.Type() - transportAddress = d.transportOptions.Address - transportUsername = d.transportOptions.Username - transportPassword = d.transportOptions.Password - transportOptionType = d.transportOptions.Type + transportType = n.transport.Type() + transportAddress = n.transportOptions.Address + transportUsername = n.transportOptions.Username + transportPassword = n.transportOptions.Password + transportOptionType = n.transportOptions.Type } - modelAsString, err := ygot.EmitJSON(d.Model, d.getYgotEmitJSONConfig()) + modelAsString, err := ygot.EmitJSON(n.Model, n.getYgotEmitJSONConfig()) if err != nil { return []byte{}, err } @@ -325,21 +325,21 @@ func (d *CommonDevice) MarshalBSON() ([]byte, error) { SBI string `bson:"sbi,omitempty"` Model string `bson:"model,omitempty"` }{ - ID: d.ID().String(), - Name: d.Name(), + ID: n.ID().String(), + Name: n.Name(), TransportType: transportType, TransportAddress: transportAddress, TransportUsername: transportUsername, TransportPassword: transportPassword, TransportOptionType: transportOptionType, - SBI: d.sbi.ID().String(), + SBI: n.sbi.ID().String(), Model: modelAsString, }) } -// GetModelAsString returns the YANG model of a device as string. -func (d *CommonDevice) GetModelAsString() (string, error) { - modelAsString, err := ygot.EmitJSON(d.Model, d.getYgotEmitJSONConfig()) +// GetModelAsString returns the YANG model of a network element as string. +func (n *CommonNetworkElement) GetModelAsString() (string, error) { + modelAsString, err := ygot.EmitJSON(n.Model, n.getYgotEmitJSONConfig()) if err != nil { return "", err } @@ -347,7 +347,7 @@ func (d *CommonDevice) GetModelAsString() (string, error) { return modelAsString, nil } -func (d *CommonDevice) getYgotEmitJSONConfig() *ygot.EmitJSONConfig { +func (n *CommonNetworkElement) getYgotEmitJSONConfig() *ygot.EmitJSONConfig { return &ygot.EmitJSONConfig{ Format: ygot.RFC7951, Indent: "", diff --git a/controller/nucleus/deviceFilesystemStore_test.go b/controller/nucleus/deviceFilesystemStore_test.go index 0a6ae860553cd2ed52b2ade62e7558107ebbe530..7ff4d15e0203e1f64dcfa004422491aac5f77daa 100644 --- a/controller/nucleus/deviceFilesystemStore_test.go +++ b/controller/nucleus/deviceFilesystemStore_test.go @@ -36,8 +36,8 @@ func TestAddDevice(t *testing.T) { sbi1, _ := NewSBI(spb.Type_TYPE_OPENCONFIG, sbiID1) - deviceStore := NewDeviceStore(pndID) - device, _ := NewDevice("testdevice", deviceID, &trop, sbi1) + deviceStore := NewNetworkElementStore(pndID) + device, _ := NewNetworkElement("testdevice", deviceID, &trop, sbi1) err := deviceStore.Add(device) if err != nil { @@ -49,7 +49,7 @@ func TestGetAllDevices(t *testing.T) { defer ensureStoreFileForTestsIsRemoved(store.DeviceFilenameSuffix) pndID, _ := uuid.Parse("b4016412-eec5-45a1-aa29-f59915357bad") - deviceStore := NewDeviceStore(pndID) + deviceStore := NewNetworkElementStore(pndID) sbiID, _ := uuid.Parse("ssssssss-ssss-ssss-ssss-ssssssssssss") sbi, _ := NewSBI(spb.Type_TYPE_OPENCONFIG, sbiID) @@ -59,12 +59,12 @@ func TestGetAllDevices(t *testing.T) { transportOptions := returnBasicTransportOption() - device1, err := NewDevice("testname", deviceID1, &transportOptions, sbi) + device1, err := NewNetworkElement("testname", deviceID1, &transportOptions, sbi) if err != nil { t.Error(err) } - device2, err := NewDevice("testname2", deviceID2, &transportOptions, sbi) + device2, err := NewNetworkElement("testname2", deviceID2, &transportOptions, sbi) if err != nil { t.Error(err) } @@ -102,7 +102,7 @@ func TestGetDevice(t *testing.T) { defer ensureStoreFileForTestsIsRemoved(store.DeviceFilenameSuffix) pndID, _ := uuid.Parse("b4016412-eec5-45a1-aa29-f59915357bad") - deviceStore := NewDeviceStore(pndID) + deviceStore := NewNetworkElementStore(pndID) sbiID, _ := uuid.Parse("ssssssss-ssss-ssss-ssss-ssssssssssss") sbi, _ := NewSBI(spb.Type_TYPE_OPENCONFIG, sbiID) @@ -112,12 +112,12 @@ func TestGetDevice(t *testing.T) { trop := returnBasicTransportOption() - device1, err := NewDevice("testname", deviceID1, &trop, sbi) + device1, err := NewNetworkElement("testname", deviceID1, &trop, sbi) if err != nil { t.Error(err) } - device2, err := NewDevice("testname2", deviceID2, &trop, sbi) + device2, err := NewNetworkElement("testname2", deviceID2, &trop, sbi) if err != nil { t.Error(err) } @@ -157,15 +157,15 @@ func TestUpdateDevice(t *testing.T) { sbi1, _ := NewSBI(spb.Type_TYPE_OPENCONFIG, sbiID1) - deviceStore := NewDeviceStore(pndID) - device, _ := NewDevice("testdevice", deviceID, &trop, sbi1) + deviceStore := NewNetworkElementStore(pndID) + device, _ := NewNetworkElement("testdevice", deviceID, &trop, sbi1) err := deviceStore.Add(device) if err != nil { t.Error(err) } - device, _ = NewDevice(updatedDeviceName, deviceID, &trop, sbi1) + device, _ = NewNetworkElement(updatedDeviceName, deviceID, &trop, sbi1) err = deviceStore.Update(device) if err != nil { @@ -189,7 +189,7 @@ func TestDeleteDevice(t *testing.T) { defer ensureStoreFileForTestsIsRemoved(store.DeviceFilenameSuffix) pndID, _ := uuid.Parse("b4016412-eec5-45a1-aa29-f59915357bad") - deviceStore := NewDeviceStore(pndID) + deviceStore := NewNetworkElementStore(pndID) sbiID, _ := uuid.Parse("ssssssss-ssss-ssss-ssss-ssssssssssss") sbi, _ := NewSBI(spb.Type_TYPE_OPENCONFIG, sbiID) @@ -199,12 +199,12 @@ func TestDeleteDevice(t *testing.T) { trop := returnBasicTransportOption() - device1, err := NewDevice("testname", deviceID1, &trop, sbi) + device1, err := NewNetworkElement("testname", deviceID1, &trop, sbi) if err != nil { t.Error(err) } - device2, err := NewDevice("testname2", deviceID2, &trop, sbi) + device2, err := NewNetworkElement("testname2", deviceID2, &trop, sbi) if err != nil { t.Error(err) } diff --git a/controller/nucleus/deviceService.go b/controller/nucleus/deviceService.go deleted file mode 100644 index 9b3d47252ccdda67d065aa6d186054a58e9fb962..0000000000000000000000000000000000000000 --- a/controller/nucleus/deviceService.go +++ /dev/null @@ -1,212 +0,0 @@ -package nucleus - -import ( - "fmt" - - spb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/southbound" - "code.fbi.h-da.de/danet/gosdn/controller/event" - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" - eventInterfaces "code.fbi.h-da.de/danet/gosdn/controller/interfaces/event" - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/southbound" - "code.fbi.h-da.de/danet/gosdn/controller/store" - "github.com/google/uuid" - "github.com/openconfig/ygot/ygot" - - tpb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/transport" - log "github.com/sirupsen/logrus" -) - -const ( - // DeviceEventTopic is the used topic for device related entity changes. - DeviceEventTopic = "device" -) - -// DeviceService provides a device service implementation. -// This services provides abstraction between the user (e.g a PND) and the matching store (e.g. deviceStore). -type DeviceService struct { - deviceStore device.Store - sbiService southbound.Service - eventService eventInterfaces.Service -} - -// NewDeviceService creates a device service. -func NewDeviceService( - deviceStore device.Store, - sbiService southbound.Service, - eventService eventInterfaces.Service, -) device.Service { - return &DeviceService{ - deviceStore: deviceStore, - sbiService: sbiService, - eventService: eventService, - } -} - -// Get takes a Device's UUID or name and returns the Device. -func (s *DeviceService) Get(query store.Query) (device.Device, error) { - loadedDevice, err := s.deviceStore.Get(query) - if err != nil { - return nil, err - } - - device, err := s.createDeviceFromStore(loadedDevice) - if err != nil { - return nil, err - } - - return device, nil -} - -// GetAll returns all stored devices. -func (s *DeviceService) GetAll() ([]device.Device, error) { - var devices []device.Device - - loadedDevices, err := s.deviceStore.GetAll() - if err != nil { - return nil, err - } - - for _, loadedDevice := range loadedDevices { - device, err := s.createDeviceFromStore(loadedDevice) - if err != nil { - return nil, err - } - - devices = append(devices, device) - } - - return devices, nil -} - -// GetAllAsLoaded returns all stored devices as LoadedDevice. -// This method should be used if there is no need for a device.Device, since -// requesting device information through this method is a lot faster than the -// usual `GetAll` method. -func (s *DeviceService) GetAllAsLoaded() ([]device.LoadedDevice, error) { - loadedDevices, err := s.deviceStore.GetAll() - if err != nil { - return nil, err - } - - return loadedDevices, nil -} - -// Add adds a device to the device store. -func (s *DeviceService) Add(deviceToAdd device.Device) error { - err := s.deviceStore.Add(deviceToAdd) - if err != nil { - return err - } - - if err := s.eventService.PublishEvent(DeviceEventTopic, event.NewAddEvent(deviceToAdd.ID())); err != nil { - log.Error(err) - } - - return nil -} - -// UpdateModel updates a existing device with a new model provided as string. -func (s *DeviceService) UpdateModel(deviceToUpdate device.Device, modelAsString string) error { - exisitingDevice, err := s.Get(store.Query{ID: deviceToUpdate.ID()}) - if err != nil { - return err - } - - // Create 'root' path to be able to load the whole model from the store. - path, err := ygot.StringToPath("/", ygot.StructuredPath) - if err != nil { - return err - } - - // Use unmarshall from the devices SBI to unmarshall ygot json in go struct. - err = exisitingDevice.SBI().Unmarshal([]byte(modelAsString), path, exisitingDevice.GetModel()) - if err != nil { - return err - } - - err = s.deviceStore.Update(exisitingDevice) - if err != nil { - return err - } - - if err := s.eventService.PublishEvent(DeviceEventTopic, event.NewUpdateEvent(deviceToUpdate.ID())); err != nil { - log.Error(err) - } - - return nil -} - -// Update updates a existing device. -func (s *DeviceService) Update(deviceToUpdate device.Device) error { - err := s.deviceStore.Update(deviceToUpdate) - if err != nil { - return err - } - - if err := s.eventService.PublishEvent(DeviceEventTopic, event.NewUpdateEvent(deviceToUpdate.ID())); err != nil { - log.Error(err) - } - - return nil -} - -// Delete deletes a device from the device store. -func (s *DeviceService) Delete(deviceToDelete device.Device) error { - err := s.deviceStore.Delete(deviceToDelete) - if err != nil { - return err - } - if deviceToDelete.SBI().Type() == spb.Type_TYPE_PLUGIN { - err = s.sbiService.Delete(deviceToDelete.SBI()) - if err != nil { - return err - } - } - - if err := s.eventService.PublishEvent(DeviceEventTopic, event.NewDeleteEvent(deviceToDelete.ID())); err != nil { - log.Error(err) - } - - return nil -} - -func (s *DeviceService) createDeviceFromStore(loadedDevice device.LoadedDevice) (device.Device, error) { - if loadedDevice.SBI == "" { - return nil, fmt.Errorf("no sbi found for device") - } - - sbiForDevice, err := s.sbiService.Get(store.Query{ID: uuid.MustParse(loadedDevice.SBI)}) - if err != nil { - return nil, err - } - - d, err := NewDevice( - loadedDevice.Name, - uuid.MustParse(loadedDevice.ID), - &tpb.TransportOption{ - Address: loadedDevice.TransportAddress, - Username: loadedDevice.TransportUsername, - Password: loadedDevice.TransportPassword, - TransportOption: &tpb.TransportOption_GnmiTransportOption{ - GnmiTransportOption: &tpb.GnmiTransportOption{}, - }, - Type: spb.Type_TYPE_OPENCONFIG, - }, sbiForDevice) - if err != nil { - return nil, err - } - - // Create 'root' path to be able to load the whole model from the store. - path, err := ygot.StringToPath("/", ygot.StructuredPath) - if err != nil { - return nil, err - } - - // Use unmarshall from the devices SBI to unmarshall ygot json in go struct. - err = d.SBI().Unmarshal([]byte(loadedDevice.Model), path, d.GetModel()) - if err != nil { - return nil, err - } - - return d, nil -} diff --git a/controller/nucleus/deviceServiceMock.go b/controller/nucleus/deviceServiceMock.go deleted file mode 100644 index a738d5ae828938b6786e20956e8c78a5e4ae8423..0000000000000000000000000000000000000000 --- a/controller/nucleus/deviceServiceMock.go +++ /dev/null @@ -1,115 +0,0 @@ -package nucleus - -import ( - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" - "code.fbi.h-da.de/danet/gosdn/controller/store" - "github.com/google/uuid" -) - -// DeviceServiceMock provides a in-memory implementation for multiple stores. -type DeviceServiceMock struct { - Store map[uuid.UUID]device.Device - nameLookupTable map[string]uuid.UUID -} - -// NewDeviceServiceMock returns a specific in-memory store for device service. -func NewDeviceServiceMock() device.Service { - return &DeviceServiceMock{ - Store: make(map[uuid.UUID]device.Device), - nameLookupTable: make(map[string]uuid.UUID), - } -} - -// Add adds a item device.Device. -func (t *DeviceServiceMock) Add(item device.Device) error { - _, ok := t.Store[item.ID()] - if ok { - return nil - } - - t.Store[item.ID()] = item - t.nameLookupTable[item.Name()] = item.ID() - - return nil -} - -// Update updates a item device.Device. -func (t *DeviceServiceMock) Update(item device.Device) error { - _, ok := t.Store[item.ID()] - if ok { - return nil - } - - t.Store[item.ID()] = item - t.nameLookupTable[item.Name()] = item.ID() - - return nil -} - -// UpdateModel updates a item device.Device. -func (t *DeviceServiceMock) UpdateModel(item device.Device, model string) error { - _, ok := t.Store[item.ID()] - if ok { - return nil - } - - t.Store[item.ID()] = item - t.nameLookupTable[item.Name()] = item.ID() - - return nil -} - -// Delete deletes a item device.Device. -func (t *DeviceServiceMock) Delete(item device.Device) error { - delete(t.Store, item.ID()) - - return nil -} - -// Get gets a item device.Device. -func (t *DeviceServiceMock) Get(query store.Query) (device.Device, error) { - // First search for direct hit on UUID. - item, ok := t.Store[query.ID] - if !ok { - // Second search for name - id, ok := t.nameLookupTable[query.Name] - if !ok { - return nil, nil - } - - item, ok := t.Store[id] - if !ok { - return nil, nil - } - - return item, nil - } - - return item, nil -} - -// GetAll gets all items. -func (t *DeviceServiceMock) GetAll() ([]device.Device, error) { - var allItems []device.Device - - for _, item := range t.Store { - allItems = append(allItems, item) - } - - return allItems, nil -} - -// GetAllAsLoaded gets all items as `device.LoadedDevice`. -func (t *DeviceServiceMock) GetAllAsLoaded() ([]device.LoadedDevice, error) { - var allItems []device.LoadedDevice - - for _, item := range t.Store { - allItems = append(allItems, device.LoadedDevice{ - ID: item.ID().String(), - Name: item.Name(), - SBI: item.SBI().ID().String(), - }) - } - - return allItems, nil -} diff --git a/controller/nucleus/deviceService_test.go b/controller/nucleus/deviceService_test.go index 0364bdf6601ec8229ddea8fe5c808043970a67fc..bbd905f57b0b57d5d21c7f6ff54e1d5d19f68710 100644 --- a/controller/nucleus/deviceService_test.go +++ b/controller/nucleus/deviceService_test.go @@ -14,7 +14,7 @@ import ( ) func getMockDevice(deviceID uuid.UUID, sbi southbound.SouthboundInterface) device.Device { - return &CommonDevice{ + return &CommonNetworkElement{ UUID: deviceID, Model: sbi.Schema().Root, sbi: sbi, @@ -27,7 +27,7 @@ func getDeviceTestStores(t *testing.T, deviceID uuid.UUID) (device.Service, sout sbiStore := NewMemorySbiStore() deviceStore := NewMemoryDeviceStore() sbiService := NewSbiService(sbiStore, eventService) - deviceService := NewDeviceService( + deviceService := NewNetworkElementService( deviceStore, sbiService, eventService, diff --git a/controller/nucleus/device_test.go b/controller/nucleus/device_test.go index 2ce8863613908f4ee9f9760d7e17e7a6b4f3b097..10edf57cbb2d3ee790d47ad118f8e5b34ff70be6 100644 --- a/controller/nucleus/device_test.go +++ b/controller/nucleus/device_test.go @@ -30,14 +30,14 @@ func TestDevice_Id(t *testing.T) { { name: "default", fields: fields{ - UUID: did, + UUID: mneid, }, - want: did, + want: mneid, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - d := &CommonDevice{ + d := &CommonNetworkElement{ Model: tt.fields.Model, sbi: tt.fields.SBI, transport: tt.fields.Transport, @@ -101,7 +101,7 @@ func TestNewDevice(t *testing.T) { tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() - resp, err := NewDevice(tt.args.name, uuid.Nil, tt.args.opts, tt.args.sbi) + resp, err := NewNetworkElement(tt.args.name, uuid.Nil, tt.args.opts, tt.args.sbi) if (err != nil) != tt.wantErr { t.Errorf("NewDevice() error = %v, wantErr %v", err, tt.wantErr) return diff --git a/controller/nucleus/initialise_test.go b/controller/nucleus/initialise_test.go index 3b1ace8cbbf1cee1a29cccf058bf340cf8aa7215..a3f4d57a8426bb3238868e0382abf5c745abebb2 100644 --- a/controller/nucleus/initialise_test.go +++ b/controller/nucleus/initialise_test.go @@ -9,9 +9,9 @@ import ( "time" eventservice "code.fbi.h-da.de/danet/gosdn/controller/eventService" - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" "code.fbi.h-da.de/danet/gosdn/controller/store" + "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/networkelement" tpb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/transport" "code.fbi.h-da.de/danet/gosdn/controller/mocks" @@ -26,7 +26,7 @@ import ( ) // UUIDs for test cases. -var did uuid.UUID +var mneid uuid.UUID var mdid uuid.UUID var defaultSbiID uuid.UUID var defaultPndID uuid.UUID @@ -108,7 +108,7 @@ func newGnmiTransportOptions() *tpb.TransportOption { func readTestUUIDs() { var err error - did, err = uuid.Parse("4d8246f8-e884-41d6-87f5-c2c784df9e44") + mneid, err = uuid.Parse("4d8246f8-e884-41d6-87f5-c2c784df9e44") if err != nil { log.Fatal(err) } @@ -142,9 +142,9 @@ func readTestUUIDs() { } } -func mockDevice() device.Device { +func mockNetworkElement() networkelement.NetworkElement { sbi := &OpenConfig{} - return &CommonDevice{ + return &CommonNetworkElement{ UUID: mdid, Model: sbi.Schema().Root, sbi: sbi, @@ -158,19 +158,19 @@ func newPnd() pndImplementation { sbiStore := NewMemorySbiStore() deviceStore := NewMemoryDeviceStore() sbiService := NewSbiService(sbiStore, eventService) - deviceService := NewDeviceService( + deviceService := NewNetworkElementService( deviceStore, sbiService, eventService, ) return pndImplementation{ - Name: "default", - Description: "default test pnd", - southboundService: sbiService, - deviceService: deviceService, - changes: store.NewChangeStore(), - Id: defaultPndID, + Name: "default", + Description: "default test pnd", + southboundService: sbiService, + networkElementService: deviceService, + changes: store.NewChangeStore(), + Id: defaultPndID, } } diff --git a/controller/nucleus/memoryDeviceStore.go b/controller/nucleus/memoryDeviceStore.go index 6fc400b425fb50a9ad721cd161f323f1c640dacf..aa2f94ff4b8597b65370499673d38d37c62aea52 100644 --- a/controller/nucleus/memoryDeviceStore.go +++ b/controller/nucleus/memoryDeviceStore.go @@ -4,81 +4,81 @@ import ( "encoding/json" "code.fbi.h-da.de/danet/gosdn/controller/customerrs" - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" + "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" "code.fbi.h-da.de/danet/gosdn/controller/store" ) -// MemoryDeviceStore provides a in-memory implementation for devices. -type MemoryDeviceStore struct { - Store map[string]device.LoadedDevice +// MemoryNetworkElementStore provides a in-memory implementation for devices. +type MemoryNetworkElementStore struct { + Store map[string]networkelement.LoadedNetworkElement nameLookupTable map[string]string } // NewMemoryDeviceStore returns a specific in-memory store for devices. -func NewMemoryDeviceStore() device.Store { - return &MemoryDeviceStore{ - Store: make(map[string]device.LoadedDevice), +func NewMemoryDeviceStore() networkelement.Store { + return &MemoryNetworkElementStore{ + Store: make(map[string]networkelement.LoadedNetworkElement), nameLookupTable: make(map[string]string), } } // Add adds a item to the store. -func (t *MemoryDeviceStore) Add(item device.Device) error { - var device device.LoadedDevice +func (t *MemoryNetworkElementStore) Add(item networkelement.NetworkElement) error { + var mne networkelement.LoadedNetworkElement b, err := json.Marshal(item) if err != nil { return err } - err = json.Unmarshal(b, &device) + err = json.Unmarshal(b, &mne) if err != nil { return err } - _, ok := t.Store[device.ID] + _, ok := t.Store[mne.ID] if ok { return nil } - t.Store[device.ID] = device - t.nameLookupTable[item.Name()] = device.ID + t.Store[mne.ID] = mne + t.nameLookupTable[item.Name()] = mne.ID return nil } -// Update updates a existing device. -func (t *MemoryDeviceStore) Update(item device.Device) error { +// Update updates a existing network element. +func (t *MemoryNetworkElementStore) Update(item networkelement.NetworkElement) error { _, ok := t.Store[item.ID().String()] if !ok { return customerrs.CouldNotFindError{ID: item.ID(), Name: item.Name()} } - var device device.LoadedDevice + var mne networkelement.LoadedNetworkElement b, err := json.Marshal(item) if err != nil { return err } - err = json.Unmarshal(b, &device) + err = json.Unmarshal(b, &mne) if err != nil { return err } - t.Store[item.ID().String()] = device + t.Store[item.ID().String()] = mne t.nameLookupTable[item.Name()] = item.ID().String() return nil } -// Delete deletes a device from the device store. -func (t *MemoryDeviceStore) Delete(item device.Device) error { +// Delete deletes a network element from the network element store. +func (t *MemoryNetworkElementStore) Delete(item networkelement.NetworkElement) error { delete(t.Store, item.ID().String()) return nil } -// Get takes a Device's UUID or name and returns the Device. -func (t *MemoryDeviceStore) Get(query store.Query) (device.LoadedDevice, error) { +// Get takes a network element's UUID or name and returns the network element. +func (t *MemoryNetworkElementStore) Get(query store.Query) (networkelement.LoadedNetworkElement, error) { // First search for direct hit on UUID. item, ok := t.Store[query.ID.String()] if !ok { @@ -100,8 +100,8 @@ func (t *MemoryDeviceStore) Get(query store.Query) (device.LoadedDevice, error) } // GetAll returns all stored devices. -func (t *MemoryDeviceStore) GetAll() ([]device.LoadedDevice, error) { - var allItems []device.LoadedDevice +func (t *MemoryNetworkElementStore) GetAll() ([]networkelement.LoadedNetworkElement, error) { + var allItems []networkelement.LoadedNetworkElement for _, item := range t.Store { allItems = append(allItems, item) diff --git a/controller/nucleus/memoryPndStore.go b/controller/nucleus/memoryPndStore.go index 7cb549236657fa6076e763733d403df2332f8fca..e454095a2c6da10dac1edb8d28c890d2dae91051 100644 --- a/controller/nucleus/memoryPndStore.go +++ b/controller/nucleus/memoryPndStore.go @@ -2,8 +2,8 @@ package nucleus import ( "code.fbi.h-da.de/danet/gosdn/controller/customerrs" - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkdomain" + "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" "code.fbi.h-da.de/danet/gosdn/controller/store" "github.com/google/uuid" ) @@ -11,14 +11,14 @@ import ( // MemoryPndStore provides a in-memory implementation for a pnd store. type MemoryPndStore struct { Store map[uuid.UUID]networkdomain.NetworkDomain - pendingChannels map[uuid.UUID]chan device.Details + pendingChannels map[uuid.UUID]chan networkelement.Details } // NewMemoryPndStore returns a in-memory implementation for a pnd store. func NewMemoryPndStore() networkdomain.PndStore { return &MemoryPndStore{ Store: make(map[uuid.UUID]networkdomain.NetworkDomain), - pendingChannels: make(map[uuid.UUID]chan device.Details), + pendingChannels: make(map[uuid.UUID]chan networkelement.Details), } } @@ -64,7 +64,7 @@ func (t *MemoryPndStore) GetAll() ([]networkdomain.NetworkDomain, error) { // PendingChannels holds channels used communicate with pending // cSBI deployments. -func (t *MemoryPndStore) PendingChannels(id uuid.UUID, parseErrors ...error) (chan device.Details, error) { +func (t *MemoryPndStore) PendingChannels(id uuid.UUID, parseErrors ...error) (chan networkelement.Details, error) { ch, ok := t.pendingChannels[id] if !ok { return nil, &customerrs.CouldNotFindError{ID: id} @@ -73,7 +73,7 @@ func (t *MemoryPndStore) PendingChannels(id uuid.UUID, parseErrors ...error) (ch } // AddPendingChannel adds a pending channel to the map. -func (t *MemoryPndStore) AddPendingChannel(id uuid.UUID, ch chan device.Details) { +func (t *MemoryPndStore) AddPendingChannel(id uuid.UUID, ch chan networkelement.Details) { t.pendingChannels[id] = ch } diff --git a/controller/nucleus/metrics.go b/controller/nucleus/metrics.go index fb151fde466811a7e4b00c497ea636c50cffebf9..aa5062fab1041fe6b3b154295070dc1d2439284b 100644 --- a/controller/nucleus/metrics.go +++ b/controller/nucleus/metrics.go @@ -6,7 +6,7 @@ import ( ) var ( - deviceCreationsTotal = promauto.NewCounterVec( + networkElementCreationsTotal = promauto.NewCounterVec( prometheus.CounterOpts{ Name: "device_creations_total", Help: "Total number of created devices", @@ -14,7 +14,7 @@ var ( []string{"type"}, ) - deviceCreationDurationSecondsTotal = promauto.NewCounterVec( + networkElementCreationDurationSecondsTotal = promauto.NewCounterVec( prometheus.CounterOpts{ Name: "device_creation_duration_seconds_total", Help: "Total time needed to create devices", @@ -22,7 +22,7 @@ var ( []string{"type"}, ) - deviceCreationDurationSeconds = promauto.NewHistogramVec( + networkElementCreationDurationSeconds = promauto.NewHistogramVec( prometheus.HistogramOpts{ Name: "device_creation_duration_seconds", Help: "Histogram of device creation times", @@ -30,7 +30,7 @@ var ( []string{"type"}, ) - deviceDeletionsTotal = promauto.NewCounterVec( + networkElementDeletionsTotal = promauto.NewCounterVec( prometheus.CounterOpts{ Name: "device_deletions_total", Help: "Total number of deleted devices", @@ -38,7 +38,7 @@ var ( []string{"type"}, ) - deviceDeletionDurationSecondsTotal = promauto.NewCounterVec( + networkElementDeletionDurationSecondsTotal = promauto.NewCounterVec( prometheus.CounterOpts{ Name: "device_deletion_duration_seconds_total", Help: "Total time needed to delete devices", @@ -46,7 +46,7 @@ var ( []string{"type"}, ) - deviceDeletionDurationSeconds = promauto.NewHistogramVec( + networkElementDeletionDurationSeconds = promauto.NewHistogramVec( prometheus.HistogramOpts{ Name: "device_deletion_duration_seconds", Help: "Histogram of device deletion times", diff --git a/controller/nucleus/networkElementService.go b/controller/nucleus/networkElementService.go new file mode 100644 index 0000000000000000000000000000000000000000..2e3159020175d8dba2296171c45d09c9a97c4f3f --- /dev/null +++ b/controller/nucleus/networkElementService.go @@ -0,0 +1,212 @@ +package nucleus + +import ( + "fmt" + + spb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/southbound" + "code.fbi.h-da.de/danet/gosdn/controller/event" + eventInterfaces "code.fbi.h-da.de/danet/gosdn/controller/interfaces/event" + "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" + "code.fbi.h-da.de/danet/gosdn/controller/interfaces/southbound" + "code.fbi.h-da.de/danet/gosdn/controller/store" + "github.com/google/uuid" + "github.com/openconfig/ygot/ygot" + + tpb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/transport" + log "github.com/sirupsen/logrus" +) + +const ( + // NetworkElementEventTopic is the used topic for network element related entity changes. + NetworkElementEventTopic = "managed network element" +) + +// NetworkElementService provides a network element service implementation. +// This services provides abstraction between the user (e.g a PND) and the matching store (e.g. networkElementStore). +type NetworkElementService struct { + networkElementStore networkelement.Store + sbiService southbound.Service + eventService eventInterfaces.Service +} + +// NewNetworkElementService creates a network element service. +func NewNetworkElementService( + networkElementStore networkelement.Store, + sbiService southbound.Service, + eventService eventInterfaces.Service, +) networkelement.Service { + return &NetworkElementService{ + networkElementStore: networkElementStore, + sbiService: sbiService, + eventService: eventService, + } +} + +// Get takes a network element's UUID or name and returns the network element. +func (s *NetworkElementService) Get(query store.Query) (networkelement.NetworkElement, error) { + loadedNetworkElement, err := s.networkElementStore.Get(query) + if err != nil { + return nil, err + } + + mne, err := s.createNetworkElementFromStore(loadedNetworkElement) + if err != nil { + return nil, err + } + + return mne, nil +} + +// GetAll returns all stored network elements. +func (s *NetworkElementService) GetAll() ([]networkelement.NetworkElement, error) { + var mnes []networkelement.NetworkElement + + loadedNetworkElements, err := s.networkElementStore.GetAll() + if err != nil { + return nil, err + } + + for _, loadedNetworkElement := range loadedNetworkElements { + mne, err := s.createNetworkElementFromStore(loadedNetworkElement) + if err != nil { + return nil, err + } + + mnes = append(mnes, mne) + } + + return mnes, nil +} + +// GetAllAsLoaded returns all stored network elements as LoadedNetworkElement. +// This method should be used if there is no need for a networkelement.NetworkElement, since +// requesting network element information through this method is a lot faster than the +// usual `GetAll` method. +func (s *NetworkElementService) GetAllAsLoaded() ([]networkelement.LoadedNetworkElement, error) { + loadedNetworkElements, err := s.networkElementStore.GetAll() + if err != nil { + return nil, err + } + + return loadedNetworkElements, nil +} + +// Add adds a network element to the network element store. +func (s *NetworkElementService) Add(networkElementToAdd networkelement.NetworkElement) error { + err := s.networkElementStore.Add(networkElementToAdd) + if err != nil { + return err + } + + if err := s.eventService.PublishEvent(NetworkElementEventTopic, event.NewAddEvent(networkElementToAdd.ID())); err != nil { + log.Error(err) + } + + return nil +} + +// UpdateModel updates a existing network element with a new model provided as string. +func (s *NetworkElementService) UpdateModel(networkElementToUpdate networkelement.NetworkElement, modelAsString string) error { + exisitingNetworkElement, err := s.Get(store.Query{ID: networkElementToUpdate.ID()}) + if err != nil { + return err + } + + // Create 'root' path to be able to load the whole model from the store. + path, err := ygot.StringToPath("/", ygot.StructuredPath) + if err != nil { + return err + } + + // Use unmarshall from the network elements SBI to unmarshall ygot json in go struct. + err = exisitingNetworkElement.SBI().Unmarshal([]byte(modelAsString), path, exisitingNetworkElement.GetModel()) + if err != nil { + return err + } + + err = s.networkElementStore.Update(exisitingNetworkElement) + if err != nil { + return err + } + + if err := s.eventService.PublishEvent(NetworkElementEventTopic, event.NewUpdateEvent(networkElementToUpdate.ID())); err != nil { + log.Error(err) + } + + return nil +} + +// Update updates a existing network element. +func (s *NetworkElementService) Update(networkElementToUpdate networkelement.NetworkElement) error { + err := s.networkElementStore.Update(networkElementToUpdate) + if err != nil { + return err + } + + if err := s.eventService.PublishEvent(NetworkElementEventTopic, event.NewUpdateEvent(networkElementToUpdate.ID())); err != nil { + log.Error(err) + } + + return nil +} + +// Delete deletes a network element from the network element store. +func (s *NetworkElementService) Delete(networkElementToDelete networkelement.NetworkElement) error { + err := s.networkElementStore.Delete(networkElementToDelete) + if err != nil { + return err + } + if networkElementToDelete.SBI().Type() == spb.Type_TYPE_PLUGIN { + err = s.sbiService.Delete(networkElementToDelete.SBI()) + if err != nil { + return err + } + } + + if err := s.eventService.PublishEvent(NetworkElementEventTopic, event.NewDeleteEvent(networkElementToDelete.ID())); err != nil { + log.Error(err) + } + + return nil +} + +func (s *NetworkElementService) createNetworkElementFromStore(loadedNetworkElement networkelement.LoadedNetworkElement) (networkelement.NetworkElement, error) { + if loadedNetworkElement.SBI == "" { + return nil, fmt.Errorf("no sbi found for network element") + } + + sbiForNetworkElement, err := s.sbiService.Get(store.Query{ID: uuid.MustParse(loadedNetworkElement.SBI)}) + if err != nil { + return nil, err + } + + mne, err := NewNetworkElement( + loadedNetworkElement.Name, + uuid.MustParse(loadedNetworkElement.ID), + &tpb.TransportOption{ + Address: loadedNetworkElement.TransportAddress, + Username: loadedNetworkElement.TransportUsername, + Password: loadedNetworkElement.TransportPassword, + TransportOption: &tpb.TransportOption_GnmiTransportOption{ + GnmiTransportOption: &tpb.GnmiTransportOption{}, + }, + Type: spb.Type_TYPE_OPENCONFIG, + }, sbiForNetworkElement) + if err != nil { + return nil, err + } + + // Create 'root' path to be able to load the whole model from the store. + path, err := ygot.StringToPath("/", ygot.StructuredPath) + if err != nil { + return nil, err + } + + // Use unmarshall from the network elements SBI to unmarshall ygot json in go struct. + err = mne.SBI().Unmarshal([]byte(loadedNetworkElement.Model), path, mne.GetModel()) + if err != nil { + return nil, err + } + + return mne, nil +} diff --git a/controller/nucleus/networkElementServiceMock.go b/controller/nucleus/networkElementServiceMock.go new file mode 100644 index 0000000000000000000000000000000000000000..dcdcea67d10f160715d28e5f7ee153f4c9285e27 --- /dev/null +++ b/controller/nucleus/networkElementServiceMock.go @@ -0,0 +1,115 @@ +package nucleus + +import ( + "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" + "code.fbi.h-da.de/danet/gosdn/controller/store" + "github.com/google/uuid" +) + +// NetworkElementServiceMock provides a in-memory implementation for multiple stores. +type NetworkElementServiceMock struct { + Store map[uuid.UUID]networkelement.NetworkElement + nameLookupTable map[string]uuid.UUID +} + +// NewNetworkElementServiceMock returns a specific in-memory store for network element service. +func NewNetworkElementServiceMock() networkelement.Service { + return &NetworkElementServiceMock{ + Store: make(map[uuid.UUID]networkelement.NetworkElement), + nameLookupTable: make(map[string]uuid.UUID), + } +} + +// Add adds a item network element. +func (t *NetworkElementServiceMock) Add(item networkelement.NetworkElement) error { + _, ok := t.Store[item.ID()] + if ok { + return nil + } + + t.Store[item.ID()] = item + t.nameLookupTable[item.Name()] = item.ID() + + return nil +} + +// Update updates a item network element. +func (t *NetworkElementServiceMock) Update(item networkelement.NetworkElement) error { + _, ok := t.Store[item.ID()] + if ok { + return nil + } + + t.Store[item.ID()] = item + t.nameLookupTable[item.Name()] = item.ID() + + return nil +} + +// UpdateModel updates a item network element. +func (t *NetworkElementServiceMock) UpdateModel(item networkelement.NetworkElement, model string) error { + _, ok := t.Store[item.ID()] + if ok { + return nil + } + + t.Store[item.ID()] = item + t.nameLookupTable[item.Name()] = item.ID() + + return nil +} + +// Delete deletes a item network element. +func (t *NetworkElementServiceMock) Delete(item networkelement.NetworkElement) error { + delete(t.Store, item.ID()) + + return nil +} + +// Get gets a item network element. +func (t *NetworkElementServiceMock) Get(query store.Query) (networkelement.NetworkElement, error) { + // First search for direct hit on UUID. + item, ok := t.Store[query.ID] + if !ok { + // Second search for name + id, ok := t.nameLookupTable[query.Name] + if !ok { + return nil, nil + } + + item, ok := t.Store[id] + if !ok { + return nil, nil + } + + return item, nil + } + + return item, nil +} + +// GetAll gets all items. +func (t *NetworkElementServiceMock) GetAll() ([]networkelement.NetworkElement, error) { + var allItems []networkelement.NetworkElement + + for _, item := range t.Store { + allItems = append(allItems, item) + } + + return allItems, nil +} + +// GetAllAsLoaded gets all items as `networkelement.LoadedNetworkElement`. +func (t *NetworkElementServiceMock) GetAllAsLoaded() ([]networkelement.LoadedNetworkElement, error) { + var allItems []networkelement.LoadedNetworkElement + + for _, item := range t.Store { + allItems = append(allItems, networkelement.LoadedNetworkElement{ + ID: item.ID().String(), + Name: item.Name(), + SBI: item.SBI().ID().String(), + }) + } + + return allItems, nil +} diff --git a/controller/nucleus/deviceStore.go b/controller/nucleus/networkElementStore.go similarity index 52% rename from controller/nucleus/deviceStore.go rename to controller/nucleus/networkElementStore.go index 22db669671e533f11c12c68efdb1aa59a9422941..173395149e86a4624e328955b23d2accb2a284c6 100644 --- a/controller/nucleus/deviceStore.go +++ b/controller/nucleus/networkElementStore.go @@ -3,22 +3,22 @@ package nucleus import ( "fmt" - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" + "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" "code.fbi.h-da.de/danet/gosdn/controller/store" "github.com/google/uuid" log "github.com/sirupsen/logrus" ) -// NewDeviceStore returns a DeviceStore. -func NewDeviceStore(pndUUID uuid.UUID) device.Store { +// NewNetworkElementStore returns a NetworkElementStore. +func NewNetworkElementStore(pndUUID uuid.UUID) networkelement.Store { storeMode := store.GetStoreMode() log.Debugf("StoreMode: %s", storeMode) switch storeMode { case store.Database: - return &DatabaseDeviceStore{ - storeName: fmt.Sprintf("device-store-%s.json", pndUUID.String()), + return &DatabaseNetworkElementStore{ + storeName: fmt.Sprintf("networkElement-store-%s.json", pndUUID.String()), } default: diff --git a/controller/nucleus/deviceWatcher.go b/controller/nucleus/networkElementWatcher.go similarity index 75% rename from controller/nucleus/deviceWatcher.go rename to controller/nucleus/networkElementWatcher.go index 61e3f0897ef83dd418ef51a74f1255603c56cc4b..0fd4774da83b49d031dfd7addd99ec09c7f61beb 100644 --- a/controller/nucleus/deviceWatcher.go +++ b/controller/nucleus/networkElementWatcher.go @@ -5,8 +5,8 @@ import ( "fmt" "code.fbi.h-da.de/danet/gosdn/controller/customerrs" - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkdomain" + "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/transport" "code.fbi.h-da.de/danet/gosdn/controller/nucleus/types" "code.fbi.h-da.de/danet/gosdn/controller/store" @@ -25,7 +25,7 @@ const ( // DeviceWatcher is a component that subscribes to devices via gNMI from within the controller and handles // responses by triggering the internal event process. -type DeviceWatcher struct { +type NetworkElementWatcher struct { pndStore networkdomain.PndStore deviceSubcriptions map[uuid.UUID]*deviceSubscriptionHelper } @@ -37,8 +37,8 @@ type deviceSubscriptionHelper struct { } // NewDeviceWatcher takes a pndStore to subscribe to device paths. -func NewDeviceWatcher(pndStore networkdomain.PndStore) *DeviceWatcher { - return &DeviceWatcher{ +func NewDeviceWatcher(pndStore networkdomain.PndStore) *NetworkElementWatcher { + return &NetworkElementWatcher{ pndStore: pndStore, deviceSubcriptions: make(map[uuid.UUID]*deviceSubscriptionHelper), } @@ -47,7 +47,7 @@ func NewDeviceWatcher(pndStore networkdomain.PndStore) *DeviceWatcher { // SubToDevices subscribes to every available device in each network domain according to provided SubscribeOptions. // Paths should be provided in the following format [][]string{{"system", "config", "hostname"}} // SubscribeOptions can be nil. Use nil for a fixed, pre-defined set of gNMI subscription options (streaming in sample mode each second). -func (d *DeviceWatcher) SubToDevices(paths [][]string, opts *gnmi.SubscribeOptions) { +func (d *NetworkElementWatcher) SubToDevices(paths [][]string, opts *gnmi.SubscribeOptions) { if opts == nil { opts = &gnmi.SubscribeOptions{ Mode: gNMISubscribeMode, @@ -67,8 +67,8 @@ func (d *DeviceWatcher) SubToDevices(paths [][]string, opts *gnmi.SubscribeOptio } } -func (d *DeviceWatcher) subscribeToPndDevices(pndID string, pnd networkdomain.NetworkDomain, opts *gnmi.SubscribeOptions) { - for _, device := range pnd.Devices() { +func (d *NetworkElementWatcher) subscribeToPndDevices(pndID string, pnd networkdomain.NetworkDomain, opts *gnmi.SubscribeOptions) { + for _, device := range pnd.NetworkElements() { subID := uuid.New() stopContext, cancel := context.WithCancel(context.Background()) @@ -80,29 +80,29 @@ func (d *DeviceWatcher) subscribeToPndDevices(pndID string, pnd networkdomain.Ne } } -func (d *DeviceWatcher) callSubscribe(stopContext context.Context, pndID string, device device.Device, opts *gnmi.SubscribeOptions) { +func (d *NetworkElementWatcher) callSubscribe(stopContext context.Context, pndID string, mne networkelement.NetworkElement, opts *gnmi.SubscribeOptions) { gNMIOptionsCtx := context.Background() gNMIOptionsCtx = context.WithValue(gNMIOptionsCtx, types.CtxKeyOpts, opts) // SubscriptionInformation contains pnd ID, device ID and name to be used in the internal subscribe to check // from which device a response was sent - if err := device.Transport().ControlPlaneSubscribe(gNMIOptionsCtx, d.handleSubscribeResponse, &transport.SubscriptionInformation{ + if err := mne.Transport().ControlPlaneSubscribe(gNMIOptionsCtx, d.handleSubscribeResponse, &transport.SubscriptionInformation{ PndID: pndID, - DeviceID: device.ID().String(), - DeviceName: device.Name(), + DeviceID: mne.ID().String(), + DeviceName: mne.Name(), StopContext: stopContext, }); err != nil { log.Error(err) } } -func (d *DeviceWatcher) addToDeviceSubscriptions(subID uuid.UUID, devSub *deviceSubscriptionHelper) { +func (d *NetworkElementWatcher) addToDeviceSubscriptions(subID uuid.UUID, devSub *deviceSubscriptionHelper) { //TODO: improve handling of subscriptions, like be able to expose to apps so specific subscriptions instead of only all can be stopped in the future d.deviceSubcriptions[subID] = devSub } // StopAndRemoveAllDeviceSubscriptions stops and removes all the available running subscriptions. -func (d *DeviceWatcher) StopAndRemoveAllDeviceSubscriptions() { +func (d *NetworkElementWatcher) StopAndRemoveAllDeviceSubscriptions() { for key := range d.deviceSubcriptions { d.StopAndRemoveDeviceSubscription(key) } @@ -110,14 +110,14 @@ func (d *DeviceWatcher) StopAndRemoveAllDeviceSubscriptions() { // StopAndRemoveDeviceSubscription passes a subscription uuid to stop the running subscription go routing and removes the entry from the map // of device subscriptions. -func (d *DeviceWatcher) StopAndRemoveDeviceSubscription(subID uuid.UUID) { +func (d *NetworkElementWatcher) StopAndRemoveDeviceSubscription(subID uuid.UUID) { d.deviceSubcriptions[subID].stopFunc() delete(d.deviceSubcriptions, subID) } // handleSubscribeResponse takes the subscribe response and additional information about the device to distinguish // from which device a subscribe response was sent including improved error handling. -func (d *DeviceWatcher) handleSubscribeResponse(resp *gpb.SubscribeResponse, subscriptionInfo *transport.SubscriptionInformation) { +func (d *NetworkElementWatcher) handleSubscribeResponse(resp *gpb.SubscribeResponse, subscriptionInfo *transport.SubscriptionInformation) { switch resp := resp.Response.(type) { case *gpb.SubscribeResponse_Error: log.Error(&customerrs.SubscribeResponseError{ @@ -141,7 +141,7 @@ func (d *DeviceWatcher) handleSubscribeResponse(resp *gpb.SubscribeResponse, sub } } -func (d *DeviceWatcher) handleSubscribeResponseUpdate(resp *gpb.SubscribeResponse_Update, subscriptionInfo *transport.SubscriptionInformation) { +func (d *NetworkElementWatcher) handleSubscribeResponseUpdate(resp *gpb.SubscribeResponse_Update, subscriptionInfo *transport.SubscriptionInformation) { pndID, err := uuid.Parse(subscriptionInfo.PndID) if err != nil { log.Error(err) @@ -152,7 +152,7 @@ func (d *DeviceWatcher) handleSubscribeResponseUpdate(resp *gpb.SubscribeRespons log.Error(err) } - device, err := pnd.GetDevice(subscriptionInfo.DeviceID) + device, err := pnd.GetNetworkElement(subscriptionInfo.DeviceID) if err != nil { log.Error(err) } @@ -161,7 +161,7 @@ func (d *DeviceWatcher) handleSubscribeResponseUpdate(resp *gpb.SubscribeRespons if err != nil { log.Error(err) } else { - if err := pnd.UpdateDeviceAfterSubscribeResponse(device); err != nil { + if err := pnd.UpdateNetworkElementAfterSubscribeResponse(device); err != nil { log.Error(err) } } diff --git a/controller/nucleus/pndFilesystemStore.go b/controller/nucleus/pndFilesystemStore.go index 524945a6a6c5f4006e7e58a2d5a6511d82aa0758..d7fb1f5978e3ac04b3dadc2fbf3def280f864019 100644 --- a/controller/nucleus/pndFilesystemStore.go +++ b/controller/nucleus/pndFilesystemStore.go @@ -7,8 +7,8 @@ import ( cpb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/csbi" "code.fbi.h-da.de/danet/gosdn/controller/customerrs" - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkdomain" + "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" "code.fbi.h-da.de/danet/gosdn/controller/store" "github.com/google/uuid" log "github.com/sirupsen/logrus" @@ -19,7 +19,7 @@ import ( // FilesystemPndStore provides a filesystem implementation for a pnd store. type FilesystemPndStore struct { - pendingChannels map[uuid.UUID]chan device.Details + pendingChannels map[uuid.UUID]chan networkelement.Details csbiClient cpb.CsbiServiceClient pathToPndFile string fileMutex sync.Mutex @@ -32,7 +32,7 @@ func NewFilesystemPndStore() FilesystemPndStore { } return FilesystemPndStore{ - pendingChannels: make(map[uuid.UUID]chan device.Details), + pendingChannels: make(map[uuid.UUID]chan networkelement.Details), pathToPndFile: store.GetCompletePathToFileStore(store.PndFilename), fileMutex: sync.Mutex{}, } @@ -168,7 +168,7 @@ func (t *FilesystemPndStore) GetAll() ([]networkdomain.NetworkDomain, error) { // PendingChannels holds channels used communicate with pending // cSBI deployments. -func (t *FilesystemPndStore) PendingChannels(id uuid.UUID, parseErrors ...error) (chan device.Details, error) { +func (t *FilesystemPndStore) PendingChannels(id uuid.UUID, parseErrors ...error) (chan networkelement.Details, error) { ch, ok := t.pendingChannels[id] if !ok { return nil, &customerrs.CouldNotFindError{ID: id} @@ -177,7 +177,7 @@ func (t *FilesystemPndStore) PendingChannels(id uuid.UUID, parseErrors ...error) } // AddPendingChannel adds a pending channel to the map. -func (t *FilesystemPndStore) AddPendingChannel(id uuid.UUID, ch chan device.Details) { +func (t *FilesystemPndStore) AddPendingChannel(id uuid.UUID, ch chan networkelement.Details) { t.pendingChannels[id] = ch } @@ -186,7 +186,7 @@ func (t *FilesystemPndStore) RemovePendingChannel(id uuid.UUID) { delete(t.pendingChannels, id) } -func (t *FilesystemPndStore) callback(id uuid.UUID, ch chan device.Details) { +func (t *FilesystemPndStore) callback(id uuid.UUID, ch chan networkelement.Details) { if ch != nil { t.AddPendingChannel(id, ch) log.Infof("pending channel %v added", id) diff --git a/controller/nucleus/pndStore.go b/controller/nucleus/pndStore.go index 61f87daa9ff2b7522c6889aedc6441b741c771fd..c370e9273619e1ad83396ed62b1a7f832aedaa77 100644 --- a/controller/nucleus/pndStore.go +++ b/controller/nucleus/pndStore.go @@ -1,8 +1,8 @@ package nucleus import ( - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkdomain" + "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" "code.fbi.h-da.de/danet/gosdn/controller/store" "github.com/google/uuid" log "github.com/sirupsen/logrus" @@ -28,7 +28,7 @@ func NewPndStore() networkdomain.PndStore { switch storeMode { case store.Database: return &DatabasePndStore{ - pendingChannels: make(map[uuid.UUID]chan device.Details), + pendingChannels: make(map[uuid.UUID]chan networkelement.Details), pndStoreName: "pnd-store.json", } diff --git a/controller/nucleus/principalNetworkDomain.go b/controller/nucleus/principalNetworkDomain.go index e694549174d8b389927b8ac32d75483d12d25a7a..f47087040bdf6afa29f76efc66552a04f5213120 100644 --- a/controller/nucleus/principalNetworkDomain.go +++ b/controller/nucleus/principalNetworkDomain.go @@ -27,9 +27,9 @@ import ( "code.fbi.h-da.de/danet/gosdn/controller/customerrs" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/change" - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" eventInterfaces "code.fbi.h-da.de/danet/gosdn/controller/interfaces/event" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkdomain" + "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/southbound" gGnmi "code.fbi.h-da.de/danet/gosdn/controller/nucleus/util/gnmi" @@ -55,7 +55,7 @@ func NewPND( description string, id uuid.UUID, c cpb.CsbiServiceClient, - callback func(uuid.UUID, chan device.Details), + callback func(uuid.UUID, chan networkelement.Details), ) (networkdomain.NetworkDomain, error) { eventService, err := eventservice.NewEventService() if err != nil { @@ -63,11 +63,11 @@ func NewPND( } sbiStore := NewSbiStore(id) - deviceStore := NewDeviceStore(id) + networkElementStore := NewNetworkElementStore(id) sbiService := NewSbiService(sbiStore, eventService) - deviceService := NewDeviceService( - deviceStore, + networkElementService := NewNetworkElementService( + networkElementStore, sbiService, eventService, ) @@ -79,12 +79,12 @@ func NewPND( } pnd := &pndImplementation{ - Name: name, - Description: description, - southboundService: sbiService, - deviceService: deviceService, - changes: changeStore, - Id: id, + Name: name, + Description: description, + southboundService: sbiService, + networkElementService: networkElementService, + changes: changeStore, + Id: id, csbiClient: c, callback: callback, @@ -108,16 +108,16 @@ func NewPND( } type pndImplementation struct { - Name string `json:"name,omitempty"` - Description string `json:"description,omitempty"` - southboundService southbound.Service - deviceService device.Service - changes *store.ChangeStore + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + southboundService southbound.Service + networkElementService networkelement.Service + changes *store.ChangeStore //nolint Id uuid.UUID `json:"id,omitempty"` csbiClient cpb.CsbiServiceClient - callback func(uuid.UUID, chan device.Details) + callback func(uuid.UUID, chan networkelement.Details) eventService eventInterfaces.Service } @@ -157,16 +157,16 @@ func (pnd *pndImplementation) ID() uuid.UUID { return pnd.Id } -func (pnd *pndImplementation) Devices() []device.Device { - allDevices, _ := pnd.deviceService.GetAll() +func (pnd *pndImplementation) NetworkElements() []networkelement.NetworkElement { + allNetworkElements, _ := pnd.networkElementService.GetAll() - return allDevices + return allNetworkElements } -func (pnd *pndImplementation) FlattenedDevices() []device.LoadedDevice { - allDevices, _ := pnd.deviceService.GetAllAsLoaded() +func (pnd *pndImplementation) FlattenedNetworkElements() []networkelement.LoadedNetworkElement { + allNetworkElements, _ := pnd.networkElementService.GetAllAsLoaded() - return allDevices + return allNetworkElements } // GetName returns the name of the PND. @@ -208,35 +208,35 @@ func (pnd *pndImplementation) AddSbi(s southbound.SouthboundInterface) error { } // RemoveSbi removes a SBI from the PND -// devices and remove the devices using this SBI. +// network elements and remove the network elements using this SBI. func (pnd *pndImplementation) RemoveSbi(sid uuid.UUID) error { - var associatedDevices []device.LoadedDevice + var associatedNetworkElements []networkelement.LoadedNetworkElement - allExistingDevices, err := pnd.deviceService.GetAllAsLoaded() + allExistingNetworkElements, err := pnd.networkElementService.GetAllAsLoaded() if err != nil { return err } - // range over all storable items within the device store - for _, device := range allExistingDevices { - // check if the device uses the provided SBI and add it to the devices + // range over all storable items within the network element store + for _, mne := range allExistingNetworkElements { + // check if the network element uses the provided SBI and add it to the network element // slice. - loadedSbiUUID, err := uuid.Parse(device.SBI) + loadedSbiUUID, err := uuid.Parse(mne.SBI) if err != nil { return err } if loadedSbiUUID == sid { - associatedDevices = append(associatedDevices, device) + associatedNetworkElements = append(associatedNetworkElements, mne) } } - // range over associated devices and remove each one of them - for _, d := range associatedDevices { - loadedDeviceUUID, err := uuid.Parse(d.ID) + // range over associated network elements and remove each one of them + for _, aMNE := range associatedNetworkElements { + loadedNetworkElementUUID, err := uuid.Parse(aMNE.ID) if err != nil { return err } - if err := pnd.removeDevice(loadedDeviceUUID); err != nil { + if err := pnd.removeNetworkElement(loadedNetworkElementUUID); err != nil { return err } } @@ -244,11 +244,11 @@ func (pnd *pndImplementation) RemoveSbi(sid uuid.UUID) error { return pnd.removeSbi(sid) } -// AddDevice adds a new device to the PND. -func (pnd *pndImplementation) AddDevice(name string, opt *tpb.TransportOption, sid uuid.UUID) (uuid.UUID, error) { +// AddNetworkElement adds a new network element to the PND. +func (pnd *pndImplementation) AddNetworkElement(name string, opt *tpb.TransportOption, sid uuid.UUID) (uuid.UUID, error) { labels := prometheus.Labels{"type": opt.Type.String()} - start := metrics.StartHook(labels, deviceCreationsTotal) - defer metrics.FinishHook(labels, start, deviceCreationDurationSecondsTotal, deviceCreationDurationSeconds) + start := metrics.StartHook(labels, networkElementCreationsTotal) + defer metrics.FinishHook(labels, start, networkElementCreationDurationSecondsTotal, networkElementCreationDurationSeconds) var sbi southbound.SouthboundInterface var err error @@ -268,48 +268,48 @@ func (pnd *pndImplementation) AddDevice(name string, opt *tpb.TransportOption, s } } - d, err := NewDevice(name, uuid.Nil, opt, sbi) + mne, err := NewNetworkElement(name, uuid.Nil, opt, sbi) if err != nil { return uuid.Nil, err } - return pnd.addDevice(d) + return pnd.addNetworkElement(mne) } // TODO: (maba): This should be changed to UUID. -func (pnd *pndImplementation) GetDevice(identifier string) (device.Device, error) { +func (pnd *pndImplementation) GetNetworkElement(identifier string) (networkelement.NetworkElement, error) { id, err := uuid.Parse(identifier) if err != nil { id = uuid.Nil } - d, err := pnd.deviceService.Get(store.Query{ + mne, err := pnd.networkElementService.Get(store.Query{ ID: id, Name: identifier, }) - if d == nil { - return nil, fmt.Errorf("no device found") + if mne == nil { + return nil, fmt.Errorf("no network element found") } if err != nil { return nil, err } - return d, nil + return mne, nil } -// RemoveDevice removes a device from the PND. -func (pnd *pndImplementation) RemoveDevice(uuid uuid.UUID) error { - return pnd.removeDevice(uuid) +// RemoveNetworkElement removes a network element from the PND. +func (pnd *pndImplementation) RemoveNetworkElement(uuid uuid.UUID) error { + return pnd.removeNetworkElement(uuid) } -// UpdateDeviceModel updates a device from the PND. -func (pnd *pndImplementation) UpdateDevice(device device.Device, modelAsString string) error { - err := pnd.deviceService.UpdateModel(device, modelAsString) +// UpdateNetworkElementModel updates a network element from the PND. +func (pnd *pndImplementation) UpdateNetworkElement(mne networkelement.NetworkElement, modelAsString string) error { + err := pnd.networkElementService.UpdateModel(mne, modelAsString) if err != nil { return err } - err = pnd.ensureIntendedConfigurationIsAppliedOnDevice(device.ID()) + err = pnd.ensureIntendedConfigurationIsAppliedOnNetworkElement(mne.ID()) if err != nil { return err } @@ -340,25 +340,25 @@ func (pnd *pndImplementation) removeSbi(id uuid.UUID) error { return pnd.southboundService.Delete(sbi) } -// addDevice adds a device to the PND's device store. -func (pnd *pndImplementation) addDevice(device device.Device) (uuid.UUID, error) { - err := pnd.deviceService.Add(device) +// addNetworkElement adds a network element to the PND's network element store. +func (pnd *pndImplementation) addNetworkElement(mne networkelement.NetworkElement) (uuid.UUID, error) { + err := pnd.networkElementService.Add(mne) if err != nil { return uuid.Nil, err } - if device.IsTransportValid() { - _, err = pnd.Request(device.ID(), "/interfaces") + if mne.IsTransportValid() { + _, err = pnd.Request(mne.ID(), "/interfaces") if err != nil { return uuid.Nil, err } } - return device.ID(), nil + return mne.ID(), nil } -func (pnd *pndImplementation) removeDevice(id uuid.UUID) error { - d, err := pnd.deviceService.Get(store.Query{ +func (pnd *pndImplementation) removeNetworkElement(id uuid.UUID) error { + mne, err := pnd.networkElementService.Get(store.Query{ ID: id, Name: id.String(), }) @@ -366,23 +366,23 @@ func (pnd *pndImplementation) removeDevice(id uuid.UUID) error { return err } - if d == nil { - return fmt.Errorf("no device found") + if mne == nil { + return fmt.Errorf("no network element found") } - labels := prometheus.Labels{"type": d.SBI().Type().String()} - start := metrics.StartHook(labels, deviceDeletionsTotal) - defer metrics.FinishHook(labels, start, deviceDeletionDurationSecondsTotal, deviceDeletionDurationSeconds) - switch d.(type) { - case *CsbiDevice: - return pnd.handleCsbiDeletion(d) + labels := prometheus.Labels{"type": mne.SBI().Type().String()} + start := metrics.StartHook(labels, networkElementDeletionsTotal) + defer metrics.FinishHook(labels, start, networkElementDeletionDurationSecondsTotal, networkElementDeletionDurationSeconds) + switch mne.(type) { + case *CsbiNetworkElement: + return pnd.handleCsbiDeletion(mne) default: - return pnd.deviceService.Delete(d) + return pnd.networkElementService.Delete(mne) } } -func (pnd *pndImplementation) MarshalDevice(identifier string) (string, error) { - foundDevice, err := pnd.deviceService.Get(store.Query{ +func (pnd *pndImplementation) MarshalNetworkElement(identifier string) (string, error) { + foundNetworkElement, err := pnd.networkElementService.Get(store.Query{ ID: uuid.MustParse(identifier), Name: identifier, }) @@ -390,33 +390,33 @@ func (pnd *pndImplementation) MarshalDevice(identifier string) (string, error) { return "", err } - jsonTree, err := json.MarshalIndent(foundDevice.GetModel(), "", "\t") + jsonTree, err := json.MarshalIndent(foundNetworkElement.GetModel(), "", "\t") if err != nil { return "", err } log.WithFields(log.Fields{ "pnd": pnd.Id, "Identifier": identifier, - "Name": foundDevice.Name, - }).Info("marshalled device") + "Name": foundNetworkElement.Name, + }).Info("marshalled network element") return string(jsonTree), nil } -// Request sends a get request to a specific device. +// Request sends a get request to a specific network element. func (pnd *pndImplementation) Request(uuid uuid.UUID, path string) (proto.Message, error) { - d, err := pnd.deviceService.Get(store.Query{ + mne, err := pnd.networkElementService.Get(store.Query{ ID: uuid, Name: uuid.String(), }) if err != nil { return nil, err } - if d == nil { - return nil, fmt.Errorf("no device found") + if mne == nil { + return nil, fmt.Errorf("no network element found") } ctx := context.Background() - res, err := d.Transport().Get(ctx, path) + res, err := mne.Transport().Get(ctx, path) if err != nil { return nil, err } @@ -427,12 +427,12 @@ func (pnd *pndImplementation) Request(uuid uuid.UUID, path string) (proto.Messag Type: (*proto.Message)(nil), } } - err = d.ProcessResponse(resp) + err = mne.ProcessResponse(resp) if err != nil { return nil, err } - err = pnd.deviceService.Update(d) + err = pnd.networkElementService.Update(mne) if err != nil { return nil, err } @@ -440,19 +440,19 @@ func (pnd *pndImplementation) Request(uuid uuid.UUID, path string) (proto.Messag return resp, nil } -// RequestAll sends a request for all registered devices. +// RequestAll sends a request for all registered network elements. func (pnd *pndImplementation) RequestAll(path string) error { - allDevices, err := pnd.deviceService.GetAllAsLoaded() + allNetworkElements, err := pnd.networkElementService.GetAllAsLoaded() if err != nil { return err } - for _, d := range allDevices { - deviceUUID, err := uuid.Parse(d.ID) + for _, mne := range allNetworkElements { + mneUUID, err := uuid.Parse(mne.ID) if err != nil { return err } - _, err = pnd.Request(deviceUUID, path) + _, err = pnd.Request(mneUUID, path) if err != nil { return err } @@ -462,19 +462,19 @@ func (pnd *pndImplementation) RequestAll(path string) error { log.WithFields(log.Fields{ "pnd": pnd.Id, "path": path, - }).Info("sent request to all devices") + }).Info("sent request to all network elements") return nil } -func (pnd *pndImplementation) ensureIntendedConfigurationIsAppliedOnDevice(deviceID uuid.UUID) error { - device, err := pnd.deviceService.Get(store.Query{ - ID: deviceID, +func (pnd *pndImplementation) ensureIntendedConfigurationIsAppliedOnNetworkElement(mneID uuid.UUID) error { + mne, err := pnd.networkElementService.Get(store.Query{ + ID: mneID, }) if err != nil { return err } - model, err := device.GetModelAsString() + model, err := mne.GetModelAsString() if err != nil { return err } @@ -492,9 +492,9 @@ func (pnd *pndImplementation) ensureIntendedConfigurationIsAppliedOnDevice(devic }, }} - response, err := device.Transport().CustomSet(context.Background(), req) + response, err := mne.Transport().CustomSet(context.Background(), req) if err != nil { - log.Errorf("Failed to apply model of device err=%+v, response=%+v", err, response) + log.Errorf("Failed to apply model of network element err=%+v, response=%+v", err, response) return err } @@ -507,14 +507,14 @@ func (pnd *pndImplementation) ensureIntendedConfigurationIsAppliedOnDevice(devic // nolint:gocyclo func (pnd *pndImplementation) ChangeMNE(duid uuid.UUID, operation ppb.ApiOperation, path string, value ...string) (uuid.UUID, error) { //TODO: check if we can get cyclomatic complexity from 16 to at least 15 - d, err := pnd.deviceService.Get(store.Query{ + mne, err := pnd.networkElementService.Get(store.Query{ ID: duid, }) if err != nil { return uuid.Nil, err } - validatedCpy, err := d.CreateModelCopy() + validatedCpy, err := mne.CreateModelCopy() if err != nil { return uuid.Nil, err } @@ -532,14 +532,14 @@ func (pnd *pndImplementation) ChangeMNE(duid uuid.UUID, operation ppb.ApiOperati } switch operation { case ppb.ApiOperation_API_OPERATION_UPDATE, ppb.ApiOperation_API_OPERATION_REPLACE: - _, entry, err := ytypes.GetOrCreateNode(d.SBI().Schema().RootSchema(), validatedCpy, p) + _, entry, err := ytypes.GetOrCreateNode(mne.SBI().Schema().RootSchema(), validatedCpy, p) if err != nil { return uuid.Nil, err } if entry.IsDir() { opts := []ytypes.UnmarshalOpt{&ytypes.IgnoreExtraFields{}} - if err := d.SBI().Unmarshal([]byte(value[0]), p, validatedCpy, opts...); err != nil { + if err := mne.SBI().Unmarshal([]byte(value[0]), p, validatedCpy, opts...); err != nil { return uuid.Nil, err } } else if entry.IsLeaf() { @@ -548,12 +548,12 @@ func (pnd *pndImplementation) ChangeMNE(duid uuid.UUID, operation ppb.ApiOperati return uuid.Nil, err } opts := []ytypes.SetNodeOpt{&ytypes.InitMissingElements{}, &ytypes.TolerateJSONInconsistencies{}} - if err := ytypes.SetNode(d.SBI().Schema().RootSchema(), validatedCpy, p, typedValue, opts...); err != nil { + if err := ytypes.SetNode(mne.SBI().Schema().RootSchema(), validatedCpy, p, typedValue, opts...); err != nil { return uuid.Nil, err } } case ppb.ApiOperation_API_OPERATION_DELETE: - if err := ytypes.DeleteNode(d.SBI().Schema().RootSchema(), validatedCpy, p); err != nil { + if err := ytypes.DeleteNode(mne.SBI().Schema().RootSchema(), validatedCpy, p); err != nil { return uuid.Nil, err } default: @@ -565,11 +565,11 @@ func (pnd *pndImplementation) ChangeMNE(duid uuid.UUID, operation ppb.ApiOperati ctx := context.WithValue(context.Background(), types.CtxKeyOperation, operation) // nolint payload := change.Payload{Original: original, Modified: modified} pathToSet := path - schema := d.SBI().Schema() - return d.Transport().Set(ctx, payload, pathToSet, schema) + schema := mne.SBI().Schema() + return mne.Transport().Set(ctx, payload, pathToSet, schema) } - ch := NewChange(duid, d.GetModel(), validatedCpy, callback) + ch := NewChange(duid, mne.GetModel(), validatedCpy, callback) if err := pnd.changes.Add(ch); err != nil { return uuid.Nil, err @@ -579,7 +579,7 @@ func (pnd *pndImplementation) ChangeMNE(duid uuid.UUID, operation ppb.ApiOperati } func (pnd *pndImplementation) SubscribePath(uuid uuid.UUID, subList *ppb.SubscriptionList) error { - d, err := pnd.deviceService.Get(store.Query{ + mne, err := pnd.networkElementService.Get(store.Query{ ID: uuid, }) if err != nil { @@ -607,7 +607,7 @@ func (pnd *pndImplementation) SubscribePath(uuid uuid.UUID, subList *ppb.Subscri ctx := context.Background() ctx = context.WithValue(ctx, types.CtxKeyOpts, opts) - if err = d.Transport().Subscribe(ctx); err != nil { + if err = mne.Transport().Subscribe(ctx); err != nil { return err } } @@ -652,24 +652,24 @@ func handleRollbackError(id uuid.UUID, err error) { // TODO: Notion of invalid state needed. } -func (pnd *pndImplementation) handleCsbiDeletion(d device.Device) error { - log.Infof("csbi deletion triggered for %v", d.ID().String()) +func (pnd *pndImplementation) handleCsbiDeletion(mne networkelement.NetworkElement) error { + log.Infof("csbi deletion triggered for %v", mne.ID().String()) ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() req := &cpb.DeleteRequest{ Timestamp: time.Now().UnixNano(), - Did: []string{d.ID().String()}, + Did: []string{mne.ID().String()}, } resp, err := pnd.csbiClient.Delete(ctx, req) if err != nil { return err } - err = pnd.southboundService.Delete(d.SBI()) + err = pnd.southboundService.Delete(mne.SBI()) if err != nil { return err } log.WithFields(log.Fields{ - "uuid": d.ID().String(), + "uuid": mne.ID().String(), "status": resp.Status, }).Info("csbi deleted") return nil @@ -688,11 +688,11 @@ func (pnd *pndImplementation) handleCsbiEnrolment(name string, opt *tpb.Transpor return uuid.Nil, err } // the slice only contains one deployment - var devID uuid.UUID - for _, d := range resp.Deployments { - dCopy := d + var mneID uuid.UUID + for _, deployment := range resp.Deployments { + dCopy := deployment g.Go(func() error { - devID, err = pnd.createCsbiDevice(ctx, name, dCopy, opt) + mneID, err = pnd.createCsbiNetworkElement(ctx, name, dCopy, opt) if err != nil { return err } @@ -704,23 +704,23 @@ func (pnd *pndImplementation) handleCsbiEnrolment(name string, opt *tpb.Transpor return uuid.Nil, err } - return devID, nil + return mneID, nil } -// createCsbiDevice is a helper method for cSBI device creation. The method +// createCsbiNetworkElement is a helper method for cSBI network element creation. The method // waits for a SYN (which indicates that the cSBI is running and addressable) -// of the commissioned cSBI and creates the device within the controller. -func (pnd *pndImplementation) createCsbiDevice( +// of the commissioned cSBI and creates the network element within the controller. +func (pnd *pndImplementation) createCsbiNetworkElement( ctx context.Context, name string, - d *cpb.Deployment, + deployment *cpb.Deployment, opt *tpb.TransportOption, ) (uuid.UUID, error) { - id, err := uuid.Parse(d.Id) + id, err := uuid.Parse(deployment.Id) if err != nil { return uuid.Nil, err } - ch := make(chan device.Details, 1) + ch := make(chan networkelement.Details, 1) pnd.callback(id, ch) defer pnd.callback(id, nil) defer close(ch) @@ -729,17 +729,17 @@ func (pnd *pndImplementation) createCsbiDevice( select { case <-tickatus.C: log.WithFields(log.Fields{ - "id": d.Id, + "id": deployment.Id, "err": ctx.Err(), }).Error("csbi handshake timed out") - case deviceDetails := <-ch: - log.Infof("syn from csbi %v", deviceDetails.ID) - id, err := uuid.Parse(deviceDetails.ID) + case mneDetails := <-ch: + log.Infof("syn from csbi %v", mneDetails.ID) + id, err := uuid.Parse(mneDetails.ID) if err != nil { return uuid.Nil, err } csbiTransportOptions := &tpb.TransportOption{ - Address: deviceDetails.Address, + Address: mneDetails.Address, Username: opt.Username, Password: opt.Password, Tls: opt.Tls, @@ -757,7 +757,7 @@ func (pnd *pndImplementation) createCsbiDevice( for _, f := range files { req := &cpb.GetPayloadRequest{ Timestamp: time.Now().UnixNano(), - Did: d.Id, + Did: deployment.Id, File: f, } g.Go(func() error { @@ -786,13 +786,13 @@ func (pnd *pndImplementation) createCsbiDevice( if err != nil { return uuid.Nil, err } - d, err := NewDevice(name, uuid.Nil, csbiTransportOptions, csbi) + mne, err := NewNetworkElement(name, uuid.Nil, csbiTransportOptions, csbi) if err != nil { return uuid.Nil, err } - d.(*CsbiDevice).UUID = id - ch <- device.Details{TransportOption: opt} - if err := pnd.deviceService.Add(d); err != nil { + mne.(*CsbiNetworkElement).UUID = id + ch <- networkelement.Details{TransportOption: opt} + if err := pnd.networkElementService.Add(mne); err != nil { return uuid.Nil, err } return id, nil @@ -936,7 +936,7 @@ func saveStreamToFile[T StreamClient](sc T, filename string, id uuid.UUID) (err return nil } -// MarshalBSON implements the MarshalBSON interface to store a device as BSON. +// MarshalBSON implements the MarshalBSON interface to store a network element as BSON. func (pnd *pndImplementation) MarshalBSON() ([]byte, error) { return bson.Marshal(&struct { ID string `bson:"_id"` @@ -949,9 +949,9 @@ func (pnd *pndImplementation) MarshalBSON() ([]byte, error) { }) } -// UpdateMNEAfterSubscribeResponse takes a device and forwards it to the device service to handle the update. -func (pnd *pndImplementation) UpdateDeviceAfterSubscribeResponse(device device.Device) error { - if err := pnd.deviceService.Update(device); err != nil { +// UpdateMNEAfterSubscribeResponse takes a network element and forwards it to the network element service to handle the update. +func (pnd *pndImplementation) UpdateNetworkElementAfterSubscribeResponse(mne networkelement.NetworkElement) error { + if err := pnd.networkElementService.Update(mne); err != nil { return err } diff --git a/controller/nucleus/principalNetworkDomain_test.go b/controller/nucleus/principalNetworkDomain_test.go index 185c91c68b8422e62208cea8df8f504752b4e619..f078ebae618c688e149a88eddca3a84b57a3eb3b 100644 --- a/controller/nucleus/principalNetworkDomain_test.go +++ b/controller/nucleus/principalNetworkDomain_test.go @@ -13,9 +13,9 @@ import ( spb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/southbound" tpb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/transport" eventservice "code.fbi.h-da.de/danet/gosdn/controller/eventService" - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" eventInterfaces "code.fbi.h-da.de/danet/gosdn/controller/interfaces/event" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkdomain" + "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/southbound" "code.fbi.h-da.de/danet/gosdn/controller/mocks" "code.fbi.h-da.de/danet/gosdn/controller/nucleus/util" @@ -89,7 +89,7 @@ func Test_destroy(t *testing.T) { } } -func Test_pndImplementation_AddDevice(t *testing.T) { +func Test_pndImplementation_AddNetworkElement(t *testing.T) { type args struct { name string opts *tpb.TransportOption @@ -119,22 +119,22 @@ func Test_pndImplementation_AddDevice(t *testing.T) { t.Error(err) } - _, err := pnd.AddDevice(tt.args.name, tt.args.opts, defaultSbiID) + _, err := pnd.AddNetworkElement(tt.args.name, tt.args.opts, defaultSbiID) if (err != nil) != tt.wantErr { - t.Errorf("AddDevice() error = %v, wantErr %v", err, tt.wantErr) + t.Errorf("AddNetworkElement() error = %v, wantErr %v", err, tt.wantErr) } if tt.name != "fails wrong type" { if err == nil { - d, err := pnd.deviceService.Get(store.Query{Name: tt.args.name}) + mne, err := pnd.networkElementService.Get(store.Query{Name: tt.args.name}) if err != nil { - t.Errorf("AddDevice() error = %v", err) + t.Errorf("AddNetworkElement() error = %v", err) return } - if d.Name() != tt.args.name { - t.Errorf("AddDevice() got = %v, want %v", d.Name(), tt.args.name) + if mne.Name() != tt.args.name { + t.Errorf("AddNetworkElement() got = %v, want %v", mne.Name(), tt.args.name) } - if err := pnd.deviceService.Delete(d); err != nil { + if err := pnd.networkElementService.Delete(mne); err != nil { t.Error(err) } } @@ -183,7 +183,7 @@ func Test_pndImplementation_AddSbi(t *testing.T) { if err == nil { sbi, err := pnd.southboundService.Get(store.Query{ID: defaultSbiID}) if err != nil { - t.Errorf("AddSbi() SBI %v not in device store %v", + t.Errorf("AddSbi() SBI %v not in network element store %v", tt.args.sbi, sbi) } if err := pnd.southboundService.Delete(sbi); err != nil { @@ -197,10 +197,10 @@ func Test_pndImplementation_AddSbi(t *testing.T) { func Test_pndImplementation_Destroy(t *testing.T) { type fields struct { - name string - description string - sbi southbound.Service - devices device.Service + name string + description string + sbi southbound.Service + networkElements networkelement.Service } tests := []struct { name string @@ -212,10 +212,10 @@ func Test_pndImplementation_Destroy(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { pnd := &pndImplementation{ - Name: tt.fields.name, - Description: tt.fields.description, - southboundService: tt.fields.sbi, - deviceService: tt.fields.devices, + Name: tt.fields.name, + Description: tt.fields.description, + southboundService: tt.fields.sbi, + networkElementService: tt.fields.networkElements, } if err := pnd.Destroy(); (err != nil) != tt.wantErr { t.Errorf("Destroy() error = %v, wantErr %v", err, tt.wantErr) @@ -258,7 +258,7 @@ func Test_pndImplementation_GetName(t *testing.T) { } } -func Test_pndImplementation_MarshalDevice(t *testing.T) { +func Test_pndImplementation_MarshalNetworkElement(t *testing.T) { type args struct { uuid uuid.UUID } @@ -270,7 +270,7 @@ func Test_pndImplementation_MarshalDevice(t *testing.T) { }{ { name: "default", - args: args{did}, + args: args{mneid}, want: "{\n\t\"Acl\": null,\n\t\"Bfd\": null,\n\t\"Components\": null,\n\t\"Interfaces\": null,\n\t\"Keychains\": null,\n\t\"Lldp\": null,\n\t\"LocalRoutes\": null,\n\t\"Messages\": null,\n\t\"NetworkInstances\": null,\n\t\"RoutingPolicy\": null,\n\t\"System\": null\n}", wantErr: false, }, @@ -288,32 +288,32 @@ func Test_pndImplementation_MarshalDevice(t *testing.T) { if err != nil { t.Error("could not add sbi") } - d := &CommonDevice{ + mne := &CommonNetworkElement{ UUID: tt.args.uuid, Model: &openconfig.Device{}, sbi: sbi, transport: nil, } - _, err = pnd.addDevice(d) + _, err = pnd.addNetworkElement(mne) if err != nil { t.Error(err) } - got, err := pnd.MarshalDevice(tt.args.uuid.String()) + got, err := pnd.MarshalNetworkElement(tt.args.uuid.String()) if (err != nil) != tt.wantErr { - t.Errorf("MarshalDevice() error = %v, wantErr %v", err, tt.wantErr) + t.Errorf("MarshalNetworkElement() error = %v, wantErr %v", err, tt.wantErr) return } if got != tt.want { - t.Errorf("MarshalDevice() got = %v, want %v", got, tt.want) + t.Errorf("MarshalNetworkElement() got = %v, want %v", got, tt.want) } - if err := pnd.deviceService.Delete(d); err != nil { + if err := pnd.networkElementService.Delete(mne); err != nil { t.Error(err) } }) } } -func Test_pndImplementation_RemoveDevice(t *testing.T) { +func Test_pndImplementation_RemoveNetworkElement(t *testing.T) { type args struct { uuid uuid.UUID } @@ -322,7 +322,7 @@ func Test_pndImplementation_RemoveDevice(t *testing.T) { args args wantErr bool }{ - {name: "default", args: args{uuid: did}, wantErr: false}, + {name: "default", args: args{uuid: mneid}, wantErr: false}, {name: "fails", args: args{uuid: uuid.New()}, wantErr: true}, } @@ -340,18 +340,18 @@ func Test_pndImplementation_RemoveDevice(t *testing.T) { if err != nil { t.Error("could not add sbi") } - d := &CommonDevice{ - UUID: did, + mne := &CommonNetworkElement{ + UUID: mneid, Model: &openconfig.Device{}, sbi: sbi, transport: nil, } - _, err = pnd.addDevice(d) + _, err = pnd.addNetworkElement(mne) if err != nil { t.Error(err) } - if err := pnd.RemoveDevice(tt.args.uuid); (err != nil) != tt.wantErr { - t.Errorf("RemoveDevice() error = %v, wantErr %v", err, tt.wantErr) + if err := pnd.RemoveNetworkElement(tt.args.uuid); (err != nil) != tt.wantErr { + t.Errorf("RemoveNetworkElement() error = %v, wantErr %v", err, tt.wantErr) } }) } @@ -375,16 +375,16 @@ func Test_pndImplementation_RemoveSbi(t *testing.T) { t.Parallel() eventService := eventservice.NewMockEventService() sbiStore := NewMemorySbiStore() - deviceStore := NewMemoryDeviceStore() + networkElementStore := NewMemoryNetworkElementStore() sbiService := NewSbiService(sbiStore, eventService) - deviceService := NewDeviceService(deviceStore, sbiService, eventService) + networkElementService := NewNetworkElementService(networkElementStore, sbiService, eventService) pnd := &pndImplementation{ - Name: "test-remove-sbi", - Description: "test-remove-sbi", - southboundService: sbiService, - deviceService: deviceService, - Id: defaultPndID, + Name: "test-remove-sbi", + Description: "test-remove-sbi", + southboundService: sbiService, + networkElementService: networkElementService, + Id: defaultPndID, } sbi, err := NewSBI(spb.Type_TYPE_OPENCONFIG, defaultSbiID) @@ -406,22 +406,22 @@ func Test_pndImplementation_RemoveSbi(t *testing.T) { t.Errorf("RemoveSbi() SBI still in SBI store %v", pnd.southboundService) } - if tt.name == "exclusively remove associated devices" { - allDevices, _ := pnd.deviceService.GetAll() - if len(allDevices) != 1 { - t.Errorf("RemoveSbi() non associated devices should remain in the storage %v", allDevices) + if tt.name == "exclusively remove associated network elements" { + allNetworkElements, _ := pnd.networkElementService.GetAll() + if len(allNetworkElements) != 1 { + t.Errorf("RemoveSbi() non associated network elements should remain in the storage %v", allNetworkElements) } } else { - allDevices, _ := pnd.deviceService.GetAll() - if len(allDevices) != 0 { - t.Errorf("RemoveSbi() associated devices have not been removed correctly %v", len(allDevices)) + allNetworkElements, _ := pnd.networkElementService.GetAll() + if len(allNetworkElements) != 0 { + t.Errorf("RemoveSbi() associated network elements have not been removed correctly %v", len(allNetworkElements)) } } }) } } -func Test_pndImplementation_RemoveSbiWithAssociatedDevices(t *testing.T) { +func Test_pndImplementation_RemoveSbiWithAssociatedNetworkElements(t *testing.T) { opts := &tpb.TransportOption{ TransportOption: &tpb.TransportOption_GnmiTransportOption{ GnmiTransportOption: &tpb.GnmiTransportOption{}, @@ -435,7 +435,7 @@ func Test_pndImplementation_RemoveSbiWithAssociatedDevices(t *testing.T) { args args wantErr bool }{ - {name: "exclusively remove associated devices", args: args{id: defaultSbiID}, wantErr: false}, + {name: "exclusively remove associated network elements", args: args{id: defaultSbiID}, wantErr: false}, } for _, tt := range tests { tt := tt @@ -443,16 +443,16 @@ func Test_pndImplementation_RemoveSbiWithAssociatedDevices(t *testing.T) { t.Parallel() eventService := eventservice.NewMockEventService() sbiStore := NewMemorySbiStore() - deviceStore := NewMemoryDeviceStore() + networkElementStore := NewMemoryNetworkElementStore() sbiService := NewSbiService(sbiStore, eventService) - deviceService := NewDeviceService(deviceStore, sbiService, eventService) + networkElementService := NewNetworkElementService(networkElementStore, sbiService, eventService) pnd := &pndImplementation{ - Name: "test-remove-sbi", - Description: "test-remove-sbi", - southboundService: sbiService, - deviceService: deviceService, - Id: defaultPndID, + Name: "test-remove-sbi", + Description: "test-remove-sbi", + southboundService: sbiService, + networkElementService: networkElementService, + Id: defaultPndID, } sbi, err := NewSBI(spb.Type_TYPE_OPENCONFIG, defaultSbiID) @@ -468,20 +468,20 @@ func Test_pndImplementation_RemoveSbiWithAssociatedDevices(t *testing.T) { if err := pnd.addSbi(&OpenConfig{id: defaultSbiID}); err != nil { t.Error(err) } - _, err = pnd.AddDevice("associatedDevice", opts, tt.args.id) + _, err = pnd.AddNetworkElement("associatedNetworkElement", opts, tt.args.id) if err != nil { t.Error(err) } - _, err = pnd.AddDevice("associatedDevice2", opts, tt.args.id) + _, err = pnd.AddNetworkElement("associatedNetworkElement2", opts, tt.args.id) if err != nil { t.Error(err) } - if tt.name == "exclusively remove associated devices" { + if tt.name == "exclusively remove associated network elements" { newID := uuid.New() if err := pnd.addSbi(&OpenConfig{id: newID}); err != nil { t.Error(err) } - _, err := pnd.AddDevice("associatedDevice2", opts, newID) + _, err := pnd.AddNetworkElement("associatedNetworkElement2", opts, newID) if err != nil { t.Error(err) } @@ -496,15 +496,15 @@ func Test_pndImplementation_RemoveSbiWithAssociatedDevices(t *testing.T) { t.Errorf("RemoveSbi() SBI still in SBI store %v", pnd.southboundService) } - if tt.name == "exclusively remove associated devices" { - allDevices, _ := pnd.southboundService.GetAll() - if len(allDevices) != 1 { - t.Errorf("RemoveSbi() non associated devices should remain in the storage %v", allDevices) + if tt.name == "exclusively remove associated network elements" { + allNetworkElements, _ := pnd.southboundService.GetAll() + if len(allNetworkElements) != 1 { + t.Errorf("RemoveSbi() non associated network elements should remain in the storage %v", allNetworkElements) } } else { - allDevices, _ := pnd.southboundService.GetAll() - if len(allDevices) != 0 { - t.Errorf("RemoveSbi() associated devices have not been removed correctly %v", len(allDevices)) + allNetworkElements, _ := pnd.southboundService.GetAll() + if len(allNetworkElements) != 0 { + t.Errorf("RemoveSbi() associated network elements have not been removed correctly %v", len(allNetworkElements)) } } }) @@ -534,7 +534,7 @@ func Test_pndImplementation_Request(t *testing.T) { { name: "error", args: args{ - uuid: did, + uuid: mneid, path: "", rErr: errors.New("deliberate test fail"), }, @@ -547,15 +547,15 @@ func Test_pndImplementation_Request(t *testing.T) { t.Run(tt.name, func(t *testing.T) { t.Parallel() sbiService := NewGenericService[southbound.SouthboundInterface]() - deviceService := NewDeviceServiceMock() + networkElementService := NewNetworkElementServiceMock() pnd := pndImplementation{ - Name: "default", - Description: "default test pnd", - southboundService: &sbiService, - deviceService: deviceService, - changes: store.NewChangeStore(), - Id: defaultPndID, + Name: "default", + Description: "default test pnd", + southboundService: &sbiService, + networkElementService: networkElementService, + changes: store.NewChangeStore(), + Id: defaultPndID, } sbi, err := NewSBI(spb.Type_TYPE_OPENCONFIG) @@ -572,25 +572,25 @@ func Test_pndImplementation_Request(t *testing.T) { transport.On("Get", mockContext, mock.Anything).Return(&gpb.GetResponse{}, tt.args.rErr) transport.On("ProcessResponse", mock.Anything, mock.Anything, mock.Anything).Return(tt.args.rErr) - deviceWithMockTransport := &CommonDevice{ + networkElementWithMockTransport := &CommonNetworkElement{ UUID: mdid, Model: &openconfig.Device{}, sbi: sbi, transport: &transport, } - _, _ = pnd.addDevice(deviceWithMockTransport) + _, _ = pnd.addNetworkElement(networkElementWithMockTransport) _, err = pnd.Request(tt.args.uuid, tt.args.path) if (err != nil) != tt.wantErr { t.Errorf("Request() error = %v, wantErr %v", err, tt.wantErr) } - device, _ := pnd.deviceService.Get(store.Query{ID: mdid}) - if device == nil { + mne, _ := pnd.networkElementService.Get(store.Query{ID: mdid}) + if mne == nil { return } - if err := pnd.deviceService.Delete(device); err != nil { + if err := pnd.networkElementService.Delete(mne); err != nil { t.Error(err) } }) @@ -620,7 +620,7 @@ func Test_pndImplementation_RequestAll(t *testing.T) { { name: "error", args: args{ - uuid: did, + uuid: mneid, path: "", rErr: errors.New("deliberate test fail"), }, @@ -633,15 +633,15 @@ func Test_pndImplementation_RequestAll(t *testing.T) { t.Run(tt.name, func(t *testing.T) { t.Parallel() sbiService := NewGenericService[southbound.SouthboundInterface]() - deviceService := NewDeviceServiceMock() + networkElementService := NewNetworkElementServiceMock() pnd := pndImplementation{ - Name: "default", - Description: "default test pnd", - southboundService: &sbiService, - deviceService: deviceService, - changes: store.NewChangeStore(), - Id: defaultPndID, + Name: "default", + Description: "default test pnd", + southboundService: &sbiService, + networkElementService: networkElementService, + changes: store.NewChangeStore(), + Id: defaultPndID, } sbi, err := NewSBI(spb.Type_TYPE_OPENCONFIG) @@ -658,20 +658,20 @@ func Test_pndImplementation_RequestAll(t *testing.T) { transport.On("Get", mockContext, mock.Anything).Return(&gpb.GetResponse{}, tt.args.rErr) transport.On("ProcessResponse", mock.Anything, mock.Anything, mock.Anything).Return(tt.args.rErr) - deviceWithMockTransport := &CommonDevice{ + networkElementWithMockTransport := &CommonNetworkElement{ UUID: mdid, Model: &openconfig.Device{}, sbi: sbi, transport: &transport, } - _, _ = pnd.addDevice(deviceWithMockTransport) + _, _ = pnd.addNetworkElement(networkElementWithMockTransport) - device, _ := pnd.deviceService.Get(store.Query{ID: mdid}) - if device == nil { + mne, _ := pnd.networkElementService.Get(store.Query{ID: mdid}) + if mne == nil { return } - if err := pnd.deviceService.Delete(device); err != nil { + if err := pnd.networkElementService.Delete(mne); err != nil { t.Error(err) } }) @@ -764,7 +764,7 @@ func Test_pndImplementation_ChangeMNE(t *testing.T) { wantErr: true, }, { - name: "device not found", + name: "network element not found", args: args{ operation: ppb.ApiOperation_API_OPERATION_UPDATE, }, @@ -779,27 +779,27 @@ func Test_pndImplementation_ChangeMNE(t *testing.T) { if err := pnd.addSbi(&OpenConfig{id: defaultSbiID}); err != nil { t.Error(err) } - _, err := pnd.AddDevice("testdevice", opts, defaultSbiID) + _, err := pnd.AddNetworkElement("testnetworkElement", opts, defaultSbiID) if err != nil { t.Error(err) return } - devices, err := pnd.deviceService.GetAllAsLoaded() + networkElements, err := pnd.networkElementService.GetAllAsLoaded() if err != nil { - err := errors.New("error fetching device") + err := errors.New("error fetching network element") t.Error(err) return } - deviceUUID, err := uuid.Parse(devices[0].ID) + neUUID, err := uuid.Parse(networkElements[0].ID) if err != nil { - err := errors.New("error parsing device uuid") + err := errors.New("error parsing network element uuid") t.Error(err) return } - _, err = pnd.ChangeMNE(deviceUUID, tt.args.operation, tt.args.path, tt.args.value...) + _, err = pnd.ChangeMNE(neUUID, tt.args.operation, tt.args.path, tt.args.value...) if (err != nil) != tt.wantErr { t.Errorf("ChangeMNE() error = %v, wantErr %v", err, tt.wantErr) return @@ -813,7 +813,7 @@ func Test_pndImplementation_ChangeMNE(t *testing.T) { } } -func Test_pndImplementation_GetDevice(t *testing.T) { +func Test_pndImplementation_GetNetworkElement(t *testing.T) { opts := &tpb.TransportOption{ Address: "", Username: "test", @@ -834,12 +834,12 @@ func Test_pndImplementation_GetDevice(t *testing.T) { t.Error(err) return } - d, err := NewDevice("default", did, opts, sbi) + mne, err := NewNetworkElement("default", mneid, opts, sbi) if err != nil { t.Error(err) return } - _, err = pnd.addDevice(d) + _, err = pnd.addNetworkElement(mne) if err != nil { t.Error(err) return @@ -856,12 +856,12 @@ func Test_pndImplementation_GetDevice(t *testing.T) { }{ { name: "default", - args: args{uuid: did}, + args: args{uuid: mneid}, want: sbi.Schema().Root, wantErr: false, }, { - name: "device not found", + name: "network element not found", args: args{uuid: mdid}, want: nil, wantErr: true, @@ -871,21 +871,21 @@ func Test_pndImplementation_GetDevice(t *testing.T) { tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() - foundDevice, err := pnd.GetDevice(tt.args.uuid.String()) + foundNetworkElement, err := pnd.GetNetworkElement(tt.args.uuid.String()) if (err != nil) != tt.wantErr { - t.Errorf("GetDevice() error = %v, wantErr %v", err, tt.wantErr) + t.Errorf("GetNetworkElement() error = %v, wantErr %v", err, tt.wantErr) return } - if foundDevice != nil { - if !reflect.DeepEqual(foundDevice.(device.Device).GetModel(), tt.want) { - t.Errorf("GetDevice() got = %v, want %v", foundDevice.(device.Device).GetModel(), tt.want) + if foundNetworkElement != nil { + if !reflect.DeepEqual(foundNetworkElement.(networkelement.NetworkElement).GetModel(), tt.want) { + t.Errorf("GetNetworkElement() got = %v, want %v", foundNetworkElement.(networkelement.NetworkElement).GetModel(), tt.want) } } }) } } -func Test_pndImplementation_GetDeviceByName(t *testing.T) { +func Test_pndImplementation_GetNetworkElementByName(t *testing.T) { opts := &tpb.TransportOption{ Address: "", Username: "test", @@ -906,12 +906,12 @@ func Test_pndImplementation_GetDeviceByName(t *testing.T) { t.Error(err) return } - d, err := NewDevice("my-device", did, opts, sbi) + mne, err := NewNetworkElement("my-mne", mneid, opts, sbi) if err != nil { t.Error(err) return } - _, err = pnd.addDevice(d) + _, err = pnd.addNetworkElement(mne) if err != nil { t.Error(err) return @@ -927,13 +927,13 @@ func Test_pndImplementation_GetDeviceByName(t *testing.T) { }{ { name: "default", - args: args{name: d.Name()}, + args: args{name: mne.Name()}, want: sbi.Schema().Root, wantErr: false, }, { - name: "device not found", - args: args{name: "test-device"}, + name: "network element not found", + args: args{name: "test-mne"}, want: nil, wantErr: true, }, @@ -942,14 +942,14 @@ func Test_pndImplementation_GetDeviceByName(t *testing.T) { tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() - foundDevice, err := pnd.GetDevice(tt.args.name) + foundNetworkElement, err := pnd.GetNetworkElement(tt.args.name) if (err != nil) != tt.wantErr { - t.Errorf("GetDeviceByName() error = %v, wantErr %v", err, tt.wantErr) + t.Errorf("GetNetworkElementByName() error = %v, wantErr %v", err, tt.wantErr) return } - if foundDevice != nil { - if !reflect.DeepEqual(foundDevice.(device.Device).GetModel(), tt.want) { - t.Errorf("GetDeviceByName() got = %v, want %v", foundDevice.(device.Device).GetModel(), tt.want) + if foundNetworkElement != nil { + if !reflect.DeepEqual(foundNetworkElement.(networkelement.NetworkElement).GetModel(), tt.want) { + t.Errorf("GetNetworkElementByName() got = %v, want %v", foundNetworkElement.(networkelement.NetworkElement).GetModel(), tt.want) } } }) @@ -976,30 +976,30 @@ func Test_pndImplementation_Confirm(t *testing.T) { t.Run(tt.name, func(t *testing.T) { t.Parallel() sbiService := NewGenericService[southbound.SouthboundInterface]() - deviceService := NewDeviceServiceMock() + networkElementService := NewNetworkElementServiceMock() pnd := pndImplementation{ - Name: "default", - Description: "default test pnd", - southboundService: &sbiService, - deviceService: deviceService, - changes: store.NewChangeStore(), - Id: defaultPndID, + Name: "default", + Description: "default test pnd", + southboundService: &sbiService, + networkElementService: networkElementService, + changes: store.NewChangeStore(), + Id: defaultPndID, } - d := mockDevice() - tr, ok := d.Transport().(*mocks.Transport) + mne := mockNetworkElement() + tr, ok := mne.Transport().(*mocks.Transport) if !ok { log.Errorf("Confirm(), failed type conversion: %v", ok) } tr.On("Set", mockContext, mock.Anything, mock.Anything, mock.Anything).Return(nil) - _, err := pnd.addDevice(d) + _, err := pnd.addNetworkElement(mne) if err != nil { t.Error(err) return } - _, err = pnd.ChangeMNE(d.ID(), ppb.ApiOperation_API_OPERATION_UPDATE, "system/config/hostname", "ceos3000") + _, err = pnd.ChangeMNE(mne.ID(), ppb.ApiOperation_API_OPERATION_UPDATE, "system/config/hostname", "ceos3000") if err != nil { t.Error(err) return @@ -1026,7 +1026,7 @@ func Test_pndImplementation_PendingChanges(t *testing.T) { } store := store.NewChangeStore() - pending := NewChange(did, &openconfig.Device{}, &openconfig.Device{}, callback) + pending := NewChange(mneid, &openconfig.Device{}, &openconfig.Device{}, callback) if err := store.Add(pending); err != nil { t.Error(err) return @@ -1059,7 +1059,7 @@ func Test_pndImplementation_CommittedChanges(t *testing.T) { } store := store.NewChangeStore() - committed := NewChange(did, &openconfig.Device{}, &openconfig.Device{}, callback) + committed := NewChange(mneid, &openconfig.Device{}, &openconfig.Device{}, callback) if err := committed.Commit(); err != nil { t.Error(err) return @@ -1095,7 +1095,7 @@ func Test_pndImplementation_ConfirmedChanges(t *testing.T) { return nil } store := store.NewChangeStore() - confirmed := NewChange(did, &openconfig.Device{}, &openconfig.Device{}, callback) + confirmed := NewChange(mneid, &openconfig.Device{}, &openconfig.Device{}, callback) if err := confirmed.Commit(); err != nil { t.Error(err) return @@ -1237,15 +1237,15 @@ func Test_pndImplementation_saveGoStructsToFile(t *testing.T) { func Test_pndImplementation_SubscribePath(t *testing.T) { type fields struct { - Name string - Description string - southboundService southbound.Service - deviceService device.Service - changes *store.ChangeStore - ID uuid.UUID - csbiClient cpb.CsbiServiceClient - callback func(uuid.UUID, chan device.Details) - eventService eventInterfaces.Service + Name string + Description string + southboundService southbound.Service + networkElementService networkelement.Service + changes *store.ChangeStore + ID uuid.UUID + csbiClient cpb.CsbiServiceClient + callback func(uuid.UUID, chan networkelement.Details) + eventService eventInterfaces.Service } type args struct { uuid uuid.UUID @@ -1261,7 +1261,7 @@ func Test_pndImplementation_SubscribePath(t *testing.T) { // { // name: "default", // args: args{ - // uuid: did, + // uuid: mneid, // subList: &ppb.SubscriptionList{ // Subscription: []*ppb.Subscription{ // { @@ -1278,15 +1278,15 @@ func Test_pndImplementation_SubscribePath(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { pnd := &pndImplementation{ - Name: tt.fields.Name, - Description: tt.fields.Description, - southboundService: tt.fields.southboundService, - deviceService: tt.fields.deviceService, - changes: tt.fields.changes, - Id: tt.fields.ID, - csbiClient: tt.fields.csbiClient, - callback: tt.fields.callback, - eventService: tt.fields.eventService, + Name: tt.fields.Name, + Description: tt.fields.Description, + southboundService: tt.fields.southboundService, + networkElementService: tt.fields.networkElementService, + changes: tt.fields.changes, + Id: tt.fields.ID, + csbiClient: tt.fields.csbiClient, + callback: tt.fields.callback, + eventService: tt.fields.eventService, } if err := pnd.SubscribePath(tt.args.uuid, tt.args.subList); (err != nil) != tt.wantErr { t.Errorf("pndImplementation.SubscribePath() error = %v, wantErr %v", err, tt.wantErr) diff --git a/controller/test/integration/nucleusIntegration_test.go b/controller/test/integration/nucleusIntegration_test.go index 5938658f49a0720bd90fe0ba96f65fb0bef6345f..62c56e8afd9d4b1a358767777c2cad8383e038ea 100644 --- a/controller/test/integration/nucleusIntegration_test.go +++ b/controller/test/integration/nucleusIntegration_test.go @@ -186,12 +186,12 @@ func TestGnmi_SetValidIntegration(t *testing.T) { t.Error(err) return } - _, err = pnd.AddDevice("test", opt, sbi.ID()) + _, err = pnd.AddNetworkElement("test", opt, sbi.ID()) if err != nil { t.Error(err) return } - device, err := pnd.GetDevice("test") + mne, err := pnd.GetNetworkElement("test") if err != nil { t.Error(err) return @@ -228,7 +228,7 @@ func TestGnmi_SetValidIntegration(t *testing.T) { tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() - cuid, err := pnd.ChangeMNE(device.ID(), tt.apiOp, tt.path, tt.value) + cuid, err := pnd.ChangeMNE(mne.ID(), tt.apiOp, tt.path, tt.value) if err != nil { t.Error(err) return @@ -242,7 +242,7 @@ func TestGnmi_SetValidIntegration(t *testing.T) { return } if tt.name != "delete" { - resp, err := pnd.Request(device.ID(), tt.path) + resp, err := pnd.Request(mne.ID(), tt.path) if err != nil { t.Error(err) return @@ -257,7 +257,7 @@ func TestGnmi_SetValidIntegration(t *testing.T) { } got := r.Notification[0].Update[0].Val.GetStringVal() if !reflect.DeepEqual(got, tt.want) { - t.Errorf("GetDevice() got = %v, want %v", got, tt.want) + t.Errorf("GetNetworkElement() got = %v, want %v", got, tt.want) } } }) diff --git a/controller/topology/ports/portStore.go b/controller/topology/ports/portStore.go index 70ce2dfa90f0047b5b45b278f5f049a52251d857..024c0f9114f2d2c297a433df163f8b00d97b22e6 100644 --- a/controller/topology/ports/portStore.go +++ b/controller/topology/ports/portStore.go @@ -4,7 +4,7 @@ import ( "fmt" "code.fbi.h-da.de/danet/gosdn/controller/customerrs" - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" + "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" "code.fbi.h-da.de/danet/gosdn/controller/nucleus/database" query "code.fbi.h-da.de/danet/gosdn/controller/store" @@ -164,7 +164,7 @@ func (s *DatabasePortStore) Add(port Port) (err error) { // Update updates a existing port. func (s *DatabasePortStore) Update(port Port) (err error) { - var updatedLoadedDevice device.LoadedDevice + var updatedLoadedNetworkElement networkelement.LoadedNetworkElement client, ctx, cancel := database.GetMongoConnection() defer cancel() @@ -188,7 +188,7 @@ func (s *DatabasePortStore) Update(port Port) (err error) { Collection(s.storeName). FindOneAndUpdate( ctx, bson.M{"_id": port.ID.String()}, update, &opt). - Decode(&updatedLoadedDevice) + Decode(&updatedLoadedNetworkElement) if err != nil { return customerrs.CouldNotUpdateError{Identifier: port.ID, Type: port, Err: err} }