From a2154d03b62a5eea4a4441b5295f858bf7a6438f Mon Sep 17 00:00:00 2001 From: ManageIQ Bot Date: Sun, 28 Jun 2026 00:23:48 +0000 Subject: [PATCH] Update kubevirt gem --- .openapi-generator/FILES | 3 + README.md | 1 + docs/V1KubeVirtConfiguration.md | 4 +- docs/V1KubeVirtSpec.md | 2 +- docs/V1MigrationConfiguration.md | 2 + docs/V1VMIMConfigurationOptions.md | 48 +++ docs/V1VirtualMachineInstanceBackupStatus.md | 2 + .../V1VirtualMachineInstanceMigrationState.md | 2 +- docs/V1alpha1MigrationPolicySpec.md | 4 + lib/kubevirt.rb | 1 + .../models/v1_kube_virt_configuration.rb | 4 +- lib/kubevirt/models/v1_kube_virt_spec.rb | 2 +- .../models/v1_migration_configuration.rb | 12 +- ..._virtual_machine_instance_backup_status.rb | 12 +- ...irtual_machine_instance_migration_state.rb | 2 +- .../models/v1_vmim_configuration_options.rb | 299 ++++++++++++++++++ .../models/v1alpha1_migration_policy_spec.rb | 21 +- .../models/v1_migration_configuration_spec.rb | 6 + ...ual_machine_instance_backup_status_spec.rb | 6 + .../v1_vmim_configuration_options_spec.rb | 126 ++++++++ .../v1alpha1_migration_policy_spec_spec.rb | 12 + 21 files changed, 560 insertions(+), 11 deletions(-) create mode 100644 docs/V1VMIMConfigurationOptions.md create mode 100644 lib/kubevirt/models/v1_vmim_configuration_options.rb create mode 100644 spec/models/v1_vmim_configuration_options_spec.rb diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index fe20c9fc..f699c8d6 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -232,6 +232,7 @@ docs/V1UserPasswordAccessCredentialSource.md docs/V1UtilityVolume.md docs/V1VGPUDisplayOptions.md docs/V1VGPUOptions.md +docs/V1VMIMConfigurationOptions.md docs/V1VideoDevice.md docs/V1VirtTemplateDeployment.md docs/V1VirtualMachine.md @@ -688,6 +689,7 @@ lib/kubevirt/models/v1_virtual_machine_start_failure.rb lib/kubevirt/models/v1_virtual_machine_state_change_request.rb lib/kubevirt/models/v1_virtual_machine_status.rb lib/kubevirt/models/v1_virtual_machine_volume_request.rb +lib/kubevirt/models/v1_vmim_configuration_options.rb lib/kubevirt/models/v1_volume.rb lib/kubevirt/models/v1_volume_migration_state.rb lib/kubevirt/models/v1_volume_snapshot_status.rb @@ -1077,6 +1079,7 @@ spec/models/v1_virtual_machine_start_failure_spec.rb spec/models/v1_virtual_machine_state_change_request_spec.rb spec/models/v1_virtual_machine_status_spec.rb spec/models/v1_virtual_machine_volume_request_spec.rb +spec/models/v1_vmim_configuration_options_spec.rb spec/models/v1_volume_migration_state_spec.rb spec/models/v1_volume_snapshot_status_spec.rb spec/models/v1_volume_spec.rb diff --git a/README.md b/README.md index 2e8d9545..6f443f64 100644 --- a/README.md +++ b/README.md @@ -602,6 +602,7 @@ Class | Method | HTTP request | Description - [Kubevirt::V1UtilityVolume](docs/V1UtilityVolume.md) - [Kubevirt::V1VGPUDisplayOptions](docs/V1VGPUDisplayOptions.md) - [Kubevirt::V1VGPUOptions](docs/V1VGPUOptions.md) + - [Kubevirt::V1VMIMConfigurationOptions](docs/V1VMIMConfigurationOptions.md) - [Kubevirt::V1VideoDevice](docs/V1VideoDevice.md) - [Kubevirt::V1VirtTemplateDeployment](docs/V1VirtTemplateDeployment.md) - [Kubevirt::V1VirtualMachine](docs/V1VirtualMachine.md) diff --git a/docs/V1KubeVirtConfiguration.md b/docs/V1KubeVirtConfiguration.md index 2fb4d712..316830f2 100644 --- a/docs/V1KubeVirtConfiguration.md +++ b/docs/V1KubeVirtConfiguration.md @@ -20,7 +20,7 @@ | **eviction_strategy** | **String** | EvictionStrategy defines at the cluster level if the VirtualMachineInstance should be migrated instead of shut-off in case of a node drain. If the VirtualMachineInstance specific field is set it overrides the cluster level one. | [optional] | | **handler_configuration** | [**V1ReloadableComponentConfiguration**](V1ReloadableComponentConfiguration.md) | | [optional] | | **hypervisors** | [**Array<V1HypervisorConfiguration>**](V1HypervisorConfiguration.md) | Hypervisors holds information regarding the hypervisor configurations supported on this cluster. | [optional] | -| **image_pull_policy** | **String** | Possible enum values: - `\"Always\"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails. - `\"IfNotPresent\"` means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails. - `\"Never\"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present | [optional] | +| **image_pull_policy** | **String** | The ImagePullPolicy to use for user workload pods and their containers (launcher pods, exporter pods, etc.). For KubeVirt infrastructure images, use spec.imagePullPolicy instead. Possible enum values: - `\"Always\"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails. - `\"IfNotPresent\"` means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails. - `\"Never\"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present | [optional] | | **instancetype** | [**V1InstancetypeConfiguration**](V1InstancetypeConfiguration.md) | | [optional] | | **ksm_configuration** | [**V1KSMConfiguration**](V1KSMConfiguration.md) | | [optional] | | **live_update_configuration** | [**V1LiveUpdateConfiguration**](V1LiveUpdateConfiguration.md) | | [optional] | @@ -34,7 +34,7 @@ | **ovmf_path** | **String** | Deprecated. Use architectureConfiguration instead. | [optional] | | **permitted_host_devices** | [**V1PermittedHostDevices**](V1PermittedHostDevices.md) | | [optional] | | **persistent_reservation_configuration** | [**V1PersistentReservationConfiguration**](V1PersistentReservationConfiguration.md) | | [optional] | -| **role_aggregation_strategy** | **String** | RoleAggregationStrategy controls whether RBAC cluster roles should be aggregated to the default Kubernetes roles (admin, edit, view). When set to \"AggregateToDefault\" (default) or not specified, the aggregate-to-* labels are added to the cluster roles. When set to \"Manual\", the labels are not added, and roles will not be aggregated to the default roles. Setting this field to \"Manual\" requires the OptOutRoleAggregation feature gate to be enabled. This is an Alpha feature and subject to change. | [optional] | +| **role_aggregation_strategy** | **String** | RoleAggregationStrategy controls whether RBAC cluster roles should be aggregated to the default Kubernetes roles (admin, edit, view). When set to \"AggregateToDefault\" (default) or not specified, the aggregate-to-* labels are added to the cluster roles. When set to \"Manual\", the labels are not added, and roles will not be aggregated to the default roles. Setting RoleAggregationStrategy to \"Manual\" requires the OptOutRoleAggregation feature gate to be enabled (Beta, enabled by default since v1.9.0). | [optional] | | **seccomp_configuration** | [**V1SeccompConfiguration**](V1SeccompConfiguration.md) | | [optional] | | **selinux_launcher_type** | **String** | | [optional] | | **smbios** | [**V1SMBiosConfiguration**](V1SMBiosConfiguration.md) | | [optional] | diff --git a/docs/V1KubeVirtSpec.md b/docs/V1KubeVirtSpec.md index 96527f29..15093c4e 100644 --- a/docs/V1KubeVirtSpec.md +++ b/docs/V1KubeVirtSpec.md @@ -7,7 +7,7 @@ | **certificate_rotate_strategy** | [**V1KubeVirtCertificateRotateStrategy**](V1KubeVirtCertificateRotateStrategy.md) | | [optional] | | **configuration** | [**V1KubeVirtConfiguration**](V1KubeVirtConfiguration.md) | | [optional] | | **customize_components** | [**V1CustomizeComponents**](V1CustomizeComponents.md) | | [optional] | -| **image_pull_policy** | **String** | The ImagePullPolicy to use. Possible enum values: - `\"Always\"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails. - `\"IfNotPresent\"` means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails. - `\"Never\"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present | [optional] | +| **image_pull_policy** | **String** | The ImagePullPolicy to use for KubeVirt operator-managed infrastructure images (virt-api, virt-controller, virt-handler, virt-exportproxy, etc.). For pull policy of user workload pods, see spec.configuration.imagePullPolicy. Possible enum values: - `\"Always\"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails. - `\"IfNotPresent\"` means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails. - `\"Never\"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present | [optional] | | **image_pull_secrets** | [**Array<K8sIoApiCoreV1LocalObjectReference>**](K8sIoApiCoreV1LocalObjectReference.md) | The imagePullSecrets to pull the container images from Defaults to none | [optional] | | **image_registry** | **String** | The image registry to pull the container images from Defaults to the same registry the operator's container image is pulled from. | [optional] | | **image_tag** | **String** | The image tag to use for the continer images installed. Defaults to the same tag as the operator's container image. | [optional] | diff --git a/docs/V1MigrationConfiguration.md b/docs/V1MigrationConfiguration.md index 9e4b0bfb..d243349b 100644 --- a/docs/V1MigrationConfiguration.md +++ b/docs/V1MigrationConfiguration.md @@ -11,6 +11,7 @@ | **completion_timeout_per_gi_b** | **Integer** | CompletionTimeoutPerGiB is the maximum number of seconds per GiB a migration is allowed to take. If the timeout is reached, the migration will be either paused, switched to post-copy or cancelled depending on other settings. Defaults to 150 | [optional] | | **disable_tls** | **Boolean** | When set to true, DisableTLS will disable the additional layer of live migration encryption provided by KubeVirt. This is usually a bad idea. Defaults to false | [optional] | | **match_se_linux_level_on_migration** | **Boolean** | By default, the SELinux level of target virt-launcher pods is forced to the level of the source virt-launcher. When set to true, MatchSELinuxLevelOnMigration lets the CRI auto-assign a random level to the target. That will ensure the target virt-launcher doesn't share categories with another pod on the node. However, migrations will fail when using RWX volumes that don't automatically deal with SELinux levels. | [optional] | +| **max_downtime_ms** | **Integer** | MaxDowntimeMs specifies the maximum tolerable downtime (in milliseconds) during switchover. Defaults to 900 | [optional] | | **network** | **String** | Network is the name of the CNI network to use for live migrations. By default, migrations go through the pod network. | [optional] | | **node_drain_taint_key** | **String** | NodeDrainTaintKey defines the taint key that indicates a node should be drained. Note: this option relies on the deprecated node taint feature. Default: kubevirt.io/drain | [optional] | | **parallel_migrations_per_cluster** | **Integer** | ParallelMigrationsPerCluster is the total number of concurrent live migrations allowed cluster-wide. Defaults to 5 | [optional] | @@ -32,6 +33,7 @@ instance = Kubevirt::V1MigrationConfiguration.new( completion_timeout_per_gi_b: null, disable_tls: null, match_se_linux_level_on_migration: null, + max_downtime_ms: null, network: null, node_drain_taint_key: null, parallel_migrations_per_cluster: null, diff --git a/docs/V1VMIMConfigurationOptions.md b/docs/V1VMIMConfigurationOptions.md new file mode 100644 index 00000000..4aa1c98c --- /dev/null +++ b/docs/V1VMIMConfigurationOptions.md @@ -0,0 +1,48 @@ +# Kubevirt::V1VMIMConfigurationOptions + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **allow_auto_converge** | **Boolean** | AllowAutoConverge allows the platform to compromise performance/availability of VMIs to guarantee successful VMI live migrations. Defaults to false | [optional] | +| **allow_post_copy** | **Boolean** | AllowPostCopy enables post-copy live migrations. Such migrations allow even the busiest VMIs to successfully live-migrate. However, events like a network failure can cause a VMI crash. If set to true, migrations will still start in pre-copy, but switch to post-copy when CompletionTimeoutPerGiB triggers. Defaults to false | [optional] | +| **allow_workload_disruption** | **Boolean** | AllowWorkloadDisruption indicates that the migration shouldn't be canceled after acceptableCompletionTime is exceeded. Instead, if permitted, migration will be switched to post-copy or the VMI will be paused to allow the migration to complete | [optional] | +| **bandwidth_per_migration** | **Object** | Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors. The serialization format is: ``` <quantity> ::= <signedNumber><suffix> (Note that <suffix> may be empty, from the \"\" case in <decimalSI>.) <digit> ::= 0 | 1 | ... | 9 <digits> ::= <digit> | <digit><digits> <number> ::= <digits> | <digits>.<digits> | <digits>. | .<digits> <sign> ::= \"+\" | \"-\" <signedNumber> ::= <number> | <sign><number> <suffix> ::= <binarySI> | <decimalExponent> | <decimalSI> <binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html) <decimalSI> ::= m | \"\" | k | M | G | T | P | E (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.) <decimalExponent> ::= \"e\" <signedNumber> | \"E\" <signedNumber> ``` No matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities. When a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized. Before serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that: - No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible. The sign will be omitted unless the number is negative. Examples: - 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\" Note that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise. Non-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.) This format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation. | [optional] | +| **completion_timeout_per_gi_b** | **Integer** | CompletionTimeoutPerGiB is the maximum number of seconds per GiB a migration is allowed to take. If the timeout is reached, the migration will be either paused, switched to post-copy or cancelled depending on other settings. Defaults to 150 | [optional] | +| **disable_tls** | **Boolean** | When set to true, DisableTLS will disable the additional layer of live migration encryption provided by KubeVirt. This is usually a bad idea. Defaults to false | [optional] | +| **experimental** | **Object** | ExperimentalMigrationOptions is an alpha API for experimental migration tunables. It is intended for experimental purposes only and will be removed in the future. | [optional] | +| **match_se_linux_level_on_migration** | **Boolean** | By default, the SELinux level of target virt-launcher pods is forced to the level of the source virt-launcher. When set to true, MatchSELinuxLevelOnMigration lets the CRI auto-assign a random level to the target. That will ensure the target virt-launcher doesn't share categories with another pod on the node. However, migrations will fail when using RWX volumes that don't automatically deal with SELinux levels. | [optional] | +| **max_downtime_ms** | **Integer** | MaxDowntimeMs specifies the maximum tolerable downtime (in milliseconds) during switchover. Defaults to 900 | [optional] | +| **network** | **String** | Network is the name of the CNI network to use for live migrations. By default, migrations go through the pod network. | [optional] | +| **node_drain_taint_key** | **String** | NodeDrainTaintKey defines the taint key that indicates a node should be drained. Note: this option relies on the deprecated node taint feature. Default: kubevirt.io/drain | [optional] | +| **parallel_migrations_per_cluster** | **Integer** | ParallelMigrationsPerCluster is the total number of concurrent live migrations allowed cluster-wide. Defaults to 5 | [optional] | +| **parallel_outbound_migrations_per_node** | **Integer** | ParallelOutboundMigrationsPerNode is the maximum number of concurrent outgoing live migrations allowed per node. Defaults to 2 | [optional] | +| **progress_timeout** | **Integer** | ProgressTimeout is the maximum number of seconds a live migration is allowed to make no progress. Hitting this timeout means a migration transferred 0 data for that many seconds. The migration is then considered stuck and therefore cancelled. Defaults to 150 | [optional] | +| **unsafe_migration_override** | **Boolean** | UnsafeMigrationOverride allows live migrations to occur even if the compatibility check indicates the migration will be unsafe to the guest. Defaults to false | [optional] | +| **utility_volumes_timeout** | **Integer** | UtilityVolumesTimeout is the maximum number of seconds a migration can wait in Pending state for utility volumes to be detached. If utility volumes are still present after this timeout, the migration will be marked as Failed. Defaults to 150 | [optional] | + +## Example + +```ruby +require 'kubevirt' + +instance = Kubevirt::V1VMIMConfigurationOptions.new( + allow_auto_converge: null, + allow_post_copy: null, + allow_workload_disruption: null, + bandwidth_per_migration: null, + completion_timeout_per_gi_b: null, + disable_tls: null, + experimental: null, + match_se_linux_level_on_migration: null, + max_downtime_ms: null, + network: null, + node_drain_taint_key: null, + parallel_migrations_per_cluster: null, + parallel_outbound_migrations_per_node: null, + progress_timeout: null, + unsafe_migration_override: null, + utility_volumes_timeout: null +) +``` + diff --git a/docs/V1VirtualMachineInstanceBackupStatus.md b/docs/V1VirtualMachineInstanceBackupStatus.md index 8295d97e..47654589 100644 --- a/docs/V1VirtualMachineInstanceBackupStatus.md +++ b/docs/V1VirtualMachineInstanceBackupStatus.md @@ -10,6 +10,7 @@ | **completed** | **Boolean** | Completed indicates the backup completed | [optional] | | **end_timestamp** | **Time** | Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. | [optional] | | **failed** | **Boolean** | Failed indicates that the backup failed | [optional] | +| **quiesce_status** | **String** | QuiesceStatus indicates whether filesystem freeze succeeded, failed, or was skipped. | [optional] | | **start_timestamp** | **Time** | Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. | [optional] | | **volumes** | [**Array<V1alpha1BackupVolumeInfo>**](V1alpha1BackupVolumeInfo.md) | Volumes lists the volumes included in the backup | [optional] | @@ -25,6 +26,7 @@ instance = Kubevirt::V1VirtualMachineInstanceBackupStatus.new( completed: null, end_timestamp: null, failed: null, + quiesce_status: null, start_timestamp: null, volumes: null ) diff --git a/docs/V1VirtualMachineInstanceMigrationState.md b/docs/V1VirtualMachineInstanceMigrationState.md index 133079c2..6a085787 100644 --- a/docs/V1VirtualMachineInstanceMigrationState.md +++ b/docs/V1VirtualMachineInstanceMigrationState.md @@ -10,7 +10,7 @@ | **end_timestamp** | **Time** | Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. | [optional] | | **failed** | **Boolean** | Indicates that the migration failed | [optional] | | **failure_reason** | **String** | Contains the reason why the migration failed | [optional] | -| **migration_configuration** | [**V1MigrationConfiguration**](V1MigrationConfiguration.md) | | [optional] | +| **migration_configuration** | [**V1VMIMConfigurationOptions**](V1VMIMConfigurationOptions.md) | | [optional] | | **migration_network_type** | **String** | The type of migration network, either 'pod' or 'migration' | [optional] | | **migration_policy_name** | **String** | Name of the migration policy. If string is empty, no policy is matched | [optional] | | **migration_uid** | **String** | The VirtualMachineInstanceMigration object associated with this migration | [optional] | diff --git a/docs/V1alpha1MigrationPolicySpec.md b/docs/V1alpha1MigrationPolicySpec.md index ef40c764..21e2e88c 100644 --- a/docs/V1alpha1MigrationPolicySpec.md +++ b/docs/V1alpha1MigrationPolicySpec.md @@ -9,6 +9,8 @@ | **allow_workload_disruption** | **Boolean** | | [optional] | | **bandwidth_per_migration** | **Object** | Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors. The serialization format is: ``` <quantity> ::= <signedNumber><suffix> (Note that <suffix> may be empty, from the \"\" case in <decimalSI>.) <digit> ::= 0 | 1 | ... | 9 <digits> ::= <digit> | <digit><digits> <number> ::= <digits> | <digits>.<digits> | <digits>. | .<digits> <sign> ::= \"+\" | \"-\" <signedNumber> ::= <number> | <sign><number> <suffix> ::= <binarySI> | <decimalExponent> | <decimalSI> <binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html) <decimalSI> ::= m | \"\" | k | M | G | T | P | E (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.) <decimalExponent> ::= \"e\" <signedNumber> | \"E\" <signedNumber> ``` No matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities. When a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized. Before serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that: - No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible. The sign will be omitted unless the number is negative. Examples: - 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\" Note that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise. Non-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.) This format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation. | [optional] | | **completion_timeout_per_gi_b** | **Integer** | | [optional] | +| **experimental** | **Object** | ExperimentalMigrationOptions is an alpha API for experimental migration tunables. It is intended for experimental purposes only and will be removed in the future. | [optional] | +| **max_downtime_ms** | **Integer** | | [optional] | | **selectors** | [**V1alpha1Selectors**](V1alpha1Selectors.md) | | | ## Example @@ -22,6 +24,8 @@ instance = Kubevirt::V1alpha1MigrationPolicySpec.new( allow_workload_disruption: null, bandwidth_per_migration: null, completion_timeout_per_gi_b: null, + experimental: null, + max_downtime_ms: null, selectors: null ) ``` diff --git a/lib/kubevirt.rb b/lib/kubevirt.rb index 600f706c..513e6b12 100644 --- a/lib/kubevirt.rb +++ b/lib/kubevirt.rb @@ -247,6 +247,7 @@ Kubevirt.autoload :V1UtilityVolume, 'kubevirt/models/v1_utility_volume' Kubevirt.autoload :V1VGPUDisplayOptions, 'kubevirt/models/v1_vgpu_display_options' Kubevirt.autoload :V1VGPUOptions, 'kubevirt/models/v1_vgpu_options' +Kubevirt.autoload :V1VMIMConfigurationOptions, 'kubevirt/models/v1_vmim_configuration_options' Kubevirt.autoload :V1VideoDevice, 'kubevirt/models/v1_video_device' Kubevirt.autoload :V1VirtTemplateDeployment, 'kubevirt/models/v1_virt_template_deployment' Kubevirt.autoload :V1VirtualMachine, 'kubevirt/models/v1_virtual_machine' diff --git a/lib/kubevirt/models/v1_kube_virt_configuration.rb b/lib/kubevirt/models/v1_kube_virt_configuration.rb index d8504259..39905e42 100644 --- a/lib/kubevirt/models/v1_kube_virt_configuration.rb +++ b/lib/kubevirt/models/v1_kube_virt_configuration.rb @@ -53,7 +53,7 @@ class V1KubeVirtConfiguration < ApiModelBase # Hypervisors holds information regarding the hypervisor configurations supported on this cluster. attr_accessor :hypervisors - # Possible enum values: - `\"Always\"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails. - `\"IfNotPresent\"` means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails. - `\"Never\"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present + # The ImagePullPolicy to use for user workload pods and their containers (launcher pods, exporter pods, etc.). For KubeVirt infrastructure images, use spec.imagePullPolicy instead. Possible enum values: - `\"Always\"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails. - `\"IfNotPresent\"` means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails. - `\"Never\"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present attr_accessor :image_pull_policy attr_accessor :instancetype @@ -85,7 +85,7 @@ class V1KubeVirtConfiguration < ApiModelBase attr_accessor :persistent_reservation_configuration - # RoleAggregationStrategy controls whether RBAC cluster roles should be aggregated to the default Kubernetes roles (admin, edit, view). When set to \"AggregateToDefault\" (default) or not specified, the aggregate-to-* labels are added to the cluster roles. When set to \"Manual\", the labels are not added, and roles will not be aggregated to the default roles. Setting this field to \"Manual\" requires the OptOutRoleAggregation feature gate to be enabled. This is an Alpha feature and subject to change. + # RoleAggregationStrategy controls whether RBAC cluster roles should be aggregated to the default Kubernetes roles (admin, edit, view). When set to \"AggregateToDefault\" (default) or not specified, the aggregate-to-* labels are added to the cluster roles. When set to \"Manual\", the labels are not added, and roles will not be aggregated to the default roles. Setting RoleAggregationStrategy to \"Manual\" requires the OptOutRoleAggregation feature gate to be enabled (Beta, enabled by default since v1.9.0). attr_accessor :role_aggregation_strategy attr_accessor :seccomp_configuration diff --git a/lib/kubevirt/models/v1_kube_virt_spec.rb b/lib/kubevirt/models/v1_kube_virt_spec.rb index 4cbd5ed7..c80084a1 100644 --- a/lib/kubevirt/models/v1_kube_virt_spec.rb +++ b/lib/kubevirt/models/v1_kube_virt_spec.rb @@ -21,7 +21,7 @@ class V1KubeVirtSpec < ApiModelBase attr_accessor :customize_components - # The ImagePullPolicy to use. Possible enum values: - `\"Always\"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails. - `\"IfNotPresent\"` means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails. - `\"Never\"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present + # The ImagePullPolicy to use for KubeVirt operator-managed infrastructure images (virt-api, virt-controller, virt-handler, virt-exportproxy, etc.). For pull policy of user workload pods, see spec.configuration.imagePullPolicy. Possible enum values: - `\"Always\"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails. - `\"IfNotPresent\"` means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails. - `\"Never\"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present attr_accessor :image_pull_policy # The imagePullSecrets to pull the container images from Defaults to none diff --git a/lib/kubevirt/models/v1_migration_configuration.rb b/lib/kubevirt/models/v1_migration_configuration.rb index 08aa02d5..16185901 100644 --- a/lib/kubevirt/models/v1_migration_configuration.rb +++ b/lib/kubevirt/models/v1_migration_configuration.rb @@ -37,6 +37,9 @@ class V1MigrationConfiguration < ApiModelBase # By default, the SELinux level of target virt-launcher pods is forced to the level of the source virt-launcher. When set to true, MatchSELinuxLevelOnMigration lets the CRI auto-assign a random level to the target. That will ensure the target virt-launcher doesn't share categories with another pod on the node. However, migrations will fail when using RWX volumes that don't automatically deal with SELinux levels. attr_accessor :match_se_linux_level_on_migration + # MaxDowntimeMs specifies the maximum tolerable downtime (in milliseconds) during switchover. Defaults to 900 + attr_accessor :max_downtime_ms + # Network is the name of the CNI network to use for live migrations. By default, migrations go through the pod network. attr_accessor :network @@ -68,6 +71,7 @@ def self.attribute_map :'completion_timeout_per_gi_b' => :'completionTimeoutPerGiB', :'disable_tls' => :'disableTLS', :'match_se_linux_level_on_migration' => :'matchSELinuxLevelOnMigration', + :'max_downtime_ms' => :'maxDowntimeMs', :'network' => :'network', :'node_drain_taint_key' => :'nodeDrainTaintKey', :'parallel_migrations_per_cluster' => :'parallelMigrationsPerCluster', @@ -98,6 +102,7 @@ def self.openapi_types :'completion_timeout_per_gi_b' => :'Integer', :'disable_tls' => :'Boolean', :'match_se_linux_level_on_migration' => :'Boolean', + :'max_downtime_ms' => :'Integer', :'network' => :'String', :'node_drain_taint_key' => :'String', :'parallel_migrations_per_cluster' => :'Integer', @@ -158,6 +163,10 @@ def initialize(attributes = {}) self.match_se_linux_level_on_migration = attributes[:'match_se_linux_level_on_migration'] end + if attributes.key?(:'max_downtime_ms') + self.max_downtime_ms = attributes[:'max_downtime_ms'] + end + if attributes.key?(:'network') self.network = attributes[:'network'] end @@ -214,6 +223,7 @@ def ==(o) completion_timeout_per_gi_b == o.completion_timeout_per_gi_b && disable_tls == o.disable_tls && match_se_linux_level_on_migration == o.match_se_linux_level_on_migration && + max_downtime_ms == o.max_downtime_ms && network == o.network && node_drain_taint_key == o.node_drain_taint_key && parallel_migrations_per_cluster == o.parallel_migrations_per_cluster && @@ -232,7 +242,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [allow_auto_converge, allow_post_copy, allow_workload_disruption, bandwidth_per_migration, completion_timeout_per_gi_b, disable_tls, match_se_linux_level_on_migration, network, node_drain_taint_key, parallel_migrations_per_cluster, parallel_outbound_migrations_per_node, progress_timeout, unsafe_migration_override, utility_volumes_timeout].hash + [allow_auto_converge, allow_post_copy, allow_workload_disruption, bandwidth_per_migration, completion_timeout_per_gi_b, disable_tls, match_se_linux_level_on_migration, max_downtime_ms, network, node_drain_taint_key, parallel_migrations_per_cluster, parallel_outbound_migrations_per_node, progress_timeout, unsafe_migration_override, utility_volumes_timeout].hash end # Builds the object from hash diff --git a/lib/kubevirt/models/v1_virtual_machine_instance_backup_status.rb b/lib/kubevirt/models/v1_virtual_machine_instance_backup_status.rb index 138cca59..df91aadd 100644 --- a/lib/kubevirt/models/v1_virtual_machine_instance_backup_status.rb +++ b/lib/kubevirt/models/v1_virtual_machine_instance_backup_status.rb @@ -34,6 +34,9 @@ class V1VirtualMachineInstanceBackupStatus < ApiModelBase # Failed indicates that the backup failed attr_accessor :failed + # QuiesceStatus indicates whether filesystem freeze succeeded, failed, or was skipped. + attr_accessor :quiesce_status + # Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. attr_accessor :start_timestamp @@ -49,6 +52,7 @@ def self.attribute_map :'completed' => :'completed', :'end_timestamp' => :'endTimestamp', :'failed' => :'failed', + :'quiesce_status' => :'quiesceStatus', :'start_timestamp' => :'startTimestamp', :'volumes' => :'volumes' } @@ -73,6 +77,7 @@ def self.openapi_types :'completed' => :'Boolean', :'end_timestamp' => :'Time', :'failed' => :'Boolean', + :'quiesce_status' => :'String', :'start_timestamp' => :'Time', :'volumes' => :'Array' } @@ -124,6 +129,10 @@ def initialize(attributes = {}) self.failed = attributes[:'failed'] end + if attributes.key?(:'quiesce_status') + self.quiesce_status = attributes[:'quiesce_status'] + end + if attributes.key?(:'start_timestamp') self.start_timestamp = attributes[:'start_timestamp'] end @@ -161,6 +170,7 @@ def ==(o) completed == o.completed && end_timestamp == o.end_timestamp && failed == o.failed && + quiesce_status == o.quiesce_status && start_timestamp == o.start_timestamp && volumes == o.volumes end @@ -174,7 +184,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [backup_msg, backup_name, checkpoint_name, completed, end_timestamp, failed, start_timestamp, volumes].hash + [backup_msg, backup_name, checkpoint_name, completed, end_timestamp, failed, quiesce_status, start_timestamp, volumes].hash end # Builds the object from hash diff --git a/lib/kubevirt/models/v1_virtual_machine_instance_migration_state.rb b/lib/kubevirt/models/v1_virtual_machine_instance_migration_state.rb index f96d804a..b1cf6304 100644 --- a/lib/kubevirt/models/v1_virtual_machine_instance_migration_state.rb +++ b/lib/kubevirt/models/v1_virtual_machine_instance_migration_state.rb @@ -148,7 +148,7 @@ def self.openapi_types :'end_timestamp' => :'Time', :'failed' => :'Boolean', :'failure_reason' => :'String', - :'migration_configuration' => :'V1MigrationConfiguration', + :'migration_configuration' => :'V1VMIMConfigurationOptions', :'migration_network_type' => :'String', :'migration_policy_name' => :'String', :'migration_uid' => :'String', diff --git a/lib/kubevirt/models/v1_vmim_configuration_options.rb b/lib/kubevirt/models/v1_vmim_configuration_options.rb new file mode 100644 index 00000000..500672bf --- /dev/null +++ b/lib/kubevirt/models/v1_vmim_configuration_options.rb @@ -0,0 +1,299 @@ +=begin +#KubeVirt API + +#This is KubeVirt API an add-on for Kubernetes. + +The version of the OpenAPI document: 1.0.0 +Contact: kubevirt-dev@googlegroups.com +Generated by: https://openapi-generator.tech +Generator version: 7.23.0 + +=end + +require 'date' +require 'time' + +module Kubevirt + # VMIMConfigurationOptions holds the resolved migration options for a single migration. It is written to VirtualMachineInstanceMigrationState and represents the effective configuration after merging KubeVirt defaults with any matched MigrationPolicy. + class V1VMIMConfigurationOptions < ApiModelBase + # AllowAutoConverge allows the platform to compromise performance/availability of VMIs to guarantee successful VMI live migrations. Defaults to false + attr_accessor :allow_auto_converge + + # AllowPostCopy enables post-copy live migrations. Such migrations allow even the busiest VMIs to successfully live-migrate. However, events like a network failure can cause a VMI crash. If set to true, migrations will still start in pre-copy, but switch to post-copy when CompletionTimeoutPerGiB triggers. Defaults to false + attr_accessor :allow_post_copy + + # AllowWorkloadDisruption indicates that the migration shouldn't be canceled after acceptableCompletionTime is exceeded. Instead, if permitted, migration will be switched to post-copy or the VMI will be paused to allow the migration to complete + attr_accessor :allow_workload_disruption + + # Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors. The serialization format is: ``` ::= (Note that may be empty, from the \"\" case in .) ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html) ::= m | \"\" | k | M | G | T | P | E (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.) ::= \"e\" | \"E\" ``` No matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities. When a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized. Before serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that: - No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible. The sign will be omitted unless the number is negative. Examples: - 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\" Note that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise. Non-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.) This format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation. + attr_accessor :bandwidth_per_migration + + # CompletionTimeoutPerGiB is the maximum number of seconds per GiB a migration is allowed to take. If the timeout is reached, the migration will be either paused, switched to post-copy or cancelled depending on other settings. Defaults to 150 + attr_accessor :completion_timeout_per_gi_b + + # When set to true, DisableTLS will disable the additional layer of live migration encryption provided by KubeVirt. This is usually a bad idea. Defaults to false + attr_accessor :disable_tls + + # ExperimentalMigrationOptions is an alpha API for experimental migration tunables. It is intended for experimental purposes only and will be removed in the future. + attr_accessor :experimental + + # By default, the SELinux level of target virt-launcher pods is forced to the level of the source virt-launcher. When set to true, MatchSELinuxLevelOnMigration lets the CRI auto-assign a random level to the target. That will ensure the target virt-launcher doesn't share categories with another pod on the node. However, migrations will fail when using RWX volumes that don't automatically deal with SELinux levels. + attr_accessor :match_se_linux_level_on_migration + + # MaxDowntimeMs specifies the maximum tolerable downtime (in milliseconds) during switchover. Defaults to 900 + attr_accessor :max_downtime_ms + + # Network is the name of the CNI network to use for live migrations. By default, migrations go through the pod network. + attr_accessor :network + + # NodeDrainTaintKey defines the taint key that indicates a node should be drained. Note: this option relies on the deprecated node taint feature. Default: kubevirt.io/drain + attr_accessor :node_drain_taint_key + + # ParallelMigrationsPerCluster is the total number of concurrent live migrations allowed cluster-wide. Defaults to 5 + attr_accessor :parallel_migrations_per_cluster + + # ParallelOutboundMigrationsPerNode is the maximum number of concurrent outgoing live migrations allowed per node. Defaults to 2 + attr_accessor :parallel_outbound_migrations_per_node + + # ProgressTimeout is the maximum number of seconds a live migration is allowed to make no progress. Hitting this timeout means a migration transferred 0 data for that many seconds. The migration is then considered stuck and therefore cancelled. Defaults to 150 + attr_accessor :progress_timeout + + # UnsafeMigrationOverride allows live migrations to occur even if the compatibility check indicates the migration will be unsafe to the guest. Defaults to false + attr_accessor :unsafe_migration_override + + # UtilityVolumesTimeout is the maximum number of seconds a migration can wait in Pending state for utility volumes to be detached. If utility volumes are still present after this timeout, the migration will be marked as Failed. Defaults to 150 + attr_accessor :utility_volumes_timeout + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'allow_auto_converge' => :'allowAutoConverge', + :'allow_post_copy' => :'allowPostCopy', + :'allow_workload_disruption' => :'allowWorkloadDisruption', + :'bandwidth_per_migration' => :'bandwidthPerMigration', + :'completion_timeout_per_gi_b' => :'completionTimeoutPerGiB', + :'disable_tls' => :'disableTLS', + :'experimental' => :'experimental', + :'match_se_linux_level_on_migration' => :'matchSELinuxLevelOnMigration', + :'max_downtime_ms' => :'maxDowntimeMs', + :'network' => :'network', + :'node_drain_taint_key' => :'nodeDrainTaintKey', + :'parallel_migrations_per_cluster' => :'parallelMigrationsPerCluster', + :'parallel_outbound_migrations_per_node' => :'parallelOutboundMigrationsPerNode', + :'progress_timeout' => :'progressTimeout', + :'unsafe_migration_override' => :'unsafeMigrationOverride', + :'utility_volumes_timeout' => :'utilityVolumesTimeout' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'allow_auto_converge' => :'Boolean', + :'allow_post_copy' => :'Boolean', + :'allow_workload_disruption' => :'Boolean', + :'bandwidth_per_migration' => :'Object', + :'completion_timeout_per_gi_b' => :'Integer', + :'disable_tls' => :'Boolean', + :'experimental' => :'Object', + :'match_se_linux_level_on_migration' => :'Boolean', + :'max_downtime_ms' => :'Integer', + :'network' => :'String', + :'node_drain_taint_key' => :'String', + :'parallel_migrations_per_cluster' => :'Integer', + :'parallel_outbound_migrations_per_node' => :'Integer', + :'progress_timeout' => :'Integer', + :'unsafe_migration_override' => :'Boolean', + :'utility_volumes_timeout' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Kubevirt::V1VMIMConfigurationOptions` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Kubevirt::V1VMIMConfigurationOptions`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'allow_auto_converge') + self.allow_auto_converge = attributes[:'allow_auto_converge'] + end + + if attributes.key?(:'allow_post_copy') + self.allow_post_copy = attributes[:'allow_post_copy'] + end + + if attributes.key?(:'allow_workload_disruption') + self.allow_workload_disruption = attributes[:'allow_workload_disruption'] + end + + if attributes.key?(:'bandwidth_per_migration') + self.bandwidth_per_migration = attributes[:'bandwidth_per_migration'] + end + + if attributes.key?(:'completion_timeout_per_gi_b') + self.completion_timeout_per_gi_b = attributes[:'completion_timeout_per_gi_b'] + end + + if attributes.key?(:'disable_tls') + self.disable_tls = attributes[:'disable_tls'] + end + + if attributes.key?(:'experimental') + self.experimental = attributes[:'experimental'] + end + + if attributes.key?(:'match_se_linux_level_on_migration') + self.match_se_linux_level_on_migration = attributes[:'match_se_linux_level_on_migration'] + end + + if attributes.key?(:'max_downtime_ms') + self.max_downtime_ms = attributes[:'max_downtime_ms'] + end + + if attributes.key?(:'network') + self.network = attributes[:'network'] + end + + if attributes.key?(:'node_drain_taint_key') + self.node_drain_taint_key = attributes[:'node_drain_taint_key'] + end + + if attributes.key?(:'parallel_migrations_per_cluster') + self.parallel_migrations_per_cluster = attributes[:'parallel_migrations_per_cluster'] + end + + if attributes.key?(:'parallel_outbound_migrations_per_node') + self.parallel_outbound_migrations_per_node = attributes[:'parallel_outbound_migrations_per_node'] + end + + if attributes.key?(:'progress_timeout') + self.progress_timeout = attributes[:'progress_timeout'] + end + + if attributes.key?(:'unsafe_migration_override') + self.unsafe_migration_override = attributes[:'unsafe_migration_override'] + end + + if attributes.key?(:'utility_volumes_timeout') + self.utility_volumes_timeout = attributes[:'utility_volumes_timeout'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + allow_auto_converge == o.allow_auto_converge && + allow_post_copy == o.allow_post_copy && + allow_workload_disruption == o.allow_workload_disruption && + bandwidth_per_migration == o.bandwidth_per_migration && + completion_timeout_per_gi_b == o.completion_timeout_per_gi_b && + disable_tls == o.disable_tls && + experimental == o.experimental && + match_se_linux_level_on_migration == o.match_se_linux_level_on_migration && + max_downtime_ms == o.max_downtime_ms && + network == o.network && + node_drain_taint_key == o.node_drain_taint_key && + parallel_migrations_per_cluster == o.parallel_migrations_per_cluster && + parallel_outbound_migrations_per_node == o.parallel_outbound_migrations_per_node && + progress_timeout == o.progress_timeout && + unsafe_migration_override == o.unsafe_migration_override && + utility_volumes_timeout == o.utility_volumes_timeout + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [allow_auto_converge, allow_post_copy, allow_workload_disruption, bandwidth_per_migration, completion_timeout_per_gi_b, disable_tls, experimental, match_se_linux_level_on_migration, max_downtime_ms, network, node_drain_taint_key, parallel_migrations_per_cluster, parallel_outbound_migrations_per_node, progress_timeout, unsafe_migration_override, utility_volumes_timeout].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/kubevirt/models/v1alpha1_migration_policy_spec.rb b/lib/kubevirt/models/v1alpha1_migration_policy_spec.rb index 0eeeae79..649490c6 100644 --- a/lib/kubevirt/models/v1alpha1_migration_policy_spec.rb +++ b/lib/kubevirt/models/v1alpha1_migration_policy_spec.rb @@ -26,6 +26,11 @@ class V1alpha1MigrationPolicySpec < ApiModelBase attr_accessor :completion_timeout_per_gi_b + # ExperimentalMigrationOptions is an alpha API for experimental migration tunables. It is intended for experimental purposes only and will be removed in the future. + attr_accessor :experimental + + attr_accessor :max_downtime_ms + attr_accessor :selectors # Attribute mapping from ruby-style variable name to JSON key. @@ -36,6 +41,8 @@ def self.attribute_map :'allow_workload_disruption' => :'allowWorkloadDisruption', :'bandwidth_per_migration' => :'bandwidthPerMigration', :'completion_timeout_per_gi_b' => :'completionTimeoutPerGiB', + :'experimental' => :'experimental', + :'max_downtime_ms' => :'maxDowntimeMs', :'selectors' => :'selectors' } end @@ -58,6 +65,8 @@ def self.openapi_types :'allow_workload_disruption' => :'Boolean', :'bandwidth_per_migration' => :'Object', :'completion_timeout_per_gi_b' => :'Integer', + :'experimental' => :'Object', + :'max_downtime_ms' => :'Integer', :'selectors' => :'V1alpha1Selectors' } end @@ -104,6 +113,14 @@ def initialize(attributes = {}) self.completion_timeout_per_gi_b = attributes[:'completion_timeout_per_gi_b'] end + if attributes.key?(:'experimental') + self.experimental = attributes[:'experimental'] + end + + if attributes.key?(:'max_downtime_ms') + self.max_downtime_ms = attributes[:'max_downtime_ms'] + end + if attributes.key?(:'selectors') self.selectors = attributes[:'selectors'] else @@ -151,6 +168,8 @@ def ==(o) allow_workload_disruption == o.allow_workload_disruption && bandwidth_per_migration == o.bandwidth_per_migration && completion_timeout_per_gi_b == o.completion_timeout_per_gi_b && + experimental == o.experimental && + max_downtime_ms == o.max_downtime_ms && selectors == o.selectors end @@ -163,7 +182,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [allow_auto_converge, allow_post_copy, allow_workload_disruption, bandwidth_per_migration, completion_timeout_per_gi_b, selectors].hash + [allow_auto_converge, allow_post_copy, allow_workload_disruption, bandwidth_per_migration, completion_timeout_per_gi_b, experimental, max_downtime_ms, selectors].hash end # Builds the object from hash diff --git a/spec/models/v1_migration_configuration_spec.rb b/spec/models/v1_migration_configuration_spec.rb index 87252d27..a110ffa9 100644 --- a/spec/models/v1_migration_configuration_spec.rb +++ b/spec/models/v1_migration_configuration_spec.rb @@ -69,6 +69,12 @@ end end + describe 'test attribute "max_downtime_ms"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "network"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/v1_virtual_machine_instance_backup_status_spec.rb b/spec/models/v1_virtual_machine_instance_backup_status_spec.rb index 3b4b3eeb..992c4f56 100644 --- a/spec/models/v1_virtual_machine_instance_backup_status_spec.rb +++ b/spec/models/v1_virtual_machine_instance_backup_status_spec.rb @@ -63,6 +63,12 @@ end end + describe 'test attribute "quiesce_status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "start_timestamp"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/v1_vmim_configuration_options_spec.rb b/spec/models/v1_vmim_configuration_options_spec.rb new file mode 100644 index 00000000..6799d99d --- /dev/null +++ b/spec/models/v1_vmim_configuration_options_spec.rb @@ -0,0 +1,126 @@ +=begin +#KubeVirt API + +#This is KubeVirt API an add-on for Kubernetes. + +The version of the OpenAPI document: 1.0.0 +Contact: kubevirt-dev@googlegroups.com +Generated by: https://openapi-generator.tech +Generator version: 7.23.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Kubevirt::V1VMIMConfigurationOptions +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Kubevirt::V1VMIMConfigurationOptions do + #let(:instance) { Kubevirt::V1VMIMConfigurationOptions.new } + + describe 'test an instance of V1VMIMConfigurationOptions' do + it 'should create an instance of V1VMIMConfigurationOptions' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(Kubevirt::V1VMIMConfigurationOptions) + end + end + + describe 'test attribute "allow_auto_converge"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "allow_post_copy"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "allow_workload_disruption"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "bandwidth_per_migration"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "completion_timeout_per_gi_b"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "disable_tls"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "experimental"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "match_se_linux_level_on_migration"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "max_downtime_ms"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "network"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "node_drain_taint_key"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "parallel_migrations_per_cluster"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "parallel_outbound_migrations_per_node"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "progress_timeout"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "unsafe_migration_override"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "utility_volumes_timeout"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/v1alpha1_migration_policy_spec_spec.rb b/spec/models/v1alpha1_migration_policy_spec_spec.rb index a8cde83b..91139476 100644 --- a/spec/models/v1alpha1_migration_policy_spec_spec.rb +++ b/spec/models/v1alpha1_migration_policy_spec_spec.rb @@ -57,6 +57,18 @@ end end + describe 'test attribute "experimental"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "max_downtime_ms"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "selectors"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/