diff --git a/v3/pkg/apis/hobbyfarm.io/v1/types.go b/v3/pkg/apis/hobbyfarm.io/v1/types.go index eacb50ab..d1e1f751 100644 --- a/v3/pkg/apis/hobbyfarm.io/v1/types.go +++ b/v3/pkg/apis/hobbyfarm.io/v1/types.go @@ -33,16 +33,24 @@ type VirtualMachineList struct { } type VirtualMachineSpec struct { - VirtualMachineTemplateId string `json:"vm_template_id"` - SshUsername string `json:"ssh_username"` - Protocol string `json:"protocol"` - SecretName string `json:"secret_name"` // this refers to the secret name for the keypair - VirtualMachineClaimId string `json:"vm_claim_id"` - UserId string `json:"user"` - Provision bool `json:"provision"` - VirtualMachineSetId string `json:"vm_set_id"` + VirtualMachineTemplateId string `json:"vm_template_id"` + SshUsername string `json:"ssh_username"` + Protocol string `json:"protocol"` + SecretName string `json:"secret_name"` // this refers to the secret name for the keypair + VirtualMachineClaimId string `json:"vm_claim_id"` + UserId string `json:"user"` + Provision bool `json:"provision"` + VirtualMachineSetId string `json:"vm_set_id"` + VirtualMachineType VirtualMachineType `json:"vm_type"` } +type VirtualMachineType string + +const ( + VirtualMachineTypeUser VirtualMachineType = "USER" + VirtualMachineTypeShared VirtualMachineType = "SHARED" +) + type VirtualMachineStatus struct { Status VmStatus `json:"status"` // default is nothing, but could be one of the following: readyforprovisioning, provisioning, running, terminating Allocated bool `json:"allocated"` @@ -488,6 +496,7 @@ type ScheduledEventSpec struct { Printable bool `json:"printable"` Scenarios []string `json:"scenarios"` Courses []string `json:"courses"` + SharedVirtualMachines []SharedVirtualMachine `json:"shared_vms"` } type ScheduledEventStatus struct { @@ -498,6 +507,13 @@ type ScheduledEventStatus struct { Finished bool `json:"finished"` } +type SharedVirtualMachine struct { + VMId string `json:"vmId"` + Name string `json:"name"` + Environment string `json:"environment"` + VMTemplate string `json:"vmTemplate"` +} + // +genclient // +genclient:noStatus // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/v3/pkg/shell/shell.go b/v3/pkg/shell/shell.go index 7e29a824..2ed9dc27 100644 --- a/v3/pkg/shell/shell.go +++ b/v3/pkg/shell/shell.go @@ -182,7 +182,8 @@ func (sp ShellProxy) proxy(w http.ResponseWriter, r *http.Request, user *userpb. return } - if vm.GetUser() != user.GetId() { + // TODO, if this is a shared VM we should check if the user has access to the Event this Shared VM belongs too. + if vm.GetUser() != user.GetId() && vm.GetVmType() == vmpb.VirtualMachineType_USER { // check if the user has access to user sessions impersonatedUserId := user.GetId() authrResponse, err := rbac2.Authorize(r, sp.authrClient, impersonatedUserId, []*authrpb.Permission{ @@ -840,11 +841,9 @@ func (sp ShellProxy) VerifyTasksFuncByVMIdGroupWithSemaphore(w http.ResponseWrit // Handle the error (log, return HTTP error response) close(errorChan) glog.Infof("Error in goroutine: %v", err) - util.ReturnHTTPMessage(w, r, 500, "error", "could send command to vm") + util.ReturnHTTPMessage(w, r, 500, "error", "could not send command to vm") return default: - // No error in the errorChan - glog.Infof("No Error in goroutine: %v", vm_output_tasks) jsonStr, _ := json.Marshal(vm_output_tasks) util.ReturnHTTPContent(w, r, 200, "success", jsonStr) } diff --git a/v3/pkg/util/conversion.go b/v3/pkg/util/conversion.go index 00692f8a..b74aa47c 100644 --- a/v3/pkg/util/conversion.go +++ b/v3/pkg/util/conversion.go @@ -55,3 +55,20 @@ func ConvertToStringMapStructMap(in map[string]map[string]string) map[string]*ge } return output } + +// This function converts a string or underlying string type to a protobuf enum +func ConvertToPBEnum[T ~string, PB ~int32](val T, pbmap map[string]int32, dftVal PB) PB { + v, ok := pbmap[string(val)] + if !ok { + return dftVal + } + return PB(v) +} + +func ConvertToStringEnum[PB ~int32, T ~string](pbval PB, pbmap map[int32]string, dftStr T) T { + v, ok := pbmap[int32(pbval)] + if !ok { + return dftStr + } + return T(v) +} diff --git a/v3/pkg/util/verify.go b/v3/pkg/util/verify.go index f1ebb292..6416ab79 100644 --- a/v3/pkg/util/verify.go +++ b/v3/pkg/util/verify.go @@ -82,3 +82,24 @@ func VerifyTaskContent(vm_tasks []hfv1.VirtualMachineTasks, request proto.Messag } return nil } + +func VerifySharedVirtualMachineContent(virtual_machines []hfv1.SharedVirtualMachine, request proto.Message) error { + //Verify that name, description and command are not empty + for _, virtual_machine := range virtual_machines { + if virtual_machine.Name == "" { + glog.Errorf("error: Name (of virtual_machines) is not specified") + return hferrors.GrpcError(codes.InvalidArgument, "name for virtual_machines property is not specified", request) + } + + if virtual_machine.Environment == "" { + glog.Errorf("error: Environment (of virtual_machine %s) is not specified", virtual_machine.Name) + return hferrors.GrpcError(codes.InvalidArgument, "name for virtual_machines property is not specified for "+virtual_machine.Name, request) + } + + if virtual_machine.VMTemplate == "" { + glog.Errorf("error VMTemplate (of virtual_machine %s) is not specified", virtual_machine.Name) + return hferrors.GrpcError(codes.InvalidArgument, "name for virtual_machines property is not specified for "+virtual_machine.Name, request) + } + } + return nil +} diff --git a/v3/protos/accesscode/accesscode.pb.go b/v3/protos/accesscode/accesscode.pb.go index 891aad5f..a19d5ecf 100644 --- a/v3/protos/accesscode/accesscode.pb.go +++ b/v3/protos/accesscode/accesscode.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 +// protoc-gen-go v1.36.3 // protoc v3.21.12 // source: accesscode/accesscode.proto diff --git a/v3/protos/authn/authn.pb.go b/v3/protos/authn/authn.pb.go index 7df4c823..14bb1426 100644 --- a/v3/protos/authn/authn.pb.go +++ b/v3/protos/authn/authn.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 +// protoc-gen-go v1.36.3 // protoc v3.21.12 // source: authn/authn.proto diff --git a/v3/protos/authr/authr.pb.go b/v3/protos/authr/authr.pb.go index 79603713..5e91e9a9 100644 --- a/v3/protos/authr/authr.pb.go +++ b/v3/protos/authr/authr.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 +// protoc-gen-go v1.36.3 // protoc v3.21.12 // source: authr/authr.proto diff --git a/v3/protos/cost/cost.pb.go b/v3/protos/cost/cost.pb.go index dd7d55fa..c667acbc 100644 --- a/v3/protos/cost/cost.pb.go +++ b/v3/protos/cost/cost.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.2 +// protoc-gen-go v1.36.3 // protoc v3.21.12 // source: cost/cost.proto diff --git a/v3/protos/course/course.pb.go b/v3/protos/course/course.pb.go index 2af2be5c..d1cbc892 100644 --- a/v3/protos/course/course.pb.go +++ b/v3/protos/course/course.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 +// protoc-gen-go v1.36.3 // protoc v3.21.12 // source: course/course.proto diff --git a/v3/protos/dbconfig/dbconfig.pb.go b/v3/protos/dbconfig/dbconfig.pb.go index c210142a..4e9eba1f 100644 --- a/v3/protos/dbconfig/dbconfig.pb.go +++ b/v3/protos/dbconfig/dbconfig.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 +// protoc-gen-go v1.36.3 // protoc v3.21.12 // source: dbconfig/dbconfig.proto diff --git a/v3/protos/environment/environment.pb.go b/v3/protos/environment/environment.pb.go index 49be531f..d43937fd 100644 --- a/v3/protos/environment/environment.pb.go +++ b/v3/protos/environment/environment.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 +// protoc-gen-go v1.36.3 // protoc v3.21.12 // source: environment/environment.proto diff --git a/v3/protos/general/general.pb.go b/v3/protos/general/general.pb.go index 161d38dc..6e88b1bc 100644 --- a/v3/protos/general/general.pb.go +++ b/v3/protos/general/general.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 +// protoc-gen-go v1.36.3 // protoc v3.21.12 // source: general/general.proto diff --git a/v3/protos/progress/progress.pb.go b/v3/protos/progress/progress.pb.go index 10aa2e75..f1be320d 100644 --- a/v3/protos/progress/progress.pb.go +++ b/v3/protos/progress/progress.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 +// protoc-gen-go v1.36.3 // protoc v3.21.12 // source: progress/progress.proto diff --git a/v3/protos/rbac/rbac.pb.go b/v3/protos/rbac/rbac.pb.go index 04121f2c..e4950857 100644 --- a/v3/protos/rbac/rbac.pb.go +++ b/v3/protos/rbac/rbac.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 +// protoc-gen-go v1.36.3 // protoc v3.21.12 // source: rbac/rbac.proto diff --git a/v3/protos/scenario/scenario.pb.go b/v3/protos/scenario/scenario.pb.go index ceacf5f6..a3bf78a9 100644 --- a/v3/protos/scenario/scenario.pb.go +++ b/v3/protos/scenario/scenario.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 +// protoc-gen-go v1.36.3 // protoc v3.21.12 // source: scenario/scenario.proto diff --git a/v3/protos/scheduledevent/scheduledevent.pb.go b/v3/protos/scheduledevent/scheduledevent.pb.go index ca1dcfa8..5d551786 100644 --- a/v3/protos/scheduledevent/scheduledevent.pb.go +++ b/v3/protos/scheduledevent/scheduledevent.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 +// protoc-gen-go v1.36.3 // protoc v3.21.12 // source: scheduledevent/scheduledevent.proto @@ -40,8 +40,9 @@ type ScheduledEvent struct { AccessCode string `protobuf:"bytes,13,opt,name=access_code,json=accessCode,proto3" json:"access_code,omitempty"` Scenarios []string `protobuf:"bytes,14,rep,name=scenarios,proto3" json:"scenarios,omitempty"` Courses []string `protobuf:"bytes,15,rep,name=courses,proto3" json:"courses,omitempty"` - Labels map[string]string `protobuf:"bytes,16,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Status *ScheduledEventStatus `protobuf:"bytes,17,opt,name=status,proto3" json:"status,omitempty"` + SharedVms []*SharedVirtualMachine `protobuf:"bytes,16,rep,name=shared_vms,json=sharedVms,proto3" json:"shared_vms,omitempty"` + Labels map[string]string `protobuf:"bytes,17,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Status *ScheduledEventStatus `protobuf:"bytes,18,opt,name=status,proto3" json:"status,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -181,6 +182,13 @@ func (x *ScheduledEvent) GetCourses() []string { return nil } +func (x *ScheduledEvent) GetSharedVms() []*SharedVirtualMachine { + if x != nil { + return x.SharedVms + } + return nil +} + func (x *ScheduledEvent) GetLabels() map[string]string { if x != nil { return x.Labels @@ -206,11 +214,12 @@ type CreateScheduledEventRequest struct { Printable bool `protobuf:"varint,7,opt,name=printable,proto3" json:"printable,omitempty"` RestrictedBind bool `protobuf:"varint,8,opt,name=restricted_bind,json=restrictedBind,proto3" json:"restricted_bind,omitempty"` // required_vms is mapping environments to their respective VMTemplateCountMap - RequiredVmsRaw string `protobuf:"bytes,9,opt,name=required_vms_raw,json=requiredVmsRaw,proto3" json:"required_vms_raw,omitempty"` - AccessCode string `protobuf:"bytes,10,opt,name=access_code,json=accessCode,proto3" json:"access_code,omitempty"` - ScenariosRaw string `protobuf:"bytes,11,opt,name=scenarios_raw,json=scenariosRaw,proto3" json:"scenarios_raw,omitempty"` - CoursesRaw string `protobuf:"bytes,12,opt,name=courses_raw,json=coursesRaw,proto3" json:"courses_raw,omitempty"` - Labels map[string]string `protobuf:"bytes,13,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + RequiredVmsRaw string `protobuf:"bytes,9,opt,name=required_vms_raw,json=requiredVmsRaw,proto3" json:"required_vms_raw,omitempty"` + AccessCode string `protobuf:"bytes,10,opt,name=access_code,json=accessCode,proto3" json:"access_code,omitempty"` + ScenariosRaw string `protobuf:"bytes,11,opt,name=scenarios_raw,json=scenariosRaw,proto3" json:"scenarios_raw,omitempty"` + CoursesRaw string `protobuf:"bytes,12,opt,name=courses_raw,json=coursesRaw,proto3" json:"courses_raw,omitempty"` + SharedVms *SharedVirtualMachineWrapper `protobuf:"bytes,13,opt,name=shared_vms,json=sharedVms,proto3" json:"shared_vms,omitempty"` + Labels map[string]string `protobuf:"bytes,14,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -329,6 +338,13 @@ func (x *CreateScheduledEventRequest) GetCoursesRaw() string { return "" } +func (x *CreateScheduledEventRequest) GetSharedVms() *SharedVirtualMachineWrapper { + if x != nil { + return x.SharedVms + } + return nil +} + func (x *CreateScheduledEventRequest) GetLabels() map[string]string { if x != nil { return x.Labels @@ -392,10 +408,11 @@ type UpdateScheduledEventRequest struct { Printable *wrapperspb.BoolValue `protobuf:"bytes,7,opt,name=printable,proto3" json:"printable,omitempty"` RestrictedBind *wrapperspb.BoolValue `protobuf:"bytes,8,opt,name=restricted_bind,json=restrictedBind,proto3" json:"restricted_bind,omitempty"` // required_vms is mapping environments to their respective VMTemplateCountMap - RequiredVmsRaw string `protobuf:"bytes,9,opt,name=required_vms_raw,json=requiredVmsRaw,proto3" json:"required_vms_raw,omitempty"` - AccessCode string `protobuf:"bytes,10,opt,name=access_code,json=accessCode,proto3" json:"access_code,omitempty"` - ScenariosRaw string `protobuf:"bytes,11,opt,name=scenarios_raw,json=scenariosRaw,proto3" json:"scenarios_raw,omitempty"` - CoursesRaw string `protobuf:"bytes,12,opt,name=courses_raw,json=coursesRaw,proto3" json:"courses_raw,omitempty"` + RequiredVmsRaw string `protobuf:"bytes,9,opt,name=required_vms_raw,json=requiredVmsRaw,proto3" json:"required_vms_raw,omitempty"` + AccessCode string `protobuf:"bytes,10,opt,name=access_code,json=accessCode,proto3" json:"access_code,omitempty"` + ScenariosRaw string `protobuf:"bytes,11,opt,name=scenarios_raw,json=scenariosRaw,proto3" json:"scenarios_raw,omitempty"` + CoursesRaw string `protobuf:"bytes,12,opt,name=courses_raw,json=coursesRaw,proto3" json:"courses_raw,omitempty"` + SharedVms *SharedVirtualMachineWrapper `protobuf:"bytes,13,opt,name=shared_vms,json=sharedVms,proto3" json:"shared_vms,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -514,6 +531,13 @@ func (x *UpdateScheduledEventRequest) GetCoursesRaw() string { return "" } +func (x *UpdateScheduledEventRequest) GetSharedVms() *SharedVirtualMachineWrapper { + if x != nil { + return x.SharedVms + } + return nil +} + type UpdateScheduledEventStatusRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -762,6 +786,118 @@ func (x *ListScheduledEventsResponse) GetScheduledevents() []*ScheduledEvent { return nil } +type SharedVirtualMachine struct { + state protoimpl.MessageState `protogen:"open.v1"` + VmId string `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Environment string `protobuf:"bytes,3,opt,name=environment,proto3" json:"environment,omitempty"` + VmTemplate string `protobuf:"bytes,4,opt,name=vm_template,json=vmTemplate,proto3" json:"vm_template,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SharedVirtualMachine) Reset() { + *x = SharedVirtualMachine{} + mi := &file_scheduledevent_scheduledevent_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SharedVirtualMachine) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SharedVirtualMachine) ProtoMessage() {} + +func (x *SharedVirtualMachine) ProtoReflect() protoreflect.Message { + mi := &file_scheduledevent_scheduledevent_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 SharedVirtualMachine.ProtoReflect.Descriptor instead. +func (*SharedVirtualMachine) Descriptor() ([]byte, []int) { + return file_scheduledevent_scheduledevent_proto_rawDescGZIP(), []int{8} +} + +func (x *SharedVirtualMachine) GetVmId() string { + if x != nil { + return x.VmId + } + return "" +} + +func (x *SharedVirtualMachine) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SharedVirtualMachine) GetEnvironment() string { + if x != nil { + return x.Environment + } + return "" +} + +func (x *SharedVirtualMachine) GetVmTemplate() string { + if x != nil { + return x.VmTemplate + } + return "" +} + +type SharedVirtualMachineWrapper struct { + state protoimpl.MessageState `protogen:"open.v1"` + Value []*SharedVirtualMachine `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SharedVirtualMachineWrapper) Reset() { + *x = SharedVirtualMachineWrapper{} + mi := &file_scheduledevent_scheduledevent_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SharedVirtualMachineWrapper) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SharedVirtualMachineWrapper) ProtoMessage() {} + +func (x *SharedVirtualMachineWrapper) ProtoReflect() protoreflect.Message { + mi := &file_scheduledevent_scheduledevent_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 SharedVirtualMachineWrapper.ProtoReflect.Descriptor instead. +func (*SharedVirtualMachineWrapper) Descriptor() ([]byte, []int) { + return file_scheduledevent_scheduledevent_proto_rawDescGZIP(), []int{9} +} + +func (x *SharedVirtualMachineWrapper) GetValue() []*SharedVirtualMachine { + if x != nil { + return x.Value + } + return nil +} + var File_scheduledevent_scheduledevent_proto protoreflect.FileDescriptor var file_scheduledevent_scheduledevent_proto_rawDesc = []byte{ @@ -773,7 +909,7 @@ var file_scheduledevent_scheduledevent_proto_rawDesc = []byte{ 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, - 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x06, 0x0a, 0x0e, 0x53, 0x63, + 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe7, 0x06, 0x0a, 0x0e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, @@ -805,186 +941,214 @@ var file_scheduledevent_scheduledevent_proto_rawDesc = []byte{ 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x63, 0x65, 0x6e, 0x61, 0x72, 0x69, 0x6f, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, 0x63, 0x65, 0x6e, 0x61, 0x72, 0x69, 0x6f, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x73, 0x18, 0x0f, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x73, 0x12, 0x42, 0x0a, - 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x53, - 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x12, 0x3c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x73, 0x12, 0x43, 0x0a, + 0x0a, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x76, 0x6d, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, - 0x62, 0x0a, 0x10, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x56, 0x6d, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x38, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x4d, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa8, - 0x04, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1d, - 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, - 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x6e, 0x5f, 0x64, - 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6f, 0x6e, 0x44, - 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x65, - 0x64, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x72, 0x65, - 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x65, 0x64, 0x42, 0x69, 0x6e, 0x64, 0x12, 0x28, 0x0a, 0x10, - 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x76, 0x6d, 0x73, 0x5f, 0x72, 0x61, 0x77, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, - 0x56, 0x6d, 0x73, 0x52, 0x61, 0x77, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x63, 0x65, 0x6e, 0x61, - 0x72, 0x69, 0x6f, 0x73, 0x5f, 0x72, 0x61, 0x77, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x73, 0x63, 0x65, 0x6e, 0x61, 0x72, 0x69, 0x6f, 0x73, 0x52, 0x61, 0x77, 0x12, 0x1f, 0x0a, 0x0b, - 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x73, 0x5f, 0x72, 0x61, 0x77, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x73, 0x52, 0x61, 0x77, 0x12, 0x4f, 0x0a, - 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, - 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, - 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xbf, 0x01, 0x0a, 0x12, 0x56, 0x4d, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x70, - 0x12, 0x64, 0x0a, 0x10, 0x76, 0x6d, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x73, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x4d, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x2e, 0x56, - 0x6d, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x76, 0x6d, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x1a, 0x43, 0x0a, 0x15, 0x56, 0x6d, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xe6, 0x03, 0x0a, 0x1b, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x09, 0x6f, - 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x6e, 0x74, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, + 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x09, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x56, + 0x6d, 0x73, 0x12, 0x42, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x11, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x3c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x1a, 0x62, 0x0a, 0x10, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x56, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x38, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x4d, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0xf4, 0x04, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, + 0x09, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x08, 0x6f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, + 0x69, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x70, + 0x72, 0x69, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x74, + 0x72, 0x69, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x65, 0x64, 0x42, 0x69, 0x6e, + 0x64, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x76, 0x6d, + 0x73, 0x5f, 0x72, 0x61, 0x77, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x64, 0x56, 0x6d, 0x73, 0x52, 0x61, 0x77, 0x12, 0x1f, 0x0a, 0x0b, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, + 0x73, 0x63, 0x65, 0x6e, 0x61, 0x72, 0x69, 0x6f, 0x73, 0x5f, 0x72, 0x61, 0x77, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x63, 0x65, 0x6e, 0x61, 0x72, 0x69, 0x6f, 0x73, 0x52, 0x61, + 0x77, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x73, 0x5f, 0x72, 0x61, 0x77, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x73, 0x52, + 0x61, 0x77, 0x12, 0x4a, 0x0a, 0x0a, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x76, 0x6d, 0x73, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x56, 0x69, + 0x72, 0x74, 0x75, 0x61, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x57, 0x72, 0x61, 0x70, + 0x70, 0x65, 0x72, 0x52, 0x09, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x56, 0x6d, 0x73, 0x12, 0x4f, + 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, + 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, + 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xbf, 0x01, 0x0a, 0x12, 0x56, + 0x4d, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, + 0x70, 0x12, 0x64, 0x0a, 0x10, 0x76, 0x6d, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x73, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x4d, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x2e, + 0x56, 0x6d, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x76, 0x6d, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x1a, 0x43, 0x0a, 0x15, 0x56, 0x6d, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb2, 0x04, 0x0a, + 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x09, + 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x6f, 0x6e, 0x44, + 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, + 0x43, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x69, + 0x6e, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x65, 0x64, + 0x42, 0x69, 0x6e, 0x64, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x5f, 0x76, 0x6d, 0x73, 0x5f, 0x72, 0x61, 0x77, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x56, 0x6d, 0x73, 0x52, 0x61, 0x77, 0x12, 0x1f, + 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x23, 0x0a, 0x0d, 0x73, 0x63, 0x65, 0x6e, 0x61, 0x72, 0x69, 0x6f, 0x73, 0x5f, 0x72, 0x61, 0x77, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x63, 0x65, 0x6e, 0x61, 0x72, 0x69, 0x6f, + 0x73, 0x52, 0x61, 0x77, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x73, 0x5f, + 0x72, 0x61, 0x77, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x75, 0x72, 0x73, + 0x65, 0x73, 0x52, 0x61, 0x77, 0x12, 0x4a, 0x0a, 0x0a, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, + 0x76, 0x6d, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, + 0x64, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x57, + 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x09, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x56, 0x6d, + 0x73, 0x22, 0xc6, 0x02, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x06, 0x76, 0x6d, 0x73, 0x65, 0x74, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, + 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x4d, 0x53, 0x65, 0x74, 0x73, 0x57, + 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x06, 0x76, 0x6d, 0x73, 0x65, 0x74, 0x73, 0x12, 0x32, + 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x6f, 0x6e, 0x44, 0x65, - 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x43, - 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x69, 0x6e, - 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x12, 0x3c, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x65, 0x64, 0x42, - 0x69, 0x6e, 0x64, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, - 0x76, 0x6d, 0x73, 0x5f, 0x72, 0x61, 0x77, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x56, 0x6d, 0x73, 0x52, 0x61, 0x77, 0x12, 0x1f, 0x0a, - 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x23, - 0x0a, 0x0d, 0x73, 0x63, 0x65, 0x6e, 0x61, 0x72, 0x69, 0x6f, 0x73, 0x5f, 0x72, 0x61, 0x77, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x63, 0x65, 0x6e, 0x61, 0x72, 0x69, 0x6f, 0x73, - 0x52, 0x61, 0x77, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x73, 0x5f, 0x72, - 0x61, 0x77, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, - 0x73, 0x52, 0x61, 0x77, 0x22, 0xc6, 0x02, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, - 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x06, 0x76, 0x6d, - 0x73, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x4d, 0x53, 0x65, - 0x74, 0x73, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x06, 0x76, 0x6d, 0x73, 0x65, 0x74, - 0x73, 0x12, 0x32, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x61, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x3c, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, - 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x65, 0x64, 0x12, 0x30, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, - 0x72, 0x65, 0x61, 0x64, 0x79, 0x12, 0x36, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, - 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x22, 0x25, 0x0a, - 0x0d, 0x56, 0x4d, 0x53, 0x65, 0x74, 0x73, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x22, 0x9a, 0x01, 0x0a, 0x14, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, - 0x06, 0x76, 0x6d, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, - 0x6d, 0x73, 0x65, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x20, 0x0a, - 0x0b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x12, - 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, - 0x72, 0x65, 0x61, 0x64, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, - 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, - 0x64, 0x22, 0x67, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x48, 0x0a, 0x0f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x73, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x32, 0xeb, 0x04, 0x0a, 0x11, 0x53, - 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x76, 0x63, - 0x12, 0x58, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2b, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x11, 0x47, 0x65, - 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, - 0x13, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x12, 0x5b, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2b, 0x2e, 0x73, + 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, + 0x12, 0x30, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x72, 0x65, 0x61, + 0x64, 0x79, 0x12, 0x36, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x22, 0x25, 0x0a, 0x0d, 0x56, 0x4d, + 0x53, 0x65, 0x74, 0x73, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x22, 0x9a, 0x01, 0x0a, 0x14, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x6d, + 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x6d, 0x73, 0x65, + 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, + 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, + 0x64, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x22, 0x67, + 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, + 0x0f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x82, 0x01, 0x0a, 0x14, 0x53, 0x68, 0x61, 0x72, + 0x65, 0x64, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x12, 0x13, 0x0a, 0x05, 0x76, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x76, 0x6d, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6e, 0x76, + 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x76, + 0x6d, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x76, 0x6d, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x59, 0x0a, 0x1b, + 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x4d, 0x61, 0x63, + 0x68, 0x69, 0x6e, 0x65, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x63, 0x68, + 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x68, 0x61, 0x72, + 0x65, 0x64, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x32, 0xeb, 0x04, 0x0a, 0x11, 0x53, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x76, 0x63, 0x12, 0x58, 0x0a, + 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2b, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, + 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x13, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x12, 0x5b, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2b, 0x2e, 0x73, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x67, + 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x12, 0x67, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x43, 0x0a, 0x14, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x12, 0x13, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x2e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, - 0x4e, 0x0a, 0x1e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x12, 0x14, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, - 0x57, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x2b, 0x2e, 0x73, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x4a, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x6f, 0x62, 0x62, 0x79, 0x66, 0x61, 0x72, 0x6d, - 0x2f, 0x67, 0x61, 0x72, 0x67, 0x61, 0x6e, 0x74, 0x75, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x3b, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x43, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, + 0x13, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x49, 0x64, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x4e, 0x0a, 0x1e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x14, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x57, 0x0a, 0x12, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x12, 0x14, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x2b, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x4a, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x6f, 0x62, 0x62, 0x79, 0x66, 0x61, 0x72, 0x6d, 0x2f, 0x67, 0x61, + 0x72, 0x67, 0x61, 0x6e, 0x74, 0x75, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x73, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x3b, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -999,7 +1163,7 @@ func file_scheduledevent_scheduledevent_proto_rawDescGZIP() []byte { return file_scheduledevent_scheduledevent_proto_rawDescData } -var file_scheduledevent_scheduledevent_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_scheduledevent_scheduledevent_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_scheduledevent_scheduledevent_proto_goTypes = []any{ (*ScheduledEvent)(nil), // 0: scheduledevent.ScheduledEvent (*CreateScheduledEventRequest)(nil), // 1: scheduledevent.CreateScheduledEventRequest @@ -1009,51 +1173,57 @@ var file_scheduledevent_scheduledevent_proto_goTypes = []any{ (*VMSetsWrapper)(nil), // 5: scheduledevent.VMSetsWrapper (*ScheduledEventStatus)(nil), // 6: scheduledevent.ScheduledEventStatus (*ListScheduledEventsResponse)(nil), // 7: scheduledevent.ListScheduledEventsResponse - nil, // 8: scheduledevent.ScheduledEvent.RequiredVmsEntry - nil, // 9: scheduledevent.ScheduledEvent.LabelsEntry - nil, // 10: scheduledevent.CreateScheduledEventRequest.LabelsEntry - nil, // 11: scheduledevent.VMTemplateCountMap.VmTemplateCountsEntry - (*wrapperspb.BoolValue)(nil), // 12: google.protobuf.BoolValue - (*general.GetRequest)(nil), // 13: general.GetRequest - (*general.ResourceId)(nil), // 14: general.ResourceId - (*general.ListOptions)(nil), // 15: general.ListOptions - (*emptypb.Empty)(nil), // 16: google.protobuf.Empty + (*SharedVirtualMachine)(nil), // 8: scheduledevent.SharedVirtualMachine + (*SharedVirtualMachineWrapper)(nil), // 9: scheduledevent.SharedVirtualMachineWrapper + nil, // 10: scheduledevent.ScheduledEvent.RequiredVmsEntry + nil, // 11: scheduledevent.ScheduledEvent.LabelsEntry + nil, // 12: scheduledevent.CreateScheduledEventRequest.LabelsEntry + nil, // 13: scheduledevent.VMTemplateCountMap.VmTemplateCountsEntry + (*wrapperspb.BoolValue)(nil), // 14: google.protobuf.BoolValue + (*general.GetRequest)(nil), // 15: general.GetRequest + (*general.ResourceId)(nil), // 16: general.ResourceId + (*general.ListOptions)(nil), // 17: general.ListOptions + (*emptypb.Empty)(nil), // 18: google.protobuf.Empty } var file_scheduledevent_scheduledevent_proto_depIdxs = []int32{ - 8, // 0: scheduledevent.ScheduledEvent.required_vms:type_name -> scheduledevent.ScheduledEvent.RequiredVmsEntry - 9, // 1: scheduledevent.ScheduledEvent.labels:type_name -> scheduledevent.ScheduledEvent.LabelsEntry - 6, // 2: scheduledevent.ScheduledEvent.status:type_name -> scheduledevent.ScheduledEventStatus - 10, // 3: scheduledevent.CreateScheduledEventRequest.labels:type_name -> scheduledevent.CreateScheduledEventRequest.LabelsEntry - 11, // 4: scheduledevent.VMTemplateCountMap.vmTemplateCounts:type_name -> scheduledevent.VMTemplateCountMap.VmTemplateCountsEntry - 12, // 5: scheduledevent.UpdateScheduledEventRequest.on_demand:type_name -> google.protobuf.BoolValue - 12, // 6: scheduledevent.UpdateScheduledEventRequest.printable:type_name -> google.protobuf.BoolValue - 12, // 7: scheduledevent.UpdateScheduledEventRequest.restricted_bind:type_name -> google.protobuf.BoolValue - 5, // 8: scheduledevent.UpdateScheduledEventStatusRequest.vmsets:type_name -> scheduledevent.VMSetsWrapper - 12, // 9: scheduledevent.UpdateScheduledEventStatusRequest.active:type_name -> google.protobuf.BoolValue - 12, // 10: scheduledevent.UpdateScheduledEventStatusRequest.provisioned:type_name -> google.protobuf.BoolValue - 12, // 11: scheduledevent.UpdateScheduledEventStatusRequest.ready:type_name -> google.protobuf.BoolValue - 12, // 12: scheduledevent.UpdateScheduledEventStatusRequest.finished:type_name -> google.protobuf.BoolValue - 0, // 13: scheduledevent.ListScheduledEventsResponse.scheduledevents:type_name -> scheduledevent.ScheduledEvent - 2, // 14: scheduledevent.ScheduledEvent.RequiredVmsEntry.value:type_name -> scheduledevent.VMTemplateCountMap - 1, // 15: scheduledevent.ScheduledEventSvc.CreateScheduledEvent:input_type -> scheduledevent.CreateScheduledEventRequest - 13, // 16: scheduledevent.ScheduledEventSvc.GetScheduledEvent:input_type -> general.GetRequest - 3, // 17: scheduledevent.ScheduledEventSvc.UpdateScheduledEvent:input_type -> scheduledevent.UpdateScheduledEventRequest - 4, // 18: scheduledevent.ScheduledEventSvc.UpdateScheduledEventStatus:input_type -> scheduledevent.UpdateScheduledEventStatusRequest - 14, // 19: scheduledevent.ScheduledEventSvc.DeleteScheduledEvent:input_type -> general.ResourceId - 15, // 20: scheduledevent.ScheduledEventSvc.DeleteCollectionScheduledEvent:input_type -> general.ListOptions - 15, // 21: scheduledevent.ScheduledEventSvc.ListScheduledEvent:input_type -> general.ListOptions - 14, // 22: scheduledevent.ScheduledEventSvc.CreateScheduledEvent:output_type -> general.ResourceId - 0, // 23: scheduledevent.ScheduledEventSvc.GetScheduledEvent:output_type -> scheduledevent.ScheduledEvent - 16, // 24: scheduledevent.ScheduledEventSvc.UpdateScheduledEvent:output_type -> google.protobuf.Empty - 16, // 25: scheduledevent.ScheduledEventSvc.UpdateScheduledEventStatus:output_type -> google.protobuf.Empty - 16, // 26: scheduledevent.ScheduledEventSvc.DeleteScheduledEvent:output_type -> google.protobuf.Empty - 16, // 27: scheduledevent.ScheduledEventSvc.DeleteCollectionScheduledEvent:output_type -> google.protobuf.Empty - 7, // 28: scheduledevent.ScheduledEventSvc.ListScheduledEvent:output_type -> scheduledevent.ListScheduledEventsResponse - 22, // [22:29] is the sub-list for method output_type - 15, // [15:22] is the sub-list for method input_type - 15, // [15:15] is the sub-list for extension type_name - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name + 10, // 0: scheduledevent.ScheduledEvent.required_vms:type_name -> scheduledevent.ScheduledEvent.RequiredVmsEntry + 8, // 1: scheduledevent.ScheduledEvent.shared_vms:type_name -> scheduledevent.SharedVirtualMachine + 11, // 2: scheduledevent.ScheduledEvent.labels:type_name -> scheduledevent.ScheduledEvent.LabelsEntry + 6, // 3: scheduledevent.ScheduledEvent.status:type_name -> scheduledevent.ScheduledEventStatus + 9, // 4: scheduledevent.CreateScheduledEventRequest.shared_vms:type_name -> scheduledevent.SharedVirtualMachineWrapper + 12, // 5: scheduledevent.CreateScheduledEventRequest.labels:type_name -> scheduledevent.CreateScheduledEventRequest.LabelsEntry + 13, // 6: scheduledevent.VMTemplateCountMap.vmTemplateCounts:type_name -> scheduledevent.VMTemplateCountMap.VmTemplateCountsEntry + 14, // 7: scheduledevent.UpdateScheduledEventRequest.on_demand:type_name -> google.protobuf.BoolValue + 14, // 8: scheduledevent.UpdateScheduledEventRequest.printable:type_name -> google.protobuf.BoolValue + 14, // 9: scheduledevent.UpdateScheduledEventRequest.restricted_bind:type_name -> google.protobuf.BoolValue + 9, // 10: scheduledevent.UpdateScheduledEventRequest.shared_vms:type_name -> scheduledevent.SharedVirtualMachineWrapper + 5, // 11: scheduledevent.UpdateScheduledEventStatusRequest.vmsets:type_name -> scheduledevent.VMSetsWrapper + 14, // 12: scheduledevent.UpdateScheduledEventStatusRequest.active:type_name -> google.protobuf.BoolValue + 14, // 13: scheduledevent.UpdateScheduledEventStatusRequest.provisioned:type_name -> google.protobuf.BoolValue + 14, // 14: scheduledevent.UpdateScheduledEventStatusRequest.ready:type_name -> google.protobuf.BoolValue + 14, // 15: scheduledevent.UpdateScheduledEventStatusRequest.finished:type_name -> google.protobuf.BoolValue + 0, // 16: scheduledevent.ListScheduledEventsResponse.scheduledevents:type_name -> scheduledevent.ScheduledEvent + 8, // 17: scheduledevent.SharedVirtualMachineWrapper.value:type_name -> scheduledevent.SharedVirtualMachine + 2, // 18: scheduledevent.ScheduledEvent.RequiredVmsEntry.value:type_name -> scheduledevent.VMTemplateCountMap + 1, // 19: scheduledevent.ScheduledEventSvc.CreateScheduledEvent:input_type -> scheduledevent.CreateScheduledEventRequest + 15, // 20: scheduledevent.ScheduledEventSvc.GetScheduledEvent:input_type -> general.GetRequest + 3, // 21: scheduledevent.ScheduledEventSvc.UpdateScheduledEvent:input_type -> scheduledevent.UpdateScheduledEventRequest + 4, // 22: scheduledevent.ScheduledEventSvc.UpdateScheduledEventStatus:input_type -> scheduledevent.UpdateScheduledEventStatusRequest + 16, // 23: scheduledevent.ScheduledEventSvc.DeleteScheduledEvent:input_type -> general.ResourceId + 17, // 24: scheduledevent.ScheduledEventSvc.DeleteCollectionScheduledEvent:input_type -> general.ListOptions + 17, // 25: scheduledevent.ScheduledEventSvc.ListScheduledEvent:input_type -> general.ListOptions + 16, // 26: scheduledevent.ScheduledEventSvc.CreateScheduledEvent:output_type -> general.ResourceId + 0, // 27: scheduledevent.ScheduledEventSvc.GetScheduledEvent:output_type -> scheduledevent.ScheduledEvent + 18, // 28: scheduledevent.ScheduledEventSvc.UpdateScheduledEvent:output_type -> google.protobuf.Empty + 18, // 29: scheduledevent.ScheduledEventSvc.UpdateScheduledEventStatus:output_type -> google.protobuf.Empty + 18, // 30: scheduledevent.ScheduledEventSvc.DeleteScheduledEvent:output_type -> google.protobuf.Empty + 18, // 31: scheduledevent.ScheduledEventSvc.DeleteCollectionScheduledEvent:output_type -> google.protobuf.Empty + 7, // 32: scheduledevent.ScheduledEventSvc.ListScheduledEvent:output_type -> scheduledevent.ListScheduledEventsResponse + 26, // [26:33] is the sub-list for method output_type + 19, // [19:26] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name } func init() { file_scheduledevent_scheduledevent_proto_init() } @@ -1067,7 +1237,7 @@ func file_scheduledevent_scheduledevent_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_scheduledevent_scheduledevent_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 14, NumExtensions: 0, NumServices: 1, }, diff --git a/v3/protos/scheduledevent/scheduledevent.proto b/v3/protos/scheduledevent/scheduledevent.proto index 98dcdf9b..3e8c4336 100644 --- a/v3/protos/scheduledevent/scheduledevent.proto +++ b/v3/protos/scheduledevent/scheduledevent.proto @@ -34,8 +34,9 @@ message ScheduledEvent { string access_code = 13; repeated string scenarios = 14; repeated string courses = 15; - map labels = 16; - ScheduledEventStatus status = 17; + repeated SharedVirtualMachine shared_vms = 16; + map labels = 17; + ScheduledEventStatus status = 18; } message CreateScheduledEventRequest { @@ -52,7 +53,8 @@ message CreateScheduledEventRequest { string access_code = 10; string scenarios_raw = 11; string courses_raw = 12; - map labels = 13; + SharedVirtualMachineWrapper shared_vms = 13; + map labels = 14; } // This message is mapping vmtemplates to their required count within a scheduled event @@ -74,6 +76,7 @@ message UpdateScheduledEventRequest { string access_code = 10; string scenarios_raw = 11; string courses_raw = 12; + SharedVirtualMachineWrapper shared_vms = 13; } message UpdateScheduledEventStatusRequest { @@ -99,4 +102,15 @@ message ScheduledEventStatus { message ListScheduledEventsResponse { repeated ScheduledEvent scheduledevents = 1; +} + +message SharedVirtualMachine { + string vm_id = 1; + string name = 2; + string environment = 3; + string vm_template = 4; +} + +message SharedVirtualMachineWrapper { + repeated SharedVirtualMachine value = 1; } \ No newline at end of file diff --git a/v3/protos/session/session.pb.go b/v3/protos/session/session.pb.go index b6cc2293..22144e81 100644 --- a/v3/protos/session/session.pb.go +++ b/v3/protos/session/session.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 +// protoc-gen-go v1.36.3 // protoc v3.21.12 // source: session/session.proto diff --git a/v3/protos/setting/setting.pb.go b/v3/protos/setting/setting.pb.go index f039b086..83600f6e 100644 --- a/v3/protos/setting/setting.pb.go +++ b/v3/protos/setting/setting.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 +// protoc-gen-go v1.36.3 // protoc v3.21.12 // source: setting/setting.proto diff --git a/v3/protos/terraform/terraform.pb.go b/v3/protos/terraform/terraform.pb.go index 2e4b9add..a8cd4db2 100644 --- a/v3/protos/terraform/terraform.pb.go +++ b/v3/protos/terraform/terraform.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 +// protoc-gen-go v1.36.3 // protoc v3.21.12 // source: terraform/terraform.proto diff --git a/v3/protos/user/user.pb.go b/v3/protos/user/user.pb.go index 15741b4b..b697bea7 100644 --- a/v3/protos/user/user.pb.go +++ b/v3/protos/user/user.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 +// protoc-gen-go v1.36.3 // protoc v3.21.12 // source: user/user.proto diff --git a/v3/protos/vm/vm.pb.go b/v3/protos/vm/vm.pb.go index 1d056c3b..35de4882 100644 --- a/v3/protos/vm/vm.pb.go +++ b/v3/protos/vm/vm.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 +// protoc-gen-go v1.36.3 // protoc v3.21.12 // source: vm/vm.proto @@ -24,6 +24,52 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type VirtualMachineType int32 + +const ( + VirtualMachineType_USER VirtualMachineType = 0 // Default value + VirtualMachineType_SHARED VirtualMachineType = 1 +) + +// Enum value maps for VirtualMachineType. +var ( + VirtualMachineType_name = map[int32]string{ + 0: "USER", + 1: "SHARED", + } + VirtualMachineType_value = map[string]int32{ + "USER": 0, + "SHARED": 1, + } +) + +func (x VirtualMachineType) Enum() *VirtualMachineType { + p := new(VirtualMachineType) + *p = x + return p +} + +func (x VirtualMachineType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (VirtualMachineType) Descriptor() protoreflect.EnumDescriptor { + return file_vm_vm_proto_enumTypes[0].Descriptor() +} + +func (VirtualMachineType) Type() protoreflect.EnumType { + return &file_vm_vm_proto_enumTypes[0] +} + +func (x VirtualMachineType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use VirtualMachineType.Descriptor instead. +func (VirtualMachineType) EnumDescriptor() ([]byte, []int) { + return file_vm_vm_proto_rawDescGZIP(), []int{0} +} + type VM struct { state protoimpl.MessageState `protogen:"open.v1"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -36,11 +82,12 @@ type VM struct { User string `protobuf:"bytes,8,opt,name=user,proto3" json:"user,omitempty"` Provision bool `protobuf:"varint,9,opt,name=provision,proto3" json:"provision,omitempty"` VmSetId string `protobuf:"bytes,10,opt,name=vm_set_id,json=vmSetId,proto3" json:"vm_set_id,omitempty"` - Labels map[string]string `protobuf:"bytes,11,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Finalizers []string `protobuf:"bytes,12,rep,name=finalizers,proto3" json:"finalizers,omitempty"` - Status *VMStatus `protobuf:"bytes,13,opt,name=status,proto3" json:"status,omitempty"` - Annotations map[string]string `protobuf:"bytes,14,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - DeletionTimestamp *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=deletion_timestamp,json=deletionTimestamp,proto3" json:"deletion_timestamp,omitempty"` + VmType VirtualMachineType `protobuf:"varint,11,opt,name=vm_type,json=vmType,proto3,enum=vm.VirtualMachineType" json:"vm_type,omitempty"` + Labels map[string]string `protobuf:"bytes,12,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Finalizers []string `protobuf:"bytes,13,rep,name=finalizers,proto3" json:"finalizers,omitempty"` + Status *VMStatus `protobuf:"bytes,14,opt,name=status,proto3" json:"status,omitempty"` + Annotations map[string]string `protobuf:"bytes,15,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + DeletionTimestamp *timestamppb.Timestamp `protobuf:"bytes,16,opt,name=deletion_timestamp,json=deletionTimestamp,proto3" json:"deletion_timestamp,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -145,6 +192,13 @@ func (x *VM) GetVmSetId() string { return "" } +func (x *VM) GetVmType() VirtualMachineType { + if x != nil { + return x.VmType + } + return VirtualMachineType_USER +} + func (x *VM) GetLabels() map[string]string { if x != nil { return x.Labels @@ -181,22 +235,25 @@ func (x *VM) GetDeletionTimestamp() *timestamppb.Timestamp { } type CreateVMRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - VmTemplateId string `protobuf:"bytes,2,opt,name=vm_template_id,json=vmTemplateId,proto3" json:"vm_template_id,omitempty"` - SshUsername string `protobuf:"bytes,3,opt,name=ssh_username,json=sshUsername,proto3" json:"ssh_username,omitempty"` - Protocol string `protobuf:"bytes,4,opt,name=protocol,proto3" json:"protocol,omitempty"` - SecretName string `protobuf:"bytes,5,opt,name=secret_name,json=secretName,proto3" json:"secret_name,omitempty"` - VmClaimId string `protobuf:"bytes,6,opt,name=vm_claim_id,json=vmClaimId,proto3" json:"vm_claim_id,omitempty"` - VmClaimUid string `protobuf:"bytes,7,opt,name=vm_claim_uid,json=vmClaimUid,proto3" json:"vm_claim_uid,omitempty"` - User string `protobuf:"bytes,8,opt,name=user,proto3" json:"user,omitempty"` - Provision bool `protobuf:"varint,9,opt,name=provision,proto3" json:"provision,omitempty"` - VmSetId string `protobuf:"bytes,10,opt,name=vm_set_id,json=vmSetId,proto3" json:"vm_set_id,omitempty"` - VmSetUid string `protobuf:"bytes,11,opt,name=vm_set_uid,json=vmSetUid,proto3" json:"vm_set_uid,omitempty"` - Labels map[string]string `protobuf:"bytes,12,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Finalizers []string `protobuf:"bytes,13,rep,name=finalizers,proto3" json:"finalizers,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + VmTemplateId string `protobuf:"bytes,2,opt,name=vm_template_id,json=vmTemplateId,proto3" json:"vm_template_id,omitempty"` + SshUsername string `protobuf:"bytes,3,opt,name=ssh_username,json=sshUsername,proto3" json:"ssh_username,omitempty"` + Protocol string `protobuf:"bytes,4,opt,name=protocol,proto3" json:"protocol,omitempty"` + SecretName string `protobuf:"bytes,5,opt,name=secret_name,json=secretName,proto3" json:"secret_name,omitempty"` + VmClaimId string `protobuf:"bytes,6,opt,name=vm_claim_id,json=vmClaimId,proto3" json:"vm_claim_id,omitempty"` + VmClaimUid string `protobuf:"bytes,7,opt,name=vm_claim_uid,json=vmClaimUid,proto3" json:"vm_claim_uid,omitempty"` + User string `protobuf:"bytes,8,opt,name=user,proto3" json:"user,omitempty"` + Provision bool `protobuf:"varint,9,opt,name=provision,proto3" json:"provision,omitempty"` + VmSetId string `protobuf:"bytes,10,opt,name=vm_set_id,json=vmSetId,proto3" json:"vm_set_id,omitempty"` + VmSetUid string `protobuf:"bytes,11,opt,name=vm_set_uid,json=vmSetUid,proto3" json:"vm_set_uid,omitempty"` + ScheduledEventId string `protobuf:"bytes,12,opt,name=scheduled_event_id,json=scheduledEventId,proto3" json:"scheduled_event_id,omitempty"` + ScheduledEventUid string `protobuf:"bytes,13,opt,name=scheduled_event_uid,json=scheduledEventUid,proto3" json:"scheduled_event_uid,omitempty"` + VmType VirtualMachineType `protobuf:"varint,14,opt,name=vm_type,json=vmType,proto3,enum=vm.VirtualMachineType" json:"vm_type,omitempty"` + Labels map[string]string `protobuf:"bytes,15,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Finalizers []string `protobuf:"bytes,16,rep,name=finalizers,proto3" json:"finalizers,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CreateVMRequest) Reset() { @@ -306,6 +363,27 @@ func (x *CreateVMRequest) GetVmSetUid() string { return "" } +func (x *CreateVMRequest) GetScheduledEventId() string { + if x != nil { + return x.ScheduledEventId + } + return "" +} + +func (x *CreateVMRequest) GetScheduledEventUid() string { + if x != nil { + return x.ScheduledEventUid + } + return "" +} + +func (x *CreateVMRequest) GetVmType() VirtualMachineType { + if x != nil { + return x.VmType + } + return VirtualMachineType_USER +} + func (x *CreateVMRequest) GetLabels() map[string]string { if x != nil { return x.Labels @@ -683,7 +761,7 @@ var file_vm_vm_proto_rawDesc = []byte{ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x05, 0x0a, 0x02, 0x56, 0x4d, 0x12, 0x0e, 0x0a, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbe, 0x05, 0x0a, 0x02, 0x56, 0x4d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x76, 0x6d, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, @@ -701,56 +779,68 @@ var file_vm_vm_proto_rawDesc = []byte{ 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x09, 0x76, 0x6d, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x6d, 0x53, 0x65, - 0x74, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0b, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x6d, 0x2e, 0x56, 0x4d, 0x2e, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, - 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x73, 0x18, 0x0c, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x73, 0x12, - 0x24, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0c, 0x2e, 0x76, 0x6d, 0x2e, 0x56, 0x4d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x39, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x6d, 0x2e, - 0x56, 0x4d, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x49, 0x0a, 0x12, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xe9, 0x03, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x56, 0x4d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x76, 0x6d, - 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x76, 0x6d, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, - 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x73, 0x68, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x73, 0x68, 0x55, 0x73, 0x65, 0x72, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, - 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x1e, 0x0a, 0x0b, 0x76, 0x6d, 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x69, 0x64, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x6d, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x49, 0x64, - 0x12, 0x20, 0x0a, 0x0c, 0x76, 0x6d, 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x75, 0x69, 0x64, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x6d, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x55, - 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x09, 0x76, 0x6d, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x6d, 0x53, 0x65, 0x74, 0x49, 0x64, - 0x12, 0x1c, 0x0a, 0x0a, 0x76, 0x6d, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6d, 0x53, 0x65, 0x74, 0x55, 0x69, 0x64, 0x12, 0x37, - 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, + 0x74, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x07, 0x76, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, + 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x76, 0x6d, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0c, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x6d, 0x2e, 0x56, 0x4d, 0x2e, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x73, 0x18, 0x0d, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x73, + 0x12, 0x24, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0c, 0x2e, 0x76, 0x6d, 0x2e, 0x56, 0x4d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x39, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x6d, + 0x2e, 0x56, 0x4d, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x49, 0x0a, 0x12, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x1a, 0x39, 0x0a, 0x0b, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf8, 0x04, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x56, 0x4d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x76, + 0x6d, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x76, 0x6d, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, + 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x73, 0x68, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x73, 0x68, 0x55, 0x73, 0x65, 0x72, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x1e, 0x0a, 0x0b, 0x76, 0x6d, 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x69, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x6d, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x49, + 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x76, 0x6d, 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x75, 0x69, + 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x6d, 0x43, 0x6c, 0x61, 0x69, 0x6d, + 0x55, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x09, 0x76, 0x6d, 0x5f, 0x73, 0x65, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x6d, 0x53, 0x65, 0x74, 0x49, + 0x64, 0x12, 0x1c, 0x0a, 0x0a, 0x76, 0x6d, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x75, 0x69, 0x64, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6d, 0x53, 0x65, 0x74, 0x55, 0x69, 0x64, 0x12, + 0x2c, 0x0a, 0x12, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x63, 0x68, + 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x2e, 0x0a, + 0x13, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x5f, 0x75, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x55, 0x69, 0x64, 0x12, 0x2f, 0x0a, + 0x07, 0x76, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, + 0x2e, 0x76, 0x6d, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x76, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x37, + 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x6d, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x4d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x6e, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x72, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x69, 0x6e, + 0x69, 0x7a, 0x65, 0x72, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, @@ -819,37 +909,39 @@ var file_vm_vm_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x73, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0x2b, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x4d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x03, 0x76, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x06, 0x2e, 0x76, 0x6d, 0x2e, 0x56, 0x4d, 0x52, 0x03, 0x76, 0x6d, 0x73, 0x32, 0x96, 0x03, - 0x0a, 0x05, 0x56, 0x4d, 0x53, 0x76, 0x63, 0x12, 0x37, 0x0a, 0x08, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x56, 0x4d, 0x12, 0x13, 0x2e, 0x76, 0x6d, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, - 0x4d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x32, 0x06, 0x2e, 0x76, 0x6d, 0x2e, 0x56, 0x4d, 0x52, 0x03, 0x76, 0x6d, 0x73, 0x2a, 0x2a, 0x0a, + 0x12, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x53, 0x45, 0x52, 0x10, 0x00, 0x12, 0x0a, 0x0a, + 0x06, 0x53, 0x48, 0x41, 0x52, 0x45, 0x44, 0x10, 0x01, 0x32, 0x96, 0x03, 0x0a, 0x05, 0x56, 0x4d, + 0x53, 0x76, 0x63, 0x12, 0x37, 0x0a, 0x08, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x4d, 0x12, + 0x13, 0x2e, 0x76, 0x6d, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x4d, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x24, 0x0a, 0x05, + 0x47, 0x65, 0x74, 0x56, 0x4d, 0x12, 0x13, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x2e, + 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x06, 0x2e, 0x76, 0x6d, 0x2e, + 0x56, 0x4d, 0x12, 0x37, 0x0a, 0x08, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x4d, 0x12, 0x13, + 0x2e, 0x76, 0x6d, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x4d, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x43, 0x0a, 0x0e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x4d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, 0x2e, + 0x76, 0x6d, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x4d, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x12, 0x24, 0x0a, 0x05, 0x47, 0x65, 0x74, 0x56, 0x4d, 0x12, 0x13, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x06, - 0x2e, 0x76, 0x6d, 0x2e, 0x56, 0x4d, 0x12, 0x37, 0x0a, 0x08, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x56, 0x4d, 0x12, 0x13, 0x2e, 0x76, 0x6d, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x4d, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, - 0x43, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x4d, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x19, 0x2e, 0x76, 0x6d, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x4d, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x12, 0x37, 0x0a, 0x08, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x4d, - 0x12, 0x13, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x49, 0x64, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x42, 0x0a, - 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x56, 0x4d, 0x12, 0x14, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x12, 0x33, 0x0a, 0x06, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x4d, 0x12, 0x14, 0x2e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x1a, 0x13, 0x2e, 0x76, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x4d, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x6f, 0x62, 0x62, 0x79, 0x66, 0x61, 0x72, 0x6d, 0x2f, 0x67, - 0x61, 0x72, 0x67, 0x61, 0x6e, 0x74, 0x75, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x73, 0x2f, 0x76, 0x6d, 0x3b, 0x76, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x12, 0x37, 0x0a, 0x08, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x4d, 0x12, 0x13, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, + 0x64, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x42, 0x0a, 0x12, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x4d, 0x12, + 0x14, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x33, 0x0a, + 0x06, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x4d, 0x12, 0x14, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x13, 0x2e, + 0x76, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x4d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x68, 0x6f, 0x62, 0x62, 0x79, 0x66, 0x61, 0x72, 0x6d, 0x2f, 0x67, 0x61, 0x72, 0x67, 0x61, + 0x6e, 0x74, 0x75, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, + 0x6d, 0x3b, 0x76, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -864,60 +956,64 @@ func file_vm_vm_proto_rawDescGZIP() []byte { return file_vm_vm_proto_rawDescData } +var file_vm_vm_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_vm_vm_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_vm_vm_proto_goTypes = []any{ - (*VM)(nil), // 0: vm.VM - (*CreateVMRequest)(nil), // 1: vm.CreateVMRequest - (*UpdateVMRequest)(nil), // 2: vm.UpdateVMRequest - (*UpdateVMStatusRequest)(nil), // 3: vm.UpdateVMStatusRequest - (*VMStatus)(nil), // 4: vm.VMStatus - (*ListVMsResponse)(nil), // 5: vm.ListVMsResponse - nil, // 6: vm.VM.LabelsEntry - nil, // 7: vm.VM.AnnotationsEntry - nil, // 8: vm.CreateVMRequest.LabelsEntry - (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp - (*wrapperspb.StringValue)(nil), // 10: google.protobuf.StringValue - (*general.StringArray)(nil), // 11: general.StringArray - (*wrapperspb.BoolValue)(nil), // 12: google.protobuf.BoolValue - (*general.GetRequest)(nil), // 13: general.GetRequest - (*general.ResourceId)(nil), // 14: general.ResourceId - (*general.ListOptions)(nil), // 15: general.ListOptions - (*emptypb.Empty)(nil), // 16: google.protobuf.Empty + (VirtualMachineType)(0), // 0: vm.VirtualMachineType + (*VM)(nil), // 1: vm.VM + (*CreateVMRequest)(nil), // 2: vm.CreateVMRequest + (*UpdateVMRequest)(nil), // 3: vm.UpdateVMRequest + (*UpdateVMStatusRequest)(nil), // 4: vm.UpdateVMStatusRequest + (*VMStatus)(nil), // 5: vm.VMStatus + (*ListVMsResponse)(nil), // 6: vm.ListVMsResponse + nil, // 7: vm.VM.LabelsEntry + nil, // 8: vm.VM.AnnotationsEntry + nil, // 9: vm.CreateVMRequest.LabelsEntry + (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp + (*wrapperspb.StringValue)(nil), // 11: google.protobuf.StringValue + (*general.StringArray)(nil), // 12: general.StringArray + (*wrapperspb.BoolValue)(nil), // 13: google.protobuf.BoolValue + (*general.GetRequest)(nil), // 14: general.GetRequest + (*general.ResourceId)(nil), // 15: general.ResourceId + (*general.ListOptions)(nil), // 16: general.ListOptions + (*emptypb.Empty)(nil), // 17: google.protobuf.Empty } var file_vm_vm_proto_depIdxs = []int32{ - 6, // 0: vm.VM.labels:type_name -> vm.VM.LabelsEntry - 4, // 1: vm.VM.status:type_name -> vm.VMStatus - 7, // 2: vm.VM.annotations:type_name -> vm.VM.AnnotationsEntry - 9, // 3: vm.VM.deletion_timestamp:type_name -> google.protobuf.Timestamp - 8, // 4: vm.CreateVMRequest.labels:type_name -> vm.CreateVMRequest.LabelsEntry - 10, // 5: vm.UpdateVMRequest.vm_claim_id:type_name -> google.protobuf.StringValue - 10, // 6: vm.UpdateVMRequest.user:type_name -> google.protobuf.StringValue - 11, // 7: vm.UpdateVMRequest.finalizers:type_name -> general.StringArray - 12, // 8: vm.UpdateVMStatusRequest.allocated:type_name -> google.protobuf.BoolValue - 12, // 9: vm.UpdateVMStatusRequest.tainted:type_name -> google.protobuf.BoolValue - 10, // 10: vm.UpdateVMStatusRequest.public_ip:type_name -> google.protobuf.StringValue - 10, // 11: vm.UpdateVMStatusRequest.private_ip:type_name -> google.protobuf.StringValue - 10, // 12: vm.UpdateVMStatusRequest.hostname:type_name -> google.protobuf.StringValue - 0, // 13: vm.ListVMsResponse.vms:type_name -> vm.VM - 1, // 14: vm.VMSvc.CreateVM:input_type -> vm.CreateVMRequest - 13, // 15: vm.VMSvc.GetVM:input_type -> general.GetRequest - 2, // 16: vm.VMSvc.UpdateVM:input_type -> vm.UpdateVMRequest - 3, // 17: vm.VMSvc.UpdateVMStatus:input_type -> vm.UpdateVMStatusRequest - 14, // 18: vm.VMSvc.DeleteVM:input_type -> general.ResourceId - 15, // 19: vm.VMSvc.DeleteCollectionVM:input_type -> general.ListOptions - 15, // 20: vm.VMSvc.ListVM:input_type -> general.ListOptions - 16, // 21: vm.VMSvc.CreateVM:output_type -> google.protobuf.Empty - 0, // 22: vm.VMSvc.GetVM:output_type -> vm.VM - 16, // 23: vm.VMSvc.UpdateVM:output_type -> google.protobuf.Empty - 16, // 24: vm.VMSvc.UpdateVMStatus:output_type -> google.protobuf.Empty - 16, // 25: vm.VMSvc.DeleteVM:output_type -> google.protobuf.Empty - 16, // 26: vm.VMSvc.DeleteCollectionVM:output_type -> google.protobuf.Empty - 5, // 27: vm.VMSvc.ListVM:output_type -> vm.ListVMsResponse - 21, // [21:28] is the sub-list for method output_type - 14, // [14:21] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name + 0, // 0: vm.VM.vm_type:type_name -> vm.VirtualMachineType + 7, // 1: vm.VM.labels:type_name -> vm.VM.LabelsEntry + 5, // 2: vm.VM.status:type_name -> vm.VMStatus + 8, // 3: vm.VM.annotations:type_name -> vm.VM.AnnotationsEntry + 10, // 4: vm.VM.deletion_timestamp:type_name -> google.protobuf.Timestamp + 0, // 5: vm.CreateVMRequest.vm_type:type_name -> vm.VirtualMachineType + 9, // 6: vm.CreateVMRequest.labels:type_name -> vm.CreateVMRequest.LabelsEntry + 11, // 7: vm.UpdateVMRequest.vm_claim_id:type_name -> google.protobuf.StringValue + 11, // 8: vm.UpdateVMRequest.user:type_name -> google.protobuf.StringValue + 12, // 9: vm.UpdateVMRequest.finalizers:type_name -> general.StringArray + 13, // 10: vm.UpdateVMStatusRequest.allocated:type_name -> google.protobuf.BoolValue + 13, // 11: vm.UpdateVMStatusRequest.tainted:type_name -> google.protobuf.BoolValue + 11, // 12: vm.UpdateVMStatusRequest.public_ip:type_name -> google.protobuf.StringValue + 11, // 13: vm.UpdateVMStatusRequest.private_ip:type_name -> google.protobuf.StringValue + 11, // 14: vm.UpdateVMStatusRequest.hostname:type_name -> google.protobuf.StringValue + 1, // 15: vm.ListVMsResponse.vms:type_name -> vm.VM + 2, // 16: vm.VMSvc.CreateVM:input_type -> vm.CreateVMRequest + 14, // 17: vm.VMSvc.GetVM:input_type -> general.GetRequest + 3, // 18: vm.VMSvc.UpdateVM:input_type -> vm.UpdateVMRequest + 4, // 19: vm.VMSvc.UpdateVMStatus:input_type -> vm.UpdateVMStatusRequest + 15, // 20: vm.VMSvc.DeleteVM:input_type -> general.ResourceId + 16, // 21: vm.VMSvc.DeleteCollectionVM:input_type -> general.ListOptions + 16, // 22: vm.VMSvc.ListVM:input_type -> general.ListOptions + 17, // 23: vm.VMSvc.CreateVM:output_type -> google.protobuf.Empty + 1, // 24: vm.VMSvc.GetVM:output_type -> vm.VM + 17, // 25: vm.VMSvc.UpdateVM:output_type -> google.protobuf.Empty + 17, // 26: vm.VMSvc.UpdateVMStatus:output_type -> google.protobuf.Empty + 17, // 27: vm.VMSvc.DeleteVM:output_type -> google.protobuf.Empty + 17, // 28: vm.VMSvc.DeleteCollectionVM:output_type -> google.protobuf.Empty + 6, // 29: vm.VMSvc.ListVM:output_type -> vm.ListVMsResponse + 23, // [23:30] is the sub-list for method output_type + 16, // [16:23] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name } func init() { file_vm_vm_proto_init() } @@ -930,13 +1026,14 @@ func file_vm_vm_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vm_vm_proto_rawDesc, - NumEnums: 0, + NumEnums: 1, NumMessages: 9, NumExtensions: 0, NumServices: 1, }, GoTypes: file_vm_vm_proto_goTypes, DependencyIndexes: file_vm_vm_proto_depIdxs, + EnumInfos: file_vm_vm_proto_enumTypes, MessageInfos: file_vm_vm_proto_msgTypes, }.Build() File_vm_vm_proto = out.File diff --git a/v3/protos/vm/vm.proto b/v3/protos/vm/vm.proto index dfc72d89..09d9e047 100644 --- a/v3/protos/vm/vm.proto +++ b/v3/protos/vm/vm.proto @@ -30,11 +30,12 @@ message VM { string user = 8; bool provision = 9; string vm_set_id = 10; - map labels = 11; - repeated string finalizers = 12; - VMStatus status = 13; - map annotations = 14; - google.protobuf.Timestamp deletion_timestamp = 15; + VirtualMachineType vm_type = 11; + map labels = 12; + repeated string finalizers = 13; + VMStatus status = 14; + map annotations = 15; + google.protobuf.Timestamp deletion_timestamp = 16; } message CreateVMRequest { @@ -49,8 +50,11 @@ message CreateVMRequest { bool provision = 9; string vm_set_id = 10; string vm_set_uid = 11; - map labels = 12; - repeated string finalizers = 13; + string scheduled_event_id = 12; + string scheduled_event_uid = 13; + VirtualMachineType vm_type = 14; + map labels = 15; + repeated string finalizers = 16; } message UpdateVMRequest { @@ -89,4 +93,9 @@ message VMStatus { message ListVMsResponse { repeated VM vms = 1; +} + +enum VirtualMachineType { + USER = 0; // Default value + SHARED = 1; } \ No newline at end of file diff --git a/v3/protos/vmclaim/virtualmachineclaim.pb.go b/v3/protos/vmclaim/virtualmachineclaim.pb.go index f94f6305..12d9d17e 100644 --- a/v3/protos/vmclaim/virtualmachineclaim.pb.go +++ b/v3/protos/vmclaim/virtualmachineclaim.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 +// protoc-gen-go v1.36.3 // protoc v3.21.12 // source: vmclaim/virtualmachineclaim.proto diff --git a/v3/protos/vmset/virtualmachineset.pb.go b/v3/protos/vmset/virtualmachineset.pb.go index 05697f76..b1e08f9f 100644 --- a/v3/protos/vmset/virtualmachineset.pb.go +++ b/v3/protos/vmset/virtualmachineset.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 +// protoc-gen-go v1.36.3 // protoc v3.21.12 // source: vmset/virtualmachineset.proto diff --git a/v3/protos/vmtemplate/vmtemplate.pb.go b/v3/protos/vmtemplate/vmtemplate.pb.go index f3b814aa..bd7906e5 100644 --- a/v3/protos/vmtemplate/vmtemplate.pb.go +++ b/v3/protos/vmtemplate/vmtemplate.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.2 +// protoc-gen-go v1.36.3 // protoc v3.21.12 // source: vmtemplate/vmtemplate.proto diff --git a/v3/services/authnsvc/internal/authnservice.go b/v3/services/authnsvc/internal/authnservice.go index 6ec385ab..e698c4a5 100644 --- a/v3/services/authnsvc/internal/authnservice.go +++ b/v3/services/authnsvc/internal/authnservice.go @@ -18,6 +18,7 @@ import ( "github.com/hobbyfarm/gargantua/v3/pkg/util" authnpb "github.com/hobbyfarm/gargantua/v3/protos/authn" generalpb "github.com/hobbyfarm/gargantua/v3/protos/general" + scheduledeventpb "github.com/hobbyfarm/gargantua/v3/protos/scheduledevent" settingpb "github.com/hobbyfarm/gargantua/v3/protos/setting" userpb "github.com/hobbyfarm/gargantua/v3/protos/user" "golang.org/x/crypto/bcrypt" @@ -28,10 +29,11 @@ import ( ) type PreparedScheduledEvent struct { - Id string `json:"id"` - Description string `json:"description"` - Name string `json:"name"` - EndDate string `json:"end_timestamp"` + Id string `json:"id"` + Description string `json:"description"` + Name string `json:"name"` + EndDate string `json:"end_timestamp"` + PreparedSharedVirtualMachines []*scheduledeventpb.SharedVirtualMachine `json:"shared_vms"` } func (a AuthServer) ChangePasswordFunc(w http.ResponseWriter, r *http.Request) { @@ -657,7 +659,7 @@ func (a AuthServer) ListScheduledEventsFunc(w http.ResponseWriter, r *http.Reque endTime = otacEndTime.Format(time.UnixDate) } - accessCodeScheduledEvent[otac.GetId()] = PreparedScheduledEvent{se.GetId(), se.GetDescription(), se.GetName(), endTime} + accessCodeScheduledEvent[otac.GetId()] = PreparedScheduledEvent{se.GetId(), se.GetDescription(), se.GetName(), endTime, se.GetSharedVms()} } } @@ -683,7 +685,7 @@ func (a AuthServer) ListScheduledEventsFunc(w http.ResponseWriter, r *http.Reque glog.Error(err) continue } - accessCodeScheduledEvent[ac.GetId()] = PreparedScheduledEvent{se.GetId(), se.GetDescription(), se.GetName(), se.GetEndTime()} + accessCodeScheduledEvent[ac.GetId()] = PreparedScheduledEvent{se.GetId(), se.GetDescription(), se.GetName(), se.GetEndTime(), se.GetSharedVms()} } encodedMap, err := json.Marshal(accessCodeScheduledEvent) diff --git a/v3/services/scheduledeventsvc/internal/controller.go b/v3/services/scheduledeventsvc/internal/controller.go index 4597d977..1b42db55 100644 --- a/v3/services/scheduledeventsvc/internal/controller.go +++ b/v3/services/scheduledeventsvc/internal/controller.go @@ -13,6 +13,7 @@ import ( hferrors "github.com/hobbyfarm/gargantua/v3/pkg/errors" hflabels "github.com/hobbyfarm/gargantua/v3/pkg/labels" settingUtil "github.com/hobbyfarm/gargantua/v3/pkg/setting" + "github.com/hobbyfarm/gargantua/v3/pkg/util" "google.golang.org/protobuf/types/known/wrapperspb" "github.com/golang/glog" @@ -25,8 +26,11 @@ import ( scheduledeventpb "github.com/hobbyfarm/gargantua/v3/protos/scheduledevent" sessionpb "github.com/hobbyfarm/gargantua/v3/protos/session" settingpb "github.com/hobbyfarm/gargantua/v3/protos/setting" + vmpb "github.com/hobbyfarm/gargantua/v3/protos/vm" vmsetpb "github.com/hobbyfarm/gargantua/v3/protos/vmset" vmtemplatepb "github.com/hobbyfarm/gargantua/v3/protos/vmtemplate" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/selection" "k8s.io/client-go/kubernetes" "k8s.io/client-go/util/workqueue" ) @@ -40,6 +44,7 @@ type ScheduledEventController struct { progressClient progresspb.ProgressSvcClient environmentClient environmentpb.EnvironmentSvcClient dbConfigClient dbconfigpb.DynamicBindConfigSvcClient + vmClient vmpb.VMSvcClient vmSetClient vmsetpb.VMSetSvcClient vmTemplateClient vmtemplatepb.VMTemplateSvcClient settingClient settingpb.SettingSvcClient @@ -70,6 +75,7 @@ func NewScheduledEventController( environmentClient environmentpb.EnvironmentSvcClient, progressClient progresspb.ProgressSvcClient, sessionClient sessionpb.SessionSvcClient, + vmClient vmpb.VMSvcClient, vmSetClient vmsetpb.VMSetSvcClient, vmTemplateClient vmtemplatepb.VMTemplateSvcClient, settingClient settingpb.SettingSvcClient, @@ -93,6 +99,7 @@ func NewScheduledEventController( environmentClient: environmentClient, progressClient: progressClient, sessionClient: sessionClient, + vmClient: vmClient, vmSetClient: vmSetClient, vmTemplateClient: vmTemplateClient, settingClient: settingClient, @@ -127,12 +134,34 @@ func (sc *ScheduledEventController) completeScheduledEvent(se *scheduledeventpb. return err } + err = sc.deleteSharedVMsFromScheduledEvent(se) + + if err != nil { + return err + } + err = sc.finishSessionsFromScheduledEvent(se) if err != nil { return err } + // Reset VirtualMachine IDs inside the Event to avoid that shared VMs are not starting when the SE is reactivated + sharedVms := se.SharedVms + for i, v := range sharedVms { + sharedVms[i] = &scheduledeventpb.SharedVirtualMachine{Name: v.Name, Environment: v.Environment, VmTemplate: v.VmTemplate} + } + + // update the scheduled event and override the shared VMs + _, err = sc.internalScheduledEventServer.UpdateScheduledEvent(sc.Context, &scheduledeventpb.UpdateScheduledEventRequest{ + Id: se.GetId(), + SharedVms: &scheduledeventpb.SharedVirtualMachineWrapper{Value: sharedVms}, + }) + + if err != nil { + return err + } + // update the scheduled event and set the various flags accordingly (provisioned, ready, finished) _, err = sc.internalScheduledEventServer.UpdateScheduledEventStatus(sc.Context, &scheduledeventpb.UpdateScheduledEventStatusRequest{ Id: se.GetId(), @@ -176,6 +205,14 @@ func (sc *ScheduledEventController) deleteVMSetsFromScheduledEvent(se *scheduled return err } +func (sc *ScheduledEventController) deleteSharedVMsFromScheduledEvent(se *scheduledeventpb.ScheduledEvent) error { + // for each vmset that belongs to this to-be-stopped scheduled event, delete that vmset + _, err := sc.vmClient.DeleteCollectionVM(sc.Context, &generalpb.ListOptions{ + LabelSelector: fmt.Sprintf("%s=%s,shared=true", hflabels.ScheduledEventLabel, se.GetId()), + }) + return err +} + func (sc *ScheduledEventController) deleteProgressFromScheduledEvent(se *scheduledeventpb.ScheduledEvent) error { // for each vmset that belongs to this to-be-stopped scheduled event, delete that vmset _, err := sc.progressClient.DeleteCollectionProgress(sc.Context, &generalpb.ListOptions{ @@ -226,6 +263,22 @@ func (sc *ScheduledEventController) finishSessionsFromScheduledEvent(se *schedul func (sc *ScheduledEventController) provisionScheduledEvent(se *scheduledeventpb.ScheduledEvent) error { glog.V(6).Infof("ScheduledEvent %s is ready to be provisioned", se.Name) + + // Let's first create or update the shared VMs related to this scheduled event + + // first taint shared vms which are not necessary anymore + // doing this first prevents iterating over freshly created vms + err := sc.taintSharedVMs(se) + if err != nil { + return err + } + + //create shared VM for ScheduledEvent + err = sc.createSharedVMs(se) + if err != nil { + return err + } + // start creating resources related to this vmSets := []string{} @@ -322,7 +375,7 @@ func (sc *ScheduledEventController) provisionScheduledEvent(se *scheduledeventpb } // Delete AccessCode if it exists - _, err := sc.accessCodeClient.GetAc(sc.Context, &generalpb.GetRequest{ + _, err = sc.accessCodeClient.GetAc(sc.Context, &generalpb.GetRequest{ Id: se.GetAccessCode(), }) if err == nil { @@ -494,6 +547,147 @@ func (sc *ScheduledEventController) reconcileScheduledEvent(seName string) error return nil } +func (sc *ScheduledEventController) taintSharedVMs(se *scheduledeventpb.ScheduledEvent) error { + req1, err := labels.NewRequirement("shared", selection.Equals, []string{"true"}) + if err != nil { + return err + } + req2, err := labels.NewRequirement(hflabels.ScheduledEventLabel, selection.Equals, []string{se.GetId()}) + if err != nil { + return err + } + selector := labels.NewSelector() + selector = selector.Add(*req1).Add(*req2) + selectorString := selector.String() + existingSharedVMList, err := sc.vmClient.ListVM(sc.Context, &generalpb.ListOptions{LabelSelector: selectorString}) + if err != nil { + return err + } + existingSharedVMs := existingSharedVMList.GetVms() + requiredSharedVMs := se.GetSharedVms() + + for _, existingSharedVM := range existingSharedVMs { + taintVm := true + currentVmId := existingSharedVM.GetId() + for _, requiredSharedVM := range requiredSharedVMs { + if currentVmId == requiredSharedVM.GetVmId() { + taintVm = false + break + } + } + if taintVm { + glog.V(5).Infof("tainting VM %s", currentVmId) + _, err := sc.vmClient.UpdateVMStatus(sc.Context, &vmpb.UpdateVMStatusRequest{ + Id: currentVmId, + Tainted: wrapperspb.Bool(true), + }) + if err != nil { + glog.Errorf("failed to taint vm %s", currentVmId) + } + } + } + + return nil +} + +func (sc *ScheduledEventController) createSharedVMs(se *scheduledeventpb.ScheduledEvent) error { + issuedVmId := false + sharedVms := se.GetSharedVms() + for i := 0; i < len(sharedVms); i++ { + sharedVM := sharedVms[i] + // if sharedVM is provisioned (VMId is set) continue, if new sharedVM (empty VMId) we create the VM + if sharedVM.GetVmId() != "" { + continue + } + env, err := sc.environmentClient.GetEnvironment(sc.Context, &generalpb.GetRequest{ + Id: sharedVM.GetEnvironment(), + }) + if err != nil { + if hferrors.IsGrpcNotFound(err) { + glog.Errorf("environment invalid") + } + return err + } + + vmt, err := sc.vmTemplateClient.GetVMTemplate(sc.Context, &generalpb.GetRequest{ + Id: sharedVM.GetVmTemplate(), + }) + if err != nil { + return fmt.Errorf("error while retrieving virtual machine template %s %v", sharedVM.GetVmTemplate(), err) + } + + vmLabels := map[string]string{ + "dynamic": "false", + "shared": "true", + hflabels.EnvironmentLabel: sharedVM.GetEnvironment(), + "bound": "true", + hflabels.VirtualMachineTemplate: sharedVM.GetVmTemplate(), + hflabels.ScheduledEventLabel: se.GetId(), + } + + config := util.GetVMConfig(env, vmt) + + sshUser := config["ssh_username"] + protocol, exists := config["protocol"] + if !exists { + protocol = "ssh" + } + + var provision bool + provision = true + if provisionMethod, ok := env.GetAnnotations()["hobbyfarm.io/provisioner"]; ok && provisionMethod != "" { + vmLabels["hobbyfarm.io/provisioner"] = provisionMethod + provision = false + } + + vmId := fmt.Sprintf("shared-%s-%08x", se.Name, rand.Uint32()) + + _, err = sc.vmClient.CreateVM(sc.Context, &vmpb.CreateVMRequest{ + Id: vmId, + VmTemplateId: sharedVM.GetVmTemplate(), + SshUsername: sshUser, + Protocol: protocol, + Provision: provision, + VmType: vmpb.VirtualMachineType_SHARED, + ScheduledEventId: se.GetId(), + ScheduledEventUid: se.GetUid(), + Labels: vmLabels, + }) + if err != nil { + return err + } + glog.V(4).Infof("Created shared VM %s ", vmId) + + _, err = sc.vmClient.UpdateVMStatus(sc.Context, &vmpb.UpdateVMStatusRequest{ + Id: vmId, + Status: string(hfv1.VmStatusRFP), + Allocated: wrapperspb.Bool(true), + Tainted: wrapperspb.Bool(false), + PublicIp: wrapperspb.String(""), + PrivateIp: wrapperspb.String(""), + Hostname: wrapperspb.String(""), + EnvironmentId: env.GetId(), + WsEndpoint: env.GetWsEndpoint(), + }) + if err != nil { + return err + } + sharedVM.VmId = vmId + issuedVmId = true + } + + // If we didn't issue new vm ids to our shared VMs, we do not need to update the scheduled event + if !issuedVmId { + return nil + } + + _, err := sc.internalScheduledEventServer.UpdateScheduledEvent(sc.Context, &scheduledeventpb.UpdateScheduledEventRequest{ + Id: se.GetId(), + SharedVms: &scheduledeventpb.SharedVirtualMachineWrapper{Value: sharedVms}, + }) + return err // returns nil if no error occurs +} + // @TODO: Integrate this function if it should be used or remove it if not. func calculateUsedCapacity(env *hfv1.Environment, vmsList *hfv1.VirtualMachineSetList, templates *hfv1.VirtualMachineTemplateList) map[string]int { usedCount := map[string]int{} diff --git a/v3/services/scheduledeventsvc/internal/grpc.go b/v3/services/scheduledeventsvc/internal/grpc.go index 03d84698..e89c2857 100644 --- a/v3/services/scheduledeventsvc/internal/grpc.go +++ b/v3/services/scheduledeventsvc/internal/grpc.go @@ -67,6 +67,7 @@ func (s *GrpcScheduledEventServer) CreateScheduledEvent(ctx context.Context, req accessCode := req.GetAccessCode() scenariosRaw := req.GetScenariosRaw() coursesRaw := req.GetCoursesRaw() + sharedVmsWrapper := req.GetSharedVms() labels := req.GetLabels() requiredStringParams := map[string]string{ @@ -133,6 +134,23 @@ func (s *GrpcScheduledEventServer) CreateScheduledEvent(ctx context.Context, req } event.Spec.Scenarios = scenarios } + if sharedVmsWrapper != nil { + tmpSharedVms := sharedVmsWrapper.GetValue() + sharedVms := make([]hfv1.SharedVirtualMachine, 0, len(tmpSharedVms)) + for _, sharedVm := range tmpSharedVms { + sharedVms = append(sharedVms, hfv1.SharedVirtualMachine{ + VMId: sharedVm.VmId, + Name: sharedVm.Name, + Environment: sharedVm.Environment, + VMTemplate: sharedVm.VmTemplate, + }) + } + err = util.VerifySharedVirtualMachineContent(sharedVms, req) + if err != nil { + return &generalpb.ResourceId{}, err + } + event.Spec.SharedVirtualMachines = sharedVms + } _, err = s.eventClient.Create(ctx, event, metav1.CreateOptions{}) if err != nil { @@ -164,6 +182,18 @@ func (s *GrpcScheduledEventServer) GetScheduledEvent(ctx context.Context, req *g requiredVms[environment] = &scheduledeventpb.VMTemplateCountMap{VmTemplateCounts: util.ConvertIntMap[int, uint32](vmTemplateCountMap)} } + sharedVms := []*scheduledeventpb.SharedVirtualMachine{} + + for _, sharedVm := range event.Spec.SharedVirtualMachines { + tmpSharedVm := &scheduledeventpb.SharedVirtualMachine{ + VmId: sharedVm.VMId, + Name: sharedVm.Name, + Environment: sharedVm.Environment, + VmTemplate: sharedVm.VMTemplate, + } + sharedVms = append(sharedVms, tmpSharedVm) + } + return &scheduledeventpb.ScheduledEvent{ Id: event.Name, Uid: string(event.UID), @@ -180,6 +210,7 @@ func (s *GrpcScheduledEventServer) GetScheduledEvent(ctx context.Context, req *g AccessCode: event.Spec.AccessCode, Scenarios: event.Spec.Scenarios, Courses: event.Spec.Courses, + SharedVms: sharedVms, Labels: event.Labels, Status: status, }, nil @@ -201,6 +232,7 @@ func (s *GrpcScheduledEventServer) UpdateScheduledEvent(ctx context.Context, req accessCode := req.GetAccessCode() scenariosRaw := req.GetScenariosRaw() coursesRaw := req.GetCoursesRaw() + sharedVmsWrapper := req.GetSharedVms() scheduledEventLabelSelector := fmt.Sprintf("%s=%s", hflabels.ScheduledEventLabel, id) @@ -278,6 +310,23 @@ func (s *GrpcScheduledEventServer) UpdateScheduledEvent(ctx context.Context, req } event.Spec.Courses = courses } + if sharedVmsWrapper != nil { + tmpSharedVms := sharedVmsWrapper.GetValue() + sharedVms := make([]hfv1.SharedVirtualMachine, 0, len(tmpSharedVms)) + for _, sharedVm := range tmpSharedVms { + sharedVms = append(sharedVms, hfv1.SharedVirtualMachine{ + VMId: sharedVm.VmId, + Name: sharedVm.Name, + Environment: sharedVm.Environment, + VMTemplate: sharedVm.VmTemplate, + }) + } + err = util.VerifySharedVirtualMachineContent(sharedVms, req) + if err != nil { + return err + } + event.Spec.SharedVirtualMachines = sharedVms + } // if our event is already provisioned, we need to undo that and delete the corresponding access code(s) and DBC(s) // our scheduledeventcontroller will then provision our scheduledevent with the updated values @@ -444,6 +493,18 @@ func (s *GrpcScheduledEventServer) ListScheduledEvent(ctx context.Context, listO requiredVms[environment] = &scheduledeventpb.VMTemplateCountMap{VmTemplateCounts: util.ConvertIntMap[int, uint32](vmTemplateCountMap)} } + sharedVms := []*scheduledeventpb.SharedVirtualMachine{} + + for _, sharedVm := range event.Spec.SharedVirtualMachines { + tmpSharedVm := &scheduledeventpb.SharedVirtualMachine{ + VmId: sharedVm.VMId, + Name: sharedVm.Name, + Environment: sharedVm.Environment, + VmTemplate: sharedVm.VMTemplate, + } + sharedVms = append(sharedVms, tmpSharedVm) + } + preparedEvents = append(preparedEvents, &scheduledeventpb.ScheduledEvent{ Id: event.Name, Uid: string(event.UID), @@ -460,6 +521,7 @@ func (s *GrpcScheduledEventServer) ListScheduledEvent(ctx context.Context, listO AccessCode: event.Spec.AccessCode, Scenarios: event.Spec.Scenarios, Courses: event.Spec.Courses, + SharedVms: sharedVms, Labels: event.Labels, Status: status, }) diff --git a/v3/services/scheduledeventsvc/internal/scheduledeventservice.go b/v3/services/scheduledeventsvc/internal/scheduledeventservice.go index 575c1641..4f79afdf 100644 --- a/v3/services/scheduledeventsvc/internal/scheduledeventservice.go +++ b/v3/services/scheduledeventsvc/internal/scheduledeventservice.go @@ -28,20 +28,21 @@ const ( ) type PreparedScheduledEvent struct { - Id string `json:"id"` - Creator string `json:"creator"` - Name string `json:"event_name"` - Description string `json:"description"` - StartTime string `json:"start_time"` - EndTime string `json:"end_time"` - OnDemand bool `json:"on_demand"` // whether or not to provision VMs on-demand - RequiredVirtualMachines map[string]map[string]uint32 `json:"required_vms"` // map of environment to a map of strings it should be environment: vm template: count - AccessCode string `json:"access_code"` - RestrictedBind bool `json:"restricted_bind"` // if restricted_bind is true, we need to make the scenario sessions when they get created only bind to vmsets that are created by this scheduledevent - RestrictedBindValue string `json:"restricted_bind_value"` - Printable bool `json:"printable"` - Scenarios []string `json:"scenarios"` - Courses []string `json:"courses"` + Id string `json:"id"` + Creator string `json:"creator"` + Name string `json:"event_name"` + Description string `json:"description"` + StartTime string `json:"start_time"` + EndTime string `json:"end_time"` + OnDemand bool `json:"on_demand"` // whether or not to provision VMs on-demand + RequiredVirtualMachines map[string]map[string]uint32 `json:"required_vms"` // map of environment to a map of strings it should be environment: vm template: count + AccessCode string `json:"access_code"` + RestrictedBind bool `json:"restricted_bind"` // if restricted_bind is true, we need to make the scenario sessions when they get created only bind to vmsets that are created by this scheduledevent + RestrictedBindValue string `json:"restricted_bind_value"` + Printable bool `json:"printable"` + Scenarios []string `json:"scenarios"` + Courses []string `json:"courses"` + SharedVirtualMachine []*scheduledeventpb.SharedVirtualMachine `json:"shared_vms"` *scheduledeventpb.ScheduledEventStatus } @@ -69,6 +70,7 @@ func (s ScheduledEventServer) getPreparedScheduledEvent(scheduledEvent *schedule Scenarios: scheduledEvent.GetScenarios(), Courses: scheduledEvent.GetCourses(), ScheduledEventStatus: scheduledEvent.GetStatus(), + SharedVirtualMachine: scheduledEvent.GetSharedVms(), } } @@ -233,6 +235,7 @@ func (s ScheduledEventServer) CreateFunc(w http.ResponseWriter, r *http.Request) util.ReturnHTTPMessage(w, r, 400, "badrequest", "no scenarios or courses passed in") return } + sharedVmsRaw := r.PostFormValue("shared_vms") // restrictedBind := strings.ToLower(restrictionDisabledRaw) == "false" || restrictionDisabled == "" restrictionDisabled := false @@ -247,6 +250,13 @@ func (s ScheduledEventServer) CreateFunc(w http.ResponseWriter, r *http.Request) } } + sharedVms, err := util.GenericUnmarshal[[]*scheduledeventpb.SharedVirtualMachine](sharedVmsRaw, "shared_vms_raw") + if err != nil { + glog.Errorf("error creating scheduled event: failed to unmarshal shared vms") + util.ReturnHTTPMessage(w, r, 500, "internalerror", "error creating scheduled event") + return + } + eventId, err := s.internalScheduledEventServer.CreateScheduledEvent(r.Context(), &scheduledeventpb.CreateScheduledEventRequest{ Name: name, Description: description, @@ -260,6 +270,7 @@ func (s ScheduledEventServer) CreateFunc(w http.ResponseWriter, r *http.Request) AccessCode: accessCode, ScenariosRaw: scenariosRaw, CoursesRaw: coursesRaw, + SharedVms: &scheduledeventpb.SharedVirtualMachineWrapper{Value: sharedVms}, }) if err != nil { @@ -318,6 +329,7 @@ func (s ScheduledEventServer) UpdateFunc(w http.ResponseWriter, r *http.Request) accessCode := r.PostFormValue("access_code") scenariosRaw := r.PostFormValue("scenarios") coursesRaw := r.PostFormValue("courses") + sharedVmsRaw := r.PostFormValue("shared_vms") onDemandRaw := r.PostFormValue("on_demand") restrictionDisabledRaw := r.PostFormValue("disable_restriction") printableRaw := r.PostFormValue("printable") @@ -349,6 +361,13 @@ func (s ScheduledEventServer) UpdateFunc(w http.ResponseWriter, r *http.Request) restrictedBindWrapper = wrapperspb.Bool(restrictedBind) } + sharedVms, err := util.GenericUnmarshal[[]*scheduledeventpb.SharedVirtualMachine](sharedVmsRaw, "shared_vms_raw") + if err != nil { + glog.Errorf("error updating scheduled event: failed to unmarshal shared vms") + util.ReturnHTTPMessage(w, r, 500, "internalerror", "error updating scheduled event") + return + } + _, err = s.internalScheduledEventServer.UpdateScheduledEvent(r.Context(), &scheduledeventpb.UpdateScheduledEventRequest{ Id: id, Name: name, @@ -362,6 +381,7 @@ func (s ScheduledEventServer) UpdateFunc(w http.ResponseWriter, r *http.Request) AccessCode: accessCode, ScenariosRaw: scenariosRaw, CoursesRaw: coursesRaw, + SharedVms: &scheduledeventpb.SharedVirtualMachineWrapper{Value: sharedVms}, }) if err != nil { diff --git a/v3/services/scheduledeventsvc/main.go b/v3/services/scheduledeventsvc/main.go index 84b01e96..2f91b1ae 100644 --- a/v3/services/scheduledeventsvc/main.go +++ b/v3/services/scheduledeventsvc/main.go @@ -22,6 +22,7 @@ import ( scheduledeventpb "github.com/hobbyfarm/gargantua/v3/protos/scheduledevent" sessionpb "github.com/hobbyfarm/gargantua/v3/protos/session" settingpb "github.com/hobbyfarm/gargantua/v3/protos/setting" + vmpb "github.com/hobbyfarm/gargantua/v3/protos/vm" vmsetpb "github.com/hobbyfarm/gargantua/v3/protos/vmset" vmtemplatepb "github.com/hobbyfarm/gargantua/v3/protos/vmtemplate" ) @@ -53,6 +54,7 @@ func main() { microservices.Environment, microservices.Progress, microservices.Session, + microservices.VM, microservices.VMSet, microservices.VMTemplate, microservices.Setting, @@ -69,6 +71,7 @@ func main() { envClient := environmentpb.NewEnvironmentSvcClient(connections[microservices.Environment]) progressClient := progresspb.NewProgressSvcClient(connections[microservices.Progress]) sessionClient := sessionpb.NewSessionSvcClient(connections[microservices.Session]) + vmClient := vmpb.NewVMSvcClient(connections[microservices.VM]) vmSetClient := vmsetpb.NewVMSetSvcClient(connections[microservices.VMSet]) vmTemplateClient := vmtemplatepb.NewVMTemplateSvcClient(connections[microservices.VMTemplate]) settingClient := settingpb.NewSettingSvcClient(connections[microservices.Setting]) @@ -86,6 +89,7 @@ func main() { envClient, progressClient, sessionClient, + vmClient, vmSetClient, vmTemplateClient, settingClient, diff --git a/v3/services/vmclaimsvc/internal/controller.go b/v3/services/vmclaimsvc/internal/controller.go index db126aa0..177e955d 100644 --- a/v3/services/vmclaimsvc/internal/controller.go +++ b/v3/services/vmclaimsvc/internal/controller.go @@ -271,6 +271,7 @@ func (v *VMClaimController) submitVirtualMachines(vmc *vmclaimpb.VMClaim) (err e VmClaimUid: vmc.GetUid(), User: vmc.GetUserId(), Provision: true, + VmType: vmpb.VirtualMachineType_USER, Labels: map[string]string{ "dynamic": "true", "vmc": vmc.GetId(), diff --git a/v3/services/vmsetsvc/internal/controller.go b/v3/services/vmsetsvc/internal/controller.go index 12ae6364..68d52b83 100644 --- a/v3/services/vmsetsvc/internal/controller.go +++ b/v3/services/vmsetsvc/internal/controller.go @@ -188,6 +188,7 @@ func (v *VMSetController) reconcileVirtualMachineSet(vmset *vmsetpb.VMSet) error Provision: provision, VmSetId: vmset.GetId(), VmSetUid: vmset.GetUid(), + VmType: vmpb.VirtualMachineType_USER, Labels: vmLabels, Finalizers: []string{vmSetFinalizer}, }) diff --git a/v3/services/vmsvc/internal/grpc.go b/v3/services/vmsvc/internal/grpc.go index ef82fde8..bbb5b0a6 100644 --- a/v3/services/vmsvc/internal/grpc.go +++ b/v3/services/vmsvc/internal/grpc.go @@ -54,19 +54,28 @@ func (s *GrpcVMServer) CreateVM(ctx context.Context, req *vmpb.CreateVMRequest) provision := req.GetProvision() vmSetId := req.GetVmSetId() vmSetUid := req.GetVmSetUid() + vmType := util.ConvertToStringEnum(req.GetVmType(), vmpb.VirtualMachineType_name, hfv1.VirtualMachineTypeUser) + seId := req.GetScheduledEventId() + seUid := req.GetScheduledEventUid() labels := req.GetLabels() finalizers := req.GetFinalizers() vmSetOwner := vmSetId != "" && vmSetUid != "" vmClaimOwner := vmClaimId != "" && vmClaimUid != "" - // either vmClaimId AND vmClaimUid or vmSetId AND vmSetUid need to be provided for the owner reference - // if that's not the case, return an error - if !vmSetOwner && !vmClaimOwner { + scheduledEventOwner := vmType == hfv1.VirtualMachineTypeShared && seId != "" && seUid != "" + + // For for VMs of type "USER" either vmClaimId AND vmClaimUid or vmSetId AND vmSetUid must be provided for the owner reference + // For for VMs of type "Shared" seId AND seUid must be provided for the owner reference + // If this is not the case, return an error + if !scheduledEventOwner && !vmSetOwner && !vmClaimOwner { return &emptypb.Empty{}, hferrors.GrpcError(codes.InvalidArgument, "no ID and UID for owner reference provided", req) } - // vm set takes precedence over vm claim - if vmSetOwner { + if scheduledEventOwner { // if scheduledEventOwner is true our vm is a Shared VM + ownerReferenceId = seId + ownerReferenceUid = types.UID(seUid) + ownerReferenceKind = "ScheduledEvent" + } else if vmSetOwner { // vm set takes precedence over vm claim ownerReferenceId = vmSetId ownerReferenceUid = types.UID(vmSetUid) ownerReferenceKind = "VirtualMachineSet" @@ -109,6 +118,7 @@ func (s *GrpcVMServer) CreateVM(ctx context.Context, req *vmpb.CreateVMRequest) UserId: user, Provision: provision, VirtualMachineSetId: vmSetId, + VirtualMachineType: vmType, }, } @@ -161,6 +171,7 @@ func (s *GrpcVMServer) GetVM(ctx context.Context, req *generalpb.GetRequest) (*v User: vm.Spec.UserId, Provision: vm.Spec.Provision, VmSetId: vm.Spec.VirtualMachineSetId, + VmType: util.ConvertToPBEnum(vm.Spec.VirtualMachineType, vmpb.VirtualMachineType_value, vmpb.VirtualMachineType_USER), Labels: vm.Labels, Finalizers: vm.Finalizers, Status: status, @@ -368,6 +379,7 @@ func (s *GrpcVMServer) ListVM(ctx context.Context, listOptions *generalpb.ListOp User: vm.Spec.UserId, Provision: vm.Spec.Provision, VmSetId: vm.Spec.VirtualMachineSetId, + VmType: util.ConvertToPBEnum(vm.Spec.VirtualMachineType, vmpb.VirtualMachineType_value, vmpb.VirtualMachineType_USER), Labels: vm.Labels, Finalizers: vm.Finalizers, Status: status, diff --git a/v3/services/vmsvc/internal/server.go b/v3/services/vmsvc/internal/server.go index 6ad88bd9..404fd960 100644 --- a/v3/services/vmsvc/internal/server.go +++ b/v3/services/vmsvc/internal/server.go @@ -3,6 +3,7 @@ package vmservice import ( "github.com/golang/glog" "github.com/gorilla/mux" + accesscodepb "github.com/hobbyfarm/gargantua/v3/protos/accesscode" authnpb "github.com/hobbyfarm/gargantua/v3/protos/authn" authrpb "github.com/hobbyfarm/gargantua/v3/protos/authr" vmtemplatepb "github.com/hobbyfarm/gargantua/v3/protos/vmtemplate" @@ -11,6 +12,7 @@ import ( type VMServer struct { authnClient authnpb.AuthNClient authrClient authrpb.AuthRClient + acClient accesscodepb.AccessCodeSvcClient vmTemplateClient vmtemplatepb.VMTemplateSvcClient internalVMServer *GrpcVMServer } @@ -18,12 +20,14 @@ type VMServer struct { func NewVMServer( authnClient authnpb.AuthNClient, authrClient authrpb.AuthRClient, + acClient accesscodepb.AccessCodeSvcClient, vmTemplateClient vmtemplatepb.VMTemplateSvcClient, internalVMServer *GrpcVMServer, ) VMServer { return VMServer{ authnClient: authnClient, authrClient: authrClient, + acClient: acClient, vmTemplateClient: vmTemplateClient, internalVMServer: internalVMServer, } @@ -35,5 +39,6 @@ func (vms VMServer) SetupRoutes(r *mux.Router) { r.HandleFunc("/a/vm/list", vms.GetAllVMListFunc).Methods("GET") r.HandleFunc("/a/vm/scheduledevent/{se_id}", vms.GetVMListByScheduledEventFunc).Methods("GET") r.HandleFunc("/a/vm/count", vms.CountByScheduledEvent).Methods("GET") + r.HandleFunc("/vm/shared/{access_code}", vms.GetSharedVirtualMachinesFunc).Methods("GET") glog.V(2).Infof("set up routes") } diff --git a/v3/services/vmsvc/internal/vmservice.go b/v3/services/vmsvc/internal/vmservice.go index 88337393..76442aca 100644 --- a/v3/services/vmsvc/internal/vmservice.go +++ b/v3/services/vmsvc/internal/vmservice.go @@ -5,12 +5,15 @@ import ( "fmt" "net/http" + hfv1 "github.com/hobbyfarm/gargantua/v3/pkg/apis/hobbyfarm.io/v1" hferrors "github.com/hobbyfarm/gargantua/v3/pkg/errors" hflabels "github.com/hobbyfarm/gargantua/v3/pkg/labels" "github.com/hobbyfarm/gargantua/v3/pkg/rbac" "github.com/hobbyfarm/gargantua/v3/pkg/util" generalpb "github.com/hobbyfarm/gargantua/v3/protos/general" vmpb "github.com/hobbyfarm/gargantua/v3/protos/vm" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/selection" "github.com/golang/glog" "github.com/gorilla/mux" @@ -22,24 +25,25 @@ const ( ) type PreparedVirtualMachine struct { - Id string `json:"id"` - VirtualMachineTemplateId string `json:"vm_template_id"` - SshUsername string `json:"ssh_username"` - Protocol string `json:"protocol"` - SecretName string `json:"secret_name"` // this refers to the secret name for the keypair - VirtualMachineClaimId string `json:"vm_claim_id"` - UserId string `json:"user"` - Provision bool `json:"provision"` - VirtualMachineSetId string `json:"vm_set_id"` - Status string `json:"status"` // default is nothing, but could be one of the following: readyforprovisioning, provisioning, running, terminating - Allocated bool `json:"allocated"` - Tainted bool `json:"tainted"` - PublicIP string `json:"public_ip"` - PrivateIP string `json:"private_ip"` - EnvironmentId string `json:"environment_id"` - Hostname string `json:"hostname"` // ideally . should be the FQDN to this machine - TFState string `json:"tfstate,omitempty"` // Terraform state name - WsEndpoint string `json:"ws_endpoint"` + Id string `json:"id"` + VirtualMachineTemplateId string `json:"vm_template_id"` + SshUsername string `json:"ssh_username"` + Protocol string `json:"protocol"` + SecretName string `json:"secret_name"` // this refers to the secret name for the keypair + VirtualMachineClaimId string `json:"vm_claim_id"` + UserId string `json:"user"` + Provision bool `json:"provision"` + VirtualMachineSetId string `json:"vm_set_id"` + Status string `json:"status"` // default is nothing, but could be one of the following: readyforprovisioning, provisioning, running, terminating + Allocated bool `json:"allocated"` + Tainted bool `json:"tainted"` + PublicIP string `json:"public_ip"` + PrivateIP string `json:"private_ip"` + EnvironmentId string `json:"environment_id"` + Hostname string `json:"hostname"` // ideally . should be the FQDN to this machine + TFState string `json:"tfstate,omitempty"` // Terraform state name + WsEndpoint string `json:"ws_endpoint"` + VirtualMachineType hfv1.VirtualMachineType `json:"vm_type"` } /* @@ -77,10 +81,11 @@ func (vms VMServer) getWebinterfaces(w http.ResponseWriter, r *http.Request) { } // Check if the VM belongs to the User or User has RBAC-Rights to access VMs - if vm.GetUser() != impersonatedUserId { + // if this is a shared VM we should check if the user can accses the SE it belongs to + if vm.GetUser() != impersonatedUserId && vm.GetVmType() == vmpb.VirtualMachineType_USER { authrResponse, err := rbac.AuthorizeSimple(r, vms.authrClient, impersonatedUserId, rbac.HobbyfarmPermission(resourcePlural, rbac.VerbGet)) if err != nil || !authrResponse.Success { - glog.Errorf("user forbidden from accessing vm id %s", vm.GetId()) + glog.Errorf("user forbidden from accessing vm id %s of type %s", vm.GetId(), vm.GetVmType().String()) util.ReturnHTTPMessage(w, r, 403, "forbidden", "no access to get vm") return } @@ -254,6 +259,63 @@ func (vms VMServer) GetAllVMListFunc(w http.ResponseWriter, r *http.Request) { vms.GetVMListFunc(w, r, &generalpb.ListOptions{}) } +func (vms VMServer) GetSharedVirtualMachinesFunc(w http.ResponseWriter, r *http.Request) { + // TODO Check if User has access to VMs + _, err := rbac.AuthenticateRequest(r, vms.authnClient) + if err != nil { + util.ReturnHTTPMessage(w, r, 403, "forbidden", "no access to get shared vms") + return + } + + vars := mux.Vars(r) + + accessCode := vars["access_code"] + + if len(accessCode) == 0 { + util.ReturnHTTPMessage(w, r, 500, "error", "no accessCode id passed in") + return + } + + accessCodeResource, err := vms.acClient.GetAccessCodeWithOTACs(r.Context(), &generalpb.ResourceId{Id: accessCode}) + if err != nil { + util.ReturnHTTPMessage(w, r, 500, "error", "no accessCode found for given accessCode") + return + } + + scheduledEventID := accessCodeResource.Labels[hflabels.ScheduledEventLabel] + req1, err := labels.NewRequirement("shared", selection.Equals, []string{"true"}) + if err != nil { + util.ReturnHTTPMessage(w, r, 500, "error", "internal error listing virtual machines") + return + } + req2, err := labels.NewRequirement(hflabels.ScheduledEventLabel, selection.Equals, []string{scheduledEventID}) + if err != nil { + util.ReturnHTTPMessage(w, r, 500, "error", "internal error listing virtual machines") + return + } + selector := labels.NewSelector() + selector = selector.Add(*req1).Add(*req2) + selectorString := selector.String() + sharedVMList, err := vms.internalVMServer.ListVM(r.Context(), &generalpb.ListOptions{LabelSelector: selectorString}) + if err != nil { + util.ReturnHTTPMessage(w, r, 500, "error", "internal error listing virtual machines") + return + } + sharedVMs := sharedVMList.GetVms() + preparedSharedVMs := []PreparedVirtualMachine{} + + for _, sharedVM := range sharedVMs { + preparedSharedVMs = append(preparedSharedVMs, getPreparedVM(sharedVM)) + glog.V(2).Infof("retrieved shared vm %s", sharedVM.GetId()) + } + + encodedVM, err := json.Marshal(preparedSharedVMs) + if err != nil { + glog.Error(err) + } + util.ReturnHTTPContent(w, r, 200, "success", encodedVM) +} + func getPreparedVM(vm *vmpb.VM) PreparedVirtualMachine { return PreparedVirtualMachine{ Id: vm.GetId(), @@ -274,5 +336,6 @@ func getPreparedVM(vm *vmpb.VM) PreparedVirtualMachine { Hostname: vm.GetStatus().GetHostname(), TFState: vm.GetStatus().GetTfstate(), WsEndpoint: vm.GetStatus().GetWsEndpoint(), + VirtualMachineType: util.ConvertToStringEnum(vm.GetVmType(), vmpb.VirtualMachineType_name, hfv1.VirtualMachineTypeUser), } } diff --git a/v3/services/vmsvc/main.go b/v3/services/vmsvc/main.go index e3d563e0..f578ab8c 100644 --- a/v3/services/vmsvc/main.go +++ b/v3/services/vmsvc/main.go @@ -11,6 +11,7 @@ import ( vmservice "github.com/hobbyfarm/gargantua/services/vmsvc/v3/internal" hfInformers "github.com/hobbyfarm/gargantua/v3/pkg/client/informers/externalversions" + accesscodepb "github.com/hobbyfarm/gargantua/v3/protos/accesscode" authnpb "github.com/hobbyfarm/gargantua/v3/protos/authn" authrpb "github.com/hobbyfarm/gargantua/v3/protos/authr" vmpb "github.com/hobbyfarm/gargantua/v3/protos/vm" @@ -38,6 +39,7 @@ func main() { services := []microservices.MicroService{ microservices.AuthN, microservices.AuthR, + microservices.AccessCode, microservices.VMTemplate, } connections := microservices.EstablishConnections(services, serviceConfig.ClientCert) @@ -46,6 +48,7 @@ func main() { } authnClient := authnpb.NewAuthNClient(connections[microservices.AuthN]) authrClient := authrpb.NewAuthRClient(connections[microservices.AuthR]) + acClient := accesscodepb.NewAccessCodeSvcClient(connections[microservices.AccessCode]) vmTemplateClient := vmtemplatepb.NewVMTemplateSvcClient(connections[microservices.VMTemplate]) gs := microservices.CreateGRPCServer(serviceConfig.ServerCert.Clone()) @@ -68,6 +71,7 @@ func main() { vmServer := vmservice.NewVMServer( authnClient, authrClient, + acClient, vmTemplateClient, vs, )