diff --git a/client/api/omni/management/management.pb.go b/client/api/omni/management/management.pb.go index 199c44635..1156f3117 100644 --- a/client/api/omni/management/management.pb.go +++ b/client/api/omni/management/management.pb.go @@ -1378,6 +1378,104 @@ func (x *ReadAuditLogResponse) GetAuditLog() []byte { return nil } +type RebootMachineRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MachineId string `protobuf:"bytes,1,opt,name=machine_id,json=machineId,proto3" json:"machine_id,omitempty"` +} + +func (x *RebootMachineRequest) Reset() { + *x = RebootMachineRequest{} + mi := &file_omni_management_management_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RebootMachineRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RebootMachineRequest) ProtoMessage() {} + +func (x *RebootMachineRequest) ProtoReflect() protoreflect.Message { + mi := &file_omni_management_management_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RebootMachineRequest.ProtoReflect.Descriptor instead. +func (*RebootMachineRequest) Descriptor() ([]byte, []int) { + return file_omni_management_management_proto_rawDescGZIP(), []int{23} +} + +func (x *RebootMachineRequest) GetMachineId() string { + if x != nil { + return x.MachineId + } + return "" +} + +type RebootMachineResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RebootId string `protobuf:"bytes,1,opt,name=reboot_id,json=rebootId,proto3" json:"reboot_id,omitempty"` + LastRebootTimestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_reboot_timestamp,json=lastRebootTimestamp,proto3" json:"last_reboot_timestamp,omitempty"` +} + +func (x *RebootMachineResponse) Reset() { + *x = RebootMachineResponse{} + mi := &file_omni_management_management_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RebootMachineResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RebootMachineResponse) ProtoMessage() {} + +func (x *RebootMachineResponse) ProtoReflect() protoreflect.Message { + mi := &file_omni_management_management_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RebootMachineResponse.ProtoReflect.Descriptor instead. +func (*RebootMachineResponse) Descriptor() ([]byte, []int) { + return file_omni_management_management_proto_rawDescGZIP(), []int{24} +} + +func (x *RebootMachineResponse) GetRebootId() string { + if x != nil { + return x.RebootId + } + return "" +} + +func (x *RebootMachineResponse) GetLastRebootTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.LastRebootTimestamp + } + return nil +} + type ListServiceAccountsResponse_ServiceAccount struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1390,7 +1488,7 @@ type ListServiceAccountsResponse_ServiceAccount struct { func (x *ListServiceAccountsResponse_ServiceAccount) Reset() { *x = ListServiceAccountsResponse_ServiceAccount{} - mi := &file_omni_management_management_proto_msgTypes[23] + mi := &file_omni_management_management_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1402,7 +1500,7 @@ func (x *ListServiceAccountsResponse_ServiceAccount) String() string { func (*ListServiceAccountsResponse_ServiceAccount) ProtoMessage() {} func (x *ListServiceAccountsResponse_ServiceAccount) ProtoReflect() protoreflect.Message { - mi := &file_omni_management_management_proto_msgTypes[23] + mi := &file_omni_management_management_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1451,7 +1549,7 @@ type ListServiceAccountsResponse_ServiceAccount_PgpPublicKey struct { func (x *ListServiceAccountsResponse_ServiceAccount_PgpPublicKey) Reset() { *x = ListServiceAccountsResponse_ServiceAccount_PgpPublicKey{} - mi := &file_omni_management_management_proto_msgTypes[24] + mi := &file_omni_management_management_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1463,7 +1561,7 @@ func (x *ListServiceAccountsResponse_ServiceAccount_PgpPublicKey) String() strin func (*ListServiceAccountsResponse_ServiceAccount_PgpPublicKey) ProtoMessage() {} func (x *ListServiceAccountsResponse_ServiceAccount_PgpPublicKey) ProtoReflect() protoreflect.Message { - mi := &file_omni_management_management_proto_msgTypes[24] + mi := &file_omni_management_management_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1514,7 +1612,7 @@ type GetSupportBundleResponse_Progress struct { func (x *GetSupportBundleResponse_Progress) Reset() { *x = GetSupportBundleResponse_Progress{} - mi := &file_omni_management_management_proto_msgTypes[26] + mi := &file_omni_management_management_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1526,7 +1624,7 @@ func (x *GetSupportBundleResponse_Progress) String() string { func (*GetSupportBundleResponse_Progress) ProtoMessage() {} func (x *GetSupportBundleResponse_Progress) ProtoReflect() protoreflect.Message { - mi := &file_omni_management_management_proto_msgTypes[26] + mi := &file_omni_management_management_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1785,92 +1883,110 @@ var file_omni_management_management_proto_rawDesc = []byte{ 0x09, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x33, 0x0a, 0x14, 0x52, 0x65, 0x61, 0x64, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x75, 0x64, 0x69, 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x61, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x32, - 0x8b, 0x0a, 0x0a, 0x11, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x0a, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x1d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, - 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6f, 0x73, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x54, - 0x61, 0x6c, 0x6f, 0x73, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x54, - 0x61, 0x6c, 0x6f, 0x73, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x4f, 0x6d, 0x6e, 0x69, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4f, 0x6d, 0x6e, 0x69, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0b, 0x4d, 0x61, 0x63, 0x68, - 0x69, 0x6e, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x6f, 0x67, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x30, 0x01, 0x12, 0x4b, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x61, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x22, + 0x35, 0x0a, 0x14, 0x52, 0x65, 0x62, 0x6f, 0x6f, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x63, + 0x68, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x22, 0x84, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x62, 0x6f, 0x6f, + 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x62, 0x6f, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x62, 0x6f, 0x6f, 0x74, 0x49, 0x64, 0x12, 0x4e, 0x0a, + 0x15, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x62, 0x6f, 0x6f, 0x74, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x65, + 0x62, 0x6f, 0x6f, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x32, 0xe1, 0x0a, + 0x0a, 0x11, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x0a, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x1d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4b, + 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4b, 0x75, + 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x4e, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6f, 0x73, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x61, 0x6c, + 0x6f, 0x73, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1f, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x61, 0x6c, + 0x6f, 0x73, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x44, 0x0a, 0x0a, 0x4f, 0x6d, 0x6e, 0x69, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x4f, 0x6d, 0x6e, 0x69, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x44, + 0x61, 0x74, 0x61, 0x30, 0x01, 0x12, 0x4b, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x12, 0x69, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, + 0x13, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x12, 0x69, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x6d, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x27, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, + 0x15, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x7b, 0x0a, 0x1a, 0x4b, 0x75, 0x62, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x65, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x2d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x55, 0x70, + 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x55, 0x70, 0x67, + 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x17, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, + 0x74, 0x65, 0x73, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x73, + 0x12, 0x29, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4b, 0x75, + 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, + 0x74, 0x65, 0x73, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x5a, 0x0a, 0x0f, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x12, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x66, 0x0a, 0x13, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, - 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x6e, 0x65, - 0x77, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x27, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x59, 0x0a, 0x15, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x7b, 0x0a, 0x1a, 0x4b, 0x75, - 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, - 0x72, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x2d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, - 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x55, - 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x17, 0x4b, 0x75, 0x62, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x65, 0x73, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, - 0x74, 0x73, 0x12, 0x29, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, - 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x61, - 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x65, 0x73, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x5a, 0x0a, 0x0f, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x12, 0x22, - 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x75, - 0x70, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, - 0x6f, 0x72, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x24, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, - 0x74, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x53, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, - 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, - 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x75, 0x64, 0x69, 0x74, - 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x42, 0x37, 0x5a, - 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x64, 0x65, - 0x72, 0x6f, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, + 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, + 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x53, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x53, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x41, 0x75, + 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, + 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x54, 0x0a, 0x0d, 0x52, + 0x65, 0x62, 0x6f, 0x6f, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x12, 0x20, 0x2e, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x62, 0x6f, 0x6f, 0x74, + 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, + 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x62, 0x6f, + 0x6f, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x73, 0x69, 0x64, 0x65, 0x72, 0x6f, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -1886,7 +2002,7 @@ func file_omni_management_management_proto_rawDescGZIP() []byte { } var file_omni_management_management_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_omni_management_management_proto_msgTypes = make([]protoimpl.MessageInfo, 27) +var file_omni_management_management_proto_msgTypes = make([]protoimpl.MessageInfo, 29) var file_omni_management_management_proto_goTypes = []any{ (KubernetesSyncManifestResponse_ResponseType)(0), // 0: management.KubernetesSyncManifestResponse.ResponseType (CreateSchematicRequest_SiderolinkGRPCTunnelMode)(0), // 1: management.CreateSchematicRequest.SiderolinkGRPCTunnelMode @@ -1913,57 +2029,62 @@ var file_omni_management_management_proto_goTypes = []any{ (*GetSupportBundleResponse)(nil), // 22: management.GetSupportBundleResponse (*ReadAuditLogRequest)(nil), // 23: management.ReadAuditLogRequest (*ReadAuditLogResponse)(nil), // 24: management.ReadAuditLogResponse - (*ListServiceAccountsResponse_ServiceAccount)(nil), // 25: management.ListServiceAccountsResponse.ServiceAccount - (*ListServiceAccountsResponse_ServiceAccount_PgpPublicKey)(nil), // 26: management.ListServiceAccountsResponse.ServiceAccount.PgpPublicKey - nil, // 27: management.CreateSchematicRequest.MetaValuesEntry - (*GetSupportBundleResponse_Progress)(nil), // 28: management.GetSupportBundleResponse.Progress - (*durationpb.Duration)(nil), // 29: google.protobuf.Duration - (*timestamppb.Timestamp)(nil), // 30: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 31: google.protobuf.Empty - (*common.Data)(nil), // 32: common.Data + (*RebootMachineRequest)(nil), // 25: management.RebootMachineRequest + (*RebootMachineResponse)(nil), // 26: management.RebootMachineResponse + (*ListServiceAccountsResponse_ServiceAccount)(nil), // 27: management.ListServiceAccountsResponse.ServiceAccount + (*ListServiceAccountsResponse_ServiceAccount_PgpPublicKey)(nil), // 28: management.ListServiceAccountsResponse.ServiceAccount.PgpPublicKey + nil, // 29: management.CreateSchematicRequest.MetaValuesEntry + (*GetSupportBundleResponse_Progress)(nil), // 30: management.GetSupportBundleResponse.Progress + (*durationpb.Duration)(nil), // 31: google.protobuf.Duration + (*timestamppb.Timestamp)(nil), // 32: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 33: google.protobuf.Empty + (*common.Data)(nil), // 34: common.Data } var file_omni_management_management_proto_depIdxs = []int32{ - 25, // 0: management.ListServiceAccountsResponse.service_accounts:type_name -> management.ListServiceAccountsResponse.ServiceAccount - 29, // 1: management.KubeconfigRequest.service_account_ttl:type_name -> google.protobuf.Duration + 27, // 0: management.ListServiceAccountsResponse.service_accounts:type_name -> management.ListServiceAccountsResponse.ServiceAccount + 31, // 1: management.KubeconfigRequest.service_account_ttl:type_name -> google.protobuf.Duration 0, // 2: management.KubernetesSyncManifestResponse.response_type:type_name -> management.KubernetesSyncManifestResponse.ResponseType - 27, // 3: management.CreateSchematicRequest.meta_values:type_name -> management.CreateSchematicRequest.MetaValuesEntry + 29, // 3: management.CreateSchematicRequest.meta_values:type_name -> management.CreateSchematicRequest.MetaValuesEntry 1, // 4: management.CreateSchematicRequest.siderolink_grpc_tunnel_mode:type_name -> management.CreateSchematicRequest.SiderolinkGRPCTunnelMode - 28, // 5: management.GetSupportBundleResponse.progress:type_name -> management.GetSupportBundleResponse.Progress - 26, // 6: management.ListServiceAccountsResponse.ServiceAccount.pgp_public_keys:type_name -> management.ListServiceAccountsResponse.ServiceAccount.PgpPublicKey - 30, // 7: management.ListServiceAccountsResponse.ServiceAccount.PgpPublicKey.expiration:type_name -> google.protobuf.Timestamp - 14, // 8: management.ManagementService.Kubeconfig:input_type -> management.KubeconfigRequest - 7, // 9: management.ManagementService.Talosconfig:input_type -> management.TalosconfigRequest - 31, // 10: management.ManagementService.Omniconfig:input_type -> google.protobuf.Empty - 5, // 11: management.ManagementService.MachineLogs:input_type -> management.MachineLogsRequest - 6, // 12: management.ManagementService.ValidateConfig:input_type -> management.ValidateConfigRequest - 8, // 13: management.ManagementService.CreateServiceAccount:input_type -> management.CreateServiceAccountRequest - 10, // 14: management.ManagementService.RenewServiceAccount:input_type -> management.RenewServiceAccountRequest - 31, // 15: management.ManagementService.ListServiceAccounts:input_type -> google.protobuf.Empty - 12, // 16: management.ManagementService.DestroyServiceAccount:input_type -> management.DestroyServiceAccountRequest - 15, // 17: management.ManagementService.KubernetesUpgradePreChecks:input_type -> management.KubernetesUpgradePreChecksRequest - 17, // 18: management.ManagementService.KubernetesSyncManifests:input_type -> management.KubernetesSyncManifestRequest - 19, // 19: management.ManagementService.CreateSchematic:input_type -> management.CreateSchematicRequest - 21, // 20: management.ManagementService.GetSupportBundle:input_type -> management.GetSupportBundleRequest - 23, // 21: management.ManagementService.ReadAuditLog:input_type -> management.ReadAuditLogRequest - 2, // 22: management.ManagementService.Kubeconfig:output_type -> management.KubeconfigResponse - 3, // 23: management.ManagementService.Talosconfig:output_type -> management.TalosconfigResponse - 4, // 24: management.ManagementService.Omniconfig:output_type -> management.OmniconfigResponse - 32, // 25: management.ManagementService.MachineLogs:output_type -> common.Data - 31, // 26: management.ManagementService.ValidateConfig:output_type -> google.protobuf.Empty - 9, // 27: management.ManagementService.CreateServiceAccount:output_type -> management.CreateServiceAccountResponse - 11, // 28: management.ManagementService.RenewServiceAccount:output_type -> management.RenewServiceAccountResponse - 13, // 29: management.ManagementService.ListServiceAccounts:output_type -> management.ListServiceAccountsResponse - 31, // 30: management.ManagementService.DestroyServiceAccount:output_type -> google.protobuf.Empty - 16, // 31: management.ManagementService.KubernetesUpgradePreChecks:output_type -> management.KubernetesUpgradePreChecksResponse - 18, // 32: management.ManagementService.KubernetesSyncManifests:output_type -> management.KubernetesSyncManifestResponse - 20, // 33: management.ManagementService.CreateSchematic:output_type -> management.CreateSchematicResponse - 22, // 34: management.ManagementService.GetSupportBundle:output_type -> management.GetSupportBundleResponse - 24, // 35: management.ManagementService.ReadAuditLog:output_type -> management.ReadAuditLogResponse - 22, // [22:36] is the sub-list for method output_type - 8, // [8:22] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 30, // 5: management.GetSupportBundleResponse.progress:type_name -> management.GetSupportBundleResponse.Progress + 32, // 6: management.RebootMachineResponse.last_reboot_timestamp:type_name -> google.protobuf.Timestamp + 28, // 7: management.ListServiceAccountsResponse.ServiceAccount.pgp_public_keys:type_name -> management.ListServiceAccountsResponse.ServiceAccount.PgpPublicKey + 32, // 8: management.ListServiceAccountsResponse.ServiceAccount.PgpPublicKey.expiration:type_name -> google.protobuf.Timestamp + 14, // 9: management.ManagementService.Kubeconfig:input_type -> management.KubeconfigRequest + 7, // 10: management.ManagementService.Talosconfig:input_type -> management.TalosconfigRequest + 33, // 11: management.ManagementService.Omniconfig:input_type -> google.protobuf.Empty + 5, // 12: management.ManagementService.MachineLogs:input_type -> management.MachineLogsRequest + 6, // 13: management.ManagementService.ValidateConfig:input_type -> management.ValidateConfigRequest + 8, // 14: management.ManagementService.CreateServiceAccount:input_type -> management.CreateServiceAccountRequest + 10, // 15: management.ManagementService.RenewServiceAccount:input_type -> management.RenewServiceAccountRequest + 33, // 16: management.ManagementService.ListServiceAccounts:input_type -> google.protobuf.Empty + 12, // 17: management.ManagementService.DestroyServiceAccount:input_type -> management.DestroyServiceAccountRequest + 15, // 18: management.ManagementService.KubernetesUpgradePreChecks:input_type -> management.KubernetesUpgradePreChecksRequest + 17, // 19: management.ManagementService.KubernetesSyncManifests:input_type -> management.KubernetesSyncManifestRequest + 19, // 20: management.ManagementService.CreateSchematic:input_type -> management.CreateSchematicRequest + 21, // 21: management.ManagementService.GetSupportBundle:input_type -> management.GetSupportBundleRequest + 23, // 22: management.ManagementService.ReadAuditLog:input_type -> management.ReadAuditLogRequest + 25, // 23: management.ManagementService.RebootMachine:input_type -> management.RebootMachineRequest + 2, // 24: management.ManagementService.Kubeconfig:output_type -> management.KubeconfigResponse + 3, // 25: management.ManagementService.Talosconfig:output_type -> management.TalosconfigResponse + 4, // 26: management.ManagementService.Omniconfig:output_type -> management.OmniconfigResponse + 34, // 27: management.ManagementService.MachineLogs:output_type -> common.Data + 33, // 28: management.ManagementService.ValidateConfig:output_type -> google.protobuf.Empty + 9, // 29: management.ManagementService.CreateServiceAccount:output_type -> management.CreateServiceAccountResponse + 11, // 30: management.ManagementService.RenewServiceAccount:output_type -> management.RenewServiceAccountResponse + 13, // 31: management.ManagementService.ListServiceAccounts:output_type -> management.ListServiceAccountsResponse + 33, // 32: management.ManagementService.DestroyServiceAccount:output_type -> google.protobuf.Empty + 16, // 33: management.ManagementService.KubernetesUpgradePreChecks:output_type -> management.KubernetesUpgradePreChecksResponse + 18, // 34: management.ManagementService.KubernetesSyncManifests:output_type -> management.KubernetesSyncManifestResponse + 20, // 35: management.ManagementService.CreateSchematic:output_type -> management.CreateSchematicResponse + 22, // 36: management.ManagementService.GetSupportBundle:output_type -> management.GetSupportBundleResponse + 24, // 37: management.ManagementService.ReadAuditLog:output_type -> management.ReadAuditLogResponse + 26, // 38: management.ManagementService.RebootMachine:output_type -> management.RebootMachineResponse + 24, // [24:39] is the sub-list for method output_type + 9, // [9:24] 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_omni_management_management_proto_init() } @@ -1977,7 +2098,7 @@ func file_omni_management_management_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_omni_management_management_proto_rawDesc, NumEnums: 2, - NumMessages: 27, + NumMessages: 29, NumExtensions: 0, NumServices: 1, }, diff --git a/client/api/omni/management/management.pb.gw.go b/client/api/omni/management/management.pb.gw.go index 36d60b375..7f84395f9 100644 --- a/client/api/omni/management/management.pb.gw.go +++ b/client/api/omni/management/management.pb.gw.go @@ -356,6 +356,30 @@ func request_ManagementService_ReadAuditLog_0(ctx context.Context, marshaler run return stream, metadata, nil } +func request_ManagementService_RebootMachine_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RebootMachineRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.RebootMachine(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_ManagementService_RebootMachine_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RebootMachineRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.RebootMachine(ctx, &protoReq) + return msg, metadata, err +} + // RegisterManagementServiceHandlerServer registers the http handlers for service ManagementService to "mux". // UnaryRPC :call ManagementServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -590,6 +614,26 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return }) + mux.Handle(http.MethodPost, pattern_ManagementService_RebootMachine_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/management.ManagementService/RebootMachine", runtime.WithHTTPPathPattern("/management.ManagementService/RebootMachine")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ManagementService_RebootMachine_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_ManagementService_RebootMachine_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } @@ -868,6 +912,23 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_ReadAuditLog_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) }) + mux.Handle(http.MethodPost, pattern_ManagementService_RebootMachine_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/management.ManagementService/RebootMachine", runtime.WithHTTPPathPattern("/management.ManagementService/RebootMachine")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ManagementService_RebootMachine_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_ManagementService_RebootMachine_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } @@ -886,6 +947,7 @@ var ( pattern_ManagementService_CreateSchematic_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"management.ManagementService", "CreateSchematic"}, "")) pattern_ManagementService_GetSupportBundle_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"management.ManagementService", "GetSupportBundle"}, "")) pattern_ManagementService_ReadAuditLog_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"management.ManagementService", "ReadAuditLog"}, "")) + pattern_ManagementService_RebootMachine_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"management.ManagementService", "RebootMachine"}, "")) ) var ( @@ -903,4 +965,5 @@ var ( forward_ManagementService_CreateSchematic_0 = runtime.ForwardResponseMessage forward_ManagementService_GetSupportBundle_0 = runtime.ForwardResponseStream forward_ManagementService_ReadAuditLog_0 = runtime.ForwardResponseStream + forward_ManagementService_RebootMachine_0 = runtime.ForwardResponseMessage ) diff --git a/client/api/omni/management/management.proto b/client/api/omni/management/management.proto index a74fc9137..a05dca864 100644 --- a/client/api/omni/management/management.proto +++ b/client/api/omni/management/management.proto @@ -172,6 +172,15 @@ message ReadAuditLogResponse { bytes audit_log = 1; } +message RebootMachineRequest { + string machine_id = 1; +} + +message RebootMachineResponse { + string reboot_id = 1; + google.protobuf.Timestamp last_reboot_timestamp = 3; +} + service ManagementService { rpc Kubeconfig(KubeconfigRequest) returns (KubeconfigResponse); rpc Talosconfig(TalosconfigRequest) returns (TalosconfigResponse); @@ -187,4 +196,5 @@ service ManagementService { rpc CreateSchematic(CreateSchematicRequest) returns (CreateSchematicResponse); rpc GetSupportBundle(GetSupportBundleRequest) returns (stream GetSupportBundleResponse); rpc ReadAuditLog(ReadAuditLogRequest) returns (stream ReadAuditLogResponse); + rpc RebootMachine(RebootMachineRequest) returns (RebootMachineResponse); } diff --git a/client/api/omni/management/management_grpc.pb.go b/client/api/omni/management/management_grpc.pb.go index 1e0e3802e..008c017f7 100644 --- a/client/api/omni/management/management_grpc.pb.go +++ b/client/api/omni/management/management_grpc.pb.go @@ -36,6 +36,7 @@ const ( ManagementService_CreateSchematic_FullMethodName = "/management.ManagementService/CreateSchematic" ManagementService_GetSupportBundle_FullMethodName = "/management.ManagementService/GetSupportBundle" ManagementService_ReadAuditLog_FullMethodName = "/management.ManagementService/ReadAuditLog" + ManagementService_RebootMachine_FullMethodName = "/management.ManagementService/RebootMachine" ) // ManagementServiceClient is the client API for ManagementService service. @@ -56,6 +57,7 @@ type ManagementServiceClient interface { CreateSchematic(ctx context.Context, in *CreateSchematicRequest, opts ...grpc.CallOption) (*CreateSchematicResponse, error) GetSupportBundle(ctx context.Context, in *GetSupportBundleRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[GetSupportBundleResponse], error) ReadAuditLog(ctx context.Context, in *ReadAuditLogRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ReadAuditLogResponse], error) + RebootMachine(ctx context.Context, in *RebootMachineRequest, opts ...grpc.CallOption) (*RebootMachineResponse, error) } type managementServiceClient struct { @@ -242,6 +244,16 @@ func (c *managementServiceClient) ReadAuditLog(ctx context.Context, in *ReadAudi // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type ManagementService_ReadAuditLogClient = grpc.ServerStreamingClient[ReadAuditLogResponse] +func (c *managementServiceClient) RebootMachine(ctx context.Context, in *RebootMachineRequest, opts ...grpc.CallOption) (*RebootMachineResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RebootMachineResponse) + err := c.cc.Invoke(ctx, ManagementService_RebootMachine_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // ManagementServiceServer is the server API for ManagementService service. // All implementations must embed UnimplementedManagementServiceServer // for forward compatibility. @@ -260,6 +272,7 @@ type ManagementServiceServer interface { CreateSchematic(context.Context, *CreateSchematicRequest) (*CreateSchematicResponse, error) GetSupportBundle(*GetSupportBundleRequest, grpc.ServerStreamingServer[GetSupportBundleResponse]) error ReadAuditLog(*ReadAuditLogRequest, grpc.ServerStreamingServer[ReadAuditLogResponse]) error + RebootMachine(context.Context, *RebootMachineRequest) (*RebootMachineResponse, error) mustEmbedUnimplementedManagementServiceServer() } @@ -312,6 +325,9 @@ func (UnimplementedManagementServiceServer) GetSupportBundle(*GetSupportBundleRe func (UnimplementedManagementServiceServer) ReadAuditLog(*ReadAuditLogRequest, grpc.ServerStreamingServer[ReadAuditLogResponse]) error { return status.Errorf(codes.Unimplemented, "method ReadAuditLog not implemented") } +func (UnimplementedManagementServiceServer) RebootMachine(context.Context, *RebootMachineRequest) (*RebootMachineResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RebootMachine not implemented") +} func (UnimplementedManagementServiceServer) mustEmbedUnimplementedManagementServiceServer() {} func (UnimplementedManagementServiceServer) testEmbeddedByValue() {} @@ -557,6 +573,24 @@ func _ManagementService_ReadAuditLog_Handler(srv interface{}, stream grpc.Server // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type ManagementService_ReadAuditLogServer = grpc.ServerStreamingServer[ReadAuditLogResponse] +func _ManagementService_RebootMachine_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RebootMachineRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ManagementServiceServer).RebootMachine(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ManagementService_RebootMachine_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ManagementServiceServer).RebootMachine(ctx, req.(*RebootMachineRequest)) + } + return interceptor(ctx, in, info, handler) +} + // ManagementService_ServiceDesc is the grpc.ServiceDesc for ManagementService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -604,6 +638,10 @@ var ManagementService_ServiceDesc = grpc.ServiceDesc{ MethodName: "CreateSchematic", Handler: _ManagementService_CreateSchematic_Handler, }, + { + MethodName: "RebootMachine", + Handler: _ManagementService_RebootMachine_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/client/api/omni/management/management_vtproto.pb.go b/client/api/omni/management/management_vtproto.pb.go index 8d5b04b75..f236d089b 100644 --- a/client/api/omni/management/management_vtproto.pb.go +++ b/client/api/omni/management/management_vtproto.pb.go @@ -554,6 +554,41 @@ func (m *ReadAuditLogResponse) CloneMessageVT() proto.Message { return m.CloneVT() } +func (m *RebootMachineRequest) CloneVT() *RebootMachineRequest { + if m == nil { + return (*RebootMachineRequest)(nil) + } + r := new(RebootMachineRequest) + r.MachineId = m.MachineId + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *RebootMachineRequest) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *RebootMachineResponse) CloneVT() *RebootMachineResponse { + if m == nil { + return (*RebootMachineResponse)(nil) + } + r := new(RebootMachineResponse) + r.RebootId = m.RebootId + r.LastRebootTimestamp = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.LastRebootTimestamp).CloneVT()) + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *RebootMachineResponse) CloneMessageVT() proto.Message { + return m.CloneVT() +} + func (this *KubeconfigResponse) EqualVT(that *KubeconfigResponse) bool { if this == that { return true @@ -1205,6 +1240,47 @@ func (this *ReadAuditLogResponse) EqualMessageVT(thatMsg proto.Message) bool { } return this.EqualVT(that) } +func (this *RebootMachineRequest) EqualVT(that *RebootMachineRequest) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.MachineId != that.MachineId { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *RebootMachineRequest) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*RebootMachineRequest) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *RebootMachineResponse) EqualVT(that *RebootMachineResponse) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.RebootId != that.RebootId { + return false + } + if !(*timestamppb1.Timestamp)(this.LastRebootTimestamp).EqualVT((*timestamppb1.Timestamp)(that.LastRebootTimestamp)) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *RebootMachineResponse) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*RebootMachineResponse) + if !ok { + return false + } + return this.EqualVT(that) +} func (m *KubeconfigResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -2538,6 +2614,96 @@ func (m *ReadAuditLogResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *RebootMachineRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RebootMachineRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *RebootMachineRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.MachineId) > 0 { + i -= len(m.MachineId) + copy(dAtA[i:], m.MachineId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MachineId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RebootMachineResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RebootMachineResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *RebootMachineResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.LastRebootTimestamp != nil { + size, err := (*timestamppb1.Timestamp)(m.LastRebootTimestamp).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if len(m.RebootId) > 0 { + i -= len(m.RebootId) + copy(dAtA[i:], m.RebootId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RebootId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *KubeconfigResponse) SizeVT() (n int) { if m == nil { return 0 @@ -3037,6 +3203,38 @@ func (m *ReadAuditLogResponse) SizeVT() (n int) { return n } +func (m *RebootMachineRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MachineId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *RebootMachineResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.RebootId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.LastRebootTimestamp != nil { + l = (*timestamppb1.Timestamp)(m.LastRebootTimestamp).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + func (m *KubeconfigResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -6207,3 +6405,205 @@ func (m *ReadAuditLogResponse) UnmarshalVT(dAtA []byte) error { } return nil } +func (m *RebootMachineRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RebootMachineRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RebootMachineRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MachineId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MachineId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RebootMachineResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RebootMachineResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RebootMachineResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RebootId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RebootId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastRebootTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LastRebootTimestamp == nil { + m.LastRebootTimestamp = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.LastRebootTimestamp).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/client/pkg/client/management/management.go b/client/pkg/client/management/management.go index 3191f45f8..69cf09ac8 100644 --- a/client/pkg/client/management/management.go +++ b/client/pkg/client/management/management.go @@ -248,6 +248,11 @@ func (client *Client) ReadAuditLog(ctx context.Context, start, end string) iter. } } +// RebootMachine reboots the infra machine with the given ID and blocks until the reboot completes. +func (client *Client) RebootMachine(ctx context.Context, req *management.RebootMachineRequest) (*management.RebootMachineResponse, error) { + return client.conn.RebootMachine(ctx, req) +} + // LogReader is a log client reader which implements io.Reader. type LogReader struct { ctx context.Context //nolint:containedctx diff --git a/client/pkg/omni/resources/omni/labels.go b/client/pkg/omni/resources/omni/labels.go index 6883fccb2..b2d91bfd6 100644 --- a/client/pkg/omni/resources/omni/labels.go +++ b/client/pkg/omni/resources/omni/labels.go @@ -91,7 +91,7 @@ const ( LabelMachinePendingAccept = SystemLabelPrefix + "accept-pending" // InfraProviderLabelPrefixFormat is the prefix of all labels which are managed by the infra providers. - InfraProviderLabelPrefixFormat = SystemLabelPrefix + "infra-provider[%s]/" + InfraProviderLabelPrefixFormat = SystemLabelPrefix + "infra-provider/%s/" ) const ( diff --git a/client/pkg/omnictl/power.go b/client/pkg/omnictl/power.go new file mode 100644 index 000000000..3766af36e --- /dev/null +++ b/client/pkg/omnictl/power.go @@ -0,0 +1,54 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. + +package omnictl + +import ( + "context" + "fmt" + + "github.com/spf13/cobra" + + managementpb "github.com/siderolabs/omni/client/api/omni/management" + "github.com/siderolabs/omni/client/pkg/client" + "github.com/siderolabs/omni/client/pkg/omnictl/internal/access" +) + +var ( + powerCmd = &cobra.Command{ + Use: "power", + Short: "Manage power state of infrastructure machines", + } + + powerRebootCmd = &cobra.Command{ + Use: "reboot ", + Aliases: []string{"cycle"}, + Short: "Reboot a machine", + Args: cobra.ExactArgs(1), + RunE: func(_ *cobra.Command, args []string) error { + machineID := args[0] + + return access.WithClient(func(ctx context.Context, client *client.Client) error { + resp, err := client.Management().RebootMachine(ctx, &managementpb.RebootMachineRequest{ + MachineId: machineID, + }) + if err != nil { + return err + } + + fmt.Printf("Rebooted machine: %s\n", machineID) + fmt.Printf("Reboot ID: %s\n", resp.RebootId) + fmt.Printf("Reboot time: %s\n", resp.LastRebootTimestamp.AsTime().String()) + + return nil + }) + }, + } +) + +func init() { + RootCmd.AddCommand(powerCmd) + + powerCmd.AddCommand(powerRebootCmd) +} diff --git a/frontend/src/api/omni/management/management.pb.ts b/frontend/src/api/omni/management/management.pb.ts index 191266358..a76f8dd17 100644 --- a/frontend/src/api/omni/management/management.pb.ts +++ b/frontend/src/api/omni/management/management.pb.ts @@ -160,6 +160,15 @@ export type ReadAuditLogResponse = { audit_log?: Uint8Array } +export type RebootMachineRequest = { + machine_id?: string +} + +export type RebootMachineResponse = { + reboot_id?: string + last_reboot_timestamp?: GoogleProtobufTimestamp.Timestamp +} + export class ManagementService { static Kubeconfig(req: KubeconfigRequest, ...options: fm.fetchOption[]): Promise { return fm.fetchReq("POST", `/management.ManagementService/Kubeconfig`, req, ...options) @@ -203,4 +212,7 @@ export class ManagementService { static ReadAuditLog(req: ReadAuditLogRequest, entityNotifier?: fm.NotifyStreamEntityArrival, ...options: fm.fetchOption[]): Promise { return fm.fetchStreamingRequest("POST", `/management.ManagementService/ReadAuditLog`, req, entityNotifier, ...options) } + static RebootMachine(req: RebootMachineRequest, ...options: fm.fetchOption[]): Promise { + return fm.fetchReq("POST", `/management.ManagementService/RebootMachine`, req, ...options) + } } \ No newline at end of file diff --git a/internal/backend/grpc/management.go b/internal/backend/grpc/management.go index 69e912945..3165d2d23 100644 --- a/internal/backend/grpc/management.go +++ b/internal/backend/grpc/management.go @@ -20,6 +20,7 @@ import ( "github.com/cosi-project/runtime/pkg/resource" "github.com/cosi-project/runtime/pkg/safe" "github.com/cosi-project/runtime/pkg/state" + "github.com/google/uuid" gateway "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/siderolabs/gen/optional" "github.com/siderolabs/go-kubernetes/kubernetes/manifests" @@ -38,6 +39,7 @@ import ( "github.com/siderolabs/omni/client/api/omni/management" "github.com/siderolabs/omni/client/pkg/constants" "github.com/siderolabs/omni/client/pkg/omni/resources" + "github.com/siderolabs/omni/client/pkg/omni/resources/infra" omnires "github.com/siderolabs/omni/client/pkg/omni/resources/omni" ctlcfg "github.com/siderolabs/omni/client/pkg/omnictl/config" "github.com/siderolabs/omni/client/pkg/panichandler" @@ -654,6 +656,81 @@ func (s *managementServer) ReadAuditLog(req *management.ReadAuditLogRequest, srv return closeFn() } +func (s *managementServer) RebootMachine(ctx context.Context, req *management.RebootMachineRequest) (*management.RebootMachineResponse, error) { + if _, err := s.authCheckGRPC(ctx, auth.WithRole(role.Admin)); err != nil { + return nil, err + } + + ctx = actor.MarkContextAsInternalActor(ctx) + + if _, err := safe.StateGetByID[*infra.Machine](ctx, s.omniState, req.MachineId); err != nil { + if state.IsNotFoundError(err) { + return nil, status.Error(codes.NotFound, "infra machine not found") + } + + return nil, err + } + + newRebootID := uuid.NewString() + + machineConfig, err := safe.StateGetByID[*omnires.InfraMachineConfig](ctx, s.omniState, req.MachineId) + if err != nil && !state.IsNotFoundError(err) { + return nil, err + } + + if machineConfig == nil { + machineConfig = omnires.NewInfraMachineConfig(resources.DefaultNamespace, req.MachineId) + + machineConfig.TypedSpec().Value.RequestedRebootId = newRebootID + + if err = s.omniState.Create(ctx, machineConfig); err != nil { + return nil, err + } + } else { + if _, err = safe.StateUpdateWithConflicts(ctx, s.omniState, machineConfig.Metadata(), func(res *omnires.InfraMachineConfig) error { + res.TypedSpec().Value.RequestedRebootId = newRebootID + + return nil + }); err != nil { + return nil, err + } + } + + eventCh := make(chan safe.WrappedStateEvent[*infra.MachineStatus]) + + if err = safe.StateWatch[*infra.MachineStatus](ctx, s.omniState, infra.NewMachineStatus(req.MachineId).Metadata(), eventCh); err != nil { + return nil, err + } + + var ( + machineStatus *infra.MachineStatus + event safe.WrappedStateEvent[*infra.MachineStatus] + ) + + for { + select { + case <-ctx.Done(): + return nil, ctx.Err() + case event = <-eventCh: + } + + if event.Error() != nil { + return nil, event.Error() + } + + if machineStatus, err = event.Resource(); err != nil { + return nil, err + } + + if machineStatus.TypedSpec().Value.LastRebootId == newRebootID { + return &management.RebootMachineResponse{ + RebootId: newRebootID, + LastRebootTimestamp: machineStatus.TypedSpec().Value.LastRebootTimestamp, + }, nil + } + } +} + func parseTime(date string, fallback time.Time) (time.Time, error) { if date == "" { return fallback, nil diff --git a/internal/backend/runtime/omni/controllers/omni/infra_machine.go b/internal/backend/runtime/omni/controllers/omni/infra_machine.go index de3615f43..56296631c 100644 --- a/internal/backend/runtime/omni/controllers/omni/infra_machine.go +++ b/internal/backend/runtime/omni/controllers/omni/infra_machine.go @@ -116,7 +116,7 @@ func (h *infraMachineControllerHelper) transformExtraOutput(ctx context.Context, return xerrors.NewTaggedf[qtransform.SkipReconcileTag]("the link is not created by a static infra provider") } - machineInfoCollected := machineStatus != nil && machineStatus.TypedSpec().Value.SecureBootStatus != nil + machineInfoCollected := machineStatus != nil && machineStatus.TypedSpec().Value.TalosVersion != "" if err = h.applyInfraMachineConfig(infraMachine, config, machineInfoCollected); err != nil { return err diff --git a/internal/backend/runtime/omni/controllers/omni/infra_machine_test.go b/internal/backend/runtime/omni/controllers/omni/infra_machine_test.go index 93da6c70b..edd782fb6 100644 --- a/internal/backend/runtime/omni/controllers/omni/infra_machine_test.go +++ b/internal/backend/runtime/omni/controllers/omni/infra_machine_test.go @@ -55,7 +55,7 @@ func (suite *InfraMachineControllerSuite) TestReconcile() { }) machineStatus := omni.NewMachineStatus(resources.DefaultNamespace, "machine-1") - machineStatus.TypedSpec().Value.SecureBootStatus = &specs.SecureBootStatus{} + machineStatus.TypedSpec().Value.TalosVersion = "v1.9.1" suite.Require().NoError(suite.state.Create(suite.ctx, machineStatus))