From f9531c8a84d251d7e94f2b703707968f8638ae5b Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Wed, 19 Nov 2025 13:54:52 +0300 Subject: [PATCH 1/4] getn kv client for virt-launcher Signed-off-by: Nikita Korolev --- images/virt-launcher/vlctl/Taskfile.yaml | 11 + .../pkg/api/generated/cmd/proto/cmd.pb.go | 2251 +++++++++++++++++ .../api/generated/cmd/proto/cmd_grpc.pb.go | 1299 ++++++++++ .../pkg/api/generated/info/proto/info.pb.go | 164 ++ .../api/generated/info/proto/info_grpc.pb.go | 121 + .../api/generated/notify/proto/notify.pb.go | 254 ++ .../generated/notify/proto/notify_grpc.pb.go | 159 ++ images/virt-launcher/vlctl/proto/cmd.proto | 223 ++ images/virt-launcher/vlctl/proto/info.proto | 14 + images/virt-launcher/vlctl/proto/notify.proto | 24 + 10 files changed, 4520 insertions(+) create mode 100644 images/virt-launcher/vlctl/pkg/api/generated/cmd/proto/cmd.pb.go create mode 100644 images/virt-launcher/vlctl/pkg/api/generated/cmd/proto/cmd_grpc.pb.go create mode 100644 images/virt-launcher/vlctl/pkg/api/generated/info/proto/info.pb.go create mode 100644 images/virt-launcher/vlctl/pkg/api/generated/info/proto/info_grpc.pb.go create mode 100644 images/virt-launcher/vlctl/pkg/api/generated/notify/proto/notify.pb.go create mode 100644 images/virt-launcher/vlctl/pkg/api/generated/notify/proto/notify_grpc.pb.go create mode 100644 images/virt-launcher/vlctl/proto/cmd.proto create mode 100644 images/virt-launcher/vlctl/proto/info.proto create mode 100644 images/virt-launcher/vlctl/proto/notify.proto diff --git a/images/virt-launcher/vlctl/Taskfile.yaml b/images/virt-launcher/vlctl/Taskfile.yaml index f986504915..892e292ec1 100644 --- a/images/virt-launcher/vlctl/Taskfile.yaml +++ b/images/virt-launcher/vlctl/Taskfile.yaml @@ -13,3 +13,14 @@ tasks: cmds: - mkdir -p bin - go build -o bin/vlctl cmd/vlctl/main.go + + gen-proto: + desc: Generate Go code from proto files + cmds: + - mkdir -p pkg/api/generated + - mkdir -p pkg/api/generated/cmd + - mkdir -p pkg/api/generated/info + - mkdir -p pkg/api/generated/notify + - protoc --go_out=pkg/api/generated/cmd --go_opt=paths=source_relative --go-grpc_out=pkg/api/generated/cmd --go-grpc_opt=paths=source_relative proto/cmd.proto + - protoc --go_out=pkg/api/generated/info --go_opt=paths=source_relative --go-grpc_out=pkg/api/generated/info --go-grpc_opt=paths=source_relative proto/info.proto + - protoc --go_out=pkg/api/generated/notify --go_opt=paths=source_relative --go-grpc_out=pkg/api/generated/notify --go-grpc_opt=paths=source_relative proto/notify.proto diff --git a/images/virt-launcher/vlctl/pkg/api/generated/cmd/proto/cmd.pb.go b/images/virt-launcher/vlctl/pkg/api/generated/cmd/proto/cmd.pb.go new file mode 100644 index 0000000000..d930349fca --- /dev/null +++ b/images/virt-launcher/vlctl/pkg/api/generated/cmd/proto/cmd.pb.go @@ -0,0 +1,2251 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v6.33.1 +// source: proto/cmd.proto + +package cmd + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type MigrationProxyAction int32 + +const ( + MigrationProxyAction_START MigrationProxyAction = 0 + MigrationProxyAction_STOP MigrationProxyAction = 1 +) + +// Enum value maps for MigrationProxyAction. +var ( + MigrationProxyAction_name = map[int32]string{ + 0: "START", + 1: "STOP", + } + MigrationProxyAction_value = map[string]int32{ + "START": 0, + "STOP": 1, + } +) + +func (x MigrationProxyAction) Enum() *MigrationProxyAction { + p := new(MigrationProxyAction) + *p = x + return p +} + +func (x MigrationProxyAction) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MigrationProxyAction) Descriptor() protoreflect.EnumDescriptor { + return file_proto_cmd_proto_enumTypes[0].Descriptor() +} + +func (MigrationProxyAction) Type() protoreflect.EnumType { + return &file_proto_cmd_proto_enumTypes[0] +} + +func (x MigrationProxyAction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MigrationProxyAction.Descriptor instead. +func (MigrationProxyAction) EnumDescriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{0} +} + +type QemuVersionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *QemuVersionResponse) Reset() { + *x = QemuVersionResponse{} + mi := &file_proto_cmd_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *QemuVersionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QemuVersionResponse) ProtoMessage() {} + +func (x *QemuVersionResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[0] + 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 QemuVersionResponse.ProtoReflect.Descriptor instead. +func (*QemuVersionResponse) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{0} +} + +func (x *QemuVersionResponse) GetResponse() *Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *QemuVersionResponse) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +type VMI struct { + state protoimpl.MessageState `protogen:"open.v1"` + VmiJson []byte `protobuf:"bytes,1,opt,name=vmiJson,proto3" json:"vmiJson,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VMI) Reset() { + *x = VMI{} + mi := &file_proto_cmd_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VMI) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VMI) ProtoMessage() {} + +func (x *VMI) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[1] + 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 VMI.ProtoReflect.Descriptor instead. +func (*VMI) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{1} +} + +func (x *VMI) GetVmiJson() []byte { + if x != nil { + return x.VmiJson + } + return nil +} + +type CPU struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Siblings []uint32 `protobuf:"varint,2,rep,packed,name=siblings,proto3" json:"siblings,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CPU) Reset() { + *x = CPU{} + mi := &file_proto_cmd_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CPU) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CPU) ProtoMessage() {} + +func (x *CPU) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[2] + 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 CPU.ProtoReflect.Descriptor instead. +func (*CPU) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{2} +} + +func (x *CPU) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *CPU) GetSiblings() []uint32 { + if x != nil { + return x.Siblings + } + return nil +} + +type Sibling struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Value uint64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Sibling) Reset() { + *x = Sibling{} + mi := &file_proto_cmd_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Sibling) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Sibling) ProtoMessage() {} + +func (x *Sibling) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[3] + 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 Sibling.ProtoReflect.Descriptor instead. +func (*Sibling) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{3} +} + +func (x *Sibling) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Sibling) GetValue() uint64 { + if x != nil { + return x.Value + } + return 0 +} + +type Pages struct { + state protoimpl.MessageState `protogen:"open.v1"` + Count uint64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + Unit string `protobuf:"bytes,2,opt,name=unit,proto3" json:"unit,omitempty"` + Size uint32 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Pages) Reset() { + *x = Pages{} + mi := &file_proto_cmd_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Pages) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Pages) ProtoMessage() {} + +func (x *Pages) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[4] + 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 Pages.ProtoReflect.Descriptor instead. +func (*Pages) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{4} +} + +func (x *Pages) GetCount() uint64 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *Pages) GetUnit() string { + if x != nil { + return x.Unit + } + return "" +} + +func (x *Pages) GetSize() uint32 { + if x != nil { + return x.Size + } + return 0 +} + +type Memory struct { + state protoimpl.MessageState `protogen:"open.v1"` + Amount uint64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` + Unit string `protobuf:"bytes,2,opt,name=unit,proto3" json:"unit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Memory) Reset() { + *x = Memory{} + mi := &file_proto_cmd_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Memory) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Memory) ProtoMessage() {} + +func (x *Memory) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[5] + 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 Memory.ProtoReflect.Descriptor instead. +func (*Memory) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{5} +} + +func (x *Memory) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *Memory) GetUnit() string { + if x != nil { + return x.Unit + } + return "" +} + +type Cell struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Memory *Memory `protobuf:"bytes,2,opt,name=memory,proto3" json:"memory,omitempty"` + Pages []*Pages `protobuf:"bytes,3,rep,name=pages,proto3" json:"pages,omitempty"` + Distances []*Sibling `protobuf:"bytes,4,rep,name=distances,proto3" json:"distances,omitempty"` + Cpus []*CPU `protobuf:"bytes,5,rep,name=cpus,proto3" json:"cpus,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Cell) Reset() { + *x = Cell{} + mi := &file_proto_cmd_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Cell) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Cell) ProtoMessage() {} + +func (x *Cell) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[6] + 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 Cell.ProtoReflect.Descriptor instead. +func (*Cell) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{6} +} + +func (x *Cell) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Cell) GetMemory() *Memory { + if x != nil { + return x.Memory + } + return nil +} + +func (x *Cell) GetPages() []*Pages { + if x != nil { + return x.Pages + } + return nil +} + +func (x *Cell) GetDistances() []*Sibling { + if x != nil { + return x.Distances + } + return nil +} + +func (x *Cell) GetCpus() []*CPU { + if x != nil { + return x.Cpus + } + return nil +} + +type Topology struct { + state protoimpl.MessageState `protogen:"open.v1"` + NumaCells []*Cell `protobuf:"bytes,1,rep,name=numa_cells,json=numaCells,proto3" json:"numa_cells,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Topology) Reset() { + *x = Topology{} + mi := &file_proto_cmd_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Topology) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Topology) ProtoMessage() {} + +func (x *Topology) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[7] + 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 Topology.ProtoReflect.Descriptor instead. +func (*Topology) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{7} +} + +func (x *Topology) GetNumaCells() []*Cell { + if x != nil { + return x.NumaCells + } + return nil +} + +type SMBios struct { + state protoimpl.MessageState `protogen:"open.v1"` + Manufacturer string `protobuf:"bytes,1,opt,name=manufacturer,proto3" json:"manufacturer,omitempty"` + Product string `protobuf:"bytes,2,opt,name=product,proto3" json:"product,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + Sku string `protobuf:"bytes,4,opt,name=sku,proto3" json:"sku,omitempty"` + Family string `protobuf:"bytes,5,opt,name=family,proto3" json:"family,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SMBios) Reset() { + *x = SMBios{} + mi := &file_proto_cmd_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SMBios) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SMBios) ProtoMessage() {} + +func (x *SMBios) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[8] + 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 SMBios.ProtoReflect.Descriptor instead. +func (*SMBios) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{8} +} + +func (x *SMBios) GetManufacturer() string { + if x != nil { + return x.Manufacturer + } + return "" +} + +func (x *SMBios) GetProduct() string { + if x != nil { + return x.Product + } + return "" +} + +func (x *SMBios) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *SMBios) GetSku() string { + if x != nil { + return x.Sku + } + return "" +} + +func (x *SMBios) GetFamily() string { + if x != nil { + return x.Family + } + return "" +} + +type DiskInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + Format string `protobuf:"bytes,1,opt,name=format,proto3" json:"format,omitempty"` + BackingFile string `protobuf:"bytes,2,opt,name=backingFile,proto3" json:"backingFile,omitempty"` + ActualSize uint64 `protobuf:"varint,3,opt,name=actualSize,proto3" json:"actualSize,omitempty"` + VirtualSize uint64 `protobuf:"varint,4,opt,name=virtualSize,proto3" json:"virtualSize,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DiskInfo) Reset() { + *x = DiskInfo{} + mi := &file_proto_cmd_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DiskInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiskInfo) ProtoMessage() {} + +func (x *DiskInfo) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[9] + 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 DiskInfo.ProtoReflect.Descriptor instead. +func (*DiskInfo) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{9} +} + +func (x *DiskInfo) GetFormat() string { + if x != nil { + return x.Format + } + return "" +} + +func (x *DiskInfo) GetBackingFile() string { + if x != nil { + return x.BackingFile + } + return "" +} + +func (x *DiskInfo) GetActualSize() uint64 { + if x != nil { + return x.ActualSize + } + return 0 +} + +func (x *DiskInfo) GetVirtualSize() uint64 { + if x != nil { + return x.VirtualSize + } + return 0 +} + +type ClusterConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + ExpandDisksEnabled bool `protobuf:"varint,1,opt,name=ExpandDisksEnabled,proto3" json:"ExpandDisksEnabled,omitempty"` + FreePageReportingDisabled bool `protobuf:"varint,2,opt,name=FreePageReportingDisabled,proto3" json:"FreePageReportingDisabled,omitempty"` + BochsDisplayForEFIGuests bool `protobuf:"varint,3,opt,name=BochsDisplayForEFIGuests,proto3" json:"BochsDisplayForEFIGuests,omitempty"` + SerialConsoleLogDisabled bool `protobuf:"varint,4,opt,name=SerialConsoleLogDisabled,proto3" json:"SerialConsoleLogDisabled,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClusterConfig) Reset() { + *x = ClusterConfig{} + mi := &file_proto_cmd_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClusterConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterConfig) ProtoMessage() {} + +func (x *ClusterConfig) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[10] + 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 ClusterConfig.ProtoReflect.Descriptor instead. +func (*ClusterConfig) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{10} +} + +func (x *ClusterConfig) GetExpandDisksEnabled() bool { + if x != nil { + return x.ExpandDisksEnabled + } + return false +} + +func (x *ClusterConfig) GetFreePageReportingDisabled() bool { + if x != nil { + return x.FreePageReportingDisabled + } + return false +} + +func (x *ClusterConfig) GetBochsDisplayForEFIGuests() bool { + if x != nil { + return x.BochsDisplayForEFIGuests + } + return false +} + +func (x *ClusterConfig) GetSerialConsoleLogDisabled() bool { + if x != nil { + return x.SerialConsoleLogDisabled + } + return false +} + +type InterfaceBindingMigration struct { + state protoimpl.MessageState `protogen:"open.v1"` + Method string `protobuf:"bytes,1,opt,name=Method,proto3" json:"Method,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InterfaceBindingMigration) Reset() { + *x = InterfaceBindingMigration{} + mi := &file_proto_cmd_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InterfaceBindingMigration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InterfaceBindingMigration) ProtoMessage() {} + +func (x *InterfaceBindingMigration) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[11] + 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 InterfaceBindingMigration.ProtoReflect.Descriptor instead. +func (*InterfaceBindingMigration) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{11} +} + +func (x *InterfaceBindingMigration) GetMethod() string { + if x != nil { + return x.Method + } + return "" +} + +type VirtualMachineOptions struct { + state protoimpl.MessageState `protogen:"open.v1"` + VirtualMachineSMBios *SMBios `protobuf:"bytes,1,opt,name=VirtualMachineSMBios,proto3" json:"VirtualMachineSMBios,omitempty"` + MemBalloonStatsPeriod uint32 `protobuf:"varint,2,opt,name=MemBalloonStatsPeriod,proto3" json:"MemBalloonStatsPeriod,omitempty"` + PreallocatedVolumes []string `protobuf:"bytes,3,rep,name=PreallocatedVolumes,proto3" json:"PreallocatedVolumes,omitempty"` + Topology *Topology `protobuf:"bytes,4,opt,name=topology,proto3" json:"topology,omitempty"` + DisksInfo map[string]*DiskInfo `protobuf:"bytes,5,rep,name=DisksInfo,proto3" json:"DisksInfo,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Deprecated, use clusterConfig.ExpandDisksEnabled + ExpandDisksEnabled bool `protobuf:"varint,6,opt,name=ExpandDisksEnabled,proto3" json:"ExpandDisksEnabled,omitempty"` + ClusterConfig *ClusterConfig `protobuf:"bytes,7,opt,name=clusterConfig,proto3" json:"clusterConfig,omitempty"` + InterfaceDomainAttachment map[string]string `protobuf:"bytes,8,rep,name=interfaceDomainAttachment,proto3" json:"interfaceDomainAttachment,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + InterfaceMigration map[string]*InterfaceBindingMigration `protobuf:"bytes,9,rep,name=interfaceMigration,proto3" json:"interfaceMigration,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VirtualMachineOptions) Reset() { + *x = VirtualMachineOptions{} + mi := &file_proto_cmd_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VirtualMachineOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VirtualMachineOptions) ProtoMessage() {} + +func (x *VirtualMachineOptions) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[12] + 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 VirtualMachineOptions.ProtoReflect.Descriptor instead. +func (*VirtualMachineOptions) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{12} +} + +func (x *VirtualMachineOptions) GetVirtualMachineSMBios() *SMBios { + if x != nil { + return x.VirtualMachineSMBios + } + return nil +} + +func (x *VirtualMachineOptions) GetMemBalloonStatsPeriod() uint32 { + if x != nil { + return x.MemBalloonStatsPeriod + } + return 0 +} + +func (x *VirtualMachineOptions) GetPreallocatedVolumes() []string { + if x != nil { + return x.PreallocatedVolumes + } + return nil +} + +func (x *VirtualMachineOptions) GetTopology() *Topology { + if x != nil { + return x.Topology + } + return nil +} + +func (x *VirtualMachineOptions) GetDisksInfo() map[string]*DiskInfo { + if x != nil { + return x.DisksInfo + } + return nil +} + +func (x *VirtualMachineOptions) GetExpandDisksEnabled() bool { + if x != nil { + return x.ExpandDisksEnabled + } + return false +} + +func (x *VirtualMachineOptions) GetClusterConfig() *ClusterConfig { + if x != nil { + return x.ClusterConfig + } + return nil +} + +func (x *VirtualMachineOptions) GetInterfaceDomainAttachment() map[string]string { + if x != nil { + return x.InterfaceDomainAttachment + } + return nil +} + +func (x *VirtualMachineOptions) GetInterfaceMigration() map[string]*InterfaceBindingMigration { + if x != nil { + return x.InterfaceMigration + } + return nil +} + +type VMIRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Vmi *VMI `protobuf:"bytes,1,opt,name=vmi,proto3" json:"vmi,omitempty"` + Options *VirtualMachineOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VMIRequest) Reset() { + *x = VMIRequest{} + mi := &file_proto_cmd_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VMIRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VMIRequest) ProtoMessage() {} + +func (x *VMIRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[13] + 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 VMIRequest.ProtoReflect.Descriptor instead. +func (*VMIRequest) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{13} +} + +func (x *VMIRequest) GetVmi() *VMI { + if x != nil { + return x.Vmi + } + return nil +} + +func (x *VMIRequest) GetOptions() *VirtualMachineOptions { + if x != nil { + return x.Options + } + return nil +} + +type MigrationRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Vmi *VMI `protobuf:"bytes,1,opt,name=vmi,proto3" json:"vmi,omitempty"` + Options []byte `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MigrationRequest) Reset() { + *x = MigrationRequest{} + mi := &file_proto_cmd_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MigrationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MigrationRequest) ProtoMessage() {} + +func (x *MigrationRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[14] + 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 MigrationRequest.ProtoReflect.Descriptor instead. +func (*MigrationRequest) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{14} +} + +func (x *MigrationRequest) GetVmi() *VMI { + if x != nil { + return x.Vmi + } + return nil +} + +func (x *MigrationRequest) GetOptions() []byte { + if x != nil { + return x.Options + } + return nil +} + +type ExecRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + DomainName string `protobuf:"bytes,1,opt,name=domainName,proto3" json:"domainName,omitempty"` + Command string `protobuf:"bytes,2,opt,name=Command,proto3" json:"Command,omitempty"` + Args []string `protobuf:"bytes,3,rep,name=Args,proto3" json:"Args,omitempty"` + TimeoutSeconds int32 `protobuf:"varint,4,opt,name=timeoutSeconds,proto3" json:"timeoutSeconds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExecRequest) Reset() { + *x = ExecRequest{} + mi := &file_proto_cmd_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExecRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecRequest) ProtoMessage() {} + +func (x *ExecRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[15] + 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 ExecRequest.ProtoReflect.Descriptor instead. +func (*ExecRequest) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{15} +} + +func (x *ExecRequest) GetDomainName() string { + if x != nil { + return x.DomainName + } + return "" +} + +func (x *ExecRequest) GetCommand() string { + if x != nil { + return x.Command + } + return "" +} + +func (x *ExecRequest) GetArgs() []string { + if x != nil { + return x.Args + } + return nil +} + +func (x *ExecRequest) GetTimeoutSeconds() int32 { + if x != nil { + return x.TimeoutSeconds + } + return 0 +} + +type EmptyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EmptyRequest) Reset() { + *x = EmptyRequest{} + mi := &file_proto_cmd_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EmptyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmptyRequest) ProtoMessage() {} + +func (x *EmptyRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[16] + 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 EmptyRequest.ProtoReflect.Descriptor instead. +func (*EmptyRequest) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{16} +} + +type Response struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Response) Reset() { + *x = Response{} + mi := &file_proto_cmd_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Response) ProtoMessage() {} + +func (x *Response) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[17] + 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 Response.ProtoReflect.Descriptor instead. +func (*Response) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{17} +} + +func (x *Response) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *Response) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type DomainResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DomainResponse) Reset() { + *x = DomainResponse{} + mi := &file_proto_cmd_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DomainResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DomainResponse) ProtoMessage() {} + +func (x *DomainResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[18] + 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 DomainResponse.ProtoReflect.Descriptor instead. +func (*DomainResponse) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{18} +} + +func (x *DomainResponse) GetResponse() *Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *DomainResponse) GetDomain() string { + if x != nil { + return x.Domain + } + return "" +} + +type DomainStatsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + DomainStats string `protobuf:"bytes,2,opt,name=domainStats,proto3" json:"domainStats,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DomainStatsResponse) Reset() { + *x = DomainStatsResponse{} + mi := &file_proto_cmd_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DomainStatsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DomainStatsResponse) ProtoMessage() {} + +func (x *DomainStatsResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[19] + 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 DomainStatsResponse.ProtoReflect.Descriptor instead. +func (*DomainStatsResponse) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{19} +} + +func (x *DomainStatsResponse) GetResponse() *Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *DomainStatsResponse) GetDomainStats() string { + if x != nil { + return x.DomainStats + } + return "" +} + +type GuestInfoResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + GuestInfoResponse string `protobuf:"bytes,2,opt,name=guestInfoResponse,proto3" json:"guestInfoResponse,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GuestInfoResponse) Reset() { + *x = GuestInfoResponse{} + mi := &file_proto_cmd_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GuestInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GuestInfoResponse) ProtoMessage() {} + +func (x *GuestInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[20] + 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 GuestInfoResponse.ProtoReflect.Descriptor instead. +func (*GuestInfoResponse) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{20} +} + +func (x *GuestInfoResponse) GetResponse() *Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *GuestInfoResponse) GetGuestInfoResponse() string { + if x != nil { + return x.GuestInfoResponse + } + return "" +} + +type GuestUserListResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + GuestUserListResponse string `protobuf:"bytes,2,opt,name=guestUserListResponse,proto3" json:"guestUserListResponse,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GuestUserListResponse) Reset() { + *x = GuestUserListResponse{} + mi := &file_proto_cmd_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GuestUserListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GuestUserListResponse) ProtoMessage() {} + +func (x *GuestUserListResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[21] + 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 GuestUserListResponse.ProtoReflect.Descriptor instead. +func (*GuestUserListResponse) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{21} +} + +func (x *GuestUserListResponse) GetResponse() *Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *GuestUserListResponse) GetGuestUserListResponse() string { + if x != nil { + return x.GuestUserListResponse + } + return "" +} + +type GuestFilesystemsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + GuestFilesystemsResponse string `protobuf:"bytes,2,opt,name=guestFilesystemsResponse,proto3" json:"guestFilesystemsResponse,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GuestFilesystemsResponse) Reset() { + *x = GuestFilesystemsResponse{} + mi := &file_proto_cmd_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GuestFilesystemsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GuestFilesystemsResponse) ProtoMessage() {} + +func (x *GuestFilesystemsResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[22] + 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 GuestFilesystemsResponse.ProtoReflect.Descriptor instead. +func (*GuestFilesystemsResponse) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{22} +} + +func (x *GuestFilesystemsResponse) GetResponse() *Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *GuestFilesystemsResponse) GetGuestFilesystemsResponse() string { + if x != nil { + return x.GuestFilesystemsResponse + } + return "" +} + +type ExecResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + ExitCode int32 `protobuf:"varint,2,opt,name=exitCode,proto3" json:"exitCode,omitempty"` + StdOut string `protobuf:"bytes,3,opt,name=stdOut,proto3" json:"stdOut,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExecResponse) Reset() { + *x = ExecResponse{} + mi := &file_proto_cmd_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExecResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecResponse) ProtoMessage() {} + +func (x *ExecResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_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 ExecResponse.ProtoReflect.Descriptor instead. +func (*ExecResponse) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{23} +} + +func (x *ExecResponse) GetResponse() *Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *ExecResponse) GetExitCode() int32 { + if x != nil { + return x.ExitCode + } + return 0 +} + +func (x *ExecResponse) GetStdOut() string { + if x != nil { + return x.StdOut + } + return "" +} + +type GuestPingRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + DomainName string `protobuf:"bytes,1,opt,name=domainName,proto3" json:"domainName,omitempty"` + TimeoutSeconds int32 `protobuf:"varint,2,opt,name=timeoutSeconds,proto3" json:"timeoutSeconds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GuestPingRequest) Reset() { + *x = GuestPingRequest{} + mi := &file_proto_cmd_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GuestPingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GuestPingRequest) ProtoMessage() {} + +func (x *GuestPingRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_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 GuestPingRequest.ProtoReflect.Descriptor instead. +func (*GuestPingRequest) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{24} +} + +func (x *GuestPingRequest) GetDomainName() string { + if x != nil { + return x.DomainName + } + return "" +} + +func (x *GuestPingRequest) GetTimeoutSeconds() int32 { + if x != nil { + return x.TimeoutSeconds + } + return 0 +} + +type GuestPingResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GuestPingResponse) Reset() { + *x = GuestPingResponse{} + mi := &file_proto_cmd_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GuestPingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GuestPingResponse) ProtoMessage() {} + +func (x *GuestPingResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[25] + 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 GuestPingResponse.ProtoReflect.Descriptor instead. +func (*GuestPingResponse) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{25} +} + +func (x *GuestPingResponse) GetResponse() *Response { + if x != nil { + return x.Response + } + return nil +} + +type FreezeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Vmi *VMI `protobuf:"bytes,1,opt,name=vmi,proto3" json:"vmi,omitempty"` + UnfreezeTimeoutSeconds int32 `protobuf:"varint,2,opt,name=unfreezeTimeoutSeconds,proto3" json:"unfreezeTimeoutSeconds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FreezeRequest) Reset() { + *x = FreezeRequest{} + mi := &file_proto_cmd_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FreezeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FreezeRequest) ProtoMessage() {} + +func (x *FreezeRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[26] + 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 FreezeRequest.ProtoReflect.Descriptor instead. +func (*FreezeRequest) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{26} +} + +func (x *FreezeRequest) GetVmi() *VMI { + if x != nil { + return x.Vmi + } + return nil +} + +func (x *FreezeRequest) GetUnfreezeTimeoutSeconds() int32 { + if x != nil { + return x.UnfreezeTimeoutSeconds + } + return 0 +} + +type MemoryDumpRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Vmi *VMI `protobuf:"bytes,1,opt,name=vmi,proto3" json:"vmi,omitempty"` + DumpPath string `protobuf:"bytes,2,opt,name=dumpPath,proto3" json:"dumpPath,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MemoryDumpRequest) Reset() { + *x = MemoryDumpRequest{} + mi := &file_proto_cmd_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MemoryDumpRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MemoryDumpRequest) ProtoMessage() {} + +func (x *MemoryDumpRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[27] + 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 MemoryDumpRequest.ProtoReflect.Descriptor instead. +func (*MemoryDumpRequest) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{27} +} + +func (x *MemoryDumpRequest) GetVmi() *VMI { + if x != nil { + return x.Vmi + } + return nil +} + +func (x *MemoryDumpRequest) GetDumpPath() string { + if x != nil { + return x.DumpPath + } + return "" +} + +type SEVInfoResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + SevInfo []byte `protobuf:"bytes,2,opt,name=sevInfo,proto3" json:"sevInfo,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SEVInfoResponse) Reset() { + *x = SEVInfoResponse{} + mi := &file_proto_cmd_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SEVInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SEVInfoResponse) ProtoMessage() {} + +func (x *SEVInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[28] + 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 SEVInfoResponse.ProtoReflect.Descriptor instead. +func (*SEVInfoResponse) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{28} +} + +func (x *SEVInfoResponse) GetResponse() *Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *SEVInfoResponse) GetSevInfo() []byte { + if x != nil { + return x.SevInfo + } + return nil +} + +type LaunchMeasurementResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + LaunchMeasurement []byte `protobuf:"bytes,2,opt,name=launchMeasurement,proto3" json:"launchMeasurement,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LaunchMeasurementResponse) Reset() { + *x = LaunchMeasurementResponse{} + mi := &file_proto_cmd_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LaunchMeasurementResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LaunchMeasurementResponse) ProtoMessage() {} + +func (x *LaunchMeasurementResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[29] + 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 LaunchMeasurementResponse.ProtoReflect.Descriptor instead. +func (*LaunchMeasurementResponse) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{29} +} + +func (x *LaunchMeasurementResponse) GetResponse() *Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *LaunchMeasurementResponse) GetLaunchMeasurement() []byte { + if x != nil { + return x.LaunchMeasurement + } + return nil +} + +type InjectLaunchSecretRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Vmi *VMI `protobuf:"bytes,1,opt,name=vmi,proto3" json:"vmi,omitempty"` + Options []byte `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InjectLaunchSecretRequest) Reset() { + *x = InjectLaunchSecretRequest{} + mi := &file_proto_cmd_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InjectLaunchSecretRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InjectLaunchSecretRequest) ProtoMessage() {} + +func (x *InjectLaunchSecretRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[30] + 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 InjectLaunchSecretRequest.ProtoReflect.Descriptor instead. +func (*InjectLaunchSecretRequest) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{30} +} + +func (x *InjectLaunchSecretRequest) GetVmi() *VMI { + if x != nil { + return x.Vmi + } + return nil +} + +func (x *InjectLaunchSecretRequest) GetOptions() []byte { + if x != nil { + return x.Options + } + return nil +} + +type VMIChecksumResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + Checksum string `protobuf:"bytes,2,opt,name=checksum,proto3" json:"checksum,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VMIChecksumResponse) Reset() { + *x = VMIChecksumResponse{} + mi := &file_proto_cmd_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VMIChecksumResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VMIChecksumResponse) ProtoMessage() {} + +func (x *VMIChecksumResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[31] + 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 VMIChecksumResponse.ProtoReflect.Descriptor instead. +func (*VMIChecksumResponse) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{31} +} + +func (x *VMIChecksumResponse) GetResponse() *Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *VMIChecksumResponse) GetChecksum() string { + if x != nil { + return x.Checksum + } + return "" +} + +type MigrationProxyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Action MigrationProxyAction `protobuf:"varint,1,opt,name=action,proto3,enum=kubevirt.cmd.v1.MigrationProxyAction" json:"action,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MigrationProxyRequest) Reset() { + *x = MigrationProxyRequest{} + mi := &file_proto_cmd_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MigrationProxyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MigrationProxyRequest) ProtoMessage() {} + +func (x *MigrationProxyRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_cmd_proto_msgTypes[32] + 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 MigrationProxyRequest.ProtoReflect.Descriptor instead. +func (*MigrationProxyRequest) Descriptor() ([]byte, []int) { + return file_proto_cmd_proto_rawDescGZIP(), []int{32} +} + +func (x *MigrationProxyRequest) GetAction() MigrationProxyAction { + if x != nil { + return x.Action + } + return MigrationProxyAction_START +} + +var File_proto_cmd_proto protoreflect.FileDescriptor + +const file_proto_cmd_proto_rawDesc = "" + + "\n" + + "\x0fproto/cmd.proto\x12\x0fkubevirt.cmd.v1\"f\n" + + "\x13QemuVersionResponse\x125\n" + + "\bresponse\x18\x01 \x01(\v2\x19.kubevirt.cmd.v1.ResponseR\bresponse\x12\x18\n" + + "\aversion\x18\x02 \x01(\tR\aversion\"\x1f\n" + + "\x03VMI\x12\x18\n" + + "\avmiJson\x18\x01 \x01(\fR\avmiJson\"1\n" + + "\x03CPU\x12\x0e\n" + + "\x02id\x18\x01 \x01(\rR\x02id\x12\x1a\n" + + "\bsiblings\x18\x02 \x03(\rR\bsiblings\"/\n" + + "\aSibling\x12\x0e\n" + + "\x02id\x18\x01 \x01(\rR\x02id\x12\x14\n" + + "\x05value\x18\x02 \x01(\x04R\x05value\"E\n" + + "\x05Pages\x12\x14\n" + + "\x05count\x18\x01 \x01(\x04R\x05count\x12\x12\n" + + "\x04unit\x18\x02 \x01(\tR\x04unit\x12\x12\n" + + "\x04size\x18\x03 \x01(\rR\x04size\"4\n" + + "\x06Memory\x12\x16\n" + + "\x06amount\x18\x01 \x01(\x04R\x06amount\x12\x12\n" + + "\x04unit\x18\x02 \x01(\tR\x04unit\"\xd7\x01\n" + + "\x04Cell\x12\x0e\n" + + "\x02id\x18\x01 \x01(\rR\x02id\x12/\n" + + "\x06memory\x18\x02 \x01(\v2\x17.kubevirt.cmd.v1.MemoryR\x06memory\x12,\n" + + "\x05pages\x18\x03 \x03(\v2\x16.kubevirt.cmd.v1.PagesR\x05pages\x126\n" + + "\tdistances\x18\x04 \x03(\v2\x18.kubevirt.cmd.v1.SiblingR\tdistances\x12(\n" + + "\x04cpus\x18\x05 \x03(\v2\x14.kubevirt.cmd.v1.CPUR\x04cpus\"@\n" + + "\bTopology\x124\n" + + "\n" + + "numa_cells\x18\x01 \x03(\v2\x15.kubevirt.cmd.v1.CellR\tnumaCells\"\x8a\x01\n" + + "\x06SMBios\x12\"\n" + + "\fmanufacturer\x18\x01 \x01(\tR\fmanufacturer\x12\x18\n" + + "\aproduct\x18\x02 \x01(\tR\aproduct\x12\x18\n" + + "\aversion\x18\x03 \x01(\tR\aversion\x12\x10\n" + + "\x03sku\x18\x04 \x01(\tR\x03sku\x12\x16\n" + + "\x06family\x18\x05 \x01(\tR\x06family\"\x86\x01\n" + + "\bDiskInfo\x12\x16\n" + + "\x06format\x18\x01 \x01(\tR\x06format\x12 \n" + + "\vbackingFile\x18\x02 \x01(\tR\vbackingFile\x12\x1e\n" + + "\n" + + "actualSize\x18\x03 \x01(\x04R\n" + + "actualSize\x12 \n" + + "\vvirtualSize\x18\x04 \x01(\x04R\vvirtualSize\"\xf5\x01\n" + + "\rClusterConfig\x12.\n" + + "\x12ExpandDisksEnabled\x18\x01 \x01(\bR\x12ExpandDisksEnabled\x12<\n" + + "\x19FreePageReportingDisabled\x18\x02 \x01(\bR\x19FreePageReportingDisabled\x12:\n" + + "\x18BochsDisplayForEFIGuests\x18\x03 \x01(\bR\x18BochsDisplayForEFIGuests\x12:\n" + + "\x18SerialConsoleLogDisabled\x18\x04 \x01(\bR\x18SerialConsoleLogDisabled\"3\n" + + "\x19InterfaceBindingMigration\x12\x16\n" + + "\x06Method\x18\x01 \x01(\tR\x06Method\"\xde\a\n" + + "\x15VirtualMachineOptions\x12K\n" + + "\x14VirtualMachineSMBios\x18\x01 \x01(\v2\x17.kubevirt.cmd.v1.SMBiosR\x14VirtualMachineSMBios\x124\n" + + "\x15MemBalloonStatsPeriod\x18\x02 \x01(\rR\x15MemBalloonStatsPeriod\x120\n" + + "\x13PreallocatedVolumes\x18\x03 \x03(\tR\x13PreallocatedVolumes\x125\n" + + "\btopology\x18\x04 \x01(\v2\x19.kubevirt.cmd.v1.TopologyR\btopology\x12S\n" + + "\tDisksInfo\x18\x05 \x03(\v25.kubevirt.cmd.v1.VirtualMachineOptions.DisksInfoEntryR\tDisksInfo\x12.\n" + + "\x12ExpandDisksEnabled\x18\x06 \x01(\bR\x12ExpandDisksEnabled\x12D\n" + + "\rclusterConfig\x18\a \x01(\v2\x1e.kubevirt.cmd.v1.ClusterConfigR\rclusterConfig\x12\x83\x01\n" + + "\x19interfaceDomainAttachment\x18\b \x03(\v2E.kubevirt.cmd.v1.VirtualMachineOptions.InterfaceDomainAttachmentEntryR\x19interfaceDomainAttachment\x12n\n" + + "\x12interfaceMigration\x18\t \x03(\v2>.kubevirt.cmd.v1.VirtualMachineOptions.InterfaceMigrationEntryR\x12interfaceMigration\x1aW\n" + + "\x0eDisksInfoEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12/\n" + + "\x05value\x18\x02 \x01(\v2\x19.kubevirt.cmd.v1.DiskInfoR\x05value:\x028\x01\x1aL\n" + + "\x1eInterfaceDomainAttachmentEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1aq\n" + + "\x17InterfaceMigrationEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12@\n" + + "\x05value\x18\x02 \x01(\v2*.kubevirt.cmd.v1.InterfaceBindingMigrationR\x05value:\x028\x01\"v\n" + + "\n" + + "VMIRequest\x12&\n" + + "\x03vmi\x18\x01 \x01(\v2\x14.kubevirt.cmd.v1.VMIR\x03vmi\x12@\n" + + "\aoptions\x18\x02 \x01(\v2&.kubevirt.cmd.v1.VirtualMachineOptionsR\aoptions\"T\n" + + "\x10MigrationRequest\x12&\n" + + "\x03vmi\x18\x01 \x01(\v2\x14.kubevirt.cmd.v1.VMIR\x03vmi\x12\x18\n" + + "\aoptions\x18\x02 \x01(\fR\aoptions\"\x83\x01\n" + + "\vExecRequest\x12\x1e\n" + + "\n" + + "domainName\x18\x01 \x01(\tR\n" + + "domainName\x12\x18\n" + + "\aCommand\x18\x02 \x01(\tR\aCommand\x12\x12\n" + + "\x04Args\x18\x03 \x03(\tR\x04Args\x12&\n" + + "\x0etimeoutSeconds\x18\x04 \x01(\x05R\x0etimeoutSeconds\"\x0e\n" + + "\fEmptyRequest\">\n" + + "\bResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" + + "\amessage\x18\x02 \x01(\tR\amessage\"_\n" + + "\x0eDomainResponse\x125\n" + + "\bresponse\x18\x01 \x01(\v2\x19.kubevirt.cmd.v1.ResponseR\bresponse\x12\x16\n" + + "\x06domain\x18\x02 \x01(\tR\x06domain\"n\n" + + "\x13DomainStatsResponse\x125\n" + + "\bresponse\x18\x01 \x01(\v2\x19.kubevirt.cmd.v1.ResponseR\bresponse\x12 \n" + + "\vdomainStats\x18\x02 \x01(\tR\vdomainStats\"x\n" + + "\x11GuestInfoResponse\x125\n" + + "\bresponse\x18\x01 \x01(\v2\x19.kubevirt.cmd.v1.ResponseR\bresponse\x12,\n" + + "\x11guestInfoResponse\x18\x02 \x01(\tR\x11guestInfoResponse\"\x84\x01\n" + + "\x15GuestUserListResponse\x125\n" + + "\bresponse\x18\x01 \x01(\v2\x19.kubevirt.cmd.v1.ResponseR\bresponse\x124\n" + + "\x15guestUserListResponse\x18\x02 \x01(\tR\x15guestUserListResponse\"\x8d\x01\n" + + "\x18GuestFilesystemsResponse\x125\n" + + "\bresponse\x18\x01 \x01(\v2\x19.kubevirt.cmd.v1.ResponseR\bresponse\x12:\n" + + "\x18guestFilesystemsResponse\x18\x02 \x01(\tR\x18guestFilesystemsResponse\"y\n" + + "\fExecResponse\x125\n" + + "\bresponse\x18\x01 \x01(\v2\x19.kubevirt.cmd.v1.ResponseR\bresponse\x12\x1a\n" + + "\bexitCode\x18\x02 \x01(\x05R\bexitCode\x12\x16\n" + + "\x06stdOut\x18\x03 \x01(\tR\x06stdOut\"Z\n" + + "\x10GuestPingRequest\x12\x1e\n" + + "\n" + + "domainName\x18\x01 \x01(\tR\n" + + "domainName\x12&\n" + + "\x0etimeoutSeconds\x18\x02 \x01(\x05R\x0etimeoutSeconds\"J\n" + + "\x11GuestPingResponse\x125\n" + + "\bresponse\x18\x01 \x01(\v2\x19.kubevirt.cmd.v1.ResponseR\bresponse\"o\n" + + "\rFreezeRequest\x12&\n" + + "\x03vmi\x18\x01 \x01(\v2\x14.kubevirt.cmd.v1.VMIR\x03vmi\x126\n" + + "\x16unfreezeTimeoutSeconds\x18\x02 \x01(\x05R\x16unfreezeTimeoutSeconds\"W\n" + + "\x11MemoryDumpRequest\x12&\n" + + "\x03vmi\x18\x01 \x01(\v2\x14.kubevirt.cmd.v1.VMIR\x03vmi\x12\x1a\n" + + "\bdumpPath\x18\x02 \x01(\tR\bdumpPath\"b\n" + + "\x0fSEVInfoResponse\x125\n" + + "\bresponse\x18\x01 \x01(\v2\x19.kubevirt.cmd.v1.ResponseR\bresponse\x12\x18\n" + + "\asevInfo\x18\x02 \x01(\fR\asevInfo\"\x80\x01\n" + + "\x19LaunchMeasurementResponse\x125\n" + + "\bresponse\x18\x01 \x01(\v2\x19.kubevirt.cmd.v1.ResponseR\bresponse\x12,\n" + + "\x11launchMeasurement\x18\x02 \x01(\fR\x11launchMeasurement\"]\n" + + "\x19InjectLaunchSecretRequest\x12&\n" + + "\x03vmi\x18\x01 \x01(\v2\x14.kubevirt.cmd.v1.VMIR\x03vmi\x12\x18\n" + + "\aoptions\x18\x02 \x01(\fR\aoptions\"h\n" + + "\x13VMIChecksumResponse\x125\n" + + "\bresponse\x18\x01 \x01(\v2\x19.kubevirt.cmd.v1.ResponseR\bresponse\x12\x1a\n" + + "\bchecksum\x18\x02 \x01(\tR\bchecksum\"V\n" + + "\x15MigrationProxyRequest\x12=\n" + + "\x06action\x18\x01 \x01(\x0e2%.kubevirt.cmd.v1.MigrationProxyActionR\x06action*+\n" + + "\x14MigrationProxyAction\x12\t\n" + + "\x05START\x10\x00\x12\b\n" + + "\x04STOP\x10\x012\xad\x15\n" + + "\x03Cmd\x12N\n" + + "\x12SyncVirtualMachine\x12\x1b.kubevirt.cmd.v1.VMIRequest\x1a\x19.kubevirt.cmd.v1.Response\"\x00\x12O\n" + + "\x13PauseVirtualMachine\x12\x1b.kubevirt.cmd.v1.VMIRequest\x1a\x19.kubevirt.cmd.v1.Response\"\x00\x12Q\n" + + "\x15UnpauseVirtualMachine\x12\x1b.kubevirt.cmd.v1.VMIRequest\x1a\x19.kubevirt.cmd.v1.Response\"\x00\x12S\n" + + "\x14FreezeVirtualMachine\x12\x1e.kubevirt.cmd.v1.FreezeRequest\x1a\x19.kubevirt.cmd.v1.Response\"\x00\x12R\n" + + "\x16UnfreezeVirtualMachine\x12\x1b.kubevirt.cmd.v1.VMIRequest\x1a\x19.kubevirt.cmd.v1.Response\"\x00\x12T\n" + + "\x18SoftRebootVirtualMachine\x12\x1b.kubevirt.cmd.v1.VMIRequest\x1a\x19.kubevirt.cmd.v1.Response\"\x00\x12R\n" + + "\x16ShutdownVirtualMachine\x12\x1b.kubevirt.cmd.v1.VMIRequest\x1a\x19.kubevirt.cmd.v1.Response\"\x00\x12N\n" + + "\x12KillVirtualMachine\x12\x1b.kubevirt.cmd.v1.VMIRequest\x1a\x19.kubevirt.cmd.v1.Response\"\x00\x12P\n" + + "\x14DeleteVirtualMachine\x12\x1b.kubevirt.cmd.v1.VMIRequest\x1a\x19.kubevirt.cmd.v1.Response\"\x00\x12W\n" + + "\x15MigrateVirtualMachine\x12!.kubevirt.cmd.v1.MigrationRequest\x1a\x19.kubevirt.cmd.v1.Response\"\x00\x12O\n" + + "\x13SyncMigrationTarget\x12\x1b.kubevirt.cmd.v1.VMIRequest\x1a\x19.kubevirt.cmd.v1.Response\"\x00\x12Y\n" + + "\x1dCancelVirtualMachineMigration\x12\x1b.kubevirt.cmd.v1.VMIRequest\x1a\x19.kubevirt.cmd.v1.Response\"\x00\x12R\n" + + "\x16SignalTargetPodCleanup\x12\x1b.kubevirt.cmd.v1.VMIRequest\x1a\x19.kubevirt.cmd.v1.Response\"\x00\x12[\n" + + "\x1fFinalizeVirtualMachineMigration\x12\x1b.kubevirt.cmd.v1.VMIRequest\x1a\x19.kubevirt.cmd.v1.Response\"\x00\x12N\n" + + "\x12HotplugHostDevices\x12\x1b.kubevirt.cmd.v1.VMIRequest\x1a\x19.kubevirt.cmd.v1.Response\"\x00\x12M\n" + + "\tGetDomain\x12\x1d.kubevirt.cmd.v1.EmptyRequest\x1a\x1f.kubevirt.cmd.v1.DomainResponse\"\x00\x12W\n" + + "\x0eGetDomainStats\x12\x1d.kubevirt.cmd.v1.EmptyRequest\x1a$.kubevirt.cmd.v1.DomainStatsResponse\"\x00\x12S\n" + + "\fGetGuestInfo\x12\x1d.kubevirt.cmd.v1.EmptyRequest\x1a\".kubevirt.cmd.v1.GuestInfoResponse\"\x00\x12S\n" + + "\bGetUsers\x12\x1d.kubevirt.cmd.v1.EmptyRequest\x1a&.kubevirt.cmd.v1.GuestUserListResponse\"\x00\x12\\\n" + + "\x0eGetFilesystems\x12\x1d.kubevirt.cmd.v1.EmptyRequest\x1a).kubevirt.cmd.v1.GuestFilesystemsResponse\"\x00\x12B\n" + + "\x04Ping\x12\x1d.kubevirt.cmd.v1.EmptyRequest\x1a\x19.kubevirt.cmd.v1.Response\"\x00\x12E\n" + + "\x04Exec\x12\x1c.kubevirt.cmd.v1.ExecRequest\x1a\x1d.kubevirt.cmd.v1.ExecResponse\"\x00\x12T\n" + + "\tGuestPing\x12!.kubevirt.cmd.v1.GuestPingRequest\x1a\".kubevirt.cmd.v1.GuestPingResponse\"\x00\x12[\n" + + "\x18VirtualMachineMemoryDump\x12\".kubevirt.cmd.v1.MemoryDumpRequest\x1a\x19.kubevirt.cmd.v1.Response\"\x00\x12W\n" + + "\x0eGetQemuVersion\x12\x1d.kubevirt.cmd.v1.EmptyRequest\x1a$.kubevirt.cmd.v1.QemuVersionResponse\"\x00\x12R\n" + + "\x16SyncVirtualMachineCPUs\x12\x1b.kubevirt.cmd.v1.VMIRequest\x1a\x19.kubevirt.cmd.v1.Response\"\x00\x12T\n" + + "\x18SyncVirtualMachineMemory\x12\x1b.kubevirt.cmd.v1.VMIRequest\x1a\x19.kubevirt.cmd.v1.Response\"\x00\x12O\n" + + "\n" + + "GetSEVInfo\x12\x1d.kubevirt.cmd.v1.EmptyRequest\x1a .kubevirt.cmd.v1.SEVInfoResponse\"\x00\x12a\n" + + "\x14GetLaunchMeasurement\x12\x1b.kubevirt.cmd.v1.VMIRequest\x1a*.kubevirt.cmd.v1.LaunchMeasurementResponse\"\x00\x12]\n" + + "\x12InjectLaunchSecret\x12*.kubevirt.cmd.v1.InjectLaunchSecretRequest\x1a\x19.kubevirt.cmd.v1.Response\"\x00\x12^\n" + + "\x15GetAppliedVMIChecksum\x12\x1d.kubevirt.cmd.v1.EmptyRequest\x1a$.kubevirt.cmd.v1.VMIChecksumResponse\"\x00\x12S\n" + + "\x0eMigrationProxy\x12&.kubevirt.cmd.v1.MigrationProxyRequest\x1a\x19.kubevirt.cmd.v1.ResponseB*Z(virt-launcher-plug/pkg/api/generated/cmdb\x06proto3" + +var ( + file_proto_cmd_proto_rawDescOnce sync.Once + file_proto_cmd_proto_rawDescData []byte +) + +func file_proto_cmd_proto_rawDescGZIP() []byte { + file_proto_cmd_proto_rawDescOnce.Do(func() { + file_proto_cmd_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proto_cmd_proto_rawDesc), len(file_proto_cmd_proto_rawDesc))) + }) + return file_proto_cmd_proto_rawDescData +} + +var file_proto_cmd_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_proto_cmd_proto_msgTypes = make([]protoimpl.MessageInfo, 36) +var file_proto_cmd_proto_goTypes = []any{ + (MigrationProxyAction)(0), // 0: kubevirt.cmd.v1.MigrationProxyAction + (*QemuVersionResponse)(nil), // 1: kubevirt.cmd.v1.QemuVersionResponse + (*VMI)(nil), // 2: kubevirt.cmd.v1.VMI + (*CPU)(nil), // 3: kubevirt.cmd.v1.CPU + (*Sibling)(nil), // 4: kubevirt.cmd.v1.Sibling + (*Pages)(nil), // 5: kubevirt.cmd.v1.Pages + (*Memory)(nil), // 6: kubevirt.cmd.v1.Memory + (*Cell)(nil), // 7: kubevirt.cmd.v1.Cell + (*Topology)(nil), // 8: kubevirt.cmd.v1.Topology + (*SMBios)(nil), // 9: kubevirt.cmd.v1.SMBios + (*DiskInfo)(nil), // 10: kubevirt.cmd.v1.DiskInfo + (*ClusterConfig)(nil), // 11: kubevirt.cmd.v1.ClusterConfig + (*InterfaceBindingMigration)(nil), // 12: kubevirt.cmd.v1.InterfaceBindingMigration + (*VirtualMachineOptions)(nil), // 13: kubevirt.cmd.v1.VirtualMachineOptions + (*VMIRequest)(nil), // 14: kubevirt.cmd.v1.VMIRequest + (*MigrationRequest)(nil), // 15: kubevirt.cmd.v1.MigrationRequest + (*ExecRequest)(nil), // 16: kubevirt.cmd.v1.ExecRequest + (*EmptyRequest)(nil), // 17: kubevirt.cmd.v1.EmptyRequest + (*Response)(nil), // 18: kubevirt.cmd.v1.Response + (*DomainResponse)(nil), // 19: kubevirt.cmd.v1.DomainResponse + (*DomainStatsResponse)(nil), // 20: kubevirt.cmd.v1.DomainStatsResponse + (*GuestInfoResponse)(nil), // 21: kubevirt.cmd.v1.GuestInfoResponse + (*GuestUserListResponse)(nil), // 22: kubevirt.cmd.v1.GuestUserListResponse + (*GuestFilesystemsResponse)(nil), // 23: kubevirt.cmd.v1.GuestFilesystemsResponse + (*ExecResponse)(nil), // 24: kubevirt.cmd.v1.ExecResponse + (*GuestPingRequest)(nil), // 25: kubevirt.cmd.v1.GuestPingRequest + (*GuestPingResponse)(nil), // 26: kubevirt.cmd.v1.GuestPingResponse + (*FreezeRequest)(nil), // 27: kubevirt.cmd.v1.FreezeRequest + (*MemoryDumpRequest)(nil), // 28: kubevirt.cmd.v1.MemoryDumpRequest + (*SEVInfoResponse)(nil), // 29: kubevirt.cmd.v1.SEVInfoResponse + (*LaunchMeasurementResponse)(nil), // 30: kubevirt.cmd.v1.LaunchMeasurementResponse + (*InjectLaunchSecretRequest)(nil), // 31: kubevirt.cmd.v1.InjectLaunchSecretRequest + (*VMIChecksumResponse)(nil), // 32: kubevirt.cmd.v1.VMIChecksumResponse + (*MigrationProxyRequest)(nil), // 33: kubevirt.cmd.v1.MigrationProxyRequest + nil, // 34: kubevirt.cmd.v1.VirtualMachineOptions.DisksInfoEntry + nil, // 35: kubevirt.cmd.v1.VirtualMachineOptions.InterfaceDomainAttachmentEntry + nil, // 36: kubevirt.cmd.v1.VirtualMachineOptions.InterfaceMigrationEntry +} +var file_proto_cmd_proto_depIdxs = []int32{ + 18, // 0: kubevirt.cmd.v1.QemuVersionResponse.response:type_name -> kubevirt.cmd.v1.Response + 6, // 1: kubevirt.cmd.v1.Cell.memory:type_name -> kubevirt.cmd.v1.Memory + 5, // 2: kubevirt.cmd.v1.Cell.pages:type_name -> kubevirt.cmd.v1.Pages + 4, // 3: kubevirt.cmd.v1.Cell.distances:type_name -> kubevirt.cmd.v1.Sibling + 3, // 4: kubevirt.cmd.v1.Cell.cpus:type_name -> kubevirt.cmd.v1.CPU + 7, // 5: kubevirt.cmd.v1.Topology.numa_cells:type_name -> kubevirt.cmd.v1.Cell + 9, // 6: kubevirt.cmd.v1.VirtualMachineOptions.VirtualMachineSMBios:type_name -> kubevirt.cmd.v1.SMBios + 8, // 7: kubevirt.cmd.v1.VirtualMachineOptions.topology:type_name -> kubevirt.cmd.v1.Topology + 34, // 8: kubevirt.cmd.v1.VirtualMachineOptions.DisksInfo:type_name -> kubevirt.cmd.v1.VirtualMachineOptions.DisksInfoEntry + 11, // 9: kubevirt.cmd.v1.VirtualMachineOptions.clusterConfig:type_name -> kubevirt.cmd.v1.ClusterConfig + 35, // 10: kubevirt.cmd.v1.VirtualMachineOptions.interfaceDomainAttachment:type_name -> kubevirt.cmd.v1.VirtualMachineOptions.InterfaceDomainAttachmentEntry + 36, // 11: kubevirt.cmd.v1.VirtualMachineOptions.interfaceMigration:type_name -> kubevirt.cmd.v1.VirtualMachineOptions.InterfaceMigrationEntry + 2, // 12: kubevirt.cmd.v1.VMIRequest.vmi:type_name -> kubevirt.cmd.v1.VMI + 13, // 13: kubevirt.cmd.v1.VMIRequest.options:type_name -> kubevirt.cmd.v1.VirtualMachineOptions + 2, // 14: kubevirt.cmd.v1.MigrationRequest.vmi:type_name -> kubevirt.cmd.v1.VMI + 18, // 15: kubevirt.cmd.v1.DomainResponse.response:type_name -> kubevirt.cmd.v1.Response + 18, // 16: kubevirt.cmd.v1.DomainStatsResponse.response:type_name -> kubevirt.cmd.v1.Response + 18, // 17: kubevirt.cmd.v1.GuestInfoResponse.response:type_name -> kubevirt.cmd.v1.Response + 18, // 18: kubevirt.cmd.v1.GuestUserListResponse.response:type_name -> kubevirt.cmd.v1.Response + 18, // 19: kubevirt.cmd.v1.GuestFilesystemsResponse.response:type_name -> kubevirt.cmd.v1.Response + 18, // 20: kubevirt.cmd.v1.ExecResponse.response:type_name -> kubevirt.cmd.v1.Response + 18, // 21: kubevirt.cmd.v1.GuestPingResponse.response:type_name -> kubevirt.cmd.v1.Response + 2, // 22: kubevirt.cmd.v1.FreezeRequest.vmi:type_name -> kubevirt.cmd.v1.VMI + 2, // 23: kubevirt.cmd.v1.MemoryDumpRequest.vmi:type_name -> kubevirt.cmd.v1.VMI + 18, // 24: kubevirt.cmd.v1.SEVInfoResponse.response:type_name -> kubevirt.cmd.v1.Response + 18, // 25: kubevirt.cmd.v1.LaunchMeasurementResponse.response:type_name -> kubevirt.cmd.v1.Response + 2, // 26: kubevirt.cmd.v1.InjectLaunchSecretRequest.vmi:type_name -> kubevirt.cmd.v1.VMI + 18, // 27: kubevirt.cmd.v1.VMIChecksumResponse.response:type_name -> kubevirt.cmd.v1.Response + 0, // 28: kubevirt.cmd.v1.MigrationProxyRequest.action:type_name -> kubevirt.cmd.v1.MigrationProxyAction + 10, // 29: kubevirt.cmd.v1.VirtualMachineOptions.DisksInfoEntry.value:type_name -> kubevirt.cmd.v1.DiskInfo + 12, // 30: kubevirt.cmd.v1.VirtualMachineOptions.InterfaceMigrationEntry.value:type_name -> kubevirt.cmd.v1.InterfaceBindingMigration + 14, // 31: kubevirt.cmd.v1.Cmd.SyncVirtualMachine:input_type -> kubevirt.cmd.v1.VMIRequest + 14, // 32: kubevirt.cmd.v1.Cmd.PauseVirtualMachine:input_type -> kubevirt.cmd.v1.VMIRequest + 14, // 33: kubevirt.cmd.v1.Cmd.UnpauseVirtualMachine:input_type -> kubevirt.cmd.v1.VMIRequest + 27, // 34: kubevirt.cmd.v1.Cmd.FreezeVirtualMachine:input_type -> kubevirt.cmd.v1.FreezeRequest + 14, // 35: kubevirt.cmd.v1.Cmd.UnfreezeVirtualMachine:input_type -> kubevirt.cmd.v1.VMIRequest + 14, // 36: kubevirt.cmd.v1.Cmd.SoftRebootVirtualMachine:input_type -> kubevirt.cmd.v1.VMIRequest + 14, // 37: kubevirt.cmd.v1.Cmd.ShutdownVirtualMachine:input_type -> kubevirt.cmd.v1.VMIRequest + 14, // 38: kubevirt.cmd.v1.Cmd.KillVirtualMachine:input_type -> kubevirt.cmd.v1.VMIRequest + 14, // 39: kubevirt.cmd.v1.Cmd.DeleteVirtualMachine:input_type -> kubevirt.cmd.v1.VMIRequest + 15, // 40: kubevirt.cmd.v1.Cmd.MigrateVirtualMachine:input_type -> kubevirt.cmd.v1.MigrationRequest + 14, // 41: kubevirt.cmd.v1.Cmd.SyncMigrationTarget:input_type -> kubevirt.cmd.v1.VMIRequest + 14, // 42: kubevirt.cmd.v1.Cmd.CancelVirtualMachineMigration:input_type -> kubevirt.cmd.v1.VMIRequest + 14, // 43: kubevirt.cmd.v1.Cmd.SignalTargetPodCleanup:input_type -> kubevirt.cmd.v1.VMIRequest + 14, // 44: kubevirt.cmd.v1.Cmd.FinalizeVirtualMachineMigration:input_type -> kubevirt.cmd.v1.VMIRequest + 14, // 45: kubevirt.cmd.v1.Cmd.HotplugHostDevices:input_type -> kubevirt.cmd.v1.VMIRequest + 17, // 46: kubevirt.cmd.v1.Cmd.GetDomain:input_type -> kubevirt.cmd.v1.EmptyRequest + 17, // 47: kubevirt.cmd.v1.Cmd.GetDomainStats:input_type -> kubevirt.cmd.v1.EmptyRequest + 17, // 48: kubevirt.cmd.v1.Cmd.GetGuestInfo:input_type -> kubevirt.cmd.v1.EmptyRequest + 17, // 49: kubevirt.cmd.v1.Cmd.GetUsers:input_type -> kubevirt.cmd.v1.EmptyRequest + 17, // 50: kubevirt.cmd.v1.Cmd.GetFilesystems:input_type -> kubevirt.cmd.v1.EmptyRequest + 17, // 51: kubevirt.cmd.v1.Cmd.Ping:input_type -> kubevirt.cmd.v1.EmptyRequest + 16, // 52: kubevirt.cmd.v1.Cmd.Exec:input_type -> kubevirt.cmd.v1.ExecRequest + 25, // 53: kubevirt.cmd.v1.Cmd.GuestPing:input_type -> kubevirt.cmd.v1.GuestPingRequest + 28, // 54: kubevirt.cmd.v1.Cmd.VirtualMachineMemoryDump:input_type -> kubevirt.cmd.v1.MemoryDumpRequest + 17, // 55: kubevirt.cmd.v1.Cmd.GetQemuVersion:input_type -> kubevirt.cmd.v1.EmptyRequest + 14, // 56: kubevirt.cmd.v1.Cmd.SyncVirtualMachineCPUs:input_type -> kubevirt.cmd.v1.VMIRequest + 14, // 57: kubevirt.cmd.v1.Cmd.SyncVirtualMachineMemory:input_type -> kubevirt.cmd.v1.VMIRequest + 17, // 58: kubevirt.cmd.v1.Cmd.GetSEVInfo:input_type -> kubevirt.cmd.v1.EmptyRequest + 14, // 59: kubevirt.cmd.v1.Cmd.GetLaunchMeasurement:input_type -> kubevirt.cmd.v1.VMIRequest + 31, // 60: kubevirt.cmd.v1.Cmd.InjectLaunchSecret:input_type -> kubevirt.cmd.v1.InjectLaunchSecretRequest + 17, // 61: kubevirt.cmd.v1.Cmd.GetAppliedVMIChecksum:input_type -> kubevirt.cmd.v1.EmptyRequest + 33, // 62: kubevirt.cmd.v1.Cmd.MigrationProxy:input_type -> kubevirt.cmd.v1.MigrationProxyRequest + 18, // 63: kubevirt.cmd.v1.Cmd.SyncVirtualMachine:output_type -> kubevirt.cmd.v1.Response + 18, // 64: kubevirt.cmd.v1.Cmd.PauseVirtualMachine:output_type -> kubevirt.cmd.v1.Response + 18, // 65: kubevirt.cmd.v1.Cmd.UnpauseVirtualMachine:output_type -> kubevirt.cmd.v1.Response + 18, // 66: kubevirt.cmd.v1.Cmd.FreezeVirtualMachine:output_type -> kubevirt.cmd.v1.Response + 18, // 67: kubevirt.cmd.v1.Cmd.UnfreezeVirtualMachine:output_type -> kubevirt.cmd.v1.Response + 18, // 68: kubevirt.cmd.v1.Cmd.SoftRebootVirtualMachine:output_type -> kubevirt.cmd.v1.Response + 18, // 69: kubevirt.cmd.v1.Cmd.ShutdownVirtualMachine:output_type -> kubevirt.cmd.v1.Response + 18, // 70: kubevirt.cmd.v1.Cmd.KillVirtualMachine:output_type -> kubevirt.cmd.v1.Response + 18, // 71: kubevirt.cmd.v1.Cmd.DeleteVirtualMachine:output_type -> kubevirt.cmd.v1.Response + 18, // 72: kubevirt.cmd.v1.Cmd.MigrateVirtualMachine:output_type -> kubevirt.cmd.v1.Response + 18, // 73: kubevirt.cmd.v1.Cmd.SyncMigrationTarget:output_type -> kubevirt.cmd.v1.Response + 18, // 74: kubevirt.cmd.v1.Cmd.CancelVirtualMachineMigration:output_type -> kubevirt.cmd.v1.Response + 18, // 75: kubevirt.cmd.v1.Cmd.SignalTargetPodCleanup:output_type -> kubevirt.cmd.v1.Response + 18, // 76: kubevirt.cmd.v1.Cmd.FinalizeVirtualMachineMigration:output_type -> kubevirt.cmd.v1.Response + 18, // 77: kubevirt.cmd.v1.Cmd.HotplugHostDevices:output_type -> kubevirt.cmd.v1.Response + 19, // 78: kubevirt.cmd.v1.Cmd.GetDomain:output_type -> kubevirt.cmd.v1.DomainResponse + 20, // 79: kubevirt.cmd.v1.Cmd.GetDomainStats:output_type -> kubevirt.cmd.v1.DomainStatsResponse + 21, // 80: kubevirt.cmd.v1.Cmd.GetGuestInfo:output_type -> kubevirt.cmd.v1.GuestInfoResponse + 22, // 81: kubevirt.cmd.v1.Cmd.GetUsers:output_type -> kubevirt.cmd.v1.GuestUserListResponse + 23, // 82: kubevirt.cmd.v1.Cmd.GetFilesystems:output_type -> kubevirt.cmd.v1.GuestFilesystemsResponse + 18, // 83: kubevirt.cmd.v1.Cmd.Ping:output_type -> kubevirt.cmd.v1.Response + 24, // 84: kubevirt.cmd.v1.Cmd.Exec:output_type -> kubevirt.cmd.v1.ExecResponse + 26, // 85: kubevirt.cmd.v1.Cmd.GuestPing:output_type -> kubevirt.cmd.v1.GuestPingResponse + 18, // 86: kubevirt.cmd.v1.Cmd.VirtualMachineMemoryDump:output_type -> kubevirt.cmd.v1.Response + 1, // 87: kubevirt.cmd.v1.Cmd.GetQemuVersion:output_type -> kubevirt.cmd.v1.QemuVersionResponse + 18, // 88: kubevirt.cmd.v1.Cmd.SyncVirtualMachineCPUs:output_type -> kubevirt.cmd.v1.Response + 18, // 89: kubevirt.cmd.v1.Cmd.SyncVirtualMachineMemory:output_type -> kubevirt.cmd.v1.Response + 29, // 90: kubevirt.cmd.v1.Cmd.GetSEVInfo:output_type -> kubevirt.cmd.v1.SEVInfoResponse + 30, // 91: kubevirt.cmd.v1.Cmd.GetLaunchMeasurement:output_type -> kubevirt.cmd.v1.LaunchMeasurementResponse + 18, // 92: kubevirt.cmd.v1.Cmd.InjectLaunchSecret:output_type -> kubevirt.cmd.v1.Response + 32, // 93: kubevirt.cmd.v1.Cmd.GetAppliedVMIChecksum:output_type -> kubevirt.cmd.v1.VMIChecksumResponse + 18, // 94: kubevirt.cmd.v1.Cmd.MigrationProxy:output_type -> kubevirt.cmd.v1.Response + 63, // [63:95] is the sub-list for method output_type + 31, // [31:63] is the sub-list for method input_type + 31, // [31:31] is the sub-list for extension type_name + 31, // [31:31] is the sub-list for extension extendee + 0, // [0:31] is the sub-list for field type_name +} + +func init() { file_proto_cmd_proto_init() } +func file_proto_cmd_proto_init() { + if File_proto_cmd_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_cmd_proto_rawDesc), len(file_proto_cmd_proto_rawDesc)), + NumEnums: 1, + NumMessages: 36, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_cmd_proto_goTypes, + DependencyIndexes: file_proto_cmd_proto_depIdxs, + EnumInfos: file_proto_cmd_proto_enumTypes, + MessageInfos: file_proto_cmd_proto_msgTypes, + }.Build() + File_proto_cmd_proto = out.File + file_proto_cmd_proto_goTypes = nil + file_proto_cmd_proto_depIdxs = nil +} diff --git a/images/virt-launcher/vlctl/pkg/api/generated/cmd/proto/cmd_grpc.pb.go b/images/virt-launcher/vlctl/pkg/api/generated/cmd/proto/cmd_grpc.pb.go new file mode 100644 index 0000000000..5670425c57 --- /dev/null +++ b/images/virt-launcher/vlctl/pkg/api/generated/cmd/proto/cmd_grpc.pb.go @@ -0,0 +1,1299 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.33.1 +// source: proto/cmd.proto + +package cmd + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Cmd_SyncVirtualMachine_FullMethodName = "/kubevirt.cmd.v1.Cmd/SyncVirtualMachine" + Cmd_PauseVirtualMachine_FullMethodName = "/kubevirt.cmd.v1.Cmd/PauseVirtualMachine" + Cmd_UnpauseVirtualMachine_FullMethodName = "/kubevirt.cmd.v1.Cmd/UnpauseVirtualMachine" + Cmd_FreezeVirtualMachine_FullMethodName = "/kubevirt.cmd.v1.Cmd/FreezeVirtualMachine" + Cmd_UnfreezeVirtualMachine_FullMethodName = "/kubevirt.cmd.v1.Cmd/UnfreezeVirtualMachine" + Cmd_SoftRebootVirtualMachine_FullMethodName = "/kubevirt.cmd.v1.Cmd/SoftRebootVirtualMachine" + Cmd_ShutdownVirtualMachine_FullMethodName = "/kubevirt.cmd.v1.Cmd/ShutdownVirtualMachine" + Cmd_KillVirtualMachine_FullMethodName = "/kubevirt.cmd.v1.Cmd/KillVirtualMachine" + Cmd_DeleteVirtualMachine_FullMethodName = "/kubevirt.cmd.v1.Cmd/DeleteVirtualMachine" + Cmd_MigrateVirtualMachine_FullMethodName = "/kubevirt.cmd.v1.Cmd/MigrateVirtualMachine" + Cmd_SyncMigrationTarget_FullMethodName = "/kubevirt.cmd.v1.Cmd/SyncMigrationTarget" + Cmd_CancelVirtualMachineMigration_FullMethodName = "/kubevirt.cmd.v1.Cmd/CancelVirtualMachineMigration" + Cmd_SignalTargetPodCleanup_FullMethodName = "/kubevirt.cmd.v1.Cmd/SignalTargetPodCleanup" + Cmd_FinalizeVirtualMachineMigration_FullMethodName = "/kubevirt.cmd.v1.Cmd/FinalizeVirtualMachineMigration" + Cmd_HotplugHostDevices_FullMethodName = "/kubevirt.cmd.v1.Cmd/HotplugHostDevices" + Cmd_GetDomain_FullMethodName = "/kubevirt.cmd.v1.Cmd/GetDomain" + Cmd_GetDomainStats_FullMethodName = "/kubevirt.cmd.v1.Cmd/GetDomainStats" + Cmd_GetGuestInfo_FullMethodName = "/kubevirt.cmd.v1.Cmd/GetGuestInfo" + Cmd_GetUsers_FullMethodName = "/kubevirt.cmd.v1.Cmd/GetUsers" + Cmd_GetFilesystems_FullMethodName = "/kubevirt.cmd.v1.Cmd/GetFilesystems" + Cmd_Ping_FullMethodName = "/kubevirt.cmd.v1.Cmd/Ping" + Cmd_Exec_FullMethodName = "/kubevirt.cmd.v1.Cmd/Exec" + Cmd_GuestPing_FullMethodName = "/kubevirt.cmd.v1.Cmd/GuestPing" + Cmd_VirtualMachineMemoryDump_FullMethodName = "/kubevirt.cmd.v1.Cmd/VirtualMachineMemoryDump" + Cmd_GetQemuVersion_FullMethodName = "/kubevirt.cmd.v1.Cmd/GetQemuVersion" + Cmd_SyncVirtualMachineCPUs_FullMethodName = "/kubevirt.cmd.v1.Cmd/SyncVirtualMachineCPUs" + Cmd_SyncVirtualMachineMemory_FullMethodName = "/kubevirt.cmd.v1.Cmd/SyncVirtualMachineMemory" + Cmd_GetSEVInfo_FullMethodName = "/kubevirt.cmd.v1.Cmd/GetSEVInfo" + Cmd_GetLaunchMeasurement_FullMethodName = "/kubevirt.cmd.v1.Cmd/GetLaunchMeasurement" + Cmd_InjectLaunchSecret_FullMethodName = "/kubevirt.cmd.v1.Cmd/InjectLaunchSecret" + Cmd_GetAppliedVMIChecksum_FullMethodName = "/kubevirt.cmd.v1.Cmd/GetAppliedVMIChecksum" + Cmd_MigrationProxy_FullMethodName = "/kubevirt.cmd.v1.Cmd/MigrationProxy" +) + +// CmdClient is the client API for Cmd service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type CmdClient interface { + SyncVirtualMachine(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) + PauseVirtualMachine(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) + UnpauseVirtualMachine(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) + FreezeVirtualMachine(ctx context.Context, in *FreezeRequest, opts ...grpc.CallOption) (*Response, error) + UnfreezeVirtualMachine(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) + SoftRebootVirtualMachine(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) + ShutdownVirtualMachine(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) + KillVirtualMachine(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) + DeleteVirtualMachine(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) + MigrateVirtualMachine(ctx context.Context, in *MigrationRequest, opts ...grpc.CallOption) (*Response, error) + SyncMigrationTarget(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) + CancelVirtualMachineMigration(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) + SignalTargetPodCleanup(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) + FinalizeVirtualMachineMigration(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) + HotplugHostDevices(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) + GetDomain(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*DomainResponse, error) + GetDomainStats(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*DomainStatsResponse, error) + GetGuestInfo(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*GuestInfoResponse, error) + GetUsers(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*GuestUserListResponse, error) + GetFilesystems(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*GuestFilesystemsResponse, error) + Ping(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*Response, error) + Exec(ctx context.Context, in *ExecRequest, opts ...grpc.CallOption) (*ExecResponse, error) + GuestPing(ctx context.Context, in *GuestPingRequest, opts ...grpc.CallOption) (*GuestPingResponse, error) + VirtualMachineMemoryDump(ctx context.Context, in *MemoryDumpRequest, opts ...grpc.CallOption) (*Response, error) + GetQemuVersion(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*QemuVersionResponse, error) + SyncVirtualMachineCPUs(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) + SyncVirtualMachineMemory(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) + GetSEVInfo(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*SEVInfoResponse, error) + GetLaunchMeasurement(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*LaunchMeasurementResponse, error) + InjectLaunchSecret(ctx context.Context, in *InjectLaunchSecretRequest, opts ...grpc.CallOption) (*Response, error) + GetAppliedVMIChecksum(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*VMIChecksumResponse, error) + MigrationProxy(ctx context.Context, in *MigrationProxyRequest, opts ...grpc.CallOption) (*Response, error) +} + +type cmdClient struct { + cc grpc.ClientConnInterface +} + +func NewCmdClient(cc grpc.ClientConnInterface) CmdClient { + return &cmdClient{cc} +} + +func (c *cmdClient) SyncVirtualMachine(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Cmd_SyncVirtualMachine_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) PauseVirtualMachine(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Cmd_PauseVirtualMachine_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) UnpauseVirtualMachine(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Cmd_UnpauseVirtualMachine_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) FreezeVirtualMachine(ctx context.Context, in *FreezeRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Cmd_FreezeVirtualMachine_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) UnfreezeVirtualMachine(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Cmd_UnfreezeVirtualMachine_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) SoftRebootVirtualMachine(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Cmd_SoftRebootVirtualMachine_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) ShutdownVirtualMachine(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Cmd_ShutdownVirtualMachine_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) KillVirtualMachine(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Cmd_KillVirtualMachine_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) DeleteVirtualMachine(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Cmd_DeleteVirtualMachine_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) MigrateVirtualMachine(ctx context.Context, in *MigrationRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Cmd_MigrateVirtualMachine_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) SyncMigrationTarget(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Cmd_SyncMigrationTarget_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) CancelVirtualMachineMigration(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Cmd_CancelVirtualMachineMigration_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) SignalTargetPodCleanup(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Cmd_SignalTargetPodCleanup_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) FinalizeVirtualMachineMigration(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Cmd_FinalizeVirtualMachineMigration_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) HotplugHostDevices(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Cmd_HotplugHostDevices_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) GetDomain(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*DomainResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DomainResponse) + err := c.cc.Invoke(ctx, Cmd_GetDomain_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) GetDomainStats(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*DomainStatsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DomainStatsResponse) + err := c.cc.Invoke(ctx, Cmd_GetDomainStats_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) GetGuestInfo(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*GuestInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GuestInfoResponse) + err := c.cc.Invoke(ctx, Cmd_GetGuestInfo_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) GetUsers(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*GuestUserListResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GuestUserListResponse) + err := c.cc.Invoke(ctx, Cmd_GetUsers_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) GetFilesystems(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*GuestFilesystemsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GuestFilesystemsResponse) + err := c.cc.Invoke(ctx, Cmd_GetFilesystems_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) Ping(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Cmd_Ping_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) Exec(ctx context.Context, in *ExecRequest, opts ...grpc.CallOption) (*ExecResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ExecResponse) + err := c.cc.Invoke(ctx, Cmd_Exec_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) GuestPing(ctx context.Context, in *GuestPingRequest, opts ...grpc.CallOption) (*GuestPingResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GuestPingResponse) + err := c.cc.Invoke(ctx, Cmd_GuestPing_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) VirtualMachineMemoryDump(ctx context.Context, in *MemoryDumpRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Cmd_VirtualMachineMemoryDump_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) GetQemuVersion(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*QemuVersionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QemuVersionResponse) + err := c.cc.Invoke(ctx, Cmd_GetQemuVersion_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) SyncVirtualMachineCPUs(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Cmd_SyncVirtualMachineCPUs_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) SyncVirtualMachineMemory(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Cmd_SyncVirtualMachineMemory_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) GetSEVInfo(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*SEVInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SEVInfoResponse) + err := c.cc.Invoke(ctx, Cmd_GetSEVInfo_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) GetLaunchMeasurement(ctx context.Context, in *VMIRequest, opts ...grpc.CallOption) (*LaunchMeasurementResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(LaunchMeasurementResponse) + err := c.cc.Invoke(ctx, Cmd_GetLaunchMeasurement_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) InjectLaunchSecret(ctx context.Context, in *InjectLaunchSecretRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Cmd_InjectLaunchSecret_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) GetAppliedVMIChecksum(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*VMIChecksumResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(VMIChecksumResponse) + err := c.cc.Invoke(ctx, Cmd_GetAppliedVMIChecksum_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cmdClient) MigrationProxy(ctx context.Context, in *MigrationProxyRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Cmd_MigrationProxy_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CmdServer is the server API for Cmd service. +// All implementations must embed UnimplementedCmdServer +// for forward compatibility. +type CmdServer interface { + SyncVirtualMachine(context.Context, *VMIRequest) (*Response, error) + PauseVirtualMachine(context.Context, *VMIRequest) (*Response, error) + UnpauseVirtualMachine(context.Context, *VMIRequest) (*Response, error) + FreezeVirtualMachine(context.Context, *FreezeRequest) (*Response, error) + UnfreezeVirtualMachine(context.Context, *VMIRequest) (*Response, error) + SoftRebootVirtualMachine(context.Context, *VMIRequest) (*Response, error) + ShutdownVirtualMachine(context.Context, *VMIRequest) (*Response, error) + KillVirtualMachine(context.Context, *VMIRequest) (*Response, error) + DeleteVirtualMachine(context.Context, *VMIRequest) (*Response, error) + MigrateVirtualMachine(context.Context, *MigrationRequest) (*Response, error) + SyncMigrationTarget(context.Context, *VMIRequest) (*Response, error) + CancelVirtualMachineMigration(context.Context, *VMIRequest) (*Response, error) + SignalTargetPodCleanup(context.Context, *VMIRequest) (*Response, error) + FinalizeVirtualMachineMigration(context.Context, *VMIRequest) (*Response, error) + HotplugHostDevices(context.Context, *VMIRequest) (*Response, error) + GetDomain(context.Context, *EmptyRequest) (*DomainResponse, error) + GetDomainStats(context.Context, *EmptyRequest) (*DomainStatsResponse, error) + GetGuestInfo(context.Context, *EmptyRequest) (*GuestInfoResponse, error) + GetUsers(context.Context, *EmptyRequest) (*GuestUserListResponse, error) + GetFilesystems(context.Context, *EmptyRequest) (*GuestFilesystemsResponse, error) + Ping(context.Context, *EmptyRequest) (*Response, error) + Exec(context.Context, *ExecRequest) (*ExecResponse, error) + GuestPing(context.Context, *GuestPingRequest) (*GuestPingResponse, error) + VirtualMachineMemoryDump(context.Context, *MemoryDumpRequest) (*Response, error) + GetQemuVersion(context.Context, *EmptyRequest) (*QemuVersionResponse, error) + SyncVirtualMachineCPUs(context.Context, *VMIRequest) (*Response, error) + SyncVirtualMachineMemory(context.Context, *VMIRequest) (*Response, error) + GetSEVInfo(context.Context, *EmptyRequest) (*SEVInfoResponse, error) + GetLaunchMeasurement(context.Context, *VMIRequest) (*LaunchMeasurementResponse, error) + InjectLaunchSecret(context.Context, *InjectLaunchSecretRequest) (*Response, error) + GetAppliedVMIChecksum(context.Context, *EmptyRequest) (*VMIChecksumResponse, error) + MigrationProxy(context.Context, *MigrationProxyRequest) (*Response, error) + mustEmbedUnimplementedCmdServer() +} + +// UnimplementedCmdServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedCmdServer struct{} + +func (UnimplementedCmdServer) SyncVirtualMachine(context.Context, *VMIRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method SyncVirtualMachine not implemented") +} +func (UnimplementedCmdServer) PauseVirtualMachine(context.Context, *VMIRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method PauseVirtualMachine not implemented") +} +func (UnimplementedCmdServer) UnpauseVirtualMachine(context.Context, *VMIRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnpauseVirtualMachine not implemented") +} +func (UnimplementedCmdServer) FreezeVirtualMachine(context.Context, *FreezeRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method FreezeVirtualMachine not implemented") +} +func (UnimplementedCmdServer) UnfreezeVirtualMachine(context.Context, *VMIRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnfreezeVirtualMachine not implemented") +} +func (UnimplementedCmdServer) SoftRebootVirtualMachine(context.Context, *VMIRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method SoftRebootVirtualMachine not implemented") +} +func (UnimplementedCmdServer) ShutdownVirtualMachine(context.Context, *VMIRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method ShutdownVirtualMachine not implemented") +} +func (UnimplementedCmdServer) KillVirtualMachine(context.Context, *VMIRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method KillVirtualMachine not implemented") +} +func (UnimplementedCmdServer) DeleteVirtualMachine(context.Context, *VMIRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteVirtualMachine not implemented") +} +func (UnimplementedCmdServer) MigrateVirtualMachine(context.Context, *MigrationRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method MigrateVirtualMachine not implemented") +} +func (UnimplementedCmdServer) SyncMigrationTarget(context.Context, *VMIRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method SyncMigrationTarget not implemented") +} +func (UnimplementedCmdServer) CancelVirtualMachineMigration(context.Context, *VMIRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelVirtualMachineMigration not implemented") +} +func (UnimplementedCmdServer) SignalTargetPodCleanup(context.Context, *VMIRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method SignalTargetPodCleanup not implemented") +} +func (UnimplementedCmdServer) FinalizeVirtualMachineMigration(context.Context, *VMIRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method FinalizeVirtualMachineMigration not implemented") +} +func (UnimplementedCmdServer) HotplugHostDevices(context.Context, *VMIRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method HotplugHostDevices not implemented") +} +func (UnimplementedCmdServer) GetDomain(context.Context, *EmptyRequest) (*DomainResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDomain not implemented") +} +func (UnimplementedCmdServer) GetDomainStats(context.Context, *EmptyRequest) (*DomainStatsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDomainStats not implemented") +} +func (UnimplementedCmdServer) GetGuestInfo(context.Context, *EmptyRequest) (*GuestInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGuestInfo not implemented") +} +func (UnimplementedCmdServer) GetUsers(context.Context, *EmptyRequest) (*GuestUserListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUsers not implemented") +} +func (UnimplementedCmdServer) GetFilesystems(context.Context, *EmptyRequest) (*GuestFilesystemsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetFilesystems not implemented") +} +func (UnimplementedCmdServer) Ping(context.Context, *EmptyRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") +} +func (UnimplementedCmdServer) Exec(context.Context, *ExecRequest) (*ExecResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Exec not implemented") +} +func (UnimplementedCmdServer) GuestPing(context.Context, *GuestPingRequest) (*GuestPingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GuestPing not implemented") +} +func (UnimplementedCmdServer) VirtualMachineMemoryDump(context.Context, *MemoryDumpRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method VirtualMachineMemoryDump not implemented") +} +func (UnimplementedCmdServer) GetQemuVersion(context.Context, *EmptyRequest) (*QemuVersionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetQemuVersion not implemented") +} +func (UnimplementedCmdServer) SyncVirtualMachineCPUs(context.Context, *VMIRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method SyncVirtualMachineCPUs not implemented") +} +func (UnimplementedCmdServer) SyncVirtualMachineMemory(context.Context, *VMIRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method SyncVirtualMachineMemory not implemented") +} +func (UnimplementedCmdServer) GetSEVInfo(context.Context, *EmptyRequest) (*SEVInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSEVInfo not implemented") +} +func (UnimplementedCmdServer) GetLaunchMeasurement(context.Context, *VMIRequest) (*LaunchMeasurementResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLaunchMeasurement not implemented") +} +func (UnimplementedCmdServer) InjectLaunchSecret(context.Context, *InjectLaunchSecretRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method InjectLaunchSecret not implemented") +} +func (UnimplementedCmdServer) GetAppliedVMIChecksum(context.Context, *EmptyRequest) (*VMIChecksumResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAppliedVMIChecksum not implemented") +} +func (UnimplementedCmdServer) MigrationProxy(context.Context, *MigrationProxyRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method MigrationProxy not implemented") +} +func (UnimplementedCmdServer) mustEmbedUnimplementedCmdServer() {} +func (UnimplementedCmdServer) testEmbeddedByValue() {} + +// UnsafeCmdServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to CmdServer will +// result in compilation errors. +type UnsafeCmdServer interface { + mustEmbedUnimplementedCmdServer() +} + +func RegisterCmdServer(s grpc.ServiceRegistrar, srv CmdServer) { + // If the following call pancis, it indicates UnimplementedCmdServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Cmd_ServiceDesc, srv) +} + +func _Cmd_SyncVirtualMachine_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VMIRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).SyncVirtualMachine(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_SyncVirtualMachine_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).SyncVirtualMachine(ctx, req.(*VMIRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_PauseVirtualMachine_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VMIRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).PauseVirtualMachine(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_PauseVirtualMachine_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).PauseVirtualMachine(ctx, req.(*VMIRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_UnpauseVirtualMachine_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VMIRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).UnpauseVirtualMachine(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_UnpauseVirtualMachine_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).UnpauseVirtualMachine(ctx, req.(*VMIRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_FreezeVirtualMachine_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FreezeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).FreezeVirtualMachine(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_FreezeVirtualMachine_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).FreezeVirtualMachine(ctx, req.(*FreezeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_UnfreezeVirtualMachine_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VMIRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).UnfreezeVirtualMachine(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_UnfreezeVirtualMachine_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).UnfreezeVirtualMachine(ctx, req.(*VMIRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_SoftRebootVirtualMachine_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VMIRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).SoftRebootVirtualMachine(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_SoftRebootVirtualMachine_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).SoftRebootVirtualMachine(ctx, req.(*VMIRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_ShutdownVirtualMachine_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VMIRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).ShutdownVirtualMachine(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_ShutdownVirtualMachine_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).ShutdownVirtualMachine(ctx, req.(*VMIRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_KillVirtualMachine_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VMIRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).KillVirtualMachine(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_KillVirtualMachine_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).KillVirtualMachine(ctx, req.(*VMIRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_DeleteVirtualMachine_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VMIRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).DeleteVirtualMachine(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_DeleteVirtualMachine_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).DeleteVirtualMachine(ctx, req.(*VMIRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_MigrateVirtualMachine_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MigrationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).MigrateVirtualMachine(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_MigrateVirtualMachine_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).MigrateVirtualMachine(ctx, req.(*MigrationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_SyncMigrationTarget_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VMIRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).SyncMigrationTarget(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_SyncMigrationTarget_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).SyncMigrationTarget(ctx, req.(*VMIRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_CancelVirtualMachineMigration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VMIRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).CancelVirtualMachineMigration(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_CancelVirtualMachineMigration_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).CancelVirtualMachineMigration(ctx, req.(*VMIRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_SignalTargetPodCleanup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VMIRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).SignalTargetPodCleanup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_SignalTargetPodCleanup_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).SignalTargetPodCleanup(ctx, req.(*VMIRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_FinalizeVirtualMachineMigration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VMIRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).FinalizeVirtualMachineMigration(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_FinalizeVirtualMachineMigration_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).FinalizeVirtualMachineMigration(ctx, req.(*VMIRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_HotplugHostDevices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VMIRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).HotplugHostDevices(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_HotplugHostDevices_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).HotplugHostDevices(ctx, req.(*VMIRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_GetDomain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EmptyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).GetDomain(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_GetDomain_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).GetDomain(ctx, req.(*EmptyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_GetDomainStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EmptyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).GetDomainStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_GetDomainStats_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).GetDomainStats(ctx, req.(*EmptyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_GetGuestInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EmptyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).GetGuestInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_GetGuestInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).GetGuestInfo(ctx, req.(*EmptyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_GetUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EmptyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).GetUsers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_GetUsers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).GetUsers(ctx, req.(*EmptyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_GetFilesystems_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EmptyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).GetFilesystems(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_GetFilesystems_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).GetFilesystems(ctx, req.(*EmptyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EmptyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).Ping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_Ping_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).Ping(ctx, req.(*EmptyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_Exec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExecRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).Exec(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_Exec_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).Exec(ctx, req.(*ExecRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_GuestPing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GuestPingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).GuestPing(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_GuestPing_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).GuestPing(ctx, req.(*GuestPingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_VirtualMachineMemoryDump_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MemoryDumpRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).VirtualMachineMemoryDump(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_VirtualMachineMemoryDump_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).VirtualMachineMemoryDump(ctx, req.(*MemoryDumpRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_GetQemuVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EmptyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).GetQemuVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_GetQemuVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).GetQemuVersion(ctx, req.(*EmptyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_SyncVirtualMachineCPUs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VMIRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).SyncVirtualMachineCPUs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_SyncVirtualMachineCPUs_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).SyncVirtualMachineCPUs(ctx, req.(*VMIRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_SyncVirtualMachineMemory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VMIRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).SyncVirtualMachineMemory(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_SyncVirtualMachineMemory_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).SyncVirtualMachineMemory(ctx, req.(*VMIRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_GetSEVInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EmptyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).GetSEVInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_GetSEVInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).GetSEVInfo(ctx, req.(*EmptyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_GetLaunchMeasurement_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VMIRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).GetLaunchMeasurement(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_GetLaunchMeasurement_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).GetLaunchMeasurement(ctx, req.(*VMIRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_InjectLaunchSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InjectLaunchSecretRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).InjectLaunchSecret(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_InjectLaunchSecret_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).InjectLaunchSecret(ctx, req.(*InjectLaunchSecretRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_GetAppliedVMIChecksum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EmptyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).GetAppliedVMIChecksum(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_GetAppliedVMIChecksum_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).GetAppliedVMIChecksum(ctx, req.(*EmptyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cmd_MigrationProxy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MigrationProxyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdServer).MigrationProxy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cmd_MigrationProxy_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdServer).MigrationProxy(ctx, req.(*MigrationProxyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Cmd_ServiceDesc is the grpc.ServiceDesc for Cmd service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Cmd_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "kubevirt.cmd.v1.Cmd", + HandlerType: (*CmdServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SyncVirtualMachine", + Handler: _Cmd_SyncVirtualMachine_Handler, + }, + { + MethodName: "PauseVirtualMachine", + Handler: _Cmd_PauseVirtualMachine_Handler, + }, + { + MethodName: "UnpauseVirtualMachine", + Handler: _Cmd_UnpauseVirtualMachine_Handler, + }, + { + MethodName: "FreezeVirtualMachine", + Handler: _Cmd_FreezeVirtualMachine_Handler, + }, + { + MethodName: "UnfreezeVirtualMachine", + Handler: _Cmd_UnfreezeVirtualMachine_Handler, + }, + { + MethodName: "SoftRebootVirtualMachine", + Handler: _Cmd_SoftRebootVirtualMachine_Handler, + }, + { + MethodName: "ShutdownVirtualMachine", + Handler: _Cmd_ShutdownVirtualMachine_Handler, + }, + { + MethodName: "KillVirtualMachine", + Handler: _Cmd_KillVirtualMachine_Handler, + }, + { + MethodName: "DeleteVirtualMachine", + Handler: _Cmd_DeleteVirtualMachine_Handler, + }, + { + MethodName: "MigrateVirtualMachine", + Handler: _Cmd_MigrateVirtualMachine_Handler, + }, + { + MethodName: "SyncMigrationTarget", + Handler: _Cmd_SyncMigrationTarget_Handler, + }, + { + MethodName: "CancelVirtualMachineMigration", + Handler: _Cmd_CancelVirtualMachineMigration_Handler, + }, + { + MethodName: "SignalTargetPodCleanup", + Handler: _Cmd_SignalTargetPodCleanup_Handler, + }, + { + MethodName: "FinalizeVirtualMachineMigration", + Handler: _Cmd_FinalizeVirtualMachineMigration_Handler, + }, + { + MethodName: "HotplugHostDevices", + Handler: _Cmd_HotplugHostDevices_Handler, + }, + { + MethodName: "GetDomain", + Handler: _Cmd_GetDomain_Handler, + }, + { + MethodName: "GetDomainStats", + Handler: _Cmd_GetDomainStats_Handler, + }, + { + MethodName: "GetGuestInfo", + Handler: _Cmd_GetGuestInfo_Handler, + }, + { + MethodName: "GetUsers", + Handler: _Cmd_GetUsers_Handler, + }, + { + MethodName: "GetFilesystems", + Handler: _Cmd_GetFilesystems_Handler, + }, + { + MethodName: "Ping", + Handler: _Cmd_Ping_Handler, + }, + { + MethodName: "Exec", + Handler: _Cmd_Exec_Handler, + }, + { + MethodName: "GuestPing", + Handler: _Cmd_GuestPing_Handler, + }, + { + MethodName: "VirtualMachineMemoryDump", + Handler: _Cmd_VirtualMachineMemoryDump_Handler, + }, + { + MethodName: "GetQemuVersion", + Handler: _Cmd_GetQemuVersion_Handler, + }, + { + MethodName: "SyncVirtualMachineCPUs", + Handler: _Cmd_SyncVirtualMachineCPUs_Handler, + }, + { + MethodName: "SyncVirtualMachineMemory", + Handler: _Cmd_SyncVirtualMachineMemory_Handler, + }, + { + MethodName: "GetSEVInfo", + Handler: _Cmd_GetSEVInfo_Handler, + }, + { + MethodName: "GetLaunchMeasurement", + Handler: _Cmd_GetLaunchMeasurement_Handler, + }, + { + MethodName: "InjectLaunchSecret", + Handler: _Cmd_InjectLaunchSecret_Handler, + }, + { + MethodName: "GetAppliedVMIChecksum", + Handler: _Cmd_GetAppliedVMIChecksum_Handler, + }, + { + MethodName: "MigrationProxy", + Handler: _Cmd_MigrationProxy_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "proto/cmd.proto", +} diff --git a/images/virt-launcher/vlctl/pkg/api/generated/info/proto/info.pb.go b/images/virt-launcher/vlctl/pkg/api/generated/info/proto/info.pb.go new file mode 100644 index 0000000000..8b2a2dcf91 --- /dev/null +++ b/images/virt-launcher/vlctl/pkg/api/generated/info/proto/info.pb.go @@ -0,0 +1,164 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v6.33.1 +// source: proto/info.proto + +package info + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CmdInfoRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CmdInfoRequest) Reset() { + *x = CmdInfoRequest{} + mi := &file_proto_info_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CmdInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CmdInfoRequest) ProtoMessage() {} + +func (x *CmdInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_info_proto_msgTypes[0] + 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 CmdInfoRequest.ProtoReflect.Descriptor instead. +func (*CmdInfoRequest) Descriptor() ([]byte, []int) { + return file_proto_info_proto_rawDescGZIP(), []int{0} +} + +type CmdInfoResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + SupportedCmdVersions []uint32 `protobuf:"varint,1,rep,packed,name=supportedCmdVersions,proto3" json:"supportedCmdVersions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CmdInfoResponse) Reset() { + *x = CmdInfoResponse{} + mi := &file_proto_info_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CmdInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CmdInfoResponse) ProtoMessage() {} + +func (x *CmdInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_info_proto_msgTypes[1] + 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 CmdInfoResponse.ProtoReflect.Descriptor instead. +func (*CmdInfoResponse) Descriptor() ([]byte, []int) { + return file_proto_info_proto_rawDescGZIP(), []int{1} +} + +func (x *CmdInfoResponse) GetSupportedCmdVersions() []uint32 { + if x != nil { + return x.SupportedCmdVersions + } + return nil +} + +var File_proto_info_proto protoreflect.FileDescriptor + +const file_proto_info_proto_rawDesc = "" + + "\n" + + "\x10proto/info.proto\x12\x11kubevirt.cmd.info\"\x10\n" + + "\x0eCmdInfoRequest\"E\n" + + "\x0fCmdInfoResponse\x122\n" + + "\x14supportedCmdVersions\x18\x01 \x03(\rR\x14supportedCmdVersions2Z\n" + + "\aCmdInfo\x12O\n" + + "\x04Info\x12!.kubevirt.cmd.info.CmdInfoRequest\x1a\".kubevirt.cmd.info.CmdInfoResponse\"\x00B+Z)virt-launcher-plug/pkg/api/generated/infob\x06proto3" + +var ( + file_proto_info_proto_rawDescOnce sync.Once + file_proto_info_proto_rawDescData []byte +) + +func file_proto_info_proto_rawDescGZIP() []byte { + file_proto_info_proto_rawDescOnce.Do(func() { + file_proto_info_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proto_info_proto_rawDesc), len(file_proto_info_proto_rawDesc))) + }) + return file_proto_info_proto_rawDescData +} + +var file_proto_info_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_proto_info_proto_goTypes = []any{ + (*CmdInfoRequest)(nil), // 0: kubevirt.cmd.info.CmdInfoRequest + (*CmdInfoResponse)(nil), // 1: kubevirt.cmd.info.CmdInfoResponse +} +var file_proto_info_proto_depIdxs = []int32{ + 0, // 0: kubevirt.cmd.info.CmdInfo.Info:input_type -> kubevirt.cmd.info.CmdInfoRequest + 1, // 1: kubevirt.cmd.info.CmdInfo.Info:output_type -> kubevirt.cmd.info.CmdInfoResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_proto_info_proto_init() } +func file_proto_info_proto_init() { + if File_proto_info_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_info_proto_rawDesc), len(file_proto_info_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_info_proto_goTypes, + DependencyIndexes: file_proto_info_proto_depIdxs, + MessageInfos: file_proto_info_proto_msgTypes, + }.Build() + File_proto_info_proto = out.File + file_proto_info_proto_goTypes = nil + file_proto_info_proto_depIdxs = nil +} diff --git a/images/virt-launcher/vlctl/pkg/api/generated/info/proto/info_grpc.pb.go b/images/virt-launcher/vlctl/pkg/api/generated/info/proto/info_grpc.pb.go new file mode 100644 index 0000000000..e290b51053 --- /dev/null +++ b/images/virt-launcher/vlctl/pkg/api/generated/info/proto/info_grpc.pb.go @@ -0,0 +1,121 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.33.1 +// source: proto/info.proto + +package info + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + CmdInfo_Info_FullMethodName = "/kubevirt.cmd.info.CmdInfo/Info" +) + +// CmdInfoClient is the client API for CmdInfo service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type CmdInfoClient interface { + Info(ctx context.Context, in *CmdInfoRequest, opts ...grpc.CallOption) (*CmdInfoResponse, error) +} + +type cmdInfoClient struct { + cc grpc.ClientConnInterface +} + +func NewCmdInfoClient(cc grpc.ClientConnInterface) CmdInfoClient { + return &cmdInfoClient{cc} +} + +func (c *cmdInfoClient) Info(ctx context.Context, in *CmdInfoRequest, opts ...grpc.CallOption) (*CmdInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CmdInfoResponse) + err := c.cc.Invoke(ctx, CmdInfo_Info_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CmdInfoServer is the server API for CmdInfo service. +// All implementations must embed UnimplementedCmdInfoServer +// for forward compatibility. +type CmdInfoServer interface { + Info(context.Context, *CmdInfoRequest) (*CmdInfoResponse, error) + mustEmbedUnimplementedCmdInfoServer() +} + +// UnimplementedCmdInfoServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedCmdInfoServer struct{} + +func (UnimplementedCmdInfoServer) Info(context.Context, *CmdInfoRequest) (*CmdInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Info not implemented") +} +func (UnimplementedCmdInfoServer) mustEmbedUnimplementedCmdInfoServer() {} +func (UnimplementedCmdInfoServer) testEmbeddedByValue() {} + +// UnsafeCmdInfoServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to CmdInfoServer will +// result in compilation errors. +type UnsafeCmdInfoServer interface { + mustEmbedUnimplementedCmdInfoServer() +} + +func RegisterCmdInfoServer(s grpc.ServiceRegistrar, srv CmdInfoServer) { + // If the following call pancis, it indicates UnimplementedCmdInfoServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&CmdInfo_ServiceDesc, srv) +} + +func _CmdInfo_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CmdInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CmdInfoServer).Info(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CmdInfo_Info_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CmdInfoServer).Info(ctx, req.(*CmdInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// CmdInfo_ServiceDesc is the grpc.ServiceDesc for CmdInfo service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var CmdInfo_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "kubevirt.cmd.info.CmdInfo", + HandlerType: (*CmdInfoServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Info", + Handler: _CmdInfo_Info_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "proto/info.proto", +} diff --git a/images/virt-launcher/vlctl/pkg/api/generated/notify/proto/notify.pb.go b/images/virt-launcher/vlctl/pkg/api/generated/notify/proto/notify.pb.go new file mode 100644 index 0000000000..5203d4b6e1 --- /dev/null +++ b/images/virt-launcher/vlctl/pkg/api/generated/notify/proto/notify.pb.go @@ -0,0 +1,254 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v6.33.1 +// source: proto/notify.proto + +package notify + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type DomainEventRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + DomainJSON []byte `protobuf:"bytes,1,opt,name=domainJSON,proto3" json:"domainJSON,omitempty"` + StatusJSON []byte `protobuf:"bytes,2,opt,name=statusJSON,proto3" json:"statusJSON,omitempty"` + EventType string `protobuf:"bytes,3,opt,name=eventType,proto3" json:"eventType,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DomainEventRequest) Reset() { + *x = DomainEventRequest{} + mi := &file_proto_notify_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DomainEventRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DomainEventRequest) ProtoMessage() {} + +func (x *DomainEventRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_notify_proto_msgTypes[0] + 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 DomainEventRequest.ProtoReflect.Descriptor instead. +func (*DomainEventRequest) Descriptor() ([]byte, []int) { + return file_proto_notify_proto_rawDescGZIP(), []int{0} +} + +func (x *DomainEventRequest) GetDomainJSON() []byte { + if x != nil { + return x.DomainJSON + } + return nil +} + +func (x *DomainEventRequest) GetStatusJSON() []byte { + if x != nil { + return x.StatusJSON + } + return nil +} + +func (x *DomainEventRequest) GetEventType() string { + if x != nil { + return x.EventType + } + return "" +} + +type K8SEventRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + EventJSON []byte `protobuf:"bytes,1,opt,name=eventJSON,proto3" json:"eventJSON,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *K8SEventRequest) Reset() { + *x = K8SEventRequest{} + mi := &file_proto_notify_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *K8SEventRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*K8SEventRequest) ProtoMessage() {} + +func (x *K8SEventRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_notify_proto_msgTypes[1] + 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 K8SEventRequest.ProtoReflect.Descriptor instead. +func (*K8SEventRequest) Descriptor() ([]byte, []int) { + return file_proto_notify_proto_rawDescGZIP(), []int{1} +} + +func (x *K8SEventRequest) GetEventJSON() []byte { + if x != nil { + return x.EventJSON + } + return nil +} + +type Response struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Response) Reset() { + *x = Response{} + mi := &file_proto_notify_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Response) ProtoMessage() {} + +func (x *Response) ProtoReflect() protoreflect.Message { + mi := &file_proto_notify_proto_msgTypes[2] + 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 Response.ProtoReflect.Descriptor instead. +func (*Response) Descriptor() ([]byte, []int) { + return file_proto_notify_proto_rawDescGZIP(), []int{2} +} + +func (x *Response) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *Response) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +var File_proto_notify_proto protoreflect.FileDescriptor + +const file_proto_notify_proto_rawDesc = "" + + "\n" + + "\x12proto/notify.proto\x12\x12kubevirt.notify.v1\"r\n" + + "\x12DomainEventRequest\x12\x1e\n" + + "\n" + + "domainJSON\x18\x01 \x01(\fR\n" + + "domainJSON\x12\x1e\n" + + "\n" + + "statusJSON\x18\x02 \x01(\fR\n" + + "statusJSON\x12\x1c\n" + + "\teventType\x18\x03 \x01(\tR\teventType\"/\n" + + "\x0fK8sEventRequest\x12\x1c\n" + + "\teventJSON\x18\x01 \x01(\fR\teventJSON\">\n" + + "\bResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" + + "\amessage\x18\x02 \x01(\tR\amessage2\xbc\x01\n" + + "\x06Notify\x12[\n" + + "\x11HandleDomainEvent\x12&.kubevirt.notify.v1.DomainEventRequest\x1a\x1c.kubevirt.notify.v1.Response\"\x00\x12U\n" + + "\x0eHandleK8sEvent\x12#.kubevirt.notify.v1.K8sEventRequest\x1a\x1c.kubevirt.notify.v1.Response\"\x00B-Z+virt-launcher-plug/pkg/api/generated/notifyb\x06proto3" + +var ( + file_proto_notify_proto_rawDescOnce sync.Once + file_proto_notify_proto_rawDescData []byte +) + +func file_proto_notify_proto_rawDescGZIP() []byte { + file_proto_notify_proto_rawDescOnce.Do(func() { + file_proto_notify_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proto_notify_proto_rawDesc), len(file_proto_notify_proto_rawDesc))) + }) + return file_proto_notify_proto_rawDescData +} + +var file_proto_notify_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_proto_notify_proto_goTypes = []any{ + (*DomainEventRequest)(nil), // 0: kubevirt.notify.v1.DomainEventRequest + (*K8SEventRequest)(nil), // 1: kubevirt.notify.v1.K8sEventRequest + (*Response)(nil), // 2: kubevirt.notify.v1.Response +} +var file_proto_notify_proto_depIdxs = []int32{ + 0, // 0: kubevirt.notify.v1.Notify.HandleDomainEvent:input_type -> kubevirt.notify.v1.DomainEventRequest + 1, // 1: kubevirt.notify.v1.Notify.HandleK8sEvent:input_type -> kubevirt.notify.v1.K8sEventRequest + 2, // 2: kubevirt.notify.v1.Notify.HandleDomainEvent:output_type -> kubevirt.notify.v1.Response + 2, // 3: kubevirt.notify.v1.Notify.HandleK8sEvent:output_type -> kubevirt.notify.v1.Response + 2, // [2:4] is the sub-list for method output_type + 0, // [0:2] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_proto_notify_proto_init() } +func file_proto_notify_proto_init() { + if File_proto_notify_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_notify_proto_rawDesc), len(file_proto_notify_proto_rawDesc)), + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_notify_proto_goTypes, + DependencyIndexes: file_proto_notify_proto_depIdxs, + MessageInfos: file_proto_notify_proto_msgTypes, + }.Build() + File_proto_notify_proto = out.File + file_proto_notify_proto_goTypes = nil + file_proto_notify_proto_depIdxs = nil +} diff --git a/images/virt-launcher/vlctl/pkg/api/generated/notify/proto/notify_grpc.pb.go b/images/virt-launcher/vlctl/pkg/api/generated/notify/proto/notify_grpc.pb.go new file mode 100644 index 0000000000..170700525d --- /dev/null +++ b/images/virt-launcher/vlctl/pkg/api/generated/notify/proto/notify_grpc.pb.go @@ -0,0 +1,159 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.33.1 +// source: proto/notify.proto + +package notify + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Notify_HandleDomainEvent_FullMethodName = "/kubevirt.notify.v1.Notify/HandleDomainEvent" + Notify_HandleK8SEvent_FullMethodName = "/kubevirt.notify.v1.Notify/HandleK8sEvent" +) + +// NotifyClient is the client API for Notify service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type NotifyClient interface { + HandleDomainEvent(ctx context.Context, in *DomainEventRequest, opts ...grpc.CallOption) (*Response, error) + HandleK8SEvent(ctx context.Context, in *K8SEventRequest, opts ...grpc.CallOption) (*Response, error) +} + +type notifyClient struct { + cc grpc.ClientConnInterface +} + +func NewNotifyClient(cc grpc.ClientConnInterface) NotifyClient { + return ¬ifyClient{cc} +} + +func (c *notifyClient) HandleDomainEvent(ctx context.Context, in *DomainEventRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Notify_HandleDomainEvent_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *notifyClient) HandleK8SEvent(ctx context.Context, in *K8SEventRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Notify_HandleK8SEvent_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// NotifyServer is the server API for Notify service. +// All implementations must embed UnimplementedNotifyServer +// for forward compatibility. +type NotifyServer interface { + HandleDomainEvent(context.Context, *DomainEventRequest) (*Response, error) + HandleK8SEvent(context.Context, *K8SEventRequest) (*Response, error) + mustEmbedUnimplementedNotifyServer() +} + +// UnimplementedNotifyServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedNotifyServer struct{} + +func (UnimplementedNotifyServer) HandleDomainEvent(context.Context, *DomainEventRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method HandleDomainEvent not implemented") +} +func (UnimplementedNotifyServer) HandleK8SEvent(context.Context, *K8SEventRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method HandleK8SEvent not implemented") +} +func (UnimplementedNotifyServer) mustEmbedUnimplementedNotifyServer() {} +func (UnimplementedNotifyServer) testEmbeddedByValue() {} + +// UnsafeNotifyServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to NotifyServer will +// result in compilation errors. +type UnsafeNotifyServer interface { + mustEmbedUnimplementedNotifyServer() +} + +func RegisterNotifyServer(s grpc.ServiceRegistrar, srv NotifyServer) { + // If the following call pancis, it indicates UnimplementedNotifyServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Notify_ServiceDesc, srv) +} + +func _Notify_HandleDomainEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DomainEventRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotifyServer).HandleDomainEvent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Notify_HandleDomainEvent_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotifyServer).HandleDomainEvent(ctx, req.(*DomainEventRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Notify_HandleK8SEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(K8SEventRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotifyServer).HandleK8SEvent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Notify_HandleK8SEvent_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotifyServer).HandleK8SEvent(ctx, req.(*K8SEventRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Notify_ServiceDesc is the grpc.ServiceDesc for Notify service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Notify_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "kubevirt.notify.v1.Notify", + HandlerType: (*NotifyServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "HandleDomainEvent", + Handler: _Notify_HandleDomainEvent_Handler, + }, + { + MethodName: "HandleK8sEvent", + Handler: _Notify_HandleK8SEvent_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "proto/notify.proto", +} diff --git a/images/virt-launcher/vlctl/proto/cmd.proto b/images/virt-launcher/vlctl/proto/cmd.proto new file mode 100644 index 0000000000..73102d8729 --- /dev/null +++ b/images/virt-launcher/vlctl/proto/cmd.proto @@ -0,0 +1,223 @@ +syntax = "proto3"; + +package kubevirt.cmd.v1; +option go_package = "virt-launcher-plug/pkg/api/generated/cmd"; + +service Cmd { + rpc SyncVirtualMachine(VMIRequest) returns (Response) {} + rpc PauseVirtualMachine(VMIRequest) returns (Response) {} + rpc UnpauseVirtualMachine(VMIRequest) returns (Response) {} + rpc FreezeVirtualMachine(FreezeRequest) returns (Response) {} + rpc UnfreezeVirtualMachine(VMIRequest) returns (Response) {} + rpc SoftRebootVirtualMachine(VMIRequest) returns (Response) {} + rpc ShutdownVirtualMachine(VMIRequest) returns (Response) {} + rpc KillVirtualMachine(VMIRequest) returns (Response) {} + rpc DeleteVirtualMachine(VMIRequest) returns (Response) {} + rpc MigrateVirtualMachine(MigrationRequest) returns (Response) {} + rpc SyncMigrationTarget(VMIRequest) returns (Response) {} + rpc CancelVirtualMachineMigration(VMIRequest) returns (Response) {} + rpc SignalTargetPodCleanup(VMIRequest) returns (Response) {} + rpc FinalizeVirtualMachineMigration(VMIRequest) returns (Response) {} + rpc HotplugHostDevices(VMIRequest) returns (Response) {} + rpc GetDomain(EmptyRequest) returns (DomainResponse) {} + rpc GetDomainStats(EmptyRequest) returns (DomainStatsResponse) {} + rpc GetGuestInfo(EmptyRequest) returns (GuestInfoResponse) {} + rpc GetUsers(EmptyRequest) returns (GuestUserListResponse) {} + rpc GetFilesystems(EmptyRequest) returns (GuestFilesystemsResponse) {} + rpc Ping(EmptyRequest) returns (Response) {} + rpc Exec(ExecRequest) returns (ExecResponse) {} + rpc GuestPing(GuestPingRequest) returns (GuestPingResponse) {} + rpc VirtualMachineMemoryDump(MemoryDumpRequest) returns (Response) {} + rpc GetQemuVersion(EmptyRequest) returns (QemuVersionResponse){} + rpc SyncVirtualMachineCPUs(VMIRequest) returns (Response) {} + rpc SyncVirtualMachineMemory(VMIRequest) returns (Response) {} + rpc GetSEVInfo(EmptyRequest) returns (SEVInfoResponse) {} + rpc GetLaunchMeasurement(VMIRequest) returns (LaunchMeasurementResponse) {} + rpc InjectLaunchSecret(InjectLaunchSecretRequest) returns (Response) {} + rpc GetAppliedVMIChecksum(EmptyRequest) returns (VMIChecksumResponse) {} + rpc MigrationProxy(MigrationProxyRequest) returns (Response); +} + +message QemuVersionResponse { + Response response = 1; + string version = 2; +} + +message VMI { + bytes vmiJson = 1; +} + +message CPU { + uint32 id = 1; + repeated uint32 siblings = 2; +} + +message Sibling { + uint32 id = 1; + uint64 value = 2; +} + +message Pages { + uint64 count = 1; + string unit = 2; + uint32 size = 3; +} + +message Memory { + uint64 amount = 1; + string unit = 2; +} + +message Cell { + uint32 id = 1; + Memory memory = 2; + repeated Pages pages = 3; + repeated Sibling distances = 4; + repeated CPU cpus = 5; +} + +message Topology { + repeated Cell numa_cells = 1; +} + +message SMBios { + string manufacturer = 1; + string product = 2; + string version = 3; + string sku = 4; + string family = 5; +} + +message DiskInfo { + string format = 1; + string backingFile = 2; + uint64 actualSize = 3; + uint64 virtualSize = 4; +} + +message ClusterConfig{ + bool ExpandDisksEnabled = 1; + bool FreePageReportingDisabled = 2; + bool BochsDisplayForEFIGuests = 3; + bool SerialConsoleLogDisabled = 4; +} + +message InterfaceBindingMigration{ + string Method = 1; +} + +message VirtualMachineOptions { + SMBios VirtualMachineSMBios = 1; + uint32 MemBalloonStatsPeriod = 2; + repeated string PreallocatedVolumes = 3; + Topology topology = 4; + map DisksInfo = 5; + // Deprecated, use clusterConfig.ExpandDisksEnabled + bool ExpandDisksEnabled = 6; + ClusterConfig clusterConfig = 7; + map interfaceDomainAttachment = 8; + map interfaceMigration = 9; +} + +message VMIRequest { + VMI vmi = 1; + VirtualMachineOptions options = 2; +} + +message MigrationRequest { + VMI vmi = 1; + bytes options = 2; +} + +message ExecRequest { + string domainName = 1; + string Command = 2; + repeated string Args = 3; + int32 timeoutSeconds = 4; +} + +message EmptyRequest {} + +message Response { + bool success = 1; + string message = 2; +} + +message DomainResponse { + Response response = 1; + string domain = 2; +} + +message DomainStatsResponse { + Response response = 1; + string domainStats = 2; +} + +message GuestInfoResponse { + Response response = 1; + string guestInfoResponse = 2; +} + +message GuestUserListResponse { + Response response = 1; + string guestUserListResponse = 2; +} + +message GuestFilesystemsResponse { + Response response = 1; + string guestFilesystemsResponse = 2; +} + +message ExecResponse { + Response response = 1; + int32 exitCode = 2; + string stdOut = 3; +} + +message GuestPingRequest { + string domainName = 1; + int32 timeoutSeconds = 2; +} + +message GuestPingResponse { + Response response = 1; +} + +message FreezeRequest { + VMI vmi = 1; + int32 unfreezeTimeoutSeconds = 2; +} + +message MemoryDumpRequest { + VMI vmi = 1; + string dumpPath = 2; +} + +message SEVInfoResponse { + Response response = 1; + bytes sevInfo = 2; +} + +message LaunchMeasurementResponse { + Response response = 1; + bytes launchMeasurement = 2; +} + +message InjectLaunchSecretRequest { + VMI vmi = 1; + bytes options = 2; +} + +message VMIChecksumResponse { + Response response = 1; + string checksum = 2; +} + +enum MigrationProxyAction { + START = 0; + STOP = 1; +} + +message MigrationProxyRequest { + MigrationProxyAction action = 1; +} diff --git a/images/virt-launcher/vlctl/proto/info.proto b/images/virt-launcher/vlctl/proto/info.proto new file mode 100644 index 0000000000..b99390ef3f --- /dev/null +++ b/images/virt-launcher/vlctl/proto/info.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +package kubevirt.cmd.info; +option go_package = "virt-launcher-plug/pkg/api/generated/info"; + +service CmdInfo { + rpc Info (CmdInfoRequest) returns (CmdInfoResponse) {} +} + +message CmdInfoRequest {} + +message CmdInfoResponse { + repeated uint32 supportedCmdVersions = 1; +} diff --git a/images/virt-launcher/vlctl/proto/notify.proto b/images/virt-launcher/vlctl/proto/notify.proto new file mode 100644 index 0000000000..d6ead354c1 --- /dev/null +++ b/images/virt-launcher/vlctl/proto/notify.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; + +package kubevirt.notify.v1; +option go_package = "virt-launcher-plug/pkg/api/generated/notify"; + +service Notify { + rpc HandleDomainEvent(DomainEventRequest) returns (Response) {} + rpc HandleK8sEvent(K8sEventRequest) returns (Response) {} +} + +message DomainEventRequest { + bytes domainJSON = 1; + bytes statusJSON = 2; + string eventType = 3; +} + +message K8sEventRequest { + bytes eventJSON = 1; +} + +message Response { + bool success = 1; + string message = 2; +} From 154cff5ede4e398617a99fc1d2ca97caa9aa30cf Mon Sep 17 00:00:00 2001 From: Yaroslav Borbat Date: Wed, 19 Nov 2025 16:15:53 +0300 Subject: [PATCH 2/4] add client Signed-off-by: Yaroslav Borbat --- images/virt-launcher/vlctl/Taskfile.yaml | 3 +- .../virt-launcher/vlctl/cmd/vlctl/app/base.go | 7 +- .../vlctl/cmd/vlctl/app/domain.go | 9 +- .../vlctl/cmd/vlctl/app/guest.go | 25 +- .../virt-launcher/vlctl/cmd/vlctl/app/ping.go | 1 + .../virt-launcher/vlctl/cmd/vlctl/app/qemu.go | 1 + .../virt-launcher/vlctl/cmd/vlctl/app/sev.go | 1 + images/virt-launcher/vlctl/go.mod | 12 +- images/virt-launcher/vlctl/go.sum | 34 -- .../pkg/api/generated/cmd/proto/cmd.pb.go | 2 +- .../api/generated/cmd/proto/cmd_grpc.pb.go | 2 +- .../pkg/api/generated/info/proto/info.pb.go | 2 +- .../api/generated/info/proto/info_grpc.pb.go | 2 +- .../api/generated/notify/proto/notify.pb.go | 254 ------------ .../generated/notify/proto/notify_grpc.pb.go | 159 -------- .../virt-launcher/vlctl/pkg/client/client.go | 362 ++++++++++++++++++ images/virt-launcher/vlctl/pkg/client/grpc.go | 40 ++ images/virt-launcher/vlctl/proto/notify.proto | 24 -- 18 files changed, 449 insertions(+), 491 deletions(-) delete mode 100644 images/virt-launcher/vlctl/pkg/api/generated/notify/proto/notify.pb.go delete mode 100644 images/virt-launcher/vlctl/pkg/api/generated/notify/proto/notify_grpc.pb.go create mode 100644 images/virt-launcher/vlctl/pkg/client/client.go create mode 100644 images/virt-launcher/vlctl/pkg/client/grpc.go delete mode 100644 images/virt-launcher/vlctl/proto/notify.proto diff --git a/images/virt-launcher/vlctl/Taskfile.yaml b/images/virt-launcher/vlctl/Taskfile.yaml index 892e292ec1..6fb1e5ba04 100644 --- a/images/virt-launcher/vlctl/Taskfile.yaml +++ b/images/virt-launcher/vlctl/Taskfile.yaml @@ -20,7 +20,6 @@ tasks: - mkdir -p pkg/api/generated - mkdir -p pkg/api/generated/cmd - mkdir -p pkg/api/generated/info - - mkdir -p pkg/api/generated/notify - protoc --go_out=pkg/api/generated/cmd --go_opt=paths=source_relative --go-grpc_out=pkg/api/generated/cmd --go-grpc_opt=paths=source_relative proto/cmd.proto - protoc --go_out=pkg/api/generated/info --go_opt=paths=source_relative --go-grpc_out=pkg/api/generated/info --go-grpc_opt=paths=source_relative proto/info.proto - - protoc --go_out=pkg/api/generated/notify --go_opt=paths=source_relative --go-grpc_out=pkg/api/generated/notify --go-grpc_opt=paths=source_relative proto/notify.proto + diff --git a/images/virt-launcher/vlctl/cmd/vlctl/app/base.go b/images/virt-launcher/vlctl/cmd/vlctl/app/base.go index fd67664e64..c181c5937b 100644 --- a/images/virt-launcher/vlctl/cmd/vlctl/app/base.go +++ b/images/virt-launcher/vlctl/cmd/vlctl/app/base.go @@ -25,7 +25,8 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" "gopkg.in/yaml.v3" - cmdclient "kubevirt.io/kubevirt/pkg/virt-handler/cmd-client" + + "vlctl/pkg/client" ) const ( @@ -64,8 +65,8 @@ func (o *BaseOptions) Validate() error { return nil } -func (o *BaseOptions) Client() (cmdclient.LauncherClient, error) { - return cmdclient.NewClient(o.Socket) +func (o *BaseOptions) Client() (client.LauncherClient, error) { + return client.NewClient(o.Socket) } func (o *BaseOptions) MarshalOutput(v interface{}) ([]byte, error) { diff --git a/images/virt-launcher/vlctl/cmd/vlctl/app/domain.go b/images/virt-launcher/vlctl/cmd/vlctl/app/domain.go index 81fa853136..efdd511fd0 100644 --- a/images/virt-launcher/vlctl/cmd/vlctl/app/domain.go +++ b/images/virt-launcher/vlctl/cmd/vlctl/app/domain.go @@ -46,6 +46,7 @@ func runDomainCommand(opts BaseOptions) error { if err != nil { return fmt.Errorf("failed to create client: %w", err) } + defer client.Close() domain, exist, err := client.GetDomain() if err != nil { @@ -56,7 +57,12 @@ func runDomainCommand(opts BaseOptions) error { return fmt.Errorf("domain does not exist") } - return marshalAndPrintOutput(&opts, domain.Spec) + spec, exist := domain["spec"] + if !exist { + return fmt.Errorf("domain does not exist") + } + + return marshalAndPrintOutput(&opts, spec) } func NewDomainStatsCommand() *cobra.Command { @@ -81,6 +87,7 @@ func runDomainStatsCommand(opts BaseOptions) error { if err != nil { return fmt.Errorf("failed to create client: %w", err) } + defer client.Close() stats, exist, err := client.GetDomainStats() if err != nil { diff --git a/images/virt-launcher/vlctl/cmd/vlctl/app/guest.go b/images/virt-launcher/vlctl/cmd/vlctl/app/guest.go index 0e88943bb6..9cc84d37de 100644 --- a/images/virt-launcher/vlctl/cmd/vlctl/app/guest.go +++ b/images/virt-launcher/vlctl/cmd/vlctl/app/guest.go @@ -60,6 +60,7 @@ func runGuestInfoCommand(opts BaseOptions) error { if err != nil { return fmt.Errorf("failed to create client: %w", err) } + defer client.Close() info, err := client.GetGuestInfo() if err != nil { @@ -120,6 +121,7 @@ func runGuestFilesystemsCommand(opts BaseOptions) error { if err != nil { return fmt.Errorf("failed to create client: %w", err) } + defer client.Close() filesystems, err := client.GetFilesystems() if err != nil { @@ -156,6 +158,7 @@ func runGuestPingCommand(opts BaseOptions, timeout int32) error { if err != nil { return fmt.Errorf("failed to create client: %w", err) } + defer client.Close() domain, exist, err := client.GetDomain() if err != nil { @@ -165,7 +168,27 @@ func runGuestPingCommand(opts BaseOptions, timeout int32) error { return fmt.Errorf("domain does not exist") } - err = client.GuestPing(domain.Spec.Name, timeout) + spec, exist := domain["spec"] + if !exist { + return fmt.Errorf("domain does not exist") + } + + specMap, ok := spec.(map[string]interface{}) + if !ok { + return fmt.Errorf("invalid spec format") + } + + name, exist := specMap["name"] + if !exist { + return fmt.Errorf("missing name in spec") + } + + domainName, ok := name.(string) + if !ok { + return fmt.Errorf("invalid name format") + } + + err = client.GuestPing(domainName, timeout) if err != nil { return fmt.Errorf("failed to ping: %w", err) } diff --git a/images/virt-launcher/vlctl/cmd/vlctl/app/ping.go b/images/virt-launcher/vlctl/cmd/vlctl/app/ping.go index c89c96f61b..737ae9cd62 100644 --- a/images/virt-launcher/vlctl/cmd/vlctl/app/ping.go +++ b/images/virt-launcher/vlctl/cmd/vlctl/app/ping.go @@ -44,6 +44,7 @@ func runPingCommand(opts BaseOptions) error { if err != nil { return fmt.Errorf("failed to create client: %w", err) } + defer client.Close() err = client.Ping() if err != nil { diff --git a/images/virt-launcher/vlctl/cmd/vlctl/app/qemu.go b/images/virt-launcher/vlctl/cmd/vlctl/app/qemu.go index debdb97ae6..739f5bda12 100644 --- a/images/virt-launcher/vlctl/cmd/vlctl/app/qemu.go +++ b/images/virt-launcher/vlctl/cmd/vlctl/app/qemu.go @@ -54,6 +54,7 @@ func runQemuVersionCommand(opts BaseOptions) error { if err != nil { return fmt.Errorf("failed to create client: %w", err) } + defer client.Close() version, err := client.GetQemuVersion() if err != nil { diff --git a/images/virt-launcher/vlctl/cmd/vlctl/app/sev.go b/images/virt-launcher/vlctl/cmd/vlctl/app/sev.go index 08ab148079..058394ecfe 100644 --- a/images/virt-launcher/vlctl/cmd/vlctl/app/sev.go +++ b/images/virt-launcher/vlctl/cmd/vlctl/app/sev.go @@ -44,6 +44,7 @@ func runSevCommand(opts BaseOptions) error { if err != nil { return fmt.Errorf("failed to create client: %w", err) } + defer client.Close() info, err := client.GetSEVInfo() if err != nil { diff --git a/images/virt-launcher/vlctl/go.mod b/images/virt-launcher/vlctl/go.mod index e7f58ff103..38c69349ea 100644 --- a/images/virt-launcher/vlctl/go.mod +++ b/images/virt-launcher/vlctl/go.mod @@ -5,17 +5,16 @@ go 1.24.6 require ( github.com/spf13/cobra v1.9.1 github.com/spf13/pflag v1.0.6 + google.golang.org/grpc v1.65.0 + google.golang.org/protobuf v1.36.1 gopkg.in/yaml.v3 v3.0.1 - kubevirt.io/kubevirt v1.6.1 + kubevirt.io/api v0.0.0-20250930144221-aaa67e9803df ) require ( github.com/fxamacker/cbor/v2 v2.7.0 // indirect - github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.4 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect @@ -24,21 +23,16 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/openshift/custom-resource-status v1.1.2 // indirect github.com/x448/float16 v0.8.4 // indirect - go.uber.org/mock v0.5.1 // indirect golang.org/x/net v0.38.0 // indirect golang.org/x/sys v0.33.0 // indirect golang.org/x/text v0.25.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 // indirect - google.golang.org/grpc v1.65.0 // indirect - google.golang.org/protobuf v1.36.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect k8s.io/api v0.32.5 // indirect k8s.io/apiextensions-apiserver v0.32.5 // indirect k8s.io/apimachinery v0.32.5 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect - kubevirt.io/api v0.0.0-20250930144221-aaa67e9803df // indirect - kubevirt.io/client-go v0.0.0-00010101000000-000000000000 // indirect kubevirt.io/containerized-data-importer-api v1.60.3-0.20241105012228-50fbed985de9 // indirect kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90 // indirect sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect diff --git a/images/virt-launcher/vlctl/go.sum b/images/virt-launcher/vlctl/go.sum index c776252305..fec8cafa44 100644 --- a/images/virt-launcher/vlctl/go.sum +++ b/images/virt-launcher/vlctl/go.sum @@ -18,19 +18,13 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emicklei/go-restful v2.15.0+incompatible h1:8KpYO/Xl/ZudZs5RNOEhWMBY4hmzlZhhRd9cu+jrZP4= github.com/emicklei/go-restful v2.15.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= -github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -41,23 +35,15 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= -github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= -github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= -github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= -github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= @@ -74,9 +60,7 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw 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/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -93,8 +77,6 @@ github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= -github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad h1:a6HEuzUHeKH6hwfN/ZoQgRgVIWFJljSWa/zetS2WTvg= -github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -103,7 +85,6 @@ github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1: github.com/ianlancetaylor/demangle v0.0.0-20240312041847-bd984b5ce465/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= @@ -122,7 +103,6 @@ github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1 github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/moby/spdystream v0.4.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -136,7 +116,6 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA github.com/nxadm/tail v0.0.0-20211216163028-4472660a31a6/go.mod h1:A+9rV4WFp4DKg1Ym1v6YtCrJ2vvlt1ZA/iml0CNuu2A= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= @@ -157,8 +136,6 @@ github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xl github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= github.com/onsi/ginkgo/v2 v2.17.2/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc= github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= -github.com/onsi/ginkgo/v2 v2.22.1 h1:QW7tbJAUDyVDVOM5dFa7qaybo+CRfR7bemlQUN6Z8aM= -github.com/onsi/ginkgo/v2 v2.22.1/go.mod h1:S6aTpoRsSq2cZOd+pssHAlKW/Q/jZt6cPrPlnj4a1xM= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= @@ -180,8 +157,6 @@ github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3ev github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/onsi/gomega v1.33.0/go.mod h1:+925n5YtiFsLzzafLUHzVMBpvvRAzrydIBiSIxjX3wY= github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= -github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8= -github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY= github.com/openshift/custom-resource-status v1.1.2 h1:C3DL44LEbvlbItfd8mT5jWrqPfHnSOQoQf/sypqA6A4= github.com/openshift/custom-resource-status v1.1.2/go.mod h1:DB/Mf2oTeiAmVVX1gN+NEqweonAPY0TKUwADizj8+ZA= github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0= @@ -218,8 +193,6 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.uber.org/mock v0.5.1 h1:ASgazW/qBmR+A32MYFDB6E2POoTgOwT509VP0CT/fjs= -go.uber.org/mock v0.5.1/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= @@ -333,8 +306,6 @@ golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= -golang.org/x/tools v0.28.0 h1:WuB6qZ4RPCQo5aP3WdKZS7i595EdWqWR8vqJTlwTVK8= -golang.org/x/tools v0.28.0/go.mod h1:dcIOrVd3mfQKTgrDVQHqCPMWy6lnhfhtX3hLXYVLfRw= 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= @@ -393,7 +364,6 @@ k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f h1:0LQagt0gDpKqvIkAMPaRGcXawNMouPECM1+F9BVxEaM= k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f/go.mod h1:S9tOR0FxgyusSNR+MboCuiDpVWkAifZvaYI1Q2ubgro= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= @@ -401,14 +371,10 @@ k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6J k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= kubevirt.io/api v0.0.0-20250930144221-aaa67e9803df h1:WLXWkHCVkKXUrKD3wuOrkfPUUEZpIY5xDIQoeknHabE= kubevirt.io/api v0.0.0-20250930144221-aaa67e9803df/go.mod h1:p66fEy/g79x7VpgUwrkUgOoG2lYs5LQq37WM6JXMwj4= -kubevirt.io/client-go v1.6.1 h1:hGxIsJZjxeVgPGRUnLeqWNiLv52WkSTq3LLLIQ8SNXM= -kubevirt.io/client-go v1.6.1/go.mod h1:Y/8zow0q41oBVM3f+wSkk581sGO2a9pchynOgJ8ALoc= kubevirt.io/containerized-data-importer-api v1.60.3-0.20241105012228-50fbed985de9 h1:KTb8wO1Lxj220DX7d2Rdo9xovvlyWWNo3AVm2ua+1nY= kubevirt.io/containerized-data-importer-api v1.60.3-0.20241105012228-50fbed985de9/go.mod h1:SDJjLGhbPyayDqAqawcGmVNapBp0KodOQvhKPLVGCQU= kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90 h1:QMrd0nKP0BGbnxTqakhDZAUhGKxPiPiN5gSDqKUmGGc= kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90/go.mod h1:018lASpFYBsYN6XwmA2TIrPCx6e0gviTd/ZNtSitKgc= -kubevirt.io/kubevirt v1.6.1 h1:n+aLOEam6YNPncvxckoVdbToV4fFU9JPF85PV8guY3I= -kubevirt.io/kubevirt v1.6.1/go.mod h1:Cz4iZeAC3ieVVmWsbeOY0RcebKLzJHslovRCwUwsIx0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8= sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo= diff --git a/images/virt-launcher/vlctl/pkg/api/generated/cmd/proto/cmd.pb.go b/images/virt-launcher/vlctl/pkg/api/generated/cmd/proto/cmd.pb.go index d930349fca..b16a1afa64 100644 --- a/images/virt-launcher/vlctl/pkg/api/generated/cmd/proto/cmd.pb.go +++ b/images/virt-launcher/vlctl/pkg/api/generated/cmd/proto/cmd.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.10 -// protoc v6.33.1 +// protoc v3.19.6 // source: proto/cmd.proto package cmd diff --git a/images/virt-launcher/vlctl/pkg/api/generated/cmd/proto/cmd_grpc.pb.go b/images/virt-launcher/vlctl/pkg/api/generated/cmd/proto/cmd_grpc.pb.go index 5670425c57..3ccbe67bc7 100644 --- a/images/virt-launcher/vlctl/pkg/api/generated/cmd/proto/cmd_grpc.pb.go +++ b/images/virt-launcher/vlctl/pkg/api/generated/cmd/proto/cmd_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v6.33.1 +// - protoc v3.19.6 // source: proto/cmd.proto package cmd diff --git a/images/virt-launcher/vlctl/pkg/api/generated/info/proto/info.pb.go b/images/virt-launcher/vlctl/pkg/api/generated/info/proto/info.pb.go index 8b2a2dcf91..5db0a0a6d9 100644 --- a/images/virt-launcher/vlctl/pkg/api/generated/info/proto/info.pb.go +++ b/images/virt-launcher/vlctl/pkg/api/generated/info/proto/info.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.10 -// protoc v6.33.1 +// protoc v3.19.6 // source: proto/info.proto package info diff --git a/images/virt-launcher/vlctl/pkg/api/generated/info/proto/info_grpc.pb.go b/images/virt-launcher/vlctl/pkg/api/generated/info/proto/info_grpc.pb.go index e290b51053..67ef1021b0 100644 --- a/images/virt-launcher/vlctl/pkg/api/generated/info/proto/info_grpc.pb.go +++ b/images/virt-launcher/vlctl/pkg/api/generated/info/proto/info_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v6.33.1 +// - protoc v3.19.6 // source: proto/info.proto package info diff --git a/images/virt-launcher/vlctl/pkg/api/generated/notify/proto/notify.pb.go b/images/virt-launcher/vlctl/pkg/api/generated/notify/proto/notify.pb.go deleted file mode 100644 index 5203d4b6e1..0000000000 --- a/images/virt-launcher/vlctl/pkg/api/generated/notify/proto/notify.pb.go +++ /dev/null @@ -1,254 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.10 -// protoc v6.33.1 -// source: proto/notify.proto - -package notify - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type DomainEventRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - DomainJSON []byte `protobuf:"bytes,1,opt,name=domainJSON,proto3" json:"domainJSON,omitempty"` - StatusJSON []byte `protobuf:"bytes,2,opt,name=statusJSON,proto3" json:"statusJSON,omitempty"` - EventType string `protobuf:"bytes,3,opt,name=eventType,proto3" json:"eventType,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DomainEventRequest) Reset() { - *x = DomainEventRequest{} - mi := &file_proto_notify_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DomainEventRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DomainEventRequest) ProtoMessage() {} - -func (x *DomainEventRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_notify_proto_msgTypes[0] - 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 DomainEventRequest.ProtoReflect.Descriptor instead. -func (*DomainEventRequest) Descriptor() ([]byte, []int) { - return file_proto_notify_proto_rawDescGZIP(), []int{0} -} - -func (x *DomainEventRequest) GetDomainJSON() []byte { - if x != nil { - return x.DomainJSON - } - return nil -} - -func (x *DomainEventRequest) GetStatusJSON() []byte { - if x != nil { - return x.StatusJSON - } - return nil -} - -func (x *DomainEventRequest) GetEventType() string { - if x != nil { - return x.EventType - } - return "" -} - -type K8SEventRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - EventJSON []byte `protobuf:"bytes,1,opt,name=eventJSON,proto3" json:"eventJSON,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *K8SEventRequest) Reset() { - *x = K8SEventRequest{} - mi := &file_proto_notify_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *K8SEventRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*K8SEventRequest) ProtoMessage() {} - -func (x *K8SEventRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_notify_proto_msgTypes[1] - 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 K8SEventRequest.ProtoReflect.Descriptor instead. -func (*K8SEventRequest) Descriptor() ([]byte, []int) { - return file_proto_notify_proto_rawDescGZIP(), []int{1} -} - -func (x *K8SEventRequest) GetEventJSON() []byte { - if x != nil { - return x.EventJSON - } - return nil -} - -type Response struct { - state protoimpl.MessageState `protogen:"open.v1"` - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Response) Reset() { - *x = Response{} - mi := &file_proto_notify_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Response) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Response) ProtoMessage() {} - -func (x *Response) ProtoReflect() protoreflect.Message { - mi := &file_proto_notify_proto_msgTypes[2] - 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 Response.ProtoReflect.Descriptor instead. -func (*Response) Descriptor() ([]byte, []int) { - return file_proto_notify_proto_rawDescGZIP(), []int{2} -} - -func (x *Response) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -func (x *Response) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -var File_proto_notify_proto protoreflect.FileDescriptor - -const file_proto_notify_proto_rawDesc = "" + - "\n" + - "\x12proto/notify.proto\x12\x12kubevirt.notify.v1\"r\n" + - "\x12DomainEventRequest\x12\x1e\n" + - "\n" + - "domainJSON\x18\x01 \x01(\fR\n" + - "domainJSON\x12\x1e\n" + - "\n" + - "statusJSON\x18\x02 \x01(\fR\n" + - "statusJSON\x12\x1c\n" + - "\teventType\x18\x03 \x01(\tR\teventType\"/\n" + - "\x0fK8sEventRequest\x12\x1c\n" + - "\teventJSON\x18\x01 \x01(\fR\teventJSON\">\n" + - "\bResponse\x12\x18\n" + - "\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" + - "\amessage\x18\x02 \x01(\tR\amessage2\xbc\x01\n" + - "\x06Notify\x12[\n" + - "\x11HandleDomainEvent\x12&.kubevirt.notify.v1.DomainEventRequest\x1a\x1c.kubevirt.notify.v1.Response\"\x00\x12U\n" + - "\x0eHandleK8sEvent\x12#.kubevirt.notify.v1.K8sEventRequest\x1a\x1c.kubevirt.notify.v1.Response\"\x00B-Z+virt-launcher-plug/pkg/api/generated/notifyb\x06proto3" - -var ( - file_proto_notify_proto_rawDescOnce sync.Once - file_proto_notify_proto_rawDescData []byte -) - -func file_proto_notify_proto_rawDescGZIP() []byte { - file_proto_notify_proto_rawDescOnce.Do(func() { - file_proto_notify_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proto_notify_proto_rawDesc), len(file_proto_notify_proto_rawDesc))) - }) - return file_proto_notify_proto_rawDescData -} - -var file_proto_notify_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_proto_notify_proto_goTypes = []any{ - (*DomainEventRequest)(nil), // 0: kubevirt.notify.v1.DomainEventRequest - (*K8SEventRequest)(nil), // 1: kubevirt.notify.v1.K8sEventRequest - (*Response)(nil), // 2: kubevirt.notify.v1.Response -} -var file_proto_notify_proto_depIdxs = []int32{ - 0, // 0: kubevirt.notify.v1.Notify.HandleDomainEvent:input_type -> kubevirt.notify.v1.DomainEventRequest - 1, // 1: kubevirt.notify.v1.Notify.HandleK8sEvent:input_type -> kubevirt.notify.v1.K8sEventRequest - 2, // 2: kubevirt.notify.v1.Notify.HandleDomainEvent:output_type -> kubevirt.notify.v1.Response - 2, // 3: kubevirt.notify.v1.Notify.HandleK8sEvent:output_type -> kubevirt.notify.v1.Response - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_proto_notify_proto_init() } -func file_proto_notify_proto_init() { - if File_proto_notify_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_notify_proto_rawDesc), len(file_proto_notify_proto_rawDesc)), - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_proto_notify_proto_goTypes, - DependencyIndexes: file_proto_notify_proto_depIdxs, - MessageInfos: file_proto_notify_proto_msgTypes, - }.Build() - File_proto_notify_proto = out.File - file_proto_notify_proto_goTypes = nil - file_proto_notify_proto_depIdxs = nil -} diff --git a/images/virt-launcher/vlctl/pkg/api/generated/notify/proto/notify_grpc.pb.go b/images/virt-launcher/vlctl/pkg/api/generated/notify/proto/notify_grpc.pb.go deleted file mode 100644 index 170700525d..0000000000 --- a/images/virt-launcher/vlctl/pkg/api/generated/notify/proto/notify_grpc.pb.go +++ /dev/null @@ -1,159 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc v6.33.1 -// source: proto/notify.proto - -package notify - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Notify_HandleDomainEvent_FullMethodName = "/kubevirt.notify.v1.Notify/HandleDomainEvent" - Notify_HandleK8SEvent_FullMethodName = "/kubevirt.notify.v1.Notify/HandleK8sEvent" -) - -// NotifyClient is the client API for Notify service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type NotifyClient interface { - HandleDomainEvent(ctx context.Context, in *DomainEventRequest, opts ...grpc.CallOption) (*Response, error) - HandleK8SEvent(ctx context.Context, in *K8SEventRequest, opts ...grpc.CallOption) (*Response, error) -} - -type notifyClient struct { - cc grpc.ClientConnInterface -} - -func NewNotifyClient(cc grpc.ClientConnInterface) NotifyClient { - return ¬ifyClient{cc} -} - -func (c *notifyClient) HandleDomainEvent(ctx context.Context, in *DomainEventRequest, opts ...grpc.CallOption) (*Response, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(Response) - err := c.cc.Invoke(ctx, Notify_HandleDomainEvent_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *notifyClient) HandleK8SEvent(ctx context.Context, in *K8SEventRequest, opts ...grpc.CallOption) (*Response, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(Response) - err := c.cc.Invoke(ctx, Notify_HandleK8SEvent_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// NotifyServer is the server API for Notify service. -// All implementations must embed UnimplementedNotifyServer -// for forward compatibility. -type NotifyServer interface { - HandleDomainEvent(context.Context, *DomainEventRequest) (*Response, error) - HandleK8SEvent(context.Context, *K8SEventRequest) (*Response, error) - mustEmbedUnimplementedNotifyServer() -} - -// UnimplementedNotifyServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedNotifyServer struct{} - -func (UnimplementedNotifyServer) HandleDomainEvent(context.Context, *DomainEventRequest) (*Response, error) { - return nil, status.Errorf(codes.Unimplemented, "method HandleDomainEvent not implemented") -} -func (UnimplementedNotifyServer) HandleK8SEvent(context.Context, *K8SEventRequest) (*Response, error) { - return nil, status.Errorf(codes.Unimplemented, "method HandleK8SEvent not implemented") -} -func (UnimplementedNotifyServer) mustEmbedUnimplementedNotifyServer() {} -func (UnimplementedNotifyServer) testEmbeddedByValue() {} - -// UnsafeNotifyServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to NotifyServer will -// result in compilation errors. -type UnsafeNotifyServer interface { - mustEmbedUnimplementedNotifyServer() -} - -func RegisterNotifyServer(s grpc.ServiceRegistrar, srv NotifyServer) { - // If the following call pancis, it indicates UnimplementedNotifyServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Notify_ServiceDesc, srv) -} - -func _Notify_HandleDomainEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DomainEventRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NotifyServer).HandleDomainEvent(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Notify_HandleDomainEvent_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NotifyServer).HandleDomainEvent(ctx, req.(*DomainEventRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Notify_HandleK8SEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(K8SEventRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NotifyServer).HandleK8SEvent(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Notify_HandleK8SEvent_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NotifyServer).HandleK8SEvent(ctx, req.(*K8SEventRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Notify_ServiceDesc is the grpc.ServiceDesc for Notify service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Notify_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "kubevirt.notify.v1.Notify", - HandlerType: (*NotifyServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "HandleDomainEvent", - Handler: _Notify_HandleDomainEvent_Handler, - }, - { - MethodName: "HandleK8sEvent", - Handler: _Notify_HandleK8SEvent_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto/notify.proto", -} diff --git a/images/virt-launcher/vlctl/pkg/client/client.go b/images/virt-launcher/vlctl/pkg/client/client.go new file mode 100644 index 0000000000..16ae14be8a --- /dev/null +++ b/images/virt-launcher/vlctl/pkg/client/client.go @@ -0,0 +1,362 @@ +package client + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net" + "net/rpc" + "os" + "sort" + "syscall" + "time" + + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + v1 "kubevirt.io/api/core/v1" + + cmdproto "vlctl/pkg/api/generated/cmd/proto" + infoproto "vlctl/pkg/api/generated/info/proto" +) + +var ( + supportedCmdVersions = []uint32{1} +) + +const ( + shortTimeout time.Duration = 5 * time.Second +) + +type LauncherClient interface { + GetDomain() (map[string]interface{}, bool, error) + GetDomainStats() (map[string]interface{}, bool, error) + GetGuestInfo() (*v1.VirtualMachineInstanceGuestAgentInfo, error) + GetUsers() (v1.VirtualMachineInstanceGuestOSUserList, error) + GetFilesystems() (v1.VirtualMachineInstanceFileSystemList, error) + Ping() error + GuestPing(string, int32) error + GetQemuVersion() (string, error) + GetSEVInfo() (*v1.SEVPlatformInfo, error) + Close() +} + +func NewClient(socketPath string) (LauncherClient, error) { + conn, err := DialSocket(socketPath) + if err != nil { + return nil, err + } + + infoClient := infoproto.NewCmdInfoClient(conn) + return NewClientWithInfoClient(infoClient, conn) +} + +func NewClientWithInfoClient(infoClient infoproto.CmdInfoClient, conn *grpc.ClientConn) (LauncherClient, error) { + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + info, err := infoClient.Info(ctx, &infoproto.CmdInfoRequest{}) + if err != nil { + return nil, fmt.Errorf("could not check cmd server version: %v", err) + } + version, err := GetHighestCompatibleVersion(info.SupportedCmdVersions, supportedCmdVersions) + if err != nil { + return nil, err + } + + // create cmd client + switch version { + case 1: + client := cmdproto.NewCmdClient(conn) + return newV1Client(client, conn), nil + default: + return nil, fmt.Errorf("cmd client version %v not implemented yet", version) + } +} + +func GetHighestCompatibleVersion(serverVersions []uint32, clientVersions []uint32) (uint32, error) { + sort.Slice(serverVersions, func(i, j int) bool { return serverVersions[i] > serverVersions[j] }) + for _, s := range serverVersions { + for _, c := range clientVersions { + if s == c { + return s, nil + } + + } + } + return 0, fmt.Errorf("no compatible version found, server: %v, client: %v", serverVersions, clientVersions) +} + +func newV1Client(client cmdproto.CmdClient, conn *grpc.ClientConn) LauncherClient { + return &VirtLauncherClient{ + v1client: client, + conn: conn, + } +} + +type VirtLauncherClient struct { + v1client cmdproto.CmdClient + conn *grpc.ClientConn +} + +func (v VirtLauncherClient) GetDomain() (map[string]interface{}, bool, error) { + var domain map[string]interface{} + + request := &cmdproto.EmptyRequest{} + ctx, cancel := context.WithTimeout(context.Background(), shortTimeout) + defer cancel() + + domainResponse, err := v.v1client.GetDomain(ctx, request) + var response *cmdproto.Response + if domainResponse != nil { + response = domainResponse.Response + } + + if err = handleError(err, "GetDomain", response); err != nil || domainResponse == nil { + return domain, false, err + } + + if domainResponse.Domain != "" { + if err := json.Unmarshal([]byte(domainResponse.Domain), &domain); err != nil { + return domain, false, err + } + } + return domain, true, nil +} + +func (v VirtLauncherClient) GetDomainStats() (map[string]interface{}, bool, error) { + var stats map[string]interface{} + + request := &cmdproto.EmptyRequest{} + ctx, cancel := context.WithTimeout(context.Background(), shortTimeout) + defer cancel() + + domainStatsResponse, err := v.v1client.GetDomainStats(ctx, request) + var response *cmdproto.Response + if domainStatsResponse != nil { + response = domainStatsResponse.Response + } + + if err = handleError(err, "GetDomainStats", response); err != nil || domainStatsResponse == nil { + return stats, false, err + } + + if domainStatsResponse.DomainStats != "" { + if err := json.Unmarshal([]byte(domainStatsResponse.DomainStats), &stats); err != nil { + return stats, false, err + } + } + return stats, true, nil +} + +func (v VirtLauncherClient) GetGuestInfo() (*v1.VirtualMachineInstanceGuestAgentInfo, error) { + guestInfo := &v1.VirtualMachineInstanceGuestAgentInfo{} + + request := &cmdproto.EmptyRequest{} + ctx, cancel := context.WithTimeout(context.Background(), shortTimeout) + defer cancel() + + gaRespose, err := v.v1client.GetGuestInfo(ctx, request) + var response *cmdproto.Response + if gaRespose != nil { + response = gaRespose.Response + } + + if err = handleError(err, "GetGuestInfo", response); err != nil || gaRespose == nil { + return guestInfo, err + } + + if gaRespose.GuestInfoResponse != "" { + if err := json.Unmarshal([]byte(gaRespose.GetGuestInfoResponse()), guestInfo); err != nil { + return guestInfo, err + } + } + return guestInfo, nil +} + +func (v VirtLauncherClient) GetUsers() (v1.VirtualMachineInstanceGuestOSUserList, error) { + var userList []v1.VirtualMachineInstanceGuestOSUser + + request := &cmdproto.EmptyRequest{} + ctx, cancel := context.WithTimeout(context.Background(), shortTimeout) + defer cancel() + + uResponse, err := v.v1client.GetUsers(ctx, request) + var response *cmdproto.Response + if uResponse != nil { + response = uResponse.Response + } + + if err = handleError(err, "GetUsers", response); err != nil || uResponse == nil { + return v1.VirtualMachineInstanceGuestOSUserList{}, err + } + + if uResponse.GetGuestUserListResponse() != "" { + if err := json.Unmarshal([]byte(uResponse.GetGuestUserListResponse()), &userList); err != nil { + return v1.VirtualMachineInstanceGuestOSUserList{}, err + } + } + + guestUserList := v1.VirtualMachineInstanceGuestOSUserList{ + Items: userList, + } + + return guestUserList, nil +} + +func (v VirtLauncherClient) GetFilesystems() (v1.VirtualMachineInstanceFileSystemList, error) { + var fsList []v1.VirtualMachineInstanceFileSystem + + request := &cmdproto.EmptyRequest{} + ctx, cancel := context.WithTimeout(context.Background(), shortTimeout) + defer cancel() + + fsResponse, err := v.v1client.GetFilesystems(ctx, request) + var response *cmdproto.Response + if fsResponse != nil { + response = fsResponse.Response + } + + if err = handleError(err, "GetFilesystems", response); err != nil || fsResponse == nil { + return v1.VirtualMachineInstanceFileSystemList{}, err + } + + if fsResponse.GetGuestFilesystemsResponse() != "" { + if err := json.Unmarshal([]byte(fsResponse.GetGuestFilesystemsResponse()), &fsList); err != nil { + return v1.VirtualMachineInstanceFileSystemList{}, err + } + } + + filesystemList := v1.VirtualMachineInstanceFileSystemList{ + Items: fsList, + } + + return filesystemList, nil +} + +func (v VirtLauncherClient) Ping() error { + request := &cmdproto.EmptyRequest{} + ctx, cancel := context.WithTimeout(context.Background(), shortTimeout) + defer cancel() + response, err := v.v1client.Ping(ctx, request) + + err = handleError(err, "Ping", response) + return err +} + +func (v VirtLauncherClient) GuestPing(domainName string, timeoutSeconds int32) error { + request := &cmdproto.GuestPingRequest{ + DomainName: domainName, + TimeoutSeconds: timeoutSeconds, + } + ctx, cancel := context.WithTimeout( + context.Background(), + // we give the context a bit more time as the timeout should kick + // on the actual execution + time.Duration(timeoutSeconds)*time.Second+shortTimeout, + ) + defer cancel() + + _, err := v.v1client.GuestPing(ctx, request) + return err +} + +func (v VirtLauncherClient) GetQemuVersion() (string, error) { + request := &cmdproto.EmptyRequest{} + ctx, cancel := context.WithTimeout(context.Background(), shortTimeout) + defer cancel() + + versionResponse, err := v.v1client.GetQemuVersion(ctx, request) + var response *cmdproto.Response + if versionResponse != nil { + response = versionResponse.Response + } + if err = handleError(err, "GetQemuVersion", response); err != nil { + return "", err + } + + if versionResponse != nil && versionResponse.Version != "" { + return versionResponse.Version, nil + } + + return "", errors.New("error getting the qemu version") +} + +func (v VirtLauncherClient) GetSEVInfo() (*v1.SEVPlatformInfo, error) { + request := &cmdproto.EmptyRequest{} + ctx, cancel := context.WithTimeout(context.Background(), shortTimeout) + defer cancel() + + sevInfoResponse, err := v.v1client.GetSEVInfo(ctx, request) + if err = handleError(err, "GetSEVInfo", sevInfoResponse.GetResponse()); err != nil { + return nil, err + } + + sevPlatformInfo := &v1.SEVPlatformInfo{} + if err := json.Unmarshal(sevInfoResponse.GetSevInfo(), sevPlatformInfo); err != nil { + return nil, err + } + + return sevPlatformInfo, nil +} + +func (v VirtLauncherClient) Close() { + _ = v.conn.Close() +} + +func IsUnimplemented(err error) bool { + if grpcStatus, ok := status.FromError(err); ok { + if grpcStatus.Code() == codes.Unimplemented { + return true + } + } + return false +} +func handleError(err error, cmdName string, response *cmdproto.Response) error { + if IsDisconnected(err) { + return err + } else if IsUnimplemented(err) { + return err + } else if err != nil { + msg := fmt.Sprintf("unknown error encountered sending command %s: %s", cmdName, err.Error()) + return fmt.Errorf(msg) + } else if response != nil && !response.Success { + return fmt.Errorf("server error. command %s failed: %q", cmdName, response.Message) + } + return nil +} + +func IsDisconnected(err error) bool { + if err == nil { + return false + } + + if errors.Is(err, rpc.ErrShutdown) || errors.Is(err, io.ErrUnexpectedEOF) || err == io.EOF { + return true + } + + var opErr *net.OpError + if errors.As(err, &opErr) { + var syscallErr *os.SyscallError + if errors.As(opErr.Err, &syscallErr) { + // catches "connection reset by peer" + if errors.Is(syscallErr.Err, syscall.ECONNRESET) { + return true + } + } + } + + if grpcStatus, ok := status.FromError(err); ok { + + // see https://github.com/grpc/grpc-go/blob/master/codes/codes.go + switch grpcStatus.Code() { + case codes.Canceled: + // e.g. v1client connection closing + return true + } + + } + + return false +} diff --git a/images/virt-launcher/vlctl/pkg/client/grpc.go b/images/virt-launcher/vlctl/pkg/client/grpc.go new file mode 100644 index 0000000000..6f1fa343b3 --- /dev/null +++ b/images/virt-launcher/vlctl/pkg/client/grpc.go @@ -0,0 +1,40 @@ +package client + +import ( + "context" + "net" + "time" + + "google.golang.org/grpc" +) + +const ( + ConnectTimeoutSeconds = 2 +) + +func DialSocket(socketPath string) (*grpc.ClientConn, error) { + return DialSocketWithTimeout(socketPath, 0) +} + +func DialSocketWithTimeout(socketPath string, timeout int) (*grpc.ClientConn, error) { + + options := []grpc.DialOption{ + grpc.WithAuthority("localhost"), + grpc.WithInsecure(), + grpc.WithDialer(func(addr string, timeout time.Duration) (net.Conn, error) { + return net.DialTimeout("unix", addr, timeout) + }), + grpc.WithBlock(), // dial sync in order to catch errors early + } + + if timeout > 0 { + options = append(options, + grpc.WithTimeout(time.Duration(timeout+ConnectTimeoutSeconds)*time.Second), + ) + } + + ctx, cancel := context.WithTimeout(context.Background(), ConnectTimeoutSeconds*time.Second) + defer cancel() + + return grpc.DialContext(ctx, socketPath, options...) +} diff --git a/images/virt-launcher/vlctl/proto/notify.proto b/images/virt-launcher/vlctl/proto/notify.proto deleted file mode 100644 index d6ead354c1..0000000000 --- a/images/virt-launcher/vlctl/proto/notify.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; - -package kubevirt.notify.v1; -option go_package = "virt-launcher-plug/pkg/api/generated/notify"; - -service Notify { - rpc HandleDomainEvent(DomainEventRequest) returns (Response) {} - rpc HandleK8sEvent(K8sEventRequest) returns (Response) {} -} - -message DomainEventRequest { - bytes domainJSON = 1; - bytes statusJSON = 2; - string eventType = 3; -} - -message K8sEventRequest { - bytes eventJSON = 1; -} - -message Response { - bool success = 1; - string message = 2; -} From 2c7bedf533d2d17540b7eec80679626097778b0b Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Wed, 19 Nov 2025 16:52:11 +0300 Subject: [PATCH 3/4] add lic Signed-off-by: Nikita Korolev --- images/virt-launcher/vlctl/Taskfile.yaml | 11 +++++------ images/virt-launcher/vlctl/pkg/client/client.go | 16 ++++++++++++++++ images/virt-launcher/vlctl/pkg/client/grpc.go | 16 ++++++++++++++++ 3 files changed, 37 insertions(+), 6 deletions(-) diff --git a/images/virt-launcher/vlctl/Taskfile.yaml b/images/virt-launcher/vlctl/Taskfile.yaml index 6fb1e5ba04..59d736e84c 100644 --- a/images/virt-launcher/vlctl/Taskfile.yaml +++ b/images/virt-launcher/vlctl/Taskfile.yaml @@ -17,9 +17,8 @@ tasks: gen-proto: desc: Generate Go code from proto files cmds: - - mkdir -p pkg/api/generated - - mkdir -p pkg/api/generated/cmd - - mkdir -p pkg/api/generated/info - - protoc --go_out=pkg/api/generated/cmd --go_opt=paths=source_relative --go-grpc_out=pkg/api/generated/cmd --go-grpc_opt=paths=source_relative proto/cmd.proto - - protoc --go_out=pkg/api/generated/info --go_opt=paths=source_relative --go-grpc_out=pkg/api/generated/info --go-grpc_opt=paths=source_relative proto/info.proto - + - mkdir -p pkg/api/generated + - mkdir -p pkg/api/generated/cmd + - mkdir -p pkg/api/generated/info + - protoc --go_out=pkg/api/generated/cmd --go_opt=paths=source_relative --go-grpc_out=pkg/api/generated/cmd --go-grpc_opt=paths=source_relative proto/cmd.proto + - protoc --go_out=pkg/api/generated/info --go_opt=paths=source_relative --go-grpc_out=pkg/api/generated/info --go-grpc_opt=paths=source_relative proto/info.proto diff --git a/images/virt-launcher/vlctl/pkg/client/client.go b/images/virt-launcher/vlctl/pkg/client/client.go index 16ae14be8a..71a15c3e93 100644 --- a/images/virt-launcher/vlctl/pkg/client/client.go +++ b/images/virt-launcher/vlctl/pkg/client/client.go @@ -1,3 +1,19 @@ +/* +Copyright 2025 Flant JSC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + package client import ( diff --git a/images/virt-launcher/vlctl/pkg/client/grpc.go b/images/virt-launcher/vlctl/pkg/client/grpc.go index 6f1fa343b3..b9c64d90bc 100644 --- a/images/virt-launcher/vlctl/pkg/client/grpc.go +++ b/images/virt-launcher/vlctl/pkg/client/grpc.go @@ -1,3 +1,19 @@ +/* +Copyright 2025 Flant JSC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + package client import ( From 0ece88ca572c4f6d1d12f79346647b5fa7ce0bf7 Mon Sep 17 00:00:00 2001 From: Yaroslav Borbat Date: Wed, 19 Nov 2025 20:22:32 +0300 Subject: [PATCH 4/4] add client and domain types Signed-off-by: Yaroslav Borbat --- .../vlctl/cmd/vlctl/app/domain.go | 12 +- .../vlctl/cmd/vlctl/app/guest.go | 22 +- images/virt-launcher/vlctl/pkg/api/domain.go | 1142 +++++++++++++++++ images/virt-launcher/vlctl/pkg/api/stats.go | 174 +++ .../virt-launcher/vlctl/pkg/client/client.go | 36 +- images/virt-launcher/vlctl/pkg/client/grpc.go | 5 +- 6 files changed, 1346 insertions(+), 45 deletions(-) create mode 100644 images/virt-launcher/vlctl/pkg/api/domain.go create mode 100644 images/virt-launcher/vlctl/pkg/api/stats.go diff --git a/images/virt-launcher/vlctl/cmd/vlctl/app/domain.go b/images/virt-launcher/vlctl/cmd/vlctl/app/domain.go index efdd511fd0..002ae4a155 100644 --- a/images/virt-launcher/vlctl/cmd/vlctl/app/domain.go +++ b/images/virt-launcher/vlctl/cmd/vlctl/app/domain.go @@ -57,12 +57,7 @@ func runDomainCommand(opts BaseOptions) error { return fmt.Errorf("domain does not exist") } - spec, exist := domain["spec"] - if !exist { - return fmt.Errorf("domain does not exist") - } - - return marshalAndPrintOutput(&opts, spec) + return marshalAndPrintOutput(&opts, domain.Spec) } func NewDomainStatsCommand() *cobra.Command { @@ -89,12 +84,11 @@ func runDomainStatsCommand(opts BaseOptions) error { } defer client.Close() - stats, exist, err := client.GetDomainStats() + stats, exists, err := client.GetDomainStats() if err != nil { return fmt.Errorf("failed to get domain stats: %w", err) } - - if !exist { + if !exists { return fmt.Errorf("domain stats does not exist") } diff --git a/images/virt-launcher/vlctl/cmd/vlctl/app/guest.go b/images/virt-launcher/vlctl/cmd/vlctl/app/guest.go index 9cc84d37de..b4f64be541 100644 --- a/images/virt-launcher/vlctl/cmd/vlctl/app/guest.go +++ b/images/virt-launcher/vlctl/cmd/vlctl/app/guest.go @@ -168,27 +168,7 @@ func runGuestPingCommand(opts BaseOptions, timeout int32) error { return fmt.Errorf("domain does not exist") } - spec, exist := domain["spec"] - if !exist { - return fmt.Errorf("domain does not exist") - } - - specMap, ok := spec.(map[string]interface{}) - if !ok { - return fmt.Errorf("invalid spec format") - } - - name, exist := specMap["name"] - if !exist { - return fmt.Errorf("missing name in spec") - } - - domainName, ok := name.(string) - if !ok { - return fmt.Errorf("invalid name format") - } - - err = client.GuestPing(domainName, timeout) + err = client.GuestPing(domain.Spec.Name, timeout) if err != nil { return fmt.Errorf("failed to ping: %w", err) } diff --git a/images/virt-launcher/vlctl/pkg/api/domain.go b/images/virt-launcher/vlctl/pkg/api/domain.go new file mode 100644 index 0000000000..a3e21017f9 --- /dev/null +++ b/images/virt-launcher/vlctl/pkg/api/domain.go @@ -0,0 +1,1142 @@ +/* +Copyright 2017,The KubeVirt Authors. +Copyright 2025 Flant JSC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +Initially copied from https://github.com/kubevirt/kubevirt/blob/v1.6.2/pkg/virt-launcher/virtwrap/api/schema.go +*/ + +package api + +import ( + "encoding/json" + "encoding/xml" + "strings" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + + v1 "kubevirt.io/api/core/v1" +) + +const ( + UserAliasPrefix = "ua-" +) + +type Domain struct { + Spec DomainSpec +} + +type DomainSysInfo struct { + Hostname string + OSInfo GuestOSInfo + Timezone Timezone +} + +type GuestOSInfo struct { + Name string + KernelRelease string + Version string + PrettyName string + VersionId string + KernelVersion string + Machine string + Id string +} + +type InterfaceStatus struct { + Mac string + Ip string + IPs []string + InterfaceName string +} + +type SEVNodeParameters struct { + PDH string + CertChain string +} + +type Timezone struct { + Zone string + Offset int +} + +type FSFreeze struct { + Status string +} + +type FSDisk struct { + Serial string + BusType string +} + +type Filesystem struct { + Name string + Mountpoint string + Type string + UsedBytes int + TotalBytes int + Disk []FSDisk +} + +type User struct { + Name string + Domain string + LoginTime float64 +} + +type DomainGuestInfo struct { + Interfaces []InterfaceStatus + OSInfo *GuestOSInfo + FSFreezeStatus *FSFreeze +} + +// DomainSpec represents the actual conversion to libvirt XML. The fields must be +// tagged, and they must correspond to the libvirt domain as described in +// https://libvirt.org/formatdomain.html. +type DomainSpec struct { + XMLName xml.Name `xml:"domain"` + Type string `xml:"type,attr"` + XmlNS string `xml:"xmlns:qemu,attr,omitempty"` + Name string `xml:"name"` + UUID string `xml:"uuid,omitempty"` + Memory Memory `xml:"memory"` + CurrentMemory *Memory `xml:"currentMemory,omitempty"` + MaxMemory *MaxMemory `xml:"maxMemory,omitempty"` + MemoryBacking *MemoryBacking `xml:"memoryBacking,omitempty"` + OS OS `xml:"os"` + SysInfo *SysInfo `xml:"sysinfo,omitempty"` + Devices Devices `xml:"devices"` + Clock *Clock `xml:"clock,omitempty"` + Resource *Resource `xml:"resource,omitempty"` + QEMUCmd *Commandline `xml:"qemu:commandline,omitempty"` + Metadata Metadata `xml:"metadata,omitempty"` + Features *Features `xml:"features,omitempty"` + CPU CPU `xml:"cpu"` + VCPU *VCPU `xml:"vcpu"` + VCPUs *VCPUs `xml:"vcpus"` + CPUTune *CPUTune `xml:"cputune"` + NUMATune *NUMATune `xml:"numatune"` + IOThreads *IOThreads `xml:"iothreads,omitempty"` + LaunchSecurity *LaunchSecurity `xml:"launchSecurity,omitempty"` +} + +type CPUTune struct { + VCPUPin []CPUTuneVCPUPin `xml:"vcpupin"` + IOThreadPin []CPUTuneIOThreadPin `xml:"iothreadpin,omitempty"` + EmulatorPin *CPUEmulatorPin `xml:"emulatorpin"` +} + +type NUMATune struct { + Memory NumaTuneMemory `xml:"memory"` + MemNodes []MemNode `xml:"memnode"` +} + +type MemNode struct { + CellID uint32 `xml:"cellid,attr"` + Mode string `xml:"mode,attr"` + NodeSet string `xml:"nodeset,attr"` +} + +type NumaTuneMemory struct { + Mode string `xml:"mode,attr"` + NodeSet string `xml:"nodeset,attr"` +} + +type CPUTuneVCPUPin struct { + VCPU uint32 `xml:"vcpu,attr"` + CPUSet string `xml:"cpuset,attr"` +} + +type CPUTuneIOThreadPin struct { + IOThread uint32 `xml:"iothread,attr"` + CPUSet string `xml:"cpuset,attr"` +} + +type CPUEmulatorPin struct { + CPUSet string `xml:"cpuset,attr"` +} + +type VCPU struct { + Placement string `xml:"placement,attr"` + CPUs uint32 `xml:",chardata"` +} + +type VCPUsVCPU struct { + ID uint32 `xml:"id,attr"` + Enabled string `xml:"enabled,attr,omitempty"` + Hotpluggable string `xml:"hotpluggable,attr,omitempty"` + Order uint32 `xml:"order,attr,omitempty"` +} + +type VCPUs struct { + VCPU []VCPUsVCPU `xml:"vcpu"` +} + +type CPU struct { + Mode string `xml:"mode,attr,omitempty"` + Model string `xml:"model,omitempty"` + Features []CPUFeature `xml:"feature"` + Topology *CPUTopology `xml:"topology"` + NUMA *NUMA `xml:"numa,omitempty"` +} + +type NUMA struct { + Cells []NUMACell `xml:"cell"` +} + +type NUMACell struct { + ID string `xml:"id,attr"` + CPUs string `xml:"cpus,attr"` + Memory uint64 `xml:"memory,attr,omitempty"` + Unit string `xml:"unit,attr,omitempty"` + MemoryAccess string `xml:"memAccess,attr,omitempty"` +} + +type CPUFeature struct { + Name string `xml:"name,attr"` + Policy string `xml:"policy,attr,omitempty"` +} + +type CPUTopology struct { + Sockets uint32 `xml:"sockets,attr,omitempty"` + Cores uint32 `xml:"cores,attr,omitempty"` + Threads uint32 `xml:"threads,attr,omitempty"` +} + +type Features struct { + ACPI *FeatureEnabled `xml:"acpi,omitempty"` + APIC *FeatureEnabled `xml:"apic,omitempty"` + Hyperv *FeatureHyperv `xml:"hyperv,omitempty"` + SMM *FeatureEnabled `xml:"smm,omitempty"` + KVM *FeatureKVM `xml:"kvm,omitempty"` + PVSpinlock *FeaturePVSpinlock `xml:"pvspinlock,omitempty"` + PMU *FeatureState `xml:"pmu,omitempty"` + VMPort *FeatureState `xml:"vmport,omitempty"` +} + +const HypervModePassthrough = "passthrough" + +type FeatureHyperv struct { + Mode string `xml:"mode,attr,omitempty"` + Relaxed *FeatureState `xml:"relaxed,omitempty"` + VAPIC *FeatureState `xml:"vapic,omitempty"` + Spinlocks *FeatureSpinlocks `xml:"spinlocks,omitempty"` + VPIndex *FeatureState `xml:"vpindex,omitempty"` + Runtime *FeatureState `xml:"runtime,omitempty"` + SyNIC *FeatureState `xml:"synic,omitempty"` + SyNICTimer *SyNICTimer `xml:"stimer,omitempty"` + Reset *FeatureState `xml:"reset,omitempty"` + VendorID *FeatureVendorID `xml:"vendor_id,omitempty"` + Frequencies *FeatureState `xml:"frequencies,omitempty"` + Reenlightenment *FeatureState `xml:"reenlightenment,omitempty"` + TLBFlush *FeatureState `xml:"tlbflush,omitempty"` + IPI *FeatureState `xml:"ipi,omitempty"` + EVMCS *FeatureState `xml:"evmcs,omitempty"` +} + +type FeatureSpinlocks struct { + State string `xml:"state,attr,omitempty"` + Retries *uint32 `xml:"retries,attr,omitempty"` +} + +type SyNICTimer struct { + Direct *FeatureState `xml:"direct,omitempty"` + State string `xml:"state,attr,omitempty"` +} + +type FeaturePVSpinlock struct { + State string `xml:"state,attr,omitempty"` +} + +type FeatureVendorID struct { + State string `xml:"state,attr,omitempty"` + Value string `xml:"value,attr,omitempty"` +} + +type FeatureEnabled struct { +} + +type Shareable struct{} + +type Slice struct { + Slice SliceType `xml:"slice,omitempty"` +} + +type SliceType struct { + Type string `xml:"type,attr"` + Offset int64 `xml:"offset,attr"` + Size int64 `xml:"size,attr"` +} + +type FeatureState struct { + State string `xml:"state,attr,omitempty"` +} + +type FeatureKVM struct { + Hidden *FeatureState `xml:"hidden,omitempty"` + HintDedicated *FeatureState `xml:"hint-dedicated,omitempty"` +} + +type Metadata struct { + // KubeVirt contains kubevirt related metadata + // Note: Libvirt only accept one element at metadata root with a specific namespace + KubeVirt KubeVirtMetadata `xml:"http://kubevirt.io kubevirt"` +} + +type KubeVirtMetadata struct { + UID types.UID `xml:"uid"` + GracePeriod *GracePeriodMetadata `xml:"graceperiod,omitempty"` + Migration *MigrationMetadata `xml:"migration,omitempty"` + AccessCredential *AccessCredentialMetadata `xml:"accessCredential,omitempty"` + MemoryDump *MemoryDumpMetadata `xml:"memoryDump,omitempty"` +} + +type AccessCredentialMetadata struct { + Succeeded bool `xml:"succeeded,omitempty"` + Message string `xml:"message,omitempty"` +} + +type MemoryDumpMetadata struct { + FileName string `xml:"fileName,omitempty"` + StartTimestamp *metav1.Time `xml:"startTimestamp,omitempty"` + EndTimestamp *metav1.Time `xml:"endTimestamp,omitempty"` + Completed bool `xml:"completed,omitempty"` + Failed bool `xml:"failed,omitempty"` + FailureReason string `xml:"failureReason,omitempty"` +} + +type MigrationMetadata struct { + UID types.UID `xml:"uid,omitempty"` + StartTimestamp *metav1.Time `xml:"startTimestamp,omitempty"` + EndTimestamp *metav1.Time `xml:"endTimestamp,omitempty"` + Failed bool `xml:"failed,omitempty"` + FailureReason string `xml:"failureReason,omitempty"` + AbortStatus string `xml:"abortStatus,omitempty"` + Mode v1.MigrationMode `xml:"mode,omitempty"` +} + +type GracePeriodMetadata struct { + DeletionGracePeriodSeconds int64 `xml:"deletionGracePeriodSeconds"` + DeletionTimestamp *metav1.Time `xml:"deletionTimestamp,omitempty"` + MarkedForGracefulShutdown *bool `xml:"markedForGracefulShutdown,omitempty"` +} + +type Commandline struct { + QEMUEnv []Env `xml:"qemu:env,omitempty"` + QEMUArg []Arg `xml:"qemu:arg,omitempty"` +} + +type Env struct { + Name string `xml:"name,attr"` + Value string `xml:"value,attr"` +} + +type Arg struct { + Value string `xml:"value,attr"` +} + +type Resource struct { + Partition string `xml:"partition"` +} + +type Memory struct { + Value uint64 `xml:",chardata"` + Unit string `xml:"unit,attr"` +} + +type MaxMemory struct { + Value uint64 `xml:",chardata"` + Unit string `xml:"unit,attr"` + Slots uint64 `xml:"slots,attr"` +} + +// MemoryBacking mirroring libvirt XML under https://libvirt.org/formatdomain.html#elementsMemoryBacking +type MemoryBacking struct { + HugePages *HugePages `xml:"hugepages,omitempty"` + Source *MemoryBackingSource `xml:"source,omitempty"` + Access *MemoryBackingAccess `xml:"access,omitempty"` + Allocation *MemoryAllocation `xml:"allocation,omitempty"` + NoSharePages *NoSharePages `xml:"nosharepages,omitempty"` +} + +type MemoryAllocationMode string + +const ( + MemoryAllocationModeImmediate MemoryAllocationMode = "immediate" +) + +type MemoryAllocation struct { + Mode MemoryAllocationMode `xml:"mode,attr"` +} + +type MemoryBackingSource struct { + Type string `xml:"type,attr"` +} + +// HugePages mirroring libvirt XML under memoryBacking +type HugePages struct { + HugePage []HugePage `xml:"page,omitempty"` +} + +// HugePage mirroring libvirt XML under hugepages +type HugePage struct { + Size string `xml:"size,attr"` + Unit string `xml:"unit,attr"` + NodeSet string `xml:"nodeset,attr"` +} + +type MemoryBackingAccess struct { + Mode string `xml:"mode,attr"` +} + +type NoSharePages struct { +} + +type MemoryAddress struct { + Base string `xml:"base,attr"` +} + +type MemoryTarget struct { + Size Memory `xml:"size"` + Requested Memory `xml:"requested"` + Current Memory `xml:"current"` + Node string `xml:"node"` + Block Memory `xml:"block"` + Address *MemoryAddress `xml:"address,omitempty"` +} + +type MemoryDevice struct { + XMLName xml.Name `xml:"memory"` + Model string `xml:"model,attr"` + Target *MemoryTarget `xml:"target"` + Alias *Alias `xml:"alias,omitempty"` + Address *Address `xml:"address,omitempty"` +} + +type Devices struct { + Emulator string `xml:"emulator,omitempty"` + Interfaces []Interface `xml:"interface"` + Channels []Channel `xml:"channel"` + HostDevices []HostDevice `xml:"hostdev,omitempty"` + PanicDevices []PanicDevice `xml:"panic,omitempty"` + Controllers []Controller `xml:"controller,omitempty"` + Video []Video `xml:"video"` + Graphics []Graphics `xml:"graphics"` + Ballooning *MemBalloon `xml:"memballoon,omitempty"` + Disks []Disk `xml:"disk"` + Inputs []Input `xml:"input"` + Serials []Serial `xml:"serial"` + Consoles []Console `xml:"console"` + Watchdogs []Watchdog `xml:"watchdog,omitempty"` + Rng *Rng `xml:"rng,omitempty"` + Filesystems []FilesystemDevice `xml:"filesystem,omitempty"` + Redirs []RedirectedDevice `xml:"redirdev,omitempty"` + SoundCards []SoundCard `xml:"sound,omitempty"` + TPMs []TPM `xml:"tpm,omitempty"` + VSOCK *VSOCK `xml:"vsock,omitempty"` + Memory *MemoryDevice `xml:"memory,omitempty"` +} + +type PanicDevice struct { + Model *v1.PanicDeviceModel `xml:"model,attr,omitempty"` +} + +type TPM struct { + Model string `xml:"model,attr"` + Backend TPMBackend `xml:"backend"` +} + +type TPMBackend struct { + Type string `xml:"type,attr"` + Version string `xml:"version,attr"` + PersistentState string `xml:"persistent_state,attr,omitempty"` +} + +// RedirectedDevice describes a device to be redirected +// See: https://libvirt.org/formatdomain.html#redirected-devices +type RedirectedDevice struct { + Type string `xml:"type,attr"` + Bus string `xml:"bus,attr"` + Source RedirectedDeviceSource `xml:"source"` +} + +type RedirectedDeviceSource struct { + Mode string `xml:"mode,attr"` + Path string `xml:"path,attr"` +} + +type FilesystemDevice struct { + Type string `xml:"type,attr"` + AccessMode string `xml:"accessMode,attr"` + Source *FilesystemSource `xml:"source,omitempty"` + Target *FilesystemTarget `xml:"target,omitempty"` + Driver *FilesystemDriver `xml:"driver,omitempty"` + Binary *FilesystemBinary `xml:"binary,omitempty"` +} + +type FilesystemTarget struct { + Dir string `xml:"dir,attr,omitempty"` +} + +type FilesystemSource struct { + Dir string `xml:"dir,attr"` + Socket string `xml:"socket,attr,omitempty"` +} + +type FilesystemDriver struct { + Type string `xml:"type,attr"` + Queue string `xml:"queue,attr,omitempty"` +} + +type FilesystemBinary struct { + Path string `xml:"path,attr,omitempty"` + Xattr string `xml:"xattr,attr,omitempty"` + Cache *FilesystemBinaryCache `xml:"cache,omitempty"` + Lock *FilesystemBinaryLock `xml:"lock,omitempty"` +} + +type FilesystemBinaryCache struct { + Mode string `xml:"mode,attr,omitempty"` +} + +type FilesystemBinaryLock struct { + Posix string `xml:"posix,attr,omitempty"` + Flock string `xml:"flock,attr,omitempty"` +} + +// Input represents input device, e.g. tablet +type Input struct { + Type v1.InputType `xml:"type,attr"` + Bus v1.InputBus `xml:"bus,attr"` + Alias *Alias `xml:"alias,omitempty"` + Address *Address `xml:"address,omitempty"` + Model string `xml:"model,attr,omitempty"` +} + +// BEGIN HostDevice ----------------------------- +type HostDevice struct { + XMLName xml.Name `xml:"hostdev"` + Source HostDeviceSource `xml:"source"` + Type string `xml:"type,attr"` + BootOrder *BootOrder `xml:"boot,omitempty"` + Managed string `xml:"managed,attr,omitempty"` + Mode string `xml:"mode,attr,omitempty"` + Model string `xml:"model,attr,omitempty"` + Address *Address `xml:"address,omitempty"` + Alias *Alias `xml:"alias,omitempty"` + Display string `xml:"display,attr,omitempty"` + RamFB string `xml:"ramfb,attr,omitempty"` +} + +type HostDeviceSource struct { + Address *Address `xml:"address,omitempty"` +} + +// END HostDevice ----------------------------- + +// BEGIN Controller ----------------------------- + +// Controller represens libvirt controller element https://libvirt.org/formatdomain.html#elementsControllers +type Controller struct { + Type string `xml:"type,attr"` + Index string `xml:"index,attr"` + Model string `xml:"model,attr,omitempty"` + Driver *ControllerDriver `xml:"driver,omitempty"` + Alias *Alias `xml:"alias,omitempty"` + Address *Address `xml:"address,omitempty"` + PCIHole64 *PCIHole64 `xml:"pcihole64,omitempty"` +} + +// END Controller ----------------------------- + +// BEGIN ControllerDriver +type ControllerDriver struct { + IOThread *uint `xml:"iothread,attr,omitempty"` + Queues *uint `xml:"queues,attr,omitempty"` + IOMMU string `xml:"iommu,attr,omitempty"` +} + +// END ControllerDriver + +// BEGIN PCIHole64 +type PCIHole64 struct { + Value uint `xml:",chardata"` + Unit string `xml:"unit,attr,omitempty"` +} + +// END PCIHole64 + +// BEGIN Disk ----------------------------- + +type Disk struct { + Device string `xml:"device,attr"` + Snapshot string `xml:"snapshot,attr,omitempty"` + Type string `xml:"type,attr"` + Source DiskSource `xml:"source"` + Target DiskTarget `xml:"target"` + Serial string `xml:"serial,omitempty"` + Driver *DiskDriver `xml:"driver,omitempty"` + ReadOnly *ReadOnly `xml:"readonly,omitempty"` + Auth *DiskAuth `xml:"auth,omitempty"` + Alias *Alias `xml:"alias,omitempty"` + BackingStore *BackingStore `xml:"backingStore,omitempty"` + BootOrder *BootOrder `xml:"boot,omitempty"` + Address *Address `xml:"address,omitempty"` + Model string `xml:"model,attr,omitempty"` + BlockIO *BlockIO `xml:"blockio,omitempty"` + FilesystemOverhead *v1.Percent `xml:"filesystemOverhead,omitempty"` + Capacity *int64 `xml:"capacity,omitempty"` + ExpandDisksEnabled bool `xml:"expandDisksEnabled,omitempty"` + Shareable *Shareable `xml:"shareable,omitempty"` +} + +type DiskAuth struct { + Username string `xml:"username,attr"` + Secret *DiskSecret `xml:"secret,omitempty"` +} + +type DiskSecret struct { + Type string `xml:"type,attr"` + Usage string `xml:"usage,attr,omitempty"` + UUID string `xml:"uuid,attr,omitempty"` +} + +type ReadOnly struct{} + +type DiskSource struct { + Dev string `xml:"dev,attr,omitempty"` + File string `xml:"file,attr,omitempty"` + StartupPolicy string `xml:"startupPolicy,attr,omitempty"` + Protocol string `xml:"protocol,attr,omitempty"` + Name string `xml:"name,attr,omitempty"` + Host *DiskSourceHost `xml:"host,omitempty"` + Reservations *Reservations `xml:"reservations,omitempty"` + Slices []Slice `xml:"slices,omitempty"` +} + +type DiskTarget struct { + Bus v1.DiskBus `xml:"bus,attr,omitempty"` + Device string `xml:"dev,attr,omitempty"` + Tray string `xml:"tray,attr,omitempty"` +} + +type DiskDriver struct { + Cache string `xml:"cache,attr,omitempty"` + ErrorPolicy v1.DiskErrorPolicy `xml:"error_policy,attr,omitempty"` + IO v1.DriverIO `xml:"io,attr,omitempty"` + Name string `xml:"name,attr"` + Type string `xml:"type,attr"` + IOThread *uint `xml:"iothread,attr,omitempty"` + IOThreads *DiskIOThreads `xml:"iothreads"` + Queues *uint `xml:"queues,attr,omitempty"` + Discard string `xml:"discard,attr,omitempty"` + IOMMU string `xml:"iommu,attr,omitempty"` +} + +type DiskIOThreads struct { + IOThread []DiskIOThread `xml:"iothread"` +} + +type DiskIOThread struct { + Id uint32 `xml:"id,attr"` +} + +type DiskSourceHost struct { + Name string `xml:"name,attr"` + Port string `xml:"port,attr,omitempty"` +} + +type BackingStore struct { + Type string `xml:"type,attr,omitempty"` + Format *BackingStoreFormat `xml:"format,omitempty"` + Source *DiskSource `xml:"source,omitempty"` +} + +type BackingStoreFormat struct { + Type string `xml:"type,attr"` +} + +type BlockIO struct { + LogicalBlockSize uint `xml:"logical_block_size,attr,omitempty"` + PhysicalBlockSize uint `xml:"physical_block_size,attr,omitempty"` +} + +type Reservations struct { + Managed string `xml:"managed,attr,omitempty"` + SourceReservations *SourceReservations `xml:"source,omitempty"` +} + +type SourceReservations struct { + Type string `xml:"type,attr"` + Path string `xml:"path,attr,omitempty"` + Mode string `xml:"mode,attr,omitempty"` +} + +// END Disk ----------------------------- + +// BEGIN Serial ----------------------------- + +type Serial struct { + Type string `xml:"type,attr"` + Target *SerialTarget `xml:"target,omitempty"` + Source *SerialSource `xml:"source,omitempty"` + Alias *Alias `xml:"alias,omitempty"` + Log *SerialLog `xml:"log,omitempty"` +} + +type SerialTarget struct { + Port *uint `xml:"port,attr,omitempty"` +} + +type SerialSource struct { + Mode string `xml:"mode,attr,omitempty"` + Path string `xml:"path,attr,omitempty"` +} + +type SerialLog struct { + File string `xml:"file,attr,omitempty"` + Append string `xml:"append,attr,omitempty"` +} + +// END Serial ----------------------------- + +// BEGIN Console ----------------------------- + +type Console struct { + Type string `xml:"type,attr"` + Target *ConsoleTarget `xml:"target,omitempty"` + Source *ConsoleSource `xml:"source,omitempty"` + Alias *Alias `xml:"alias,omitempty"` +} + +type ConsoleTarget struct { + Type *string `xml:"type,attr,omitempty"` + Port *uint `xml:"port,attr,omitempty"` +} + +type ConsoleSource struct { + Mode string `xml:"mode,attr,omitempty"` + Path string `xml:"path,attr,omitempty"` +} + +// END Serial ----------------------------- + +// BEGIN Inteface ----------------------------- + +type Interface struct { + XMLName xml.Name `xml:"interface"` + Address *Address `xml:"address,omitempty"` + Type string `xml:"type,attr"` + TrustGuestRxFilters string `xml:"trustGuestRxFilters,attr,omitempty"` + Source InterfaceSource `xml:"source"` + Target *InterfaceTarget `xml:"target,omitempty"` + Model *Model `xml:"model,omitempty"` + MAC *MAC `xml:"mac,omitempty"` + MTU *MTU `xml:"mtu,omitempty"` + BandWidth *BandWidth `xml:"bandwidth,omitempty"` + BootOrder *BootOrder `xml:"boot,omitempty"` + LinkState *LinkState `xml:"link,omitempty"` + FilterRef *FilterRef `xml:"filterref,omitempty"` + Alias *Alias `xml:"alias,omitempty"` + Driver *InterfaceDriver `xml:"driver,omitempty"` + Rom *Rom `xml:"rom,omitempty"` + ACPI *ACPI `xml:"acpi,omitempty"` + Backend *InterfaceBackend `xml:"backend,omitempty"` + PortForward []InterfacePortForward `xml:"portForward,omitempty"` +} + +type InterfacePortForward struct { + Proto string `xml:"proto,attr"` + Address string `xml:"address,attr,omitempty"` + Dev string `xml:"dev,attr,omitempty"` + Ranges []InterfacePortForwardRange `xml:"range,omitempty"` +} + +type InterfacePortForwardRange struct { + Start uint `xml:"start,attr"` + End uint `xml:"end,attr,omitempty"` + To uint `xml:"to,attr,omitempty"` + Exclude string `xml:"exclude,attr,omitempty"` +} + +type InterfaceBackend struct { + Type string `xml:"type,attr,omitempty"` + LogFile string `xml:"logFile,attr,omitempty"` +} + +type ACPI struct { + Index uint `xml:"index,attr"` +} + +type InterfaceDriver struct { + Name string `xml:"name,attr"` + Queues *uint `xml:"queues,attr,omitempty"` + IOMMU string `xml:"iommu,attr,omitempty"` +} + +type LinkState struct { + State string `xml:"state,attr"` +} + +type BandWidth struct { +} + +type BootOrder struct { + Order uint `xml:"order,attr"` +} + +type MAC struct { + MAC string `xml:"address,attr"` +} + +type MTU struct { + Size string `xml:"size,attr"` +} + +type FilterRef struct { + Filter string `xml:"filter,attr"` +} + +type InterfaceSource struct { + Network string `xml:"network,attr,omitempty"` + Device string `xml:"dev,attr,omitempty"` + Bridge string `xml:"bridge,attr,omitempty"` + Mode string `xml:"mode,attr,omitempty"` + Address *Address `xml:"address,omitempty"` +} + +type Model struct { + Type string `xml:"type,attr"` +} + +type InterfaceTarget struct { + Device string `xml:"dev,attr"` + Managed string `xml:"managed,attr,omitempty"` +} + +type Alias struct { + name string + userDefined bool +} + +// Package private, responsible to interact with xml and json marshal/unmarshal +type userAliasMarshal struct { + Name string `xml:"name,attr"` + UserDefined bool `xml:"-"` +} + +type Rom struct { + Enabled string `xml:"enabled,attr"` +} + +func (alias *Alias) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { + var userAlias userAliasMarshal + err := d.DecodeElement(&userAlias, &start) + if err != nil { + return err + } + *alias = Alias{name: userAlias.Name} + if strings.HasPrefix(alias.name, UserAliasPrefix) { + alias.userDefined = true + alias.name = alias.name[len(UserAliasPrefix):] + } + return nil +} + +func (alias Alias) MarshalJSON() ([]byte, error) { + userAlias := userAliasMarshal{Name: alias.name, UserDefined: alias.userDefined} + return json.Marshal(&userAlias) +} + +func (alias *Alias) UnmarshalJSON(data []byte) error { + var userAlias userAliasMarshal + if err := json.Unmarshal(data, &userAlias); err != nil { + return err + } + *alias = Alias{name: userAlias.Name, userDefined: userAlias.UserDefined} + return nil +} + +// END Inteface ----------------------------- +//BEGIN OS -------------------- + +type OS struct { + Type OSType `xml:"type"` + ACPI *OSACPI `xml:"acpi,omitempty"` + SMBios *SMBios `xml:"smbios,omitempty"` + BootOrder []Boot `xml:"boot"` + BootMenu *BootMenu `xml:"bootmenu,omitempty"` + BIOS *BIOS `xml:"bios,omitempty"` + BootLoader *Loader `xml:"loader,omitempty"` + NVRam *NVRam `xml:"nvram,omitempty"` + Kernel string `xml:"kernel,omitempty"` + Initrd string `xml:"initrd,omitempty"` + KernelArgs string `xml:"cmdline,omitempty"` +} + +type OSType struct { + OS string `xml:",chardata"` + Arch string `xml:"arch,attr,omitempty"` + Machine string `xml:"machine,attr,omitempty"` +} + +type OSACPI struct { + Table []ACPITable `xml:"table,omitempty"` +} + +type ACPITable struct { + Path string `xml:",chardata"` + Type string `xml:"type,attr,omitempty"` +} + +type SMBios struct { + Mode string `xml:"mode,attr"` +} + +type NVRam struct { + Template string `xml:"template,attr,omitempty"` + NVRam string `xml:",chardata"` +} + +type Boot struct { + Dev string `xml:"dev,attr"` +} + +type BootMenu struct { + Enable string `xml:"enable,attr"` + Timeout *uint `xml:"timeout,attr,omitempty"` +} + +type Loader struct { + ReadOnly string `xml:"readonly,attr,omitempty"` + Secure string `xml:"secure,attr,omitempty"` + Type string `xml:"type,attr,omitempty"` + Path string `xml:",chardata"` +} + +// TODO +type BIOS struct { + UseSerial string `xml:"useserial,attr,omitempty"` +} + +type SysInfo struct { + Type string `xml:"type,attr"` + System []Entry `xml:"system>entry"` + BIOS []Entry `xml:"bios>entry"` + BaseBoard []Entry `xml:"baseBoard>entry"` + Chassis []Entry `xml:"chassis>entry"` +} + +type Entry struct { + Name string `xml:"name,attr"` + Value string `xml:",chardata"` +} + +//END OS -------------------- +//BEGIN LaunchSecurity -------------------- + +type LaunchSecurity struct { + Type string `xml:"type,attr"` + Cbitpos string `xml:"cbitpos,omitempty"` + ReducedPhysBits string `xml:"reducedPhysBits,omitempty"` + Policy string `xml:"policy,omitempty"` + DHCert string `xml:"dhCert,omitempty"` + Session string `xml:"session,omitempty"` +} + +//END LaunchSecurity -------------------- +//BEGIN Clock -------------------- + +type Clock struct { + Offset string `xml:"offset,attr,omitempty"` + Timezone string `xml:"timezone,attr,omitempty"` + Adjustment string `xml:"adjustment,attr,omitempty"` + Timer []Timer `xml:"timer,omitempty"` +} + +type Timer struct { + Name string `xml:"name,attr"` + TickPolicy string `xml:"tickpolicy,attr,omitempty"` + Present string `xml:"present,attr,omitempty"` + Track string `xml:"track,attr,omitempty"` + Frequency string `xml:"frequency,attr,omitempty"` +} + +//END Clock -------------------- + +//BEGIN Channel -------------------- + +type Channel struct { + Type string `xml:"type,attr"` + Source *ChannelSource `xml:"source,omitempty"` + Target *ChannelTarget `xml:"target,omitempty"` +} + +type ChannelTarget struct { + Name string `xml:"name,attr,omitempty"` + Type string `xml:"type,attr"` + Address string `xml:"address,attr,omitempty"` + Port uint `xml:"port,attr,omitempty"` + State string `xml:"state,attr,omitempty"` +} + +type ChannelSource struct { + Mode string `xml:"mode,attr"` + Path string `xml:"path,attr"` +} + +//END Channel -------------------- + +//BEGIN Sound ------------------- + +type SoundCard struct { + Alias *Alias `xml:"alias,omitempty"` + Model string `xml:"model,attr"` +} + +//END Sound ------------------- + +//BEGIN Video ------------------- + +type Video struct { + Model VideoModel `xml:"model"` +} + +type VideoModel struct { + Type string `xml:"type,attr"` + Heads *uint `xml:"heads,attr,omitempty"` + Ram *uint `xml:"ram,attr,omitempty"` + VRam *uint `xml:"vram,attr,omitempty"` + VGAMem *uint `xml:"vgamem,attr,omitempty"` +} + +type Graphics struct { + AutoPort string `xml:"autoport,attr,omitempty"` + DefaultMode string `xml:"defaultMode,attr,omitempty"` + Listen *GraphicsListen `xml:"listen,omitempty"` + PasswdValidTo string `xml:"passwdValidTo,attr,omitempty"` + Port int32 `xml:"port,attr,omitempty"` + TLSPort int `xml:"tlsPort,attr,omitempty"` + Type string `xml:"type,attr"` +} + +type GraphicsListen struct { + Type string `xml:"type,attr"` + Address string `xml:"address,attr,omitempty"` + Network string `xml:"newtork,attr,omitempty"` + Socket string `xml:"socket,attr,omitempty"` +} + +type Address struct { + Type string `xml:"type,attr"` + Domain string `xml:"domain,attr,omitempty"` + Bus string `xml:"bus,attr"` + Slot string `xml:"slot,attr,omitempty"` + Function string `xml:"function,attr,omitempty"` + Controller string `xml:"controller,attr,omitempty"` + Target string `xml:"target,attr,omitempty"` + Unit string `xml:"unit,attr,omitempty"` + UUID string `xml:"uuid,attr,omitempty"` + Device string `xml:"device,attr,omitempty"` + CSSID string `xml:"cssid,attr,omitempty"` + SSID string `xml:"ssid,attr,omitempty"` + DevNo string `xml:"devno,attr,omitempty"` +} + +//END Video ------------------- + +//BEGIN VSOCK ------------------- + +type VSOCK struct { + Model string `xml:"model,attr,omitempty"` + CID CID `xml:"cid"` +} + +type CID struct { + Auto string `xml:"auto,attr"` + Address uint32 `xml:"address,attr,omitempty"` +} + +//END VSOCK ------------------- + +type Stats struct { + Period uint `xml:"period,attr"` +} + +type MemBalloon struct { + Model string `xml:"model,attr"` + Stats *Stats `xml:"stats,omitempty"` + Address *Address `xml:"address,omitempty"` + Driver *MemBalloonDriver `xml:"driver,omitempty"` + FreePageReporting string `xml:"freePageReporting,attr,omitempty"` +} + +type MemBalloonDriver struct { + IOMMU string `xml:"iommu,attr,omitempty"` +} + +type Watchdog struct { + Model string `xml:"model,attr"` + Action string `xml:"action,attr"` + Alias *Alias `xml:"alias,omitempty"` + Address *Address `xml:"address,omitempty"` +} + +// Rng represents the source of entropy from host to VM +type Rng struct { + // Model attribute specifies what type of RNG device is provided + Model string `xml:"model,attr"` + // Backend specifies the source of entropy to be used + Backend *RngBackend `xml:"backend,omitempty"` + Address *Address `xml:"address,omitempty"` + Driver *RngDriver `xml:"driver,omitempty"` +} + +type RngDriver struct { + IOMMU string `xml:"iommu,attr,omitempty"` +} + +// RngRate sets the limiting factor how to read from entropy source +type RngRate struct { + // Period define how long is the read period + Period uint32 `xml:"period,attr"` + // Bytes define how many bytes can guest read from entropy source + Bytes uint32 `xml:"bytes,attr"` +} + +// RngBackend is the backend device used +type RngBackend struct { + // Model is source model + Model string `xml:"model,attr"` + // specifies the source of entropy to be used + Source string `xml:",chardata"` +} + +type IOThreads struct { + IOThreads uint `xml:",chardata"` +} + +type SecretUsage struct { + Type string `xml:"type,attr"` + Target string `xml:"target,omitempty"` +} + +type SecretSpec struct { + XMLName xml.Name `xml:"secret"` + Ephemeral string `xml:"ephemeral,attr"` + Private string `xml:"private,attr"` + Description string `xml:"description,omitempty"` + Usage SecretUsage `xml:"usage,omitempty"` +} diff --git a/images/virt-launcher/vlctl/pkg/api/stats.go b/images/virt-launcher/vlctl/pkg/api/stats.go new file mode 100644 index 0000000000..ee0433bea3 --- /dev/null +++ b/images/virt-launcher/vlctl/pkg/api/stats.go @@ -0,0 +1,174 @@ +/* +Copyright The KubeVirt Authors. +Copyright 2025 Flant JSC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +Initially copied from https://github.com/kubevirt/kubevirt/blob/v1.6.2/pkg/virt-launcher/virtwrap/stats/types.go +*/ + +package api + +type DomainStats struct { + // the following aren't really needed for stats, but it's practical to report + // OTOH, the whole "Domain" is too much data to be unconditionally reported + Name string + UUID string + // omitted from libvirt-go: Domain + // omitted from libvirt-go: State + Cpu *DomainStatsCPU + // new, see below + Memory *DomainStatsMemory + // omitted from libvirt-go: DomainJobInfo + MigrateDomainJobInfo *DomainJobInfo + // omitted from libvirt-go: Balloon + Vcpu []DomainStatsVcpu + Net []DomainStatsNet + Block []DomainStatsBlock + // omitted from libvirt-go: Perf + // extra stats + CPUMapSet bool + CPUMap [][]bool + NrVirtCpu uint + DirtyRate *DomainStatsDirtyRate +} + +type DomainStatsCPU struct { + TimeSet bool + Time uint64 + UserSet bool + User uint64 + SystemSet bool + System uint64 +} + +type DomainStatsVcpu struct { + StateSet bool + State int // VcpuState + TimeSet bool + Time uint64 + WaitSet bool + Wait uint64 + DelaySet bool + Delay uint64 +} + +type DomainStatsNet struct { + NameSet bool + Name string + AliasSet bool + Alias string + RxBytesSet bool + RxBytes uint64 + RxPktsSet bool + RxPkts uint64 + RxErrsSet bool + RxErrs uint64 + RxDropSet bool + RxDrop uint64 + TxBytesSet bool + TxBytes uint64 + TxPktsSet bool + TxPkts uint64 + TxErrsSet bool + TxErrs uint64 + TxDropSet bool + TxDrop uint64 +} + +type DomainStatsBlock struct { + NameSet bool + Name string + Alias string + BackingIndexSet bool + BackingIndex uint + PathSet bool + Path string + RdReqsSet bool + RdReqs uint64 + RdBytesSet bool + RdBytes uint64 + RdTimesSet bool + RdTimes uint64 + WrReqsSet bool + WrReqs uint64 + WrBytesSet bool + WrBytes uint64 + WrTimesSet bool + WrTimes uint64 + FlReqsSet bool + FlReqs uint64 + FlTimesSet bool + FlTimes uint64 + ErrorsSet bool + Errors uint64 + AllocationSet bool + Allocation uint64 + CapacitySet bool + Capacity uint64 + PhysicalSet bool + Physical uint64 +} + +// mimic existing structs, but data is taken from +// DomainMemoryStat +type DomainStatsMemory struct { + UnusedSet bool + Unused uint64 + CachedSet bool + Cached uint64 + AvailableSet bool + Available uint64 + ActualBalloonSet bool + ActualBalloon uint64 + RSSSet bool + RSS uint64 + SwapInSet bool + SwapIn uint64 + SwapOutSet bool + SwapOut uint64 + MajorFaultSet bool + MajorFault uint64 + MinorFaultSet bool + MinorFault uint64 + UsableSet bool + Usable uint64 + TotalSet bool + Total uint64 +} + +// mimic existing structs, but data is taken from +// DomainJobInfo +type DomainJobInfo struct { + DataTotalSet bool + DataTotal uint64 + DataProcessedSet bool + DataProcessed uint64 + MemoryBpsSet bool + MemoryBps uint64 + DataRemainingSet bool + DataRemaining uint64 + MemDirtyRateSet bool + MemDirtyRate uint64 +} + +type DomainStatsDirtyRate struct { + CalcStatusSet bool + CalcStatus int + CalcStartTimeSet bool + CalcStartTime int64 + CalcPeriodSet bool + CalcPeriod int + MegabytesPerSecondSet bool + MegabytesPerSecond int64 +} diff --git a/images/virt-launcher/vlctl/pkg/client/client.go b/images/virt-launcher/vlctl/pkg/client/client.go index 71a15c3e93..2260ac61f3 100644 --- a/images/virt-launcher/vlctl/pkg/client/client.go +++ b/images/virt-launcher/vlctl/pkg/client/client.go @@ -1,17 +1,20 @@ /* +Copyright The KubeVirt Authors. Copyright 2025 Flant JSC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + +Initially copied from https://github.com/kubevirt/kubevirt/blob/v1.6.2/pkg/virt-handler/cmd-client/client.go */ package client @@ -34,6 +37,7 @@ import ( "google.golang.org/grpc/status" v1 "kubevirt.io/api/core/v1" + "vlctl/pkg/api" cmdproto "vlctl/pkg/api/generated/cmd/proto" infoproto "vlctl/pkg/api/generated/info/proto" ) @@ -47,8 +51,8 @@ const ( ) type LauncherClient interface { - GetDomain() (map[string]interface{}, bool, error) - GetDomainStats() (map[string]interface{}, bool, error) + GetDomain() (*api.Domain, bool, error) + GetDomainStats() (*api.DomainStats, bool, error) GetGuestInfo() (*v1.VirtualMachineInstanceGuestAgentInfo, error) GetUsers() (v1.VirtualMachineInstanceGuestOSUserList, error) GetFilesystems() (v1.VirtualMachineInstanceFileSystemList, error) @@ -116,8 +120,9 @@ type VirtLauncherClient struct { conn *grpc.ClientConn } -func (v VirtLauncherClient) GetDomain() (map[string]interface{}, bool, error) { - var domain map[string]interface{} +func (v VirtLauncherClient) GetDomain() (*api.Domain, bool, error) { + domain := &api.Domain{} + exists := false request := &cmdproto.EmptyRequest{} ctx, cancel := context.WithTimeout(context.Background(), shortTimeout) @@ -130,19 +135,21 @@ func (v VirtLauncherClient) GetDomain() (map[string]interface{}, bool, error) { } if err = handleError(err, "GetDomain", response); err != nil || domainResponse == nil { - return domain, false, err + return nil, false, err } if domainResponse.Domain != "" { if err := json.Unmarshal([]byte(domainResponse.Domain), &domain); err != nil { - return domain, false, err + return nil, false, err } + exists = true } - return domain, true, nil + return domain, exists, nil } -func (v VirtLauncherClient) GetDomainStats() (map[string]interface{}, bool, error) { - var stats map[string]interface{} +func (v VirtLauncherClient) GetDomainStats() (*api.DomainStats, bool, error) { + stats := &api.DomainStats{} + exists := false request := &cmdproto.EmptyRequest{} ctx, cancel := context.WithTimeout(context.Background(), shortTimeout) @@ -155,15 +162,16 @@ func (v VirtLauncherClient) GetDomainStats() (map[string]interface{}, bool, erro } if err = handleError(err, "GetDomainStats", response); err != nil || domainStatsResponse == nil { - return stats, false, err + return nil, false, err } if domainStatsResponse.DomainStats != "" { - if err := json.Unmarshal([]byte(domainStatsResponse.DomainStats), &stats); err != nil { - return stats, false, err + if err := json.Unmarshal([]byte(domainStatsResponse.DomainStats), stats); err != nil { + return nil, false, err } + exists = true } - return stats, true, nil + return stats, exists, nil } func (v VirtLauncherClient) GetGuestInfo() (*v1.VirtualMachineInstanceGuestAgentInfo, error) { diff --git a/images/virt-launcher/vlctl/pkg/client/grpc.go b/images/virt-launcher/vlctl/pkg/client/grpc.go index b9c64d90bc..7251958d22 100644 --- a/images/virt-launcher/vlctl/pkg/client/grpc.go +++ b/images/virt-launcher/vlctl/pkg/client/grpc.go @@ -1,17 +1,20 @@ /* +Copyright The KubeVirt Authors. Copyright 2025 Flant JSC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + +Initially copied from https://github.com/kubevirt/kubevirt/blob/v1.6.2/pkg/util/net/grpc/grpc.go */ package client