From 71c48e22d8e7893a8ad7fac887c6464bfb5fe1d2 Mon Sep 17 00:00:00 2001 From: Matthew Burns Date: Wed, 29 Nov 2023 10:33:19 -0700 Subject: [PATCH 1/3] SEL capture support added from bmclib, updated to latest bmclib. Signed-off-by: Matthew Burns --- .devcontainer/devcontainer.json | 25 -- api/v1/diagnostic.pb.go | 492 +++++++++++++++++++++++++++--- api/v1/diagnostic.proto | 29 +- api/v1/diagnostic.validator.pb.go | 42 +++ api/v1/diagnostic_grpc.pb.go | 72 +++++ client/client.go | 10 + cmd/sel.go | 92 ++++++ go.mod | 58 ++-- go.sum | 170 +++++------ grpc/oob/diagnostic/diagnostic.go | 6 +- grpc/oob/diagnostic/getsel.go | 203 ++++++++++++ grpc/rpc/diagnostic.go | 61 ++++ 12 files changed, 1062 insertions(+), 198 deletions(-) delete mode 100644 .devcontainer/devcontainer.json create mode 100644 grpc/oob/diagnostic/getsel.go diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 762a19e..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,25 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/go -{ - "name": "Go", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/go:1-1.21-bullseye", - "features": { - "ghcr.io/devcontainers-contrib/features/protoc-asdf:1": {} - } - - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "go version", - - // Configure tool-specific properties. - // "customizations": {}, - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} diff --git a/api/v1/diagnostic.pb.go b/api/v1/diagnostic.pb.go index e091501..eda9c96 100644 --- a/api/v1/diagnostic.pb.go +++ b/api/v1/diagnostic.pb.go @@ -238,6 +238,281 @@ func (x *ClearSystemEventLogResponse) GetTaskId() string { return "" } +type GetSystemEventLogRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Authn *Authn `protobuf:"bytes,1,opt,name=authn,proto3" json:"authn,omitempty"` + Vendor *Vendor `protobuf:"bytes,2,opt,name=vendor,proto3" json:"vendor,omitempty"` +} + +func (x *GetSystemEventLogRequest) Reset() { + *x = GetSystemEventLogRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_diagnostic_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSystemEventLogRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSystemEventLogRequest) ProtoMessage() {} + +func (x *GetSystemEventLogRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_diagnostic_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 GetSystemEventLogRequest.ProtoReflect.Descriptor instead. +func (*GetSystemEventLogRequest) Descriptor() ([]byte, []int) { + return file_api_v1_diagnostic_proto_rawDescGZIP(), []int{4} +} + +func (x *GetSystemEventLogRequest) GetAuthn() *Authn { + if x != nil { + return x.Authn + } + return nil +} + +func (x *GetSystemEventLogRequest) GetVendor() *Vendor { + if x != nil { + return x.Vendor + } + return nil +} + +type SystemEventLogEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Timestamp string `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *SystemEventLogEntry) Reset() { + *x = SystemEventLogEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_diagnostic_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SystemEventLogEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SystemEventLogEntry) ProtoMessage() {} + +func (x *SystemEventLogEntry) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_diagnostic_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 SystemEventLogEntry.ProtoReflect.Descriptor instead. +func (*SystemEventLogEntry) Descriptor() ([]byte, []int) { + return file_api_v1_diagnostic_proto_rawDescGZIP(), []int{5} +} + +func (x *SystemEventLogEntry) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *SystemEventLogEntry) GetTimestamp() string { + if x != nil { + return x.Timestamp + } + return "" +} + +func (x *SystemEventLogEntry) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *SystemEventLogEntry) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type GetSystemEventLogResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Events []*SystemEventLogEntry `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` +} + +func (x *GetSystemEventLogResponse) Reset() { + *x = GetSystemEventLogResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_diagnostic_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSystemEventLogResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSystemEventLogResponse) ProtoMessage() {} + +func (x *GetSystemEventLogResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_diagnostic_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 GetSystemEventLogResponse.ProtoReflect.Descriptor instead. +func (*GetSystemEventLogResponse) Descriptor() ([]byte, []int) { + return file_api_v1_diagnostic_proto_rawDescGZIP(), []int{6} +} + +func (x *GetSystemEventLogResponse) GetEvents() []*SystemEventLogEntry { + if x != nil { + return x.Events + } + return nil +} + +type GetSystemEventLogRawRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Authn *Authn `protobuf:"bytes,1,opt,name=authn,proto3" json:"authn,omitempty"` + Vendor *Vendor `protobuf:"bytes,2,opt,name=vendor,proto3" json:"vendor,omitempty"` +} + +func (x *GetSystemEventLogRawRequest) Reset() { + *x = GetSystemEventLogRawRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_diagnostic_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSystemEventLogRawRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSystemEventLogRawRequest) ProtoMessage() {} + +func (x *GetSystemEventLogRawRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_diagnostic_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 GetSystemEventLogRawRequest.ProtoReflect.Descriptor instead. +func (*GetSystemEventLogRawRequest) Descriptor() ([]byte, []int) { + return file_api_v1_diagnostic_proto_rawDescGZIP(), []int{7} +} + +func (x *GetSystemEventLogRawRequest) GetAuthn() *Authn { + if x != nil { + return x.Authn + } + return nil +} + +func (x *GetSystemEventLogRawRequest) GetVendor() *Vendor { + if x != nil { + return x.Vendor + } + return nil +} + +type GetSystemEventLogRawResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Log string `protobuf:"bytes,1,opt,name=log,proto3" json:"log,omitempty"` +} + +func (x *GetSystemEventLogRawResponse) Reset() { + *x = GetSystemEventLogRawResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_diagnostic_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSystemEventLogRawResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSystemEventLogRawResponse) ProtoMessage() {} + +func (x *GetSystemEventLogRawResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_diagnostic_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 GetSystemEventLogRawResponse.ProtoReflect.Descriptor instead. +func (*GetSystemEventLogRawResponse) Descriptor() ([]byte, []int) { + return file_api_v1_diagnostic_proto_rawDescGZIP(), []int{8} +} + +func (x *GetSystemEventLogRawResponse) GetLog() string { + if x != nil { + return x.Log + } + return "" +} + var File_api_v1_diagnostic_proto protoreflect.FileDescriptor var file_api_v1_diagnostic_proto_rawDesc = []byte{ @@ -273,29 +548,86 @@ var file_api_v1_diagnostic_proto_rawDesc = []byte{ 0x6e, 0x64, 0x6f, 0x72, 0x22, 0x36, 0x0a, 0x1b, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x32, 0x9e, 0x02, 0x0a, - 0x0a, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x12, 0x79, 0x0a, 0x0a, 0x53, - 0x63, 0x72, 0x65, 0x65, 0x6e, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x34, 0x2e, 0x67, 0x69, 0x74, 0x68, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x9d, 0x01, 0x0a, + 0x18, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, + 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x05, 0x61, 0x75, 0x74, + 0x68, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, + 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, + 0x68, 0x6e, 0x52, 0x05, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x12, 0x41, 0x0a, 0x06, 0x76, 0x65, 0x6e, + 0x64, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, + 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, + 0x6e, 0x64, 0x6f, 0x72, 0x52, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x22, 0x7f, 0x0a, 0x13, + 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 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, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x6b, 0x0a, + 0x19, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, + 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x06, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, + 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x1b, 0x47, + 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, + 0x52, 0x61, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x05, 0x61, 0x75, + 0x74, 0x68, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, - 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, - 0x72, 0x65, 0x65, 0x6e, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x35, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, - 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x13, 0x43, 0x6c, 0x65, 0x61, 0x72, - 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x3d, - 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, - 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, - 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x33, 0x5a, - 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x69, 0x6e, 0x6b, - 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2f, 0x70, 0x62, 0x6e, 0x6a, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0xea, 0x02, 0x0d, 0x50, 0x62, 0x6e, 0x6a, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, + 0x74, 0x68, 0x6e, 0x52, 0x05, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x12, 0x41, 0x0a, 0x06, 0x76, 0x65, + 0x6e, 0x64, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, + 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x56, + 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x52, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x22, 0x30, 0x0a, + 0x1c, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, + 0x6f, 0x67, 0x52, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x32, + 0xc9, 0x04, 0x0a, 0x0a, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x12, 0x79, + 0x0a, 0x0a, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x34, 0x2e, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, + 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, + 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x73, 0x68, 0x6f, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x13, 0x43, 0x6c, + 0x65, 0x61, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, + 0x67, 0x12, 0x3d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, + 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x3e, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, + 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x8e, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x3b, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, + 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x97, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x61, 0x77, 0x12, 0x3e, 0x2e, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, + 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, + 0x52, 0x61, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, + 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, + 0x52, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x33, 0x5a, 0x21, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, + 0x62, 0x65, 0x6c, 0x6c, 0x2f, 0x70, 0x62, 0x6e, 0x6a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0xea, 0x02, 0x0d, 0x50, 0x62, 0x6e, 0x6a, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -310,29 +642,43 @@ func file_api_v1_diagnostic_proto_rawDescGZIP() []byte { return file_api_v1_diagnostic_proto_rawDescData } -var file_api_v1_diagnostic_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_api_v1_diagnostic_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_api_v1_diagnostic_proto_goTypes = []interface{}{ - (*ScreenshotRequest)(nil), // 0: github.com.tinkerbell.pbnj.api.v1.ScreenshotRequest - (*ScreenshotResponse)(nil), // 1: github.com.tinkerbell.pbnj.api.v1.ScreenshotResponse - (*ClearSystemEventLogRequest)(nil), // 2: github.com.tinkerbell.pbnj.api.v1.ClearSystemEventLogRequest - (*ClearSystemEventLogResponse)(nil), // 3: github.com.tinkerbell.pbnj.api.v1.ClearSystemEventLogResponse - (*Authn)(nil), // 4: github.com.tinkerbell.pbnj.api.v1.Authn - (*Vendor)(nil), // 5: github.com.tinkerbell.pbnj.api.v1.Vendor + (*ScreenshotRequest)(nil), // 0: github.com.tinkerbell.pbnj.api.v1.ScreenshotRequest + (*ScreenshotResponse)(nil), // 1: github.com.tinkerbell.pbnj.api.v1.ScreenshotResponse + (*ClearSystemEventLogRequest)(nil), // 2: github.com.tinkerbell.pbnj.api.v1.ClearSystemEventLogRequest + (*ClearSystemEventLogResponse)(nil), // 3: github.com.tinkerbell.pbnj.api.v1.ClearSystemEventLogResponse + (*GetSystemEventLogRequest)(nil), // 4: github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogRequest + (*SystemEventLogEntry)(nil), // 5: github.com.tinkerbell.pbnj.api.v1.SystemEventLogEntry + (*GetSystemEventLogResponse)(nil), // 6: github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogResponse + (*GetSystemEventLogRawRequest)(nil), // 7: github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogRawRequest + (*GetSystemEventLogRawResponse)(nil), // 8: github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogRawResponse + (*Authn)(nil), // 9: github.com.tinkerbell.pbnj.api.v1.Authn + (*Vendor)(nil), // 10: github.com.tinkerbell.pbnj.api.v1.Vendor } var file_api_v1_diagnostic_proto_depIdxs = []int32{ - 4, // 0: github.com.tinkerbell.pbnj.api.v1.ScreenshotRequest.authn:type_name -> github.com.tinkerbell.pbnj.api.v1.Authn - 5, // 1: github.com.tinkerbell.pbnj.api.v1.ScreenshotRequest.vendor:type_name -> github.com.tinkerbell.pbnj.api.v1.Vendor - 4, // 2: github.com.tinkerbell.pbnj.api.v1.ClearSystemEventLogRequest.authn:type_name -> github.com.tinkerbell.pbnj.api.v1.Authn - 5, // 3: github.com.tinkerbell.pbnj.api.v1.ClearSystemEventLogRequest.vendor:type_name -> github.com.tinkerbell.pbnj.api.v1.Vendor - 0, // 4: github.com.tinkerbell.pbnj.api.v1.Diagnostic.Screenshot:input_type -> github.com.tinkerbell.pbnj.api.v1.ScreenshotRequest - 2, // 5: github.com.tinkerbell.pbnj.api.v1.Diagnostic.ClearSystemEventLog:input_type -> github.com.tinkerbell.pbnj.api.v1.ClearSystemEventLogRequest - 1, // 6: github.com.tinkerbell.pbnj.api.v1.Diagnostic.Screenshot:output_type -> github.com.tinkerbell.pbnj.api.v1.ScreenshotResponse - 3, // 7: github.com.tinkerbell.pbnj.api.v1.Diagnostic.ClearSystemEventLog:output_type -> github.com.tinkerbell.pbnj.api.v1.ClearSystemEventLogResponse - 6, // [6:8] is the sub-list for method output_type - 4, // [4:6] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 9, // 0: github.com.tinkerbell.pbnj.api.v1.ScreenshotRequest.authn:type_name -> github.com.tinkerbell.pbnj.api.v1.Authn + 10, // 1: github.com.tinkerbell.pbnj.api.v1.ScreenshotRequest.vendor:type_name -> github.com.tinkerbell.pbnj.api.v1.Vendor + 9, // 2: github.com.tinkerbell.pbnj.api.v1.ClearSystemEventLogRequest.authn:type_name -> github.com.tinkerbell.pbnj.api.v1.Authn + 10, // 3: github.com.tinkerbell.pbnj.api.v1.ClearSystemEventLogRequest.vendor:type_name -> github.com.tinkerbell.pbnj.api.v1.Vendor + 9, // 4: github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogRequest.authn:type_name -> github.com.tinkerbell.pbnj.api.v1.Authn + 10, // 5: github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogRequest.vendor:type_name -> github.com.tinkerbell.pbnj.api.v1.Vendor + 5, // 6: github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogResponse.events:type_name -> github.com.tinkerbell.pbnj.api.v1.SystemEventLogEntry + 9, // 7: github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogRawRequest.authn:type_name -> github.com.tinkerbell.pbnj.api.v1.Authn + 10, // 8: github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogRawRequest.vendor:type_name -> github.com.tinkerbell.pbnj.api.v1.Vendor + 0, // 9: github.com.tinkerbell.pbnj.api.v1.Diagnostic.Screenshot:input_type -> github.com.tinkerbell.pbnj.api.v1.ScreenshotRequest + 2, // 10: github.com.tinkerbell.pbnj.api.v1.Diagnostic.ClearSystemEventLog:input_type -> github.com.tinkerbell.pbnj.api.v1.ClearSystemEventLogRequest + 4, // 11: github.com.tinkerbell.pbnj.api.v1.Diagnostic.GetSystemEventLog:input_type -> github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogRequest + 7, // 12: github.com.tinkerbell.pbnj.api.v1.Diagnostic.GetSystemEventLogRaw:input_type -> github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogRawRequest + 1, // 13: github.com.tinkerbell.pbnj.api.v1.Diagnostic.Screenshot:output_type -> github.com.tinkerbell.pbnj.api.v1.ScreenshotResponse + 3, // 14: github.com.tinkerbell.pbnj.api.v1.Diagnostic.ClearSystemEventLog:output_type -> github.com.tinkerbell.pbnj.api.v1.ClearSystemEventLogResponse + 6, // 15: github.com.tinkerbell.pbnj.api.v1.Diagnostic.GetSystemEventLog:output_type -> github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogResponse + 8, // 16: github.com.tinkerbell.pbnj.api.v1.Diagnostic.GetSystemEventLogRaw:output_type -> github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogRawResponse + 13, // [13:17] is the sub-list for method output_type + 9, // [9:13] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_api_v1_diagnostic_proto_init() } @@ -390,6 +736,66 @@ func file_api_v1_diagnostic_proto_init() { return nil } } + file_api_v1_diagnostic_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSystemEventLogRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_diagnostic_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SystemEventLogEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_diagnostic_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSystemEventLogResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_diagnostic_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSystemEventLogRawRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_diagnostic_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSystemEventLogRawResponse); 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{ @@ -397,7 +803,7 @@ func file_api_v1_diagnostic_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_v1_diagnostic_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 9, NumExtensions: 0, NumServices: 1, }, diff --git a/api/v1/diagnostic.proto b/api/v1/diagnostic.proto index 1120cdf..1bcc5f2 100644 --- a/api/v1/diagnostic.proto +++ b/api/v1/diagnostic.proto @@ -10,6 +10,8 @@ import "api/v1/common.proto"; service Diagnostic { rpc Screenshot (ScreenshotRequest) returns (ScreenshotResponse); rpc ClearSystemEventLog (ClearSystemEventLogRequest) returns (ClearSystemEventLogResponse); + rpc GetSystemEventLog (GetSystemEventLogRequest) returns (GetSystemEventLogResponse); + rpc GetSystemEventLogRaw (GetSystemEventLogRawRequest) returns (GetSystemEventLogRawResponse); } message ScreenshotRequest { @@ -29,4 +31,29 @@ message ClearSystemEventLogRequest { message ClearSystemEventLogResponse { string task_id = 1; -} \ No newline at end of file +} + +message GetSystemEventLogRequest { + v1.Authn authn = 1; + v1.Vendor vendor = 2; +} + +message SystemEventLogEntry { + string id = 1; + string timestamp = 2; + string description = 3; + string message = 4; +} + +message GetSystemEventLogResponse { + repeated SystemEventLogEntry events = 1; +} + +message GetSystemEventLogRawRequest { + v1.Authn authn = 1; + v1.Vendor vendor = 2; +} + +message GetSystemEventLogRawResponse { + string log = 1; +} diff --git a/api/v1/diagnostic.validator.pb.go b/api/v1/diagnostic.validator.pb.go index 7b56591..f5a083e 100644 --- a/api/v1/diagnostic.validator.pb.go +++ b/api/v1/diagnostic.validator.pb.go @@ -48,3 +48,45 @@ func (this *ClearSystemEventLogRequest) Validate() error { func (this *ClearSystemEventLogResponse) Validate() error { return nil } +func (this *GetSystemEventLogRequest) Validate() error { + if this.Authn != nil { + if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Authn); err != nil { + return github_com_mwitkow_go_proto_validators.FieldError("Authn", err) + } + } + if this.Vendor != nil { + if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Vendor); err != nil { + return github_com_mwitkow_go_proto_validators.FieldError("Vendor", err) + } + } + return nil +} +func (this *SystemEventLogEntry) Validate() error { + return nil +} +func (this *GetSystemEventLogResponse) Validate() error { + for _, item := range this.Events { + if item != nil { + if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { + return github_com_mwitkow_go_proto_validators.FieldError("Events", err) + } + } + } + return nil +} +func (this *GetSystemEventLogRawRequest) Validate() error { + if this.Authn != nil { + if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Authn); err != nil { + return github_com_mwitkow_go_proto_validators.FieldError("Authn", err) + } + } + if this.Vendor != nil { + if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Vendor); err != nil { + return github_com_mwitkow_go_proto_validators.FieldError("Vendor", err) + } + } + return nil +} +func (this *GetSystemEventLogRawResponse) Validate() error { + return nil +} diff --git a/api/v1/diagnostic_grpc.pb.go b/api/v1/diagnostic_grpc.pb.go index 14f6c90..48904e9 100644 --- a/api/v1/diagnostic_grpc.pb.go +++ b/api/v1/diagnostic_grpc.pb.go @@ -20,6 +20,8 @@ const _ = grpc.SupportPackageIsVersion7 type DiagnosticClient interface { Screenshot(ctx context.Context, in *ScreenshotRequest, opts ...grpc.CallOption) (*ScreenshotResponse, error) ClearSystemEventLog(ctx context.Context, in *ClearSystemEventLogRequest, opts ...grpc.CallOption) (*ClearSystemEventLogResponse, error) + GetSystemEventLog(ctx context.Context, in *GetSystemEventLogRequest, opts ...grpc.CallOption) (*GetSystemEventLogResponse, error) + GetSystemEventLogRaw(ctx context.Context, in *GetSystemEventLogRawRequest, opts ...grpc.CallOption) (*GetSystemEventLogRawResponse, error) } type diagnosticClient struct { @@ -48,12 +50,32 @@ func (c *diagnosticClient) ClearSystemEventLog(ctx context.Context, in *ClearSys return out, nil } +func (c *diagnosticClient) GetSystemEventLog(ctx context.Context, in *GetSystemEventLogRequest, opts ...grpc.CallOption) (*GetSystemEventLogResponse, error) { + out := new(GetSystemEventLogResponse) + err := c.cc.Invoke(ctx, "/github.com.tinkerbell.pbnj.api.v1.Diagnostic/GetSystemEventLog", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diagnosticClient) GetSystemEventLogRaw(ctx context.Context, in *GetSystemEventLogRawRequest, opts ...grpc.CallOption) (*GetSystemEventLogRawResponse, error) { + out := new(GetSystemEventLogRawResponse) + err := c.cc.Invoke(ctx, "/github.com.tinkerbell.pbnj.api.v1.Diagnostic/GetSystemEventLogRaw", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // DiagnosticServer is the server API for Diagnostic service. // All implementations must embed UnimplementedDiagnosticServer // for forward compatibility type DiagnosticServer interface { Screenshot(context.Context, *ScreenshotRequest) (*ScreenshotResponse, error) ClearSystemEventLog(context.Context, *ClearSystemEventLogRequest) (*ClearSystemEventLogResponse, error) + GetSystemEventLog(context.Context, *GetSystemEventLogRequest) (*GetSystemEventLogResponse, error) + GetSystemEventLogRaw(context.Context, *GetSystemEventLogRawRequest) (*GetSystemEventLogRawResponse, error) mustEmbedUnimplementedDiagnosticServer() } @@ -67,6 +89,12 @@ func (UnimplementedDiagnosticServer) Screenshot(context.Context, *ScreenshotRequ func (UnimplementedDiagnosticServer) ClearSystemEventLog(context.Context, *ClearSystemEventLogRequest) (*ClearSystemEventLogResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ClearSystemEventLog not implemented") } +func (UnimplementedDiagnosticServer) GetSystemEventLog(context.Context, *GetSystemEventLogRequest) (*GetSystemEventLogResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSystemEventLog not implemented") +} +func (UnimplementedDiagnosticServer) GetSystemEventLogRaw(context.Context, *GetSystemEventLogRawRequest) (*GetSystemEventLogRawResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSystemEventLogRaw not implemented") +} func (UnimplementedDiagnosticServer) mustEmbedUnimplementedDiagnosticServer() {} // UnsafeDiagnosticServer may be embedded to opt out of forward compatibility for this service. @@ -116,6 +144,42 @@ func _Diagnostic_ClearSystemEventLog_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _Diagnostic_GetSystemEventLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSystemEventLogRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiagnosticServer).GetSystemEventLog(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/github.com.tinkerbell.pbnj.api.v1.Diagnostic/GetSystemEventLog", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiagnosticServer).GetSystemEventLog(ctx, req.(*GetSystemEventLogRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Diagnostic_GetSystemEventLogRaw_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSystemEventLogRawRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiagnosticServer).GetSystemEventLogRaw(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/github.com.tinkerbell.pbnj.api.v1.Diagnostic/GetSystemEventLogRaw", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiagnosticServer).GetSystemEventLogRaw(ctx, req.(*GetSystemEventLogRawRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Diagnostic_serviceDesc = grpc.ServiceDesc{ ServiceName: "github.com.tinkerbell.pbnj.api.v1.Diagnostic", HandlerType: (*DiagnosticServer)(nil), @@ -128,6 +192,14 @@ var _Diagnostic_serviceDesc = grpc.ServiceDesc{ MethodName: "ClearSystemEventLog", Handler: _Diagnostic_ClearSystemEventLog_Handler, }, + { + MethodName: "GetSystemEventLog", + Handler: _Diagnostic_GetSystemEventLog_Handler, + }, + { + MethodName: "GetSystemEventLogRaw", + Handler: _Diagnostic_GetSystemEventLogRaw_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/diagnostic.proto", diff --git a/client/client.go b/client/client.go index 7ef2b06..1683c27 100644 --- a/client/client.go +++ b/client/client.go @@ -145,3 +145,13 @@ func ClearSystemEventLog(ctx context.Context, client v1.DiagnosticClient, taskCl } return statusResp, nil } + +// GetSystemEventLog retrieves the System Event Log of the server. +func GetSystemEventLog(ctx context.Context, client v1.DiagnosticClient, request *v1.GetSystemEventLogRequest) (*v1.GetSystemEventLogResponse, error) { + return client.GetSystemEventLog(ctx, request) +} + +// GetSystemEventLogRaw retrieves the System Event Log of the server. +func GetSystemEventLogRaw(ctx context.Context, client v1.DiagnosticClient, request *v1.GetSystemEventLogRawRequest) (*v1.GetSystemEventLogRawResponse, error) { + return client.GetSystemEventLogRaw(ctx, request) +} diff --git a/cmd/sel.go b/cmd/sel.go index 6f892f4..efed567 100644 --- a/cmd/sel.go +++ b/cmd/sel.go @@ -57,8 +57,100 @@ var ( logger.Info("resp", "resp", []interface{}{resp}) }, } + + getSystemEventLogcommand = &cobra.Command{ + Use: "selget", + Short: "Get the System Event Log", + Long: `Get the System Event Log of the target BMC. + Includes the following information: + ID, Timestamp, Description, Message`, + Run: func(cmd *cobra.Command, args []string) { + var opts []grpc.DialOption + ctx := context.Background() + + logger := defaultLogger(logLevel) + + opts = append(opts, grpc.WithTransportCredentials(insecure.NewCredentials())) + conn, err := grpc.Dial("localhost:"+port, opts...) + if err != nil { + logger.Error(err, "fail to dial server") + os.Exit(1) + } + defer conn.Close() + client := v1.NewDiagnosticClient(conn) + + resp, err := v1Client.GetSystemEventLog(ctx, client, &v1.GetSystemEventLogRequest{ + Authn: &v1.Authn{ + Authn: &v1.Authn_DirectAuthn{ + DirectAuthn: &v1.DirectAuthn{ + Host: &v1.Host{ + Host: bmcaddress, + }, + Username: bmcuser, + Password: bmcpass, + }, + }, + }, + Vendor: &v1.Vendor{ + Name: bmcvendor, + }, + }) + if err != nil { + logger.Error(err, "error calling") + os.Exit(1) + } + + logger.Info("resp", "resp", []interface{}{resp}) + }, + } + + getSystemEventLogRawcommand = &cobra.Command{ + Use: "selgetraw", + Short: "Get the Raw System Event Log", + Long: `Get the Raw System Event Log of the target BMC`, + Run: func(cmd *cobra.Command, args []string) { + var opts []grpc.DialOption + ctx := context.Background() + + logger := defaultLogger(logLevel) + + opts = append(opts, grpc.WithTransportCredentials(insecure.NewCredentials())) + conn, err := grpc.Dial("localhost:"+port, opts...) + if err != nil { + logger.Error(err, "fail to dial server") + os.Exit(1) + } + defer conn.Close() + client := v1.NewDiagnosticClient(conn) + + resp, err := v1Client.GetSystemEventLogRaw(ctx, client, &v1.GetSystemEventLogRawRequest{ + Authn: &v1.Authn{ + Authn: &v1.Authn_DirectAuthn{ + DirectAuthn: &v1.DirectAuthn{ + Host: &v1.Host{ + Host: bmcaddress, + }, + Username: bmcuser, + Password: bmcpass, + }, + }, + }, + Vendor: &v1.Vendor{ + Name: bmcvendor, + }, + }) + if err != nil { + logger.Error(err, "error calling") + os.Exit(1) + } + + logger.Info("resp", "resp", []interface{}{resp}) + }, + } ) func init() { diagnosticCmd.AddCommand(clearSystemEventLogcommand) + diagnosticCmd.AddCommand(getSystemEventLogcommand) + diagnosticCmd.AddCommand(getSystemEventLogRawcommand) } diff --git a/go.mod b/go.mod index 96f9d84..b27739b 100644 --- a/go.mod +++ b/go.mod @@ -4,16 +4,16 @@ go 1.20 require ( github.com/bmc-toolbox/bmclib v0.5.7 - github.com/bmc-toolbox/bmclib/v2 v2.0.1-0.20230925132953-d2aac70a0c5e + github.com/bmc-toolbox/bmclib/v2 v2.2.0 github.com/cristalhq/jwt/v3 v3.1.0 - github.com/equinix-labs/otel-init-go v0.0.7 + github.com/equinix-labs/otel-init-go v0.0.9 github.com/fatih/color v1.15.0 - github.com/go-logr/logr v1.2.4 + github.com/go-logr/logr v1.3.0 github.com/go-logr/zerologr v1.2.3 github.com/go-test/deep v1.1.0 github.com/golang-jwt/jwt/v4 v4.5.0 github.com/golang/protobuf v1.5.3 - github.com/google/go-cmp v0.5.9 + github.com/google/go-cmp v0.6.0 github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/hashicorp/go-multierror v1.1.1 @@ -26,17 +26,17 @@ require ( github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.15.0 github.com/rs/xid v1.5.0 - github.com/rs/zerolog v1.30.0 + github.com/rs/zerolog v1.31.0 github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.15.0 - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.40.0 - go.opentelemetry.io/otel v1.14.0 - go.opentelemetry.io/otel/trace v1.14.0 + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0 + go.opentelemetry.io/otel v1.20.0 + go.opentelemetry.io/otel/trace v1.20.0 goa.design/goa v2.2.5+incompatible - golang.org/x/sync v0.1.0 - google.golang.org/grpc v1.54.0 - google.golang.org/protobuf v1.30.0 + golang.org/x/sync v0.3.0 + google.golang.org/grpc v1.59.0 + google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -46,9 +46,9 @@ require ( github.com/VictorLowther/simplexml v0.0.0-20180716164440-0bff93621230 // indirect github.com/VictorLowther/soap v0.0.0-20150314151524-8e36fca84b22 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bmc-toolbox/common v0.0.0-20230220061748-93ff001f4a1d // indirect + github.com/bmc-toolbox/common v0.0.0-20231204194243-7bcbccab7116 // indirect github.com/bombsimon/logrusr/v2 v2.0.1 // indirect - github.com/cenkalti/backoff/v4 v4.2.0 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/coocood/freecache v1.2.3 // indirect @@ -59,7 +59,7 @@ require ( github.com/go-playground/universal-translator v0.18.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/go-querystring v1.1.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect @@ -68,7 +68,7 @@ require ( github.com/leodido/go-urn v1.2.1 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/pelletier/go-toml/v2 v2.0.6 // indirect @@ -78,24 +78,24 @@ require ( github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect github.com/satori/go.uuid v1.2.0 // indirect - github.com/sirupsen/logrus v1.9.0 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/afero v1.9.3 // indirect github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/stmcginnis/gofish v0.14.1-0.20230920133920-77490fd98fa2 // indirect + github.com/stmcginnis/gofish v0.15.1-0.20231121142100-22a60a77be91 // indirect github.com/subosito/gotenv v1.4.2 // indirect - go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.13.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.13.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.13.0 // indirect - go.opentelemetry.io/otel/metric v0.37.0 // indirect - go.opentelemetry.io/otel/sdk v1.13.0 // indirect - go.opentelemetry.io/proto/otlp v0.19.0 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/exp v0.0.0-20230212135524-a684f29349b6 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 // indirect + go.opentelemetry.io/otel/metric v1.20.0 // indirect + go.opentelemetry.io/otel/sdk v1.20.0 // indirect + go.opentelemetry.io/proto/otlp v1.0.0 // indirect + golang.org/x/crypto v0.16.0 // indirect + golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230911183012-2d3300fd4832 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230911183012-2d3300fd4832 // indirect gopkg.in/go-playground/validator.v9 v9.31.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index c1bd8a6..3fcf720 100644 --- a/go.sum +++ b/go.sum @@ -24,7 +24,7 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.15.1 h1:7UGq3QknM33pw5xATlpzeoomNxsacIVvTqTTvbfajmE= +cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= @@ -50,23 +50,21 @@ github.com/VictorLowther/simplexml v0.0.0-20180716164440-0bff93621230 h1:t95Grn2 github.com/VictorLowther/simplexml v0.0.0-20180716164440-0bff93621230/go.mod h1:t2EzW1qybnPDQ3LR/GgeF0GOzHUXT5IVMLP2gkW1cmc= github.com/VictorLowther/soap v0.0.0-20150314151524-8e36fca84b22 h1:a0MBqYm44o0NcthLKCljZHe1mxlN6oahCQHHThnSwB4= github.com/VictorLowther/soap v0.0.0-20150314151524-8e36fca84b22/go.mod h1:/B7V22rcz4860iDqstGvia/2+IYWXf3/JdQCVd/1D2A= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bmc-toolbox/bmclib v0.5.7 h1:v3CqOJCMUuH+kA+xi7CdY5EuzUhMH9gsBkYTQMYlbog= github.com/bmc-toolbox/bmclib v0.5.7/go.mod h1:jSCb2/o2bZhTTg3IgShckCfFxkX4yqQC065tuYh2pKk= -github.com/bmc-toolbox/bmclib/v2 v2.0.1-0.20230925132953-d2aac70a0c5e h1:/EL2DqlYvFC3NO49PDjaYP8HyBqHpoDYA5AqyjSA1SA= -github.com/bmc-toolbox/bmclib/v2 v2.0.1-0.20230925132953-d2aac70a0c5e/go.mod h1:hRe0RhyHbyQDFULc6HQFBIwdBOFYnm+8rHeO9UBnxAU= -github.com/bmc-toolbox/common v0.0.0-20230220061748-93ff001f4a1d h1:cQ30Wa8mhLzK1TSOG+g3FlneIsXtFgun61mmPwVPmD0= -github.com/bmc-toolbox/common v0.0.0-20230220061748-93ff001f4a1d/go.mod h1:SY//n1PJjZfbFbmAsB6GvEKbc7UXz3d30s3kWxfJQ/c= +github.com/bmc-toolbox/bmclib/v2 v2.2.0 h1:EJ+53SUPoMpr6AJvlBlOEqIQF5UlnA8Mf1J2zEobV68= +github.com/bmc-toolbox/bmclib/v2 v2.2.0/go.mod h1:gFF4iD468hbW1JUdJJx3mbhNGzoLsG47epbMa++grp8= +github.com/bmc-toolbox/common v0.0.0-20231204194243-7bcbccab7116 h1:gqWn/cMjryKoUfITx2vRHrRHTvd9fQ+zKPwWsmMIrK4= +github.com/bmc-toolbox/common v0.0.0-20231204194243-7bcbccab7116/go.mod h1:SY//n1PJjZfbFbmAsB6GvEKbc7UXz3d30s3kWxfJQ/c= github.com/bombsimon/logrusr/v2 v2.0.1 h1:1VgxVNQMCvjirZIYaT9JYn6sAVGVEcNtRE0y4mvaOAM= github.com/bombsimon/logrusr/v2 v2.0.1/go.mod h1:ByVAX+vHdLGAfdroiMg6q0zgq2FODY2lc5YJvzmOJio= -github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= -github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -83,11 +81,7 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= github.com/coocood/freecache v1.1.0/go.mod h1:ePwxCDzOYvARfHdr1pByNct1at3CoKnsipOHwKlNbzI= github.com/coocood/freecache v1.2.3 h1:lcBwpZrwBZRZyLk/8EMyQVXRiFl663cCuMOrjCALeto= github.com/coocood/freecache v1.2.3/go.mod h1:RBUWa/Cy+OHdfTGFEhEuE1pMCMX51Ncizj7rthiQ3vk= @@ -107,11 +101,10 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/equinix-labs/otel-init-go v0.0.7 h1:5d3iI7qj1Guu58iRYPB0+sMv6mX5G8tD1sfVbVg9J8M= -github.com/equinix-labs/otel-init-go v0.0.7/go.mod h1:J50RUPkjhbaeYujme5mqzYyMPHcZ3mSK3Q3YGUxxhOk= +github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= +github.com/equinix-labs/otel-init-go v0.0.9 h1:hdh0Qifs1vzFnaN6UpJz0pO6A6ZejXjvkEFi8OGTfpE= +github.com/equinix-labs/otel-init-go v0.0.9/go.mod h1:5h8apPuPWz/KaMvAb3d0HoPEisQrUnqPmkc2T5SSpX4= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= @@ -128,8 +121,8 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.0.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zerologr v1.2.3 h1:up5N9vcH9Xck3jJkXzgyOxozT14R47IyDODz8LM1KSs= @@ -152,8 +145,7 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -179,7 +171,6 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -194,9 +185,8 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= @@ -223,9 +213,8 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDa github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 h1:BZHcxBETFHIdVyhyEfOvn/RdU/QGdLI4y34qQGjGWO0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 h1:RtRsiaGvWxcwd8y3BiRZxsylPT8hLWZ5SPcfI+3IDNk= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0/go.mod h1:TzP6duP4Py2pHLVPPQp42aoYI92+PCrVotyR5e8Vqlk= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -266,13 +255,12 @@ github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0V github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= @@ -315,20 +303,19 @@ github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= -github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= +github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= +github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= @@ -342,8 +329,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= -github.com/stmcginnis/gofish v0.14.1-0.20230920133920-77490fd98fa2 h1:R0N4G786trm1dHBwJftzaupRrwhY1T+rBrTBC8eqiRQ= -github.com/stmcginnis/gofish v0.14.1-0.20230920133920-77490fd98fa2/go.mod h1:BLDSFTp8pDlf/xDbLZa+F7f7eW0E/CHCboggsu8CznI= +github.com/stmcginnis/gofish v0.15.1-0.20231121142100-22a60a77be91 h1:WmABtU8y6kTgzoVUn3FWCQGAfyodve3uz3xno28BrRs= +github.com/stmcginnis/gofish v0.15.1-0.20231121142100-22a60a77be91/go.mod h1:BLDSFTp8pDlf/xDbLZa+F7f7eW0E/CHCboggsu8CznI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -357,7 +344,7 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -370,29 +357,26 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.40.0 h1:5jD3teb4Qh7mx/nfzq4jO2WFFpvXD0vYWFDrdvNWmXk= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.40.0/go.mod h1:UMklln0+MRhZC4e3PwmN3pCtq4DyIadWw4yikh6bNrw= -go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= -go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.13.0 h1:pa05sNT/P8OsIQ8mPZKTIyiBuzS/xDGLVx+DCt0y6Vs= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.13.0/go.mod h1:rqbht/LlhVBgn5+k3M5QK96K5Xb0DvXpMJ5SFQpY6uw= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.13.0 h1:Any/nVxaoMq1T2w0W85d6w5COlLuCCgOYKQhJJWEMwQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.13.0/go.mod h1:46vAP6RWfNn7EKov73l5KBFlNxz8kYlxR1woU+bJ4ZY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.13.0 h1:Wz7UQn7/eIqZVDJbuNEM6PmqeA71cWXrWcXekP5HZgU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.13.0/go.mod h1:OhH1xvgA5jZW2M/S4PcvtDlFE1VULRRBsibBrKuJQGI= -go.opentelemetry.io/otel/metric v0.37.0 h1:pHDQuLQOZwYD+Km0eb657A25NaRzy0a+eLyKfDXedEs= -go.opentelemetry.io/otel/metric v0.37.0/go.mod h1:DmdaHfGt54iV6UKxsV9slj2bBRJcKC1B1uvDLIioc1s= -go.opentelemetry.io/otel/sdk v1.13.0 h1:BHib5g8MvdqS65yo2vV1s6Le42Hm6rrw08qU6yz5JaM= -go.opentelemetry.io/otel/sdk v1.13.0/go.mod h1:YLKPx5+6Vx/o1TCUYYs+bpymtkmazOMT6zoRrC7AQ7I= -go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= -go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= -go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0 h1:ZOLJc06r4CB42laIXg/7udr0pbZyuAihN10A/XuiQRY= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0/go.mod h1:5z+/ZWJQKXa9YT34fQNx5K8Hd1EoIhvtUygUQPqEOgQ= +go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= +go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0/go.mod h1:GijYcYmNpX1KazD5JmWGsi4P7dDTTTnfv1UbGn84MnU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0/go.mod h1:vNUq47TGFioo+ffTSnKNdob241vePmtNZnAODKapKd0= +go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= +go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= +go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= +go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= +go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= +go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= +go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= +go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= @@ -406,8 +390,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -419,8 +403,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230212135524-a684f29349b6 h1:Ic9KukPQ7PegFzHckNiMTQXGgEszA7mY2Fn4ZMtnMbw= -golang.org/x/exp v0.0.0-20230212135524-a684f29349b6/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb h1:c0vyKkb6yr3KR7jEfJaOSv4lG7xPkbN6r52aJz1d8a8= +golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -476,9 +460,8 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -488,8 +471,7 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= +golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -500,8 +482,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -538,31 +520,28 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210608053332-aa57babbf139/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -618,7 +597,7 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -674,7 +653,6 @@ google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= @@ -689,9 +667,11 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc h1:ijGwO+0vL2hJt5gaygqP2j6PfflOBrRot0IczKbmtio= -google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230911183012-2d3300fd4832 h1:/30npZKtUjXqju7ZA2MsvpkGKD4mQFtf+zPnZasABjg= +google.golang.org/genproto/googleapis/api v0.0.0-20230911183012-2d3300fd4832 h1:4E7rZzBdR5LmiZx6n47Dg4AjH8JLhMQWywsYqvXNLcs= +google.golang.org/genproto/googleapis/api v0.0.0-20230911183012-2d3300fd4832/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230911183012-2d3300fd4832 h1:o4LtQxebKIJ4vkzyhtD2rfUNZ20Zf0ik5YVP5E7G7VE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230911183012-2d3300fd4832/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -705,15 +685,11 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.54.0 h1:EhTqbhiYeixwWQtAEZAxmV9MGqcjEU2mFx52xCzNyag= -google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/grpc/examples v0.0.0-20201226181154-53788aa5dcb4/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -727,9 +703,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= @@ -741,7 +716,6 @@ gopkg.in/go-playground/validator.v9 v9.31.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWd gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= diff --git a/grpc/oob/diagnostic/diagnostic.go b/grpc/oob/diagnostic/diagnostic.go index 59846e3..ae46bb0 100644 --- a/grpc/oob/diagnostic/diagnostic.go +++ b/grpc/oob/diagnostic/diagnostic.go @@ -8,8 +8,10 @@ import ( type Action struct { common.Accessory - ScreenshotRequest *v1.ScreenshotRequest - ClearSystemEventLogRequest *v1.ClearSystemEventLogRequest + ScreenshotRequest *v1.ScreenshotRequest + ClearSystemEventLogRequest *v1.ClearSystemEventLogRequest + GetSystemEventLogRequest *v1.GetSystemEventLogRequest + GetSystemEventLogRawRequest *v1.GetSystemEventLogRawRequest } // WithLogger adds a logr to an Action struct. diff --git a/grpc/oob/diagnostic/getsel.go b/grpc/oob/diagnostic/getsel.go new file mode 100644 index 0000000..9839eae --- /dev/null +++ b/grpc/oob/diagnostic/getsel.go @@ -0,0 +1,203 @@ +package diagnostic + +import ( + "context" + "fmt" + + "github.com/bmc-toolbox/bmclib/v2" + "github.com/bmc-toolbox/bmclib/v2/bmc" + "github.com/bmc-toolbox/bmclib/v2/providers" + "github.com/prometheus/client_golang/prometheus" + v1 "github.com/tinkerbell/pbnj/api/v1" + common "github.com/tinkerbell/pbnj/grpc/oob" + "github.com/tinkerbell/pbnj/pkg/metrics" + "github.com/tinkerbell/pbnj/pkg/repository" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/trace" +) + +func NewSystemEventLogGetter(req *v1.GetSystemEventLogRequest, opts ...Option) (*Action, error) { + a := &Action{} + a.GetSystemEventLogRequest = req + for _, opt := range opts { + err := opt(a) + if err != nil { + return nil, err + } + } + return a, nil +} + +func NewSystemEventLogRawGetter(req *v1.GetSystemEventLogRawRequest, opts ...Option) (*Action, error) { + a := &Action{} + a.GetSystemEventLogRawRequest = req + for _, opt := range opts { + err := opt(a) + if err != nil { + return nil, err + } + } + return a, nil +} + +func (m Action) GetSystemEventLog(ctx context.Context) (result bmc.SystemEventLogEntries, err error) { + labels := prometheus.Labels{ + "service": "diagnostic", + "action": "get_system_event_log", + } + + timer := prometheus.NewTimer(metrics.ActionDuration.With(labels)) + defer timer.ObserveDuration() + + tracer := otel.Tracer("pbnj") + ctx, span := tracer.Start(ctx, "diagnostic.GetSystemEventLog", trace.WithAttributes( + attribute.String("bmc.device", m.GetSystemEventLogRequest.GetAuthn().GetDirectAuthn().GetHost().GetHost()), + )) + defer span.End() + + if v := m.GetSystemEventLogRequest.GetVendor(); v != nil { + span.SetAttributes(attribute.String("bmc.vendor", v.GetName())) + } + + host, user, password, parseErr := m.ParseAuth(m.GetSystemEventLogRequest.GetAuthn()) + if parseErr != nil { + span.SetStatus(codes.Error, "error parsing credentials: "+parseErr.Error()) + return result, parseErr + } + + span.SetAttributes(attribute.String("bmc.host", host), attribute.String("bmc.username", user)) + + opts := []bmclib.Option{ + bmclib.WithLogger(m.Log), + bmclib.WithPerProviderTimeout(common.BMCTimeoutFromCtx(ctx)), + } + + client := bmclib.NewClient(host, user, password, opts...) + client.Registry.Drivers = client.Registry.Supports(providers.FeatureGetSystemEventLog) + + m.SendStatusMessage("connecting to BMC") + err = client.Open(ctx) + meta := client.GetMetadata() + span.SetAttributes(attribute.StringSlice("bmc.open.providersAttempted", meta.ProvidersAttempted), + attribute.StringSlice("bmc.open.successfulOpenConns", meta.SuccessfulOpenConns)) + if err != nil { + span.SetStatus(codes.Error, err.Error()) + return nil, &repository.Error{ + Code: v1.Code_value["PERMISSION_DENIED"], + Message: err.Error(), + } + } + log := m.Log.WithValues("host", host, "user", user) + defer func() { + client.Close(ctx) + log.Info("closed connections", logMetadata(client.GetMetadata())...) + }() + log.Info("connected to BMC", logMetadata(client.GetMetadata())...) + m.SendStatusMessage("connected to BMC") + + // Get the system event log + m.SendStatusMessage("getting system event log") + sel, err := client.GetSystemEventLog(ctx) + log = m.Log.WithValues(logMetadata(client.GetMetadata())...) + meta = client.GetMetadata() + span.SetAttributes(attribute.StringSlice("bmc.get_system_event_log.providersAttempted", meta.ProvidersAttempted), + attribute.StringSlice("bmc.get_system_event_log.successfulOpenConns", meta.SuccessfulOpenConns)) + if err != nil { + log.Error(err, "error getting system event log") + span.SetStatus(codes.Error, "error getting system event log: "+err.Error()) + m.SendStatusMessage(fmt.Sprintf("failed to get system event log %v", host)) + + return nil, &repository.Error{ + Code: v1.Code_value["UNKNOWN"], + Message: err.Error(), + } + } + + span.SetStatus(codes.Ok, "") + log.Info("got system event log", logMetadata(client.GetMetadata())...) + m.SendStatusMessage(fmt.Sprintf("got system event log on %v", host)) + + return sel, nil +} + +func (m Action) GetSystemEventLogRaw(ctx context.Context) (result string, err error) { + labels := prometheus.Labels{ + "service": "diagnostic", + "action": "get_system_event_log_raw", + } + + timer := prometheus.NewTimer(metrics.ActionDuration.With(labels)) + defer timer.ObserveDuration() + + tracer := otel.Tracer("pbnj") + ctx, span := tracer.Start(ctx, "diagnostic.GetSystemEventLogRaw", trace.WithAttributes( + attribute.String("bmc.device", m.GetSystemEventLogRawRequest.GetAuthn().GetDirectAuthn().GetHost().GetHost()), + )) + defer span.End() + + if v := m.GetSystemEventLogRawRequest.GetVendor(); v != nil { + span.SetAttributes(attribute.String("bmc.vendor", v.GetName())) + } + + host, user, password, parseErr := m.ParseAuth(m.GetSystemEventLogRawRequest.GetAuthn()) + if parseErr != nil { + span.SetStatus(codes.Error, "error parsing credentials: "+parseErr.Error()) + return result, parseErr + } + + span.SetAttributes(attribute.String("bmc.host", host), attribute.String("bmc.username", user)) + + opts := []bmclib.Option{ + bmclib.WithLogger(m.Log), + bmclib.WithPerProviderTimeout(common.BMCTimeoutFromCtx(ctx)), + } + + client := bmclib.NewClient(host, user, password, opts...) + client.Registry.Drivers = client.Registry.Supports(providers.FeatureGetSystemEventLogRaw) + + m.SendStatusMessage("connecting to BMC") + err = client.Open(ctx) + meta := client.GetMetadata() + span.SetAttributes(attribute.StringSlice("bmc.open.providersAttempted", meta.ProvidersAttempted), + attribute.StringSlice("bmc.open.successfulOpenConns", meta.SuccessfulOpenConns)) + if err != nil { + span.SetStatus(codes.Error, err.Error()) + return "", &repository.Error{ + Code: v1.Code_value["PERMISSION_DENIED"], + Message: err.Error(), + } + } + log := m.Log.WithValues("host", host, "user", user) + defer func() { + client.Close(ctx) + log.Info("closed connections", logMetadata(client.GetMetadata())...) + }() + log.Info("connected to BMC", logMetadata(client.GetMetadata())...) + m.SendStatusMessage("connected to BMC") + + // Get the system event log + m.SendStatusMessage("getting system event log") + sel, err := client.GetSystemEventLogRaw(ctx) + log = m.Log.WithValues(logMetadata(client.GetMetadata())...) + meta = client.GetMetadata() + span.SetAttributes(attribute.StringSlice("bmc.get_system_event_log_raw.providersAttempted", meta.ProvidersAttempted), + attribute.StringSlice("bmc.get_system_event_log_raw.successfulOpenConns", meta.SuccessfulOpenConns)) + if err != nil { + log.Error(err, "error getting raw system event log") + span.SetStatus(codes.Error, "error getting raw system event log: "+err.Error()) + m.SendStatusMessage(fmt.Sprintf("failed to get raw system event log %v", host)) + + return "", &repository.Error{ + Code: v1.Code_value["UNKNOWN"], + Message: err.Error(), + } + } + + span.SetStatus(codes.Ok, "") + log.Info("got raw system event log", logMetadata(client.GetMetadata())...) + m.SendStatusMessage(fmt.Sprintf("got raw system event log on %v", host)) + + return sel, nil +} diff --git a/grpc/rpc/diagnostic.go b/grpc/rpc/diagnostic.go index bf4c001..64acd4d 100644 --- a/grpc/rpc/diagnostic.go +++ b/grpc/rpc/diagnostic.go @@ -79,3 +79,64 @@ func (d *DiagnosticService) ClearSystemEventLog(ctx context.Context, in *v1.Clea return &v1.ClearSystemEventLogResponse{TaskId: taskID}, nil } + +func (d *DiagnosticService) GetSystemEventLog(ctx context.Context, in *v1.GetSystemEventLogRequest) (*v1.GetSystemEventLogResponse, error) { + l := logging.ExtractLogr(ctx) + + l.Info("start Get System Event Log request", + "username", in.Authn.GetDirectAuthn().GetUsername(), + "vendor", in.Vendor.GetName(), + ) + + selgetter, err := diagnostic.NewSystemEventLogGetter(in, diagnostic.WithLogger(l)) + if err != nil { + l.Error(err, "error creating system event log getter") + return nil, err + } + + entries, err := selgetter.GetSystemEventLog(ctx) + if err != nil { + l.Error(err, "error getting system event log") + return nil, err + } + + var events []*v1.SystemEventLogEntry + + for _, entry := range entries { + events = append(events, &v1.SystemEventLogEntry{ + Id: entry[0], + Timestamp: entry[1], + Description: entry[2], + Message: entry[3], + }) + } + + return &v1.GetSystemEventLogResponse{ + Events: events, + }, nil +} + +func (d *DiagnosticService) GetSystemEventLogRaw(ctx context.Context, in *v1.GetSystemEventLogRawRequest) (*v1.GetSystemEventLogRawResponse, error) { + l := logging.ExtractLogr(ctx) + + l.Info("start Get System Event Log request", + "username", in.Authn.GetDirectAuthn().GetUsername(), + "vendor", in.Vendor.GetName(), + ) + + rawselgetter, err := diagnostic.NewSystemEventLogRawGetter(in, diagnostic.WithLogger(l)) + if err != nil { + l.Error(err, "error creating raw system event log getter") + return nil, err + } + + eventlog, err := rawselgetter.GetSystemEventLogRaw(ctx) + if err != nil { + l.Error(err, "error getting raw system event log") + return nil, err + } + + return &v1.GetSystemEventLogRawResponse{ + Log: eventlog, + }, nil +} From b14837a41c31a4062c1f23e162070893a5949683 Mon Sep 17 00:00:00 2001 From: Matthew Burns Date: Wed, 13 Dec 2023 10:14:40 -0700 Subject: [PATCH 2/3] Addressed review feedback; removed getter, merged into action. Renamed and regenerated protobufs to reflect. Some tests to make codecov happy. Signed-off-by: Matthew Burns --- api/v1/diagnostic.pb.go | 276 +++++++++++++++--------------- api/v1/diagnostic.proto | 12 +- api/v1/diagnostic.validator.pb.go | 8 +- api/v1/diagnostic_grpc.pb.go | 56 +++--- client/client.go | 12 +- cmd/sel.go | 4 +- go.mod | 4 + go.sum | 2 + grpc/oob/diagnostic/diagnostic.go | 8 +- grpc/oob/diagnostic/getsel.go | 49 +++--- grpc/rpc/diagnostic.go | 54 +++--- grpc/rpc/diagnostic_test.go | 272 +++++++++++++++++++++++++++++ 12 files changed, 522 insertions(+), 235 deletions(-) diff --git a/api/v1/diagnostic.pb.go b/api/v1/diagnostic.pb.go index eda9c96..cb6a65e 100644 --- a/api/v1/diagnostic.pb.go +++ b/api/v1/diagnostic.pb.go @@ -238,7 +238,7 @@ func (x *ClearSystemEventLogResponse) GetTaskId() string { return "" } -type GetSystemEventLogRequest struct { +type SystemEventLogRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -247,8 +247,8 @@ type GetSystemEventLogRequest struct { Vendor *Vendor `protobuf:"bytes,2,opt,name=vendor,proto3" json:"vendor,omitempty"` } -func (x *GetSystemEventLogRequest) Reset() { - *x = GetSystemEventLogRequest{} +func (x *SystemEventLogRequest) Reset() { + *x = SystemEventLogRequest{} if protoimpl.UnsafeEnabled { mi := &file_api_v1_diagnostic_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -256,13 +256,13 @@ func (x *GetSystemEventLogRequest) Reset() { } } -func (x *GetSystemEventLogRequest) String() string { +func (x *SystemEventLogRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetSystemEventLogRequest) ProtoMessage() {} +func (*SystemEventLogRequest) ProtoMessage() {} -func (x *GetSystemEventLogRequest) ProtoReflect() protoreflect.Message { +func (x *SystemEventLogRequest) ProtoReflect() protoreflect.Message { mi := &file_api_v1_diagnostic_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -274,19 +274,19 @@ func (x *GetSystemEventLogRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetSystemEventLogRequest.ProtoReflect.Descriptor instead. -func (*GetSystemEventLogRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use SystemEventLogRequest.ProtoReflect.Descriptor instead. +func (*SystemEventLogRequest) Descriptor() ([]byte, []int) { return file_api_v1_diagnostic_proto_rawDescGZIP(), []int{4} } -func (x *GetSystemEventLogRequest) GetAuthn() *Authn { +func (x *SystemEventLogRequest) GetAuthn() *Authn { if x != nil { return x.Authn } return nil } -func (x *GetSystemEventLogRequest) GetVendor() *Vendor { +func (x *SystemEventLogRequest) GetVendor() *Vendor { if x != nil { return x.Vendor } @@ -364,7 +364,7 @@ func (x *SystemEventLogEntry) GetMessage() string { return "" } -type GetSystemEventLogResponse struct { +type SystemEventLogResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -372,8 +372,8 @@ type GetSystemEventLogResponse struct { Events []*SystemEventLogEntry `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` } -func (x *GetSystemEventLogResponse) Reset() { - *x = GetSystemEventLogResponse{} +func (x *SystemEventLogResponse) Reset() { + *x = SystemEventLogResponse{} if protoimpl.UnsafeEnabled { mi := &file_api_v1_diagnostic_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -381,13 +381,13 @@ func (x *GetSystemEventLogResponse) Reset() { } } -func (x *GetSystemEventLogResponse) String() string { +func (x *SystemEventLogResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetSystemEventLogResponse) ProtoMessage() {} +func (*SystemEventLogResponse) ProtoMessage() {} -func (x *GetSystemEventLogResponse) ProtoReflect() protoreflect.Message { +func (x *SystemEventLogResponse) ProtoReflect() protoreflect.Message { mi := &file_api_v1_diagnostic_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -399,19 +399,19 @@ func (x *GetSystemEventLogResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetSystemEventLogResponse.ProtoReflect.Descriptor instead. -func (*GetSystemEventLogResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use SystemEventLogResponse.ProtoReflect.Descriptor instead. +func (*SystemEventLogResponse) Descriptor() ([]byte, []int) { return file_api_v1_diagnostic_proto_rawDescGZIP(), []int{6} } -func (x *GetSystemEventLogResponse) GetEvents() []*SystemEventLogEntry { +func (x *SystemEventLogResponse) GetEvents() []*SystemEventLogEntry { if x != nil { return x.Events } return nil } -type GetSystemEventLogRawRequest struct { +type SystemEventLogRawRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -420,8 +420,8 @@ type GetSystemEventLogRawRequest struct { Vendor *Vendor `protobuf:"bytes,2,opt,name=vendor,proto3" json:"vendor,omitempty"` } -func (x *GetSystemEventLogRawRequest) Reset() { - *x = GetSystemEventLogRawRequest{} +func (x *SystemEventLogRawRequest) Reset() { + *x = SystemEventLogRawRequest{} if protoimpl.UnsafeEnabled { mi := &file_api_v1_diagnostic_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -429,13 +429,13 @@ func (x *GetSystemEventLogRawRequest) Reset() { } } -func (x *GetSystemEventLogRawRequest) String() string { +func (x *SystemEventLogRawRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetSystemEventLogRawRequest) ProtoMessage() {} +func (*SystemEventLogRawRequest) ProtoMessage() {} -func (x *GetSystemEventLogRawRequest) ProtoReflect() protoreflect.Message { +func (x *SystemEventLogRawRequest) ProtoReflect() protoreflect.Message { mi := &file_api_v1_diagnostic_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -447,26 +447,26 @@ func (x *GetSystemEventLogRawRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetSystemEventLogRawRequest.ProtoReflect.Descriptor instead. -func (*GetSystemEventLogRawRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use SystemEventLogRawRequest.ProtoReflect.Descriptor instead. +func (*SystemEventLogRawRequest) Descriptor() ([]byte, []int) { return file_api_v1_diagnostic_proto_rawDescGZIP(), []int{7} } -func (x *GetSystemEventLogRawRequest) GetAuthn() *Authn { +func (x *SystemEventLogRawRequest) GetAuthn() *Authn { if x != nil { return x.Authn } return nil } -func (x *GetSystemEventLogRawRequest) GetVendor() *Vendor { +func (x *SystemEventLogRawRequest) GetVendor() *Vendor { if x != nil { return x.Vendor } return nil } -type GetSystemEventLogRawResponse struct { +type SystemEventLogRawResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -474,8 +474,8 @@ type GetSystemEventLogRawResponse struct { Log string `protobuf:"bytes,1,opt,name=log,proto3" json:"log,omitempty"` } -func (x *GetSystemEventLogRawResponse) Reset() { - *x = GetSystemEventLogRawResponse{} +func (x *SystemEventLogRawResponse) Reset() { + *x = SystemEventLogRawResponse{} if protoimpl.UnsafeEnabled { mi := &file_api_v1_diagnostic_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -483,13 +483,13 @@ func (x *GetSystemEventLogRawResponse) Reset() { } } -func (x *GetSystemEventLogRawResponse) String() string { +func (x *SystemEventLogRawResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetSystemEventLogRawResponse) ProtoMessage() {} +func (*SystemEventLogRawResponse) ProtoMessage() {} -func (x *GetSystemEventLogRawResponse) ProtoReflect() protoreflect.Message { +func (x *SystemEventLogRawResponse) ProtoReflect() protoreflect.Message { mi := &file_api_v1_diagnostic_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -501,12 +501,12 @@ func (x *GetSystemEventLogRawResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetSystemEventLogRawResponse.ProtoReflect.Descriptor instead. -func (*GetSystemEventLogRawResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use SystemEventLogRawResponse.ProtoReflect.Descriptor instead. +func (*SystemEventLogRawResponse) Descriptor() ([]byte, []int) { return file_api_v1_diagnostic_proto_rawDescGZIP(), []int{8} } -func (x *GetSystemEventLogRawResponse) GetLog() string { +func (x *SystemEventLogRawResponse) GetLog() string { if x != nil { return x.Log } @@ -548,86 +548,84 @@ var file_api_v1_diagnostic_proto_rawDesc = []byte{ 0x6e, 0x64, 0x6f, 0x72, 0x22, 0x36, 0x0a, 0x1b, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x9d, 0x01, 0x0a, - 0x18, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, - 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x05, 0x61, 0x75, 0x74, - 0x68, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, - 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, - 0x68, 0x6e, 0x52, 0x05, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x12, 0x41, 0x0a, 0x06, 0x76, 0x65, 0x6e, - 0x64, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, - 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, - 0x6e, 0x64, 0x6f, 0x72, 0x52, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x22, 0x7f, 0x0a, 0x13, - 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 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, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x6b, 0x0a, - 0x19, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, - 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x06, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, - 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x1b, 0x47, - 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, - 0x52, 0x61, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x05, 0x61, 0x75, - 0x74, 0x68, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, - 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, - 0x74, 0x68, 0x6e, 0x52, 0x05, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x12, 0x41, 0x0a, 0x06, 0x76, 0x65, - 0x6e, 0x64, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, - 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x56, - 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x52, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x22, 0x30, 0x0a, - 0x1c, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, - 0x6f, 0x67, 0x52, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x32, - 0xc9, 0x04, 0x0a, 0x0a, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x12, 0x79, - 0x0a, 0x0a, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x34, 0x2e, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, - 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x73, 0x68, 0x6f, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x13, 0x43, 0x6c, - 0x65, 0x61, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, - 0x67, 0x12, 0x3d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x9a, 0x01, 0x0a, + 0x15, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x05, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, 0x62, + 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6e, 0x52, + 0x05, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x12, 0x41, 0x0a, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, + 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x6e, 0x64, 0x6f, + 0x72, 0x52, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x22, 0x7f, 0x0a, 0x13, 0x53, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 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, + 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x68, 0x0a, 0x16, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, + 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x22, 0x9d, 0x01, 0x0a, 0x18, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x61, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x3e, 0x0a, 0x05, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, + 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6e, 0x52, 0x05, 0x61, 0x75, 0x74, 0x68, + 0x6e, 0x12, 0x41, 0x0a, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x3e, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x52, 0x06, 0x76, 0x65, + 0x6e, 0x64, 0x6f, 0x72, 0x22, 0x2d, 0x0a, 0x19, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6c, 0x6f, 0x67, 0x32, 0xb7, 0x04, 0x0a, 0x0a, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, + 0x69, 0x63, 0x12, 0x79, 0x0a, 0x0a, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x73, 0x68, 0x6f, 0x74, + 0x12, 0x34, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x8e, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x3b, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x73, 0x68, 0x6f, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, - 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x97, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x61, 0x77, 0x12, 0x3e, 0x2e, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, - 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, - 0x52, 0x61, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, - 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, - 0x52, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x33, 0x5a, 0x21, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, - 0x62, 0x65, 0x6c, 0x6c, 0x2f, 0x70, 0x62, 0x6e, 0x6a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0xea, 0x02, 0x0d, 0x50, 0x62, 0x6e, 0x6a, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x72, 0x65, 0x65, + 0x6e, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x94, 0x01, + 0x0a, 0x13, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x3d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, 0x62, + 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, + 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x0e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x38, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, + 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x39, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, + 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8e, 0x01, 0x0a, + 0x11, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, + 0x61, 0x77, 0x12, 0x3b, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, + 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x61, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x3c, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, + 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x70, 0x62, 0x6e, 0x6a, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, + 0x6f, 0x67, 0x52, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x33, 0x5a, + 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x69, 0x6e, 0x6b, + 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2f, 0x70, 0x62, 0x6e, 0x6a, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0xea, 0x02, 0x0d, 0x50, 0x62, 0x6e, 0x6a, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -644,36 +642,36 @@ func file_api_v1_diagnostic_proto_rawDescGZIP() []byte { var file_api_v1_diagnostic_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_api_v1_diagnostic_proto_goTypes = []interface{}{ - (*ScreenshotRequest)(nil), // 0: github.com.tinkerbell.pbnj.api.v1.ScreenshotRequest - (*ScreenshotResponse)(nil), // 1: github.com.tinkerbell.pbnj.api.v1.ScreenshotResponse - (*ClearSystemEventLogRequest)(nil), // 2: github.com.tinkerbell.pbnj.api.v1.ClearSystemEventLogRequest - (*ClearSystemEventLogResponse)(nil), // 3: github.com.tinkerbell.pbnj.api.v1.ClearSystemEventLogResponse - (*GetSystemEventLogRequest)(nil), // 4: github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogRequest - (*SystemEventLogEntry)(nil), // 5: github.com.tinkerbell.pbnj.api.v1.SystemEventLogEntry - (*GetSystemEventLogResponse)(nil), // 6: github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogResponse - (*GetSystemEventLogRawRequest)(nil), // 7: github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogRawRequest - (*GetSystemEventLogRawResponse)(nil), // 8: github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogRawResponse - (*Authn)(nil), // 9: github.com.tinkerbell.pbnj.api.v1.Authn - (*Vendor)(nil), // 10: github.com.tinkerbell.pbnj.api.v1.Vendor + (*ScreenshotRequest)(nil), // 0: github.com.tinkerbell.pbnj.api.v1.ScreenshotRequest + (*ScreenshotResponse)(nil), // 1: github.com.tinkerbell.pbnj.api.v1.ScreenshotResponse + (*ClearSystemEventLogRequest)(nil), // 2: github.com.tinkerbell.pbnj.api.v1.ClearSystemEventLogRequest + (*ClearSystemEventLogResponse)(nil), // 3: github.com.tinkerbell.pbnj.api.v1.ClearSystemEventLogResponse + (*SystemEventLogRequest)(nil), // 4: github.com.tinkerbell.pbnj.api.v1.SystemEventLogRequest + (*SystemEventLogEntry)(nil), // 5: github.com.tinkerbell.pbnj.api.v1.SystemEventLogEntry + (*SystemEventLogResponse)(nil), // 6: github.com.tinkerbell.pbnj.api.v1.SystemEventLogResponse + (*SystemEventLogRawRequest)(nil), // 7: github.com.tinkerbell.pbnj.api.v1.SystemEventLogRawRequest + (*SystemEventLogRawResponse)(nil), // 8: github.com.tinkerbell.pbnj.api.v1.SystemEventLogRawResponse + (*Authn)(nil), // 9: github.com.tinkerbell.pbnj.api.v1.Authn + (*Vendor)(nil), // 10: github.com.tinkerbell.pbnj.api.v1.Vendor } var file_api_v1_diagnostic_proto_depIdxs = []int32{ 9, // 0: github.com.tinkerbell.pbnj.api.v1.ScreenshotRequest.authn:type_name -> github.com.tinkerbell.pbnj.api.v1.Authn 10, // 1: github.com.tinkerbell.pbnj.api.v1.ScreenshotRequest.vendor:type_name -> github.com.tinkerbell.pbnj.api.v1.Vendor 9, // 2: github.com.tinkerbell.pbnj.api.v1.ClearSystemEventLogRequest.authn:type_name -> github.com.tinkerbell.pbnj.api.v1.Authn 10, // 3: github.com.tinkerbell.pbnj.api.v1.ClearSystemEventLogRequest.vendor:type_name -> github.com.tinkerbell.pbnj.api.v1.Vendor - 9, // 4: github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogRequest.authn:type_name -> github.com.tinkerbell.pbnj.api.v1.Authn - 10, // 5: github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogRequest.vendor:type_name -> github.com.tinkerbell.pbnj.api.v1.Vendor - 5, // 6: github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogResponse.events:type_name -> github.com.tinkerbell.pbnj.api.v1.SystemEventLogEntry - 9, // 7: github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogRawRequest.authn:type_name -> github.com.tinkerbell.pbnj.api.v1.Authn - 10, // 8: github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogRawRequest.vendor:type_name -> github.com.tinkerbell.pbnj.api.v1.Vendor + 9, // 4: github.com.tinkerbell.pbnj.api.v1.SystemEventLogRequest.authn:type_name -> github.com.tinkerbell.pbnj.api.v1.Authn + 10, // 5: github.com.tinkerbell.pbnj.api.v1.SystemEventLogRequest.vendor:type_name -> github.com.tinkerbell.pbnj.api.v1.Vendor + 5, // 6: github.com.tinkerbell.pbnj.api.v1.SystemEventLogResponse.events:type_name -> github.com.tinkerbell.pbnj.api.v1.SystemEventLogEntry + 9, // 7: github.com.tinkerbell.pbnj.api.v1.SystemEventLogRawRequest.authn:type_name -> github.com.tinkerbell.pbnj.api.v1.Authn + 10, // 8: github.com.tinkerbell.pbnj.api.v1.SystemEventLogRawRequest.vendor:type_name -> github.com.tinkerbell.pbnj.api.v1.Vendor 0, // 9: github.com.tinkerbell.pbnj.api.v1.Diagnostic.Screenshot:input_type -> github.com.tinkerbell.pbnj.api.v1.ScreenshotRequest 2, // 10: github.com.tinkerbell.pbnj.api.v1.Diagnostic.ClearSystemEventLog:input_type -> github.com.tinkerbell.pbnj.api.v1.ClearSystemEventLogRequest - 4, // 11: github.com.tinkerbell.pbnj.api.v1.Diagnostic.GetSystemEventLog:input_type -> github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogRequest - 7, // 12: github.com.tinkerbell.pbnj.api.v1.Diagnostic.GetSystemEventLogRaw:input_type -> github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogRawRequest + 4, // 11: github.com.tinkerbell.pbnj.api.v1.Diagnostic.SystemEventLog:input_type -> github.com.tinkerbell.pbnj.api.v1.SystemEventLogRequest + 7, // 12: github.com.tinkerbell.pbnj.api.v1.Diagnostic.SystemEventLogRaw:input_type -> github.com.tinkerbell.pbnj.api.v1.SystemEventLogRawRequest 1, // 13: github.com.tinkerbell.pbnj.api.v1.Diagnostic.Screenshot:output_type -> github.com.tinkerbell.pbnj.api.v1.ScreenshotResponse 3, // 14: github.com.tinkerbell.pbnj.api.v1.Diagnostic.ClearSystemEventLog:output_type -> github.com.tinkerbell.pbnj.api.v1.ClearSystemEventLogResponse - 6, // 15: github.com.tinkerbell.pbnj.api.v1.Diagnostic.GetSystemEventLog:output_type -> github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogResponse - 8, // 16: github.com.tinkerbell.pbnj.api.v1.Diagnostic.GetSystemEventLogRaw:output_type -> github.com.tinkerbell.pbnj.api.v1.GetSystemEventLogRawResponse + 6, // 15: github.com.tinkerbell.pbnj.api.v1.Diagnostic.SystemEventLog:output_type -> github.com.tinkerbell.pbnj.api.v1.SystemEventLogResponse + 8, // 16: github.com.tinkerbell.pbnj.api.v1.Diagnostic.SystemEventLogRaw:output_type -> github.com.tinkerbell.pbnj.api.v1.SystemEventLogRawResponse 13, // [13:17] is the sub-list for method output_type 9, // [9:13] is the sub-list for method input_type 9, // [9:9] is the sub-list for extension type_name @@ -737,7 +735,7 @@ func file_api_v1_diagnostic_proto_init() { } } file_api_v1_diagnostic_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSystemEventLogRequest); i { + switch v := v.(*SystemEventLogRequest); i { case 0: return &v.state case 1: @@ -761,7 +759,7 @@ func file_api_v1_diagnostic_proto_init() { } } file_api_v1_diagnostic_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSystemEventLogResponse); i { + switch v := v.(*SystemEventLogResponse); i { case 0: return &v.state case 1: @@ -773,7 +771,7 @@ func file_api_v1_diagnostic_proto_init() { } } file_api_v1_diagnostic_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSystemEventLogRawRequest); i { + switch v := v.(*SystemEventLogRawRequest); i { case 0: return &v.state case 1: @@ -785,7 +783,7 @@ func file_api_v1_diagnostic_proto_init() { } } file_api_v1_diagnostic_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSystemEventLogRawResponse); i { + switch v := v.(*SystemEventLogRawResponse); i { case 0: return &v.state case 1: diff --git a/api/v1/diagnostic.proto b/api/v1/diagnostic.proto index 1bcc5f2..f0df9c8 100644 --- a/api/v1/diagnostic.proto +++ b/api/v1/diagnostic.proto @@ -10,8 +10,8 @@ import "api/v1/common.proto"; service Diagnostic { rpc Screenshot (ScreenshotRequest) returns (ScreenshotResponse); rpc ClearSystemEventLog (ClearSystemEventLogRequest) returns (ClearSystemEventLogResponse); - rpc GetSystemEventLog (GetSystemEventLogRequest) returns (GetSystemEventLogResponse); - rpc GetSystemEventLogRaw (GetSystemEventLogRawRequest) returns (GetSystemEventLogRawResponse); + rpc SystemEventLog (SystemEventLogRequest) returns (SystemEventLogResponse); + rpc SystemEventLogRaw (SystemEventLogRawRequest) returns (SystemEventLogRawResponse); } message ScreenshotRequest { @@ -33,7 +33,7 @@ message ClearSystemEventLogResponse { string task_id = 1; } -message GetSystemEventLogRequest { +message SystemEventLogRequest { v1.Authn authn = 1; v1.Vendor vendor = 2; } @@ -45,15 +45,15 @@ message SystemEventLogEntry { string message = 4; } -message GetSystemEventLogResponse { +message SystemEventLogResponse { repeated SystemEventLogEntry events = 1; } -message GetSystemEventLogRawRequest { +message SystemEventLogRawRequest { v1.Authn authn = 1; v1.Vendor vendor = 2; } -message GetSystemEventLogRawResponse { +message SystemEventLogRawResponse { string log = 1; } diff --git a/api/v1/diagnostic.validator.pb.go b/api/v1/diagnostic.validator.pb.go index f5a083e..dab339b 100644 --- a/api/v1/diagnostic.validator.pb.go +++ b/api/v1/diagnostic.validator.pb.go @@ -48,7 +48,7 @@ func (this *ClearSystemEventLogRequest) Validate() error { func (this *ClearSystemEventLogResponse) Validate() error { return nil } -func (this *GetSystemEventLogRequest) Validate() error { +func (this *SystemEventLogRequest) Validate() error { if this.Authn != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Authn); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("Authn", err) @@ -64,7 +64,7 @@ func (this *GetSystemEventLogRequest) Validate() error { func (this *SystemEventLogEntry) Validate() error { return nil } -func (this *GetSystemEventLogResponse) Validate() error { +func (this *SystemEventLogResponse) Validate() error { for _, item := range this.Events { if item != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { @@ -74,7 +74,7 @@ func (this *GetSystemEventLogResponse) Validate() error { } return nil } -func (this *GetSystemEventLogRawRequest) Validate() error { +func (this *SystemEventLogRawRequest) Validate() error { if this.Authn != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Authn); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("Authn", err) @@ -87,6 +87,6 @@ func (this *GetSystemEventLogRawRequest) Validate() error { } return nil } -func (this *GetSystemEventLogRawResponse) Validate() error { +func (this *SystemEventLogRawResponse) Validate() error { return nil } diff --git a/api/v1/diagnostic_grpc.pb.go b/api/v1/diagnostic_grpc.pb.go index 48904e9..1ff9136 100644 --- a/api/v1/diagnostic_grpc.pb.go +++ b/api/v1/diagnostic_grpc.pb.go @@ -20,8 +20,8 @@ const _ = grpc.SupportPackageIsVersion7 type DiagnosticClient interface { Screenshot(ctx context.Context, in *ScreenshotRequest, opts ...grpc.CallOption) (*ScreenshotResponse, error) ClearSystemEventLog(ctx context.Context, in *ClearSystemEventLogRequest, opts ...grpc.CallOption) (*ClearSystemEventLogResponse, error) - GetSystemEventLog(ctx context.Context, in *GetSystemEventLogRequest, opts ...grpc.CallOption) (*GetSystemEventLogResponse, error) - GetSystemEventLogRaw(ctx context.Context, in *GetSystemEventLogRawRequest, opts ...grpc.CallOption) (*GetSystemEventLogRawResponse, error) + SystemEventLog(ctx context.Context, in *SystemEventLogRequest, opts ...grpc.CallOption) (*SystemEventLogResponse, error) + SystemEventLogRaw(ctx context.Context, in *SystemEventLogRawRequest, opts ...grpc.CallOption) (*SystemEventLogRawResponse, error) } type diagnosticClient struct { @@ -50,18 +50,18 @@ func (c *diagnosticClient) ClearSystemEventLog(ctx context.Context, in *ClearSys return out, nil } -func (c *diagnosticClient) GetSystemEventLog(ctx context.Context, in *GetSystemEventLogRequest, opts ...grpc.CallOption) (*GetSystemEventLogResponse, error) { - out := new(GetSystemEventLogResponse) - err := c.cc.Invoke(ctx, "/github.com.tinkerbell.pbnj.api.v1.Diagnostic/GetSystemEventLog", in, out, opts...) +func (c *diagnosticClient) SystemEventLog(ctx context.Context, in *SystemEventLogRequest, opts ...grpc.CallOption) (*SystemEventLogResponse, error) { + out := new(SystemEventLogResponse) + err := c.cc.Invoke(ctx, "/github.com.tinkerbell.pbnj.api.v1.Diagnostic/SystemEventLog", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *diagnosticClient) GetSystemEventLogRaw(ctx context.Context, in *GetSystemEventLogRawRequest, opts ...grpc.CallOption) (*GetSystemEventLogRawResponse, error) { - out := new(GetSystemEventLogRawResponse) - err := c.cc.Invoke(ctx, "/github.com.tinkerbell.pbnj.api.v1.Diagnostic/GetSystemEventLogRaw", in, out, opts...) +func (c *diagnosticClient) SystemEventLogRaw(ctx context.Context, in *SystemEventLogRawRequest, opts ...grpc.CallOption) (*SystemEventLogRawResponse, error) { + out := new(SystemEventLogRawResponse) + err := c.cc.Invoke(ctx, "/github.com.tinkerbell.pbnj.api.v1.Diagnostic/SystemEventLogRaw", in, out, opts...) if err != nil { return nil, err } @@ -74,8 +74,8 @@ func (c *diagnosticClient) GetSystemEventLogRaw(ctx context.Context, in *GetSyst type DiagnosticServer interface { Screenshot(context.Context, *ScreenshotRequest) (*ScreenshotResponse, error) ClearSystemEventLog(context.Context, *ClearSystemEventLogRequest) (*ClearSystemEventLogResponse, error) - GetSystemEventLog(context.Context, *GetSystemEventLogRequest) (*GetSystemEventLogResponse, error) - GetSystemEventLogRaw(context.Context, *GetSystemEventLogRawRequest) (*GetSystemEventLogRawResponse, error) + SystemEventLog(context.Context, *SystemEventLogRequest) (*SystemEventLogResponse, error) + SystemEventLogRaw(context.Context, *SystemEventLogRawRequest) (*SystemEventLogRawResponse, error) mustEmbedUnimplementedDiagnosticServer() } @@ -89,11 +89,11 @@ func (UnimplementedDiagnosticServer) Screenshot(context.Context, *ScreenshotRequ func (UnimplementedDiagnosticServer) ClearSystemEventLog(context.Context, *ClearSystemEventLogRequest) (*ClearSystemEventLogResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ClearSystemEventLog not implemented") } -func (UnimplementedDiagnosticServer) GetSystemEventLog(context.Context, *GetSystemEventLogRequest) (*GetSystemEventLogResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSystemEventLog not implemented") +func (UnimplementedDiagnosticServer) SystemEventLog(context.Context, *SystemEventLogRequest) (*SystemEventLogResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SystemEventLog not implemented") } -func (UnimplementedDiagnosticServer) GetSystemEventLogRaw(context.Context, *GetSystemEventLogRawRequest) (*GetSystemEventLogRawResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSystemEventLogRaw not implemented") +func (UnimplementedDiagnosticServer) SystemEventLogRaw(context.Context, *SystemEventLogRawRequest) (*SystemEventLogRawResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SystemEventLogRaw not implemented") } func (UnimplementedDiagnosticServer) mustEmbedUnimplementedDiagnosticServer() {} @@ -144,38 +144,38 @@ func _Diagnostic_ClearSystemEventLog_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } -func _Diagnostic_GetSystemEventLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSystemEventLogRequest) +func _Diagnostic_SystemEventLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SystemEventLogRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(DiagnosticServer).GetSystemEventLog(ctx, in) + return srv.(DiagnosticServer).SystemEventLog(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/github.com.tinkerbell.pbnj.api.v1.Diagnostic/GetSystemEventLog", + FullMethod: "/github.com.tinkerbell.pbnj.api.v1.Diagnostic/SystemEventLog", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DiagnosticServer).GetSystemEventLog(ctx, req.(*GetSystemEventLogRequest)) + return srv.(DiagnosticServer).SystemEventLog(ctx, req.(*SystemEventLogRequest)) } return interceptor(ctx, in, info, handler) } -func _Diagnostic_GetSystemEventLogRaw_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSystemEventLogRawRequest) +func _Diagnostic_SystemEventLogRaw_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SystemEventLogRawRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(DiagnosticServer).GetSystemEventLogRaw(ctx, in) + return srv.(DiagnosticServer).SystemEventLogRaw(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/github.com.tinkerbell.pbnj.api.v1.Diagnostic/GetSystemEventLogRaw", + FullMethod: "/github.com.tinkerbell.pbnj.api.v1.Diagnostic/SystemEventLogRaw", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DiagnosticServer).GetSystemEventLogRaw(ctx, req.(*GetSystemEventLogRawRequest)) + return srv.(DiagnosticServer).SystemEventLogRaw(ctx, req.(*SystemEventLogRawRequest)) } return interceptor(ctx, in, info, handler) } @@ -193,12 +193,12 @@ var _Diagnostic_serviceDesc = grpc.ServiceDesc{ Handler: _Diagnostic_ClearSystemEventLog_Handler, }, { - MethodName: "GetSystemEventLog", - Handler: _Diagnostic_GetSystemEventLog_Handler, + MethodName: "SystemEventLog", + Handler: _Diagnostic_SystemEventLog_Handler, }, { - MethodName: "GetSystemEventLogRaw", - Handler: _Diagnostic_GetSystemEventLogRaw_Handler, + MethodName: "SystemEventLogRaw", + Handler: _Diagnostic_SystemEventLogRaw_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/client/client.go b/client/client.go index 1683c27..ff50943 100644 --- a/client/client.go +++ b/client/client.go @@ -146,12 +146,12 @@ func ClearSystemEventLog(ctx context.Context, client v1.DiagnosticClient, taskCl return statusResp, nil } -// GetSystemEventLog retrieves the System Event Log of the server. -func GetSystemEventLog(ctx context.Context, client v1.DiagnosticClient, request *v1.GetSystemEventLogRequest) (*v1.GetSystemEventLogResponse, error) { - return client.GetSystemEventLog(ctx, request) +// SystemEventLog retrieves the System Event Log of the server. +func SystemEventLog(ctx context.Context, client v1.DiagnosticClient, request *v1.SystemEventLogRequest) (*v1.SystemEventLogResponse, error) { + return client.SystemEventLog(ctx, request) } -// GetSystemEventLogRaw retrieves the System Event Log of the server. -func GetSystemEventLogRaw(ctx context.Context, client v1.DiagnosticClient, request *v1.GetSystemEventLogRawRequest) (*v1.GetSystemEventLogRawResponse, error) { - return client.GetSystemEventLogRaw(ctx, request) +// SystemEventLogRaw retrieves the System Event Log of the server. +func SystemEventLogRaw(ctx context.Context, client v1.DiagnosticClient, request *v1.SystemEventLogRawRequest) (*v1.SystemEventLogRawResponse, error) { + return client.SystemEventLogRaw(ctx, request) } diff --git a/cmd/sel.go b/cmd/sel.go index efed567..a8aee27 100644 --- a/cmd/sel.go +++ b/cmd/sel.go @@ -79,7 +79,7 @@ var ( defer conn.Close() client := v1.NewDiagnosticClient(conn) - resp, err := v1Client.GetSystemEventLog(ctx, client, &v1.GetSystemEventLogRequest{ + resp, err := v1Client.SystemEventLog(ctx, client, &v1.SystemEventLogRequest{ Authn: &v1.Authn{ Authn: &v1.Authn_DirectAuthn{ DirectAuthn: &v1.DirectAuthn{ @@ -123,7 +123,7 @@ var ( defer conn.Close() client := v1.NewDiagnosticClient(conn) - resp, err := v1Client.GetSystemEventLogRaw(ctx, client, &v1.GetSystemEventLogRawRequest{ + resp, err := v1Client.SystemEventLogRaw(ctx, client, &v1.SystemEventLogRawRequest{ Authn: &v1.Authn{ Authn: &v1.Authn_DirectAuthn{ DirectAuthn: &v1.DirectAuthn{ diff --git a/go.mod b/go.mod index b27739b..721b62b 100644 --- a/go.mod +++ b/go.mod @@ -52,6 +52,7 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/coocood/freecache v1.2.3 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -74,6 +75,7 @@ require ( github.com/pelletier/go-toml/v2 v2.0.6 // indirect github.com/philippgille/gokv/encoding v0.6.0 // indirect github.com/philippgille/gokv/util v0.6.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect @@ -83,6 +85,8 @@ require ( github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/stmcginnis/gofish v0.15.1-0.20231121142100-22a60a77be91 // indirect + github.com/stretchr/objx v0.5.0 // indirect + github.com/stretchr/testify v1.8.4 // indirect github.com/subosito/gotenv v1.4.2 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 // indirect diff --git a/go.sum b/go.sum index 3fcf720..07d0182 100644 --- a/go.sum +++ b/go.sum @@ -334,6 +334,7 @@ github.com/stmcginnis/gofish v0.15.1-0.20231121142100-22a60a77be91/go.mod h1:BLD github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -345,6 +346,7 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/grpc/oob/diagnostic/diagnostic.go b/grpc/oob/diagnostic/diagnostic.go index ae46bb0..5d5d870 100644 --- a/grpc/oob/diagnostic/diagnostic.go +++ b/grpc/oob/diagnostic/diagnostic.go @@ -8,10 +8,10 @@ import ( type Action struct { common.Accessory - ScreenshotRequest *v1.ScreenshotRequest - ClearSystemEventLogRequest *v1.ClearSystemEventLogRequest - GetSystemEventLogRequest *v1.GetSystemEventLogRequest - GetSystemEventLogRawRequest *v1.GetSystemEventLogRawRequest + ScreenshotRequest *v1.ScreenshotRequest + ClearSystemEventLogRequest *v1.ClearSystemEventLogRequest + SystemEventLogRequest *v1.SystemEventLogRequest + SystemEventLogRawRequest *v1.SystemEventLogRawRequest } // WithLogger adds a logr to an Action struct. diff --git a/grpc/oob/diagnostic/getsel.go b/grpc/oob/diagnostic/getsel.go index 9839eae..87b9b7a 100644 --- a/grpc/oob/diagnostic/getsel.go +++ b/grpc/oob/diagnostic/getsel.go @@ -18,50 +18,47 @@ import ( "go.opentelemetry.io/otel/trace" ) -func NewSystemEventLogGetter(req *v1.GetSystemEventLogRequest, opts ...Option) (*Action, error) { +func NewSystemEventLogAction(req interface{}, opts ...Option) (*Action, error) { a := &Action{} - a.GetSystemEventLogRequest = req - for _, opt := range opts { - err := opt(a) - if err != nil { - return nil, err - } + switch r := req.(type) { + case *v1.SystemEventLogRequest: + a.SystemEventLogRequest = r + case *v1.SystemEventLogRawRequest: + a.SystemEventLogRawRequest = r + default: + return nil, fmt.Errorf("unsupported request type") } - return a, nil -} -func NewSystemEventLogRawGetter(req *v1.GetSystemEventLogRawRequest, opts ...Option) (*Action, error) { - a := &Action{} - a.GetSystemEventLogRawRequest = req for _, opt := range opts { err := opt(a) if err != nil { return nil, err } } + return a, nil } -func (m Action) GetSystemEventLog(ctx context.Context) (result bmc.SystemEventLogEntries, err error) { +func (m Action) SystemEventLog(ctx context.Context) (result bmc.SystemEventLogEntries, err error) { labels := prometheus.Labels{ "service": "diagnostic", - "action": "get_system_event_log", + "action": "system_event_log", } timer := prometheus.NewTimer(metrics.ActionDuration.With(labels)) defer timer.ObserveDuration() tracer := otel.Tracer("pbnj") - ctx, span := tracer.Start(ctx, "diagnostic.GetSystemEventLog", trace.WithAttributes( - attribute.String("bmc.device", m.GetSystemEventLogRequest.GetAuthn().GetDirectAuthn().GetHost().GetHost()), + ctx, span := tracer.Start(ctx, "diagnostic.SystemEventLog", trace.WithAttributes( + attribute.String("bmc.device", m.SystemEventLogRequest.GetAuthn().GetDirectAuthn().GetHost().GetHost()), )) defer span.End() - if v := m.GetSystemEventLogRequest.GetVendor(); v != nil { + if v := m.SystemEventLogRequest.GetVendor(); v != nil { span.SetAttributes(attribute.String("bmc.vendor", v.GetName())) } - host, user, password, parseErr := m.ParseAuth(m.GetSystemEventLogRequest.GetAuthn()) + host, user, password, parseErr := m.ParseAuth(m.SystemEventLogRequest.GetAuthn()) if parseErr != nil { span.SetStatus(codes.Error, "error parsing credentials: "+parseErr.Error()) return result, parseErr @@ -102,8 +99,8 @@ func (m Action) GetSystemEventLog(ctx context.Context) (result bmc.SystemEventLo sel, err := client.GetSystemEventLog(ctx) log = m.Log.WithValues(logMetadata(client.GetMetadata())...) meta = client.GetMetadata() - span.SetAttributes(attribute.StringSlice("bmc.get_system_event_log.providersAttempted", meta.ProvidersAttempted), - attribute.StringSlice("bmc.get_system_event_log.successfulOpenConns", meta.SuccessfulOpenConns)) + span.SetAttributes(attribute.StringSlice("bmc.system_event_log.providersAttempted", meta.ProvidersAttempted), + attribute.StringSlice("bmc.system_event_log.successfulOpenConns", meta.SuccessfulOpenConns)) if err != nil { log.Error(err, "error getting system event log") span.SetStatus(codes.Error, "error getting system event log: "+err.Error()) @@ -122,26 +119,26 @@ func (m Action) GetSystemEventLog(ctx context.Context) (result bmc.SystemEventLo return sel, nil } -func (m Action) GetSystemEventLogRaw(ctx context.Context) (result string, err error) { +func (m Action) SystemEventLogRaw(ctx context.Context) (result string, err error) { labels := prometheus.Labels{ "service": "diagnostic", - "action": "get_system_event_log_raw", + "action": "system_event_log_raw", } timer := prometheus.NewTimer(metrics.ActionDuration.With(labels)) defer timer.ObserveDuration() tracer := otel.Tracer("pbnj") - ctx, span := tracer.Start(ctx, "diagnostic.GetSystemEventLogRaw", trace.WithAttributes( - attribute.String("bmc.device", m.GetSystemEventLogRawRequest.GetAuthn().GetDirectAuthn().GetHost().GetHost()), + ctx, span := tracer.Start(ctx, "diagnostic.SystemEventLogRaw", trace.WithAttributes( + attribute.String("bmc.device", m.SystemEventLogRawRequest.GetAuthn().GetDirectAuthn().GetHost().GetHost()), )) defer span.End() - if v := m.GetSystemEventLogRawRequest.GetVendor(); v != nil { + if v := m.SystemEventLogRawRequest.GetVendor(); v != nil { span.SetAttributes(attribute.String("bmc.vendor", v.GetName())) } - host, user, password, parseErr := m.ParseAuth(m.GetSystemEventLogRawRequest.GetAuthn()) + host, user, password, parseErr := m.ParseAuth(m.SystemEventLogRawRequest.GetAuthn()) if parseErr != nil { span.SetStatus(codes.Error, "error parsing credentials: "+parseErr.Error()) return result, parseErr diff --git a/grpc/rpc/diagnostic.go b/grpc/rpc/diagnostic.go index 64acd4d..7d1517f 100644 --- a/grpc/rpc/diagnostic.go +++ b/grpc/rpc/diagnostic.go @@ -4,6 +4,7 @@ import ( "context" "time" + "github.com/bmc-toolbox/bmclib/v2/bmc" "github.com/rs/xid" v1 "github.com/tinkerbell/pbnj/api/v1" "github.com/tinkerbell/pbnj/grpc/oob/diagnostic" @@ -80,7 +81,7 @@ func (d *DiagnosticService) ClearSystemEventLog(ctx context.Context, in *v1.Clea return &v1.ClearSystemEventLogResponse{TaskId: taskID}, nil } -func (d *DiagnosticService) GetSystemEventLog(ctx context.Context, in *v1.GetSystemEventLogRequest) (*v1.GetSystemEventLogResponse, error) { +func (d *DiagnosticService) SystemEventLog(ctx context.Context, in *v1.SystemEventLogRequest) (*v1.SystemEventLogResponse, error) { l := logging.ExtractLogr(ctx) l.Info("start Get System Event Log request", @@ -88,35 +89,26 @@ func (d *DiagnosticService) GetSystemEventLog(ctx context.Context, in *v1.GetSys "vendor", in.Vendor.GetName(), ) - selgetter, err := diagnostic.NewSystemEventLogGetter(in, diagnostic.WithLogger(l)) + selaction, err := diagnostic.NewSystemEventLogAction(in, diagnostic.WithLogger(l)) if err != nil { - l.Error(err, "error creating system event log getter") + l.Error(err, "error creating system event log action") return nil, err } - entries, err := selgetter.GetSystemEventLog(ctx) + entries, err := selaction.SystemEventLog(ctx) if err != nil { l.Error(err, "error getting system event log") return nil, err } - var events []*v1.SystemEventLogEntry + events := convertEntriesToEvents(entries) - for _, entry := range entries { - events = append(events, &v1.SystemEventLogEntry{ - Id: entry[0], - Timestamp: entry[1], - Description: entry[2], - Message: entry[3], - }) - } - - return &v1.GetSystemEventLogResponse{ + return &v1.SystemEventLogResponse{ Events: events, }, nil } -func (d *DiagnosticService) GetSystemEventLogRaw(ctx context.Context, in *v1.GetSystemEventLogRawRequest) (*v1.GetSystemEventLogRawResponse, error) { +func (d *DiagnosticService) SystemEventLogRaw(ctx context.Context, in *v1.SystemEventLogRawRequest) (*v1.SystemEventLogRawResponse, error) { l := logging.ExtractLogr(ctx) l.Info("start Get System Event Log request", @@ -124,19 +116,41 @@ func (d *DiagnosticService) GetSystemEventLogRaw(ctx context.Context, in *v1.Get "vendor", in.Vendor.GetName(), ) - rawselgetter, err := diagnostic.NewSystemEventLogRawGetter(in, diagnostic.WithLogger(l)) + rawselaction, err := diagnostic.NewSystemEventLogAction(in, diagnostic.WithLogger(l)) if err != nil { - l.Error(err, "error creating raw system event log getter") + l.Error(err, "error creating raw system event log action") return nil, err } - eventlog, err := rawselgetter.GetSystemEventLogRaw(ctx) + eventlog, err := rawselaction.SystemEventLogRaw(ctx) if err != nil { l.Error(err, "error getting raw system event log") return nil, err } - return &v1.GetSystemEventLogRawResponse{ + return &v1.SystemEventLogRawResponse{ Log: eventlog, }, nil } + +func convertEntriesToEvents(entries bmc.SystemEventLogEntries) []*v1.SystemEventLogEntry { + var events []*v1.SystemEventLogEntry + + if len(entries) == 0 { + return events + } + + for _, entry := range entries { + if len(entry) < 4 { + continue + } + events = append(events, &v1.SystemEventLogEntry{ + Id: entry[0], + Timestamp: entry[1], + Description: entry[2], + Message: entry[3], + }) + } + + return events +} diff --git a/grpc/rpc/diagnostic_test.go b/grpc/rpc/diagnostic_test.go index 950e210..c601db7 100644 --- a/grpc/rpc/diagnostic_test.go +++ b/grpc/rpc/diagnostic_test.go @@ -3,12 +3,16 @@ package rpc import ( "context" "errors" + "fmt" "testing" + "github.com/bmc-toolbox/bmclib/v2/bmc" "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" "github.com/onsi/gomega" "github.com/philippgille/gokv" "github.com/philippgille/gokv/freecache" + "github.com/stretchr/testify/mock" v1 "github.com/tinkerbell/pbnj/api/v1" "github.com/tinkerbell/pbnj/grpc/persistence" "github.com/tinkerbell/pbnj/grpc/taskrunner" @@ -84,3 +88,271 @@ func TestClearSystemEventLog(t *testing.T) { }) } } +func TestConvertEntriesToEvents(t *testing.T) { + testCases := []struct { + name string + entries bmc.SystemEventLogEntries + expectedEvents []*v1.SystemEventLogEntry + }{ + { + name: "empty entries", + entries: bmc.SystemEventLogEntries{}, + expectedEvents: nil, + }, + { + name: "valid entries", + entries: bmc.SystemEventLogEntries{ + {"1", "2022-01-01", "Event 1", "Message 1"}, + {"2", "2022-01-02", "Event 2", "Message 2"}, + }, + expectedEvents: []*v1.SystemEventLogEntry{ + { + Id: "1", + Timestamp: "2022-01-01", + Description: "Event 1", + Message: "Message 1", + }, + { + Id: "2", + Timestamp: "2022-01-02", + Description: "Event 2", + Message: "Message 2", + }, + }, + }, + { + name: "invalid entries", + entries: bmc.SystemEventLogEntries{ + {"1", "2022-01-01", "Event 1"}, + {"2", "2022-01-02", "Event 2", "Message 2"}, + }, + expectedEvents: []*v1.SystemEventLogEntry{ + { + Id: "2", + Timestamp: "2022-01-02", + Description: "Event 2", + Message: "Message 2", + }, + }, + }, + } + + for _, tc := range testCases { + testCase := tc + t.Run(testCase.name, func(t *testing.T) { + t.Parallel() + + events := convertEntriesToEvents(testCase.entries) + + if diff := cmp.Diff(testCase.expectedEvents, events, cmpopts.IgnoreUnexported(v1.SystemEventLogEntry{})); diff != "" { + t.Errorf("Mismatch (-expected, +actual):\n%s", diff) + } + }) + } +} + +func TestDiagnosticService_SystemEventLogRaw(t *testing.T) { + testCases := []struct { + name string + ctx context.Context + in *v1.SystemEventLogRawRequest + expectedLog *v1.SystemEventLogRawResponse + expectedErr error + expectedLogMessage string + }{ + { + name: "successful request", + ctx: context.Background(), + in: &v1.SystemEventLogRawRequest{ + Authn: &v1.Authn{ + Authn: &v1.Authn_DirectAuthn{ + DirectAuthn: &v1.DirectAuthn{ + Username: "testuser", + }, + }, + }, + Vendor: &v1.Vendor{ + Name: "testvendor", + }, + }, + expectedLog: &v1.SystemEventLogRawResponse{ + Log: "test log", + }, + expectedErr: nil, + expectedLogMessage: "start Get System Event Log request", + }, + { + name: "error creating raw system event log action", + ctx: context.Background(), + in: &v1.SystemEventLogRawRequest{ + Authn: &v1.Authn{ + Authn: &v1.Authn_DirectAuthn{ + DirectAuthn: &v1.DirectAuthn{ + Username: "testuser", + }, + }, + }, + Vendor: &v1.Vendor{ + Name: "testvendor", + }, + }, + expectedLog: nil, + expectedErr: errors.New("error creating raw system event log action"), + expectedLogMessage: "start Get System Event Log request", + }, + { + name: "error getting raw system event log", + ctx: context.Background(), + in: &v1.SystemEventLogRawRequest{ + Authn: &v1.Authn{ + Authn: &v1.Authn_DirectAuthn{ + DirectAuthn: &v1.DirectAuthn{ + Username: "testuser", + }, + }, + }, + Vendor: &v1.Vendor{ + Name: "testvendor", + }, + }, + expectedLog: nil, + expectedErr: errors.New("error getting raw system event log"), + expectedLogMessage: "start Get System Event Log request", + }, + } + + for _, tc := range testCases { + testCase := tc + t.Run(testCase.name, func(t *testing.T) { + t.Parallel() + diagnosticService := NewMockDiagnosticService() + diagnosticService.On("SystemEventLogRaw", testCase.ctx, testCase.in).Return(testCase.expectedLog, testCase.expectedErr) + }) + } +} +func TestDiagnosticService_SystemEventLog(t *testing.T) { + testCases := []struct { + name string + ctx context.Context + in *v1.SystemEventLogRequest + expectedEvents []*v1.SystemEventLogEntry + expectedErr error + }{ + { + name: "successful request", + ctx: context.Background(), + in: &v1.SystemEventLogRequest{ + Authn: &v1.Authn{ + Authn: &v1.Authn_DirectAuthn{ + DirectAuthn: &v1.DirectAuthn{ + Username: "testuser", + }, + }, + }, + Vendor: &v1.Vendor{ + Name: "testvendor", + }, + }, + expectedEvents: []*v1.SystemEventLogEntry{ + { + Id: "1", + Timestamp: "2022-01-01", + Description: "Event 1", + Message: "Message 1", + }, + { + Id: "2", + Timestamp: "2022-01-02", + Description: "Event 2", + Message: "Message 2", + }, + }, + expectedErr: nil, + }, + { + name: "error creating system event log action", + ctx: context.Background(), + in: &v1.SystemEventLogRequest{ + Authn: &v1.Authn{ + Authn: &v1.Authn_DirectAuthn{ + DirectAuthn: &v1.DirectAuthn{ + Username: "testuser", + }, + }, + }, + Vendor: &v1.Vendor{ + Name: "testvendor", + }, + }, + expectedEvents: nil, + expectedErr: errors.New("error creating system event log action"), + }, + { + name: "error getting system event log", + ctx: context.Background(), + in: &v1.SystemEventLogRequest{ + Authn: &v1.Authn{ + Authn: &v1.Authn_DirectAuthn{ + DirectAuthn: &v1.DirectAuthn{ + Username: "testuser", + }, + }, + }, + Vendor: &v1.Vendor{ + Name: "testvendor", + }, + }, + expectedEvents: nil, + expectedErr: errors.New("error getting system event log"), + }, + } + + for _, tc := range testCases { + testCase := tc + t.Run(testCase.name, func(t *testing.T) { + t.Parallel() + diagnosticService := NewMockDiagnosticService() + diagnosticService.On("SystemEventLog", testCase.ctx, testCase.in).Return(&v1.SystemEventLogResponse{ + Events: testCase.expectedEvents, + }, testCase.expectedErr) + + response, err := diagnosticService.SystemEventLog(testCase.ctx, testCase.in) + + if diff := cmp.Diff(testCase.expectedEvents, response.Events, cmpopts.IgnoreUnexported(v1.SystemEventLogEntry{})); diff != "" { + t.Errorf("Mismatch in events (-expected, +actual):\n%s", diff) + } + + if diff := cmp.Diff(testCase.expectedErr, err, cmpopts.EquateErrors()); diff != "" { + t.Errorf("Mismatch in error (-expected, +actual):\n%s", diff) + } + }) + } +} + +// MockDiagnosticService is a mock implementation of the DiagnosticService interface. +type MockDiagnosticService struct { + mock.Mock +} + +// NewMockDiagnosticService creates a new instance of MockDiagnosticService. +func NewMockDiagnosticService() *MockDiagnosticService { + return &MockDiagnosticService{} +} + +func (m *MockDiagnosticService) SystemEventLog(ctx context.Context, in *v1.SystemEventLogRequest) (*v1.SystemEventLogResponse, error) { + args := m.Called(ctx, in) + resp, ok := args.Get(0).(*v1.SystemEventLogResponse) + if !ok { + return nil, fmt.Errorf("unexpected type for SystemEventLogResponse") + } + return resp, args.Error(1) +} + +func (m *MockDiagnosticService) SystemEventLogRaw(ctx context.Context, in *v1.SystemEventLogRawRequest) (*v1.SystemEventLogRawResponse, error) { + args := m.Called(ctx, in) + resp, ok := args.Get(0).(*v1.SystemEventLogRawResponse) + if !ok { + return nil, fmt.Errorf("unexpected type for SystemEventLogRawResponse") + } + return resp, args.Error(1) +} From 0c56e5fd67df11040b90d871ec5b173b01893d2a Mon Sep 17 00:00:00 2001 From: Matthew Burns Date: Wed, 13 Dec 2023 12:33:18 -0700 Subject: [PATCH 3/3] I think codecov can't handle rebase Signed-off-by: Matthew Burns --- grpc/rpc/diagnostic_test.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/grpc/rpc/diagnostic_test.go b/grpc/rpc/diagnostic_test.go index c601db7..b0ce817 100644 --- a/grpc/rpc/diagnostic_test.go +++ b/grpc/rpc/diagnostic_test.go @@ -329,16 +329,23 @@ func TestDiagnosticService_SystemEventLog(t *testing.T) { } } -// MockDiagnosticService is a mock implementation of the DiagnosticService interface. type MockDiagnosticService struct { mock.Mock } -// NewMockDiagnosticService creates a new instance of MockDiagnosticService. func NewMockDiagnosticService() *MockDiagnosticService { return &MockDiagnosticService{} } +func (m *MockDiagnosticService) Screenshot(ctx context.Context, in *v1.ScreenshotRequest) (*v1.ScreenshotResponse, error) { + args := m.Called(ctx, in) + resp, ok := args.Get(0).(*v1.ScreenshotResponse) + if !ok { + return nil, fmt.Errorf("unexpected type for ScreenshotResponse") + } + return resp, args.Error(1) +} + func (m *MockDiagnosticService) SystemEventLog(ctx context.Context, in *v1.SystemEventLogRequest) (*v1.SystemEventLogResponse, error) { args := m.Called(ctx, in) resp, ok := args.Get(0).(*v1.SystemEventLogResponse)