From a2893a12222e02bb19bcc42fba316f058a1f1d61 Mon Sep 17 00:00:00 2001 From: Vladik Romanovsky Date: Tue, 19 Feb 2019 14:50:58 -0500 Subject: [PATCH] add a struct for a migration config Signed-off-by: Vladik Romanovsky --- pkg/api/v1/deepcopy_generated.go | 16 ++++++++++++++++ pkg/api/v1/types.go | 7 +++++++ pkg/api/v1/types_swagger_generated.go | 7 +++++++ 3 files changed, 30 insertions(+) diff --git a/pkg/api/v1/deepcopy_generated.go b/pkg/api/v1/deepcopy_generated.go index 055e1bced6f4..7ec64873e707 100644 --- a/pkg/api/v1/deepcopy_generated.go +++ b/pkg/api/v1/deepcopy_generated.go @@ -1512,6 +1512,22 @@ func (in *Memory) DeepCopy() *Memory { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MigrationConfig) DeepCopyInto(out *MigrationConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigrationConfig. +func (in *MigrationConfig) DeepCopy() *MigrationConfig { + if in == nil { + return nil + } + out := new(MigrationConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Network) DeepCopyInto(out *Network) { *out = *in diff --git a/pkg/api/v1/types.go b/pkg/api/v1/types.go index 090614c6eb12..f62b8e3b98de 100644 --- a/pkg/api/v1/types.go +++ b/pkg/api/v1/types.go @@ -365,6 +365,13 @@ type VirtualMachineInstanceMigrationState struct { MigrationUID types.UID `json:"migrationUid,omitempty"` } +type MigrationConfig struct { + // The time for GiB of data to wait for the migration to be completed before aborting it + CompletionTimeoutPerGiB int64 `json:"completionTimeoutPerGiB,omitempty"` + // The time to wait for live migration to make progress in transferring data. + ProgressTimeout int64 `json:"progressTimeout,omitempty"` +} + // --- // +k8s:openapi-gen=true type VirtualMachineInstanceMigrationMethod string diff --git a/pkg/api/v1/types_swagger_generated.go b/pkg/api/v1/types_swagger_generated.go index fb27ef93dbed..111850c7666e 100644 --- a/pkg/api/v1/types_swagger_generated.go +++ b/pkg/api/v1/types_swagger_generated.go @@ -78,6 +78,13 @@ func (VirtualMachineInstanceMigrationState) SwaggerDoc() map[string]string { } } +func (MigrationConfig) SwaggerDoc() map[string]string { + return map[string]string{ + "completionTimeoutPerGiB": "The time for GiB of data to wait for the migration to be completed before aborting it", + "progressTimeout": "The time to wait for live migration to make progress in transferring data.", + } +} + func (VMISelector) SwaggerDoc() map[string]string { return map[string]string{ "name": "Name of the VirtualMachineInstance to migrate",