diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 32f6a06..e6067b0 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -89,10 +89,6 @@ docs/V1DHCPPrivateOptions.md docs/V1DataVolumeSource.md docs/V1DataVolumeTemplateSpec.md docs/V1DeveloperConfiguration.md -docs/V1DeviceAttribute.md -docs/V1DeviceResourceClaimStatus.md -docs/V1DeviceStatus.md -docs/V1DeviceStatusInfo.md docs/V1Devices.md docs/V1Diag288Watchdog.md docs/V1Disk.md @@ -483,10 +479,6 @@ lib/kubevirt/models/v1_customize_components_patch.rb lib/kubevirt/models/v1_data_volume_source.rb lib/kubevirt/models/v1_data_volume_template_spec.rb lib/kubevirt/models/v1_developer_configuration.rb -lib/kubevirt/models/v1_device_attribute.rb -lib/kubevirt/models/v1_device_resource_claim_status.rb -lib/kubevirt/models/v1_device_status.rb -lib/kubevirt/models/v1_device_status_info.rb lib/kubevirt/models/v1_devices.rb lib/kubevirt/models/v1_dhcp_options.rb lib/kubevirt/models/v1_dhcp_private_options.rb @@ -873,10 +865,6 @@ spec/models/v1_customize_components_spec.rb spec/models/v1_data_volume_source_spec.rb spec/models/v1_data_volume_template_spec_spec.rb spec/models/v1_developer_configuration_spec.rb -spec/models/v1_device_attribute_spec.rb -spec/models/v1_device_resource_claim_status_spec.rb -spec/models/v1_device_status_info_spec.rb -spec/models/v1_device_status_spec.rb spec/models/v1_devices_spec.rb spec/models/v1_dhcp_options_spec.rb spec/models/v1_dhcp_private_options_spec.rb diff --git a/README.md b/README.md index 067a94a..acb87bc 100644 --- a/README.md +++ b/README.md @@ -456,10 +456,6 @@ Class | Method | HTTP request | Description - [Kubevirt::V1DataVolumeSource](docs/V1DataVolumeSource.md) - [Kubevirt::V1DataVolumeTemplateSpec](docs/V1DataVolumeTemplateSpec.md) - [Kubevirt::V1DeveloperConfiguration](docs/V1DeveloperConfiguration.md) - - [Kubevirt::V1DeviceAttribute](docs/V1DeviceAttribute.md) - - [Kubevirt::V1DeviceResourceClaimStatus](docs/V1DeviceResourceClaimStatus.md) - - [Kubevirt::V1DeviceStatus](docs/V1DeviceStatus.md) - - [Kubevirt::V1DeviceStatusInfo](docs/V1DeviceStatusInfo.md) - [Kubevirt::V1Devices](docs/V1Devices.md) - [Kubevirt::V1Diag288Watchdog](docs/V1Diag288Watchdog.md) - [Kubevirt::V1Disk](docs/V1Disk.md) diff --git a/docs/V1DeviceAttribute.md b/docs/V1DeviceAttribute.md deleted file mode 100644 index 4ede934..0000000 --- a/docs/V1DeviceAttribute.md +++ /dev/null @@ -1,20 +0,0 @@ -# Kubevirt::V1DeviceAttribute - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **m_dev_uuid** | **String** | MDevUUID is the mediated device uuid of the allocated device | [optional] | -| **pci_address** | **String** | PCIAddress is the PCIe bus address of the allocated device | [optional] | - -## Example - -```ruby -require 'kubevirt' - -instance = Kubevirt::V1DeviceAttribute.new( - m_dev_uuid: null, - pci_address: null -) -``` - diff --git a/docs/V1DeviceResourceClaimStatus.md b/docs/V1DeviceResourceClaimStatus.md deleted file mode 100644 index c808fd7..0000000 --- a/docs/V1DeviceResourceClaimStatus.md +++ /dev/null @@ -1,22 +0,0 @@ -# Kubevirt::V1DeviceResourceClaimStatus - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **attributes** | [**V1DeviceAttribute**](V1DeviceAttribute.md) | | [optional] | -| **name** | **String** | Name is the name of actual device on the host provisioned by the driver as reflected in resourceclaim.status | [optional] | -| **resource_claim_name** | **String** | ResourceClaimName is the name of the resource claims object used to provision this resource | [optional] | - -## Example - -```ruby -require 'kubevirt' - -instance = Kubevirt::V1DeviceResourceClaimStatus.new( - attributes: null, - name: null, - resource_claim_name: null -) -``` - diff --git a/docs/V1DeviceStatus.md b/docs/V1DeviceStatus.md deleted file mode 100644 index bbf92d5..0000000 --- a/docs/V1DeviceStatus.md +++ /dev/null @@ -1,20 +0,0 @@ -# Kubevirt::V1DeviceStatus - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **gpu_statuses** | [**Array<V1DeviceStatusInfo>**](V1DeviceStatusInfo.md) | GPUStatuses reflects the state of GPUs requested in spec.domain.devices.gpus | [optional] | -| **host_device_statuses** | [**Array<V1DeviceStatusInfo>**](V1DeviceStatusInfo.md) | HostDeviceStatuses reflects the state of GPUs requested in spec.domain.devices.hostDevices DRA | [optional] | - -## Example - -```ruby -require 'kubevirt' - -instance = Kubevirt::V1DeviceStatus.new( - gpu_statuses: null, - host_device_statuses: null -) -``` - diff --git a/docs/V1DeviceStatusInfo.md b/docs/V1DeviceStatusInfo.md deleted file mode 100644 index 8d80a54..0000000 --- a/docs/V1DeviceStatusInfo.md +++ /dev/null @@ -1,20 +0,0 @@ -# Kubevirt::V1DeviceStatusInfo - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **device_resource_claim_status** | [**V1DeviceResourceClaimStatus**](V1DeviceResourceClaimStatus.md) | | [optional] | -| **name** | **String** | Name of the device as specified in spec.domain.devices.gpus.name or spec.domain.devices.hostDevices.name | [default to ''] | - -## Example - -```ruby -require 'kubevirt' - -instance = Kubevirt::V1DeviceStatusInfo.new( - device_resource_claim_status: null, - name: null -) -``` - diff --git a/docs/V1VirtualMachineInstanceStatus.md b/docs/V1VirtualMachineInstanceStatus.md index b0a6ddf..e0a3bf9 100644 --- a/docs/V1VirtualMachineInstanceStatus.md +++ b/docs/V1VirtualMachineInstanceStatus.md @@ -9,7 +9,6 @@ | **changed_block_tracking** | [**V1ChangedBlockTrackingStatus**](V1ChangedBlockTrackingStatus.md) | | [optional] | | **conditions** | [**Array<V1VirtualMachineInstanceCondition>**](V1VirtualMachineInstanceCondition.md) | Conditions are specific points in VirtualMachineInstance's pod runtime. | [optional] | | **current_cpu_topology** | [**V1CPUTopology**](V1CPUTopology.md) | | [optional] | -| **device_status** | [**V1DeviceStatus**](V1DeviceStatus.md) | | [optional] | | **evacuation_node_name** | **String** | EvacuationNodeName is used to track the eviction process of a VMI. It stores the name of the node that we want to evacuate. It is meant to be used by KubeVirt core components only and can't be set or modified by users. | [optional] | | **fs_freeze_status** | **String** | FSFreezeStatus indicates whether a freeze operation was requested for the guest filesystem. It will be set to \"frozen\" if the request was made, or unset otherwise. This does not reflect the actual state of the guest filesystem. | [optional] | | **guest_os_info** | [**V1VirtualMachineInstanceGuestOSInfo**](V1VirtualMachineInstanceGuestOSInfo.md) | | [optional] | @@ -44,7 +43,6 @@ instance = Kubevirt::V1VirtualMachineInstanceStatus.new( changed_block_tracking: null, conditions: null, current_cpu_topology: null, - device_status: null, evacuation_node_name: null, fs_freeze_status: null, guest_os_info: null, diff --git a/lib/kubevirt.rb b/lib/kubevirt.rb index 664897e..5b5c878 100644 --- a/lib/kubevirt.rb +++ b/lib/kubevirt.rb @@ -104,10 +104,6 @@ Kubevirt.autoload :V1DataVolumeSource, 'kubevirt/models/v1_data_volume_source' Kubevirt.autoload :V1DataVolumeTemplateSpec, 'kubevirt/models/v1_data_volume_template_spec' Kubevirt.autoload :V1DeveloperConfiguration, 'kubevirt/models/v1_developer_configuration' -Kubevirt.autoload :V1DeviceAttribute, 'kubevirt/models/v1_device_attribute' -Kubevirt.autoload :V1DeviceResourceClaimStatus, 'kubevirt/models/v1_device_resource_claim_status' -Kubevirt.autoload :V1DeviceStatus, 'kubevirt/models/v1_device_status' -Kubevirt.autoload :V1DeviceStatusInfo, 'kubevirt/models/v1_device_status_info' Kubevirt.autoload :V1Devices, 'kubevirt/models/v1_devices' Kubevirt.autoload :V1Diag288Watchdog, 'kubevirt/models/v1_diag288_watchdog' Kubevirt.autoload :V1Disk, 'kubevirt/models/v1_disk' diff --git a/lib/kubevirt/models/v1_device_attribute.rb b/lib/kubevirt/models/v1_device_attribute.rb deleted file mode 100644 index 28c233f..0000000 --- a/lib/kubevirt/models/v1_device_attribute.rb +++ /dev/null @@ -1,159 +0,0 @@ -=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.20.0 - -=end - -require 'date' -require 'time' - -module Kubevirt - # DeviceAttribute must have exactly one field set. - class V1DeviceAttribute < ApiModelBase - # MDevUUID is the mediated device uuid of the allocated device - attr_accessor :m_dev_uuid - - # PCIAddress is the PCIe bus address of the allocated device - attr_accessor :pci_address - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'m_dev_uuid' => :'mDevUUID', - :'pci_address' => :'pciAddress' - } - 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 - { - :'m_dev_uuid' => :'String', - :'pci_address' => :'String' - } - 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::V1DeviceAttribute` 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::V1DeviceAttribute`. 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?(:'m_dev_uuid') - self.m_dev_uuid = attributes[:'m_dev_uuid'] - end - - if attributes.key?(:'pci_address') - self.pci_address = attributes[:'pci_address'] - 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 && - m_dev_uuid == o.m_dev_uuid && - pci_address == o.pci_address - 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 - [m_dev_uuid, pci_address].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/v1_device_resource_claim_status.rb b/lib/kubevirt/models/v1_device_resource_claim_status.rb deleted file mode 100644 index 46858cc..0000000 --- a/lib/kubevirt/models/v1_device_resource_claim_status.rb +++ /dev/null @@ -1,168 +0,0 @@ -=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.20.0 - -=end - -require 'date' -require 'time' - -module Kubevirt - # DeviceResourceClaimStatus has to be before SyncVMI call from virt-handler to virt-launcher - class V1DeviceResourceClaimStatus < ApiModelBase - attr_accessor :attributes - - # Name is the name of actual device on the host provisioned by the driver as reflected in resourceclaim.status - attr_accessor :name - - # ResourceClaimName is the name of the resource claims object used to provision this resource - attr_accessor :resource_claim_name - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'attributes' => :'attributes', - :'name' => :'name', - :'resource_claim_name' => :'resourceClaimName' - } - 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 - { - :'attributes' => :'V1DeviceAttribute', - :'name' => :'String', - :'resource_claim_name' => :'String' - } - 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::V1DeviceResourceClaimStatus` 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::V1DeviceResourceClaimStatus`. 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?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'resource_claim_name') - self.resource_claim_name = attributes[:'resource_claim_name'] - 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 && - attributes == o.attributes && - name == o.name && - resource_claim_name == o.resource_claim_name - 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 - [attributes, name, resource_claim_name].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/v1_device_status.rb b/lib/kubevirt/models/v1_device_status.rb deleted file mode 100644 index 0ed9663..0000000 --- a/lib/kubevirt/models/v1_device_status.rb +++ /dev/null @@ -1,163 +0,0 @@ -=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.20.0 - -=end - -require 'date' -require 'time' - -module Kubevirt - # DeviceStatus has the information of all devices allocated spec.domain.devices - class V1DeviceStatus < ApiModelBase - # GPUStatuses reflects the state of GPUs requested in spec.domain.devices.gpus - attr_accessor :gpu_statuses - - # HostDeviceStatuses reflects the state of GPUs requested in spec.domain.devices.hostDevices DRA - attr_accessor :host_device_statuses - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'gpu_statuses' => :'gpuStatuses', - :'host_device_statuses' => :'hostDeviceStatuses' - } - 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 - { - :'gpu_statuses' => :'Array', - :'host_device_statuses' => :'Array' - } - 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::V1DeviceStatus` 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::V1DeviceStatus`. 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?(:'gpu_statuses') - if (value = attributes[:'gpu_statuses']).is_a?(Array) - self.gpu_statuses = value - end - end - - if attributes.key?(:'host_device_statuses') - if (value = attributes[:'host_device_statuses']).is_a?(Array) - self.host_device_statuses = value - end - 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 && - gpu_statuses == o.gpu_statuses && - host_device_statuses == o.host_device_statuses - 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 - [gpu_statuses, host_device_statuses].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/v1_device_status_info.rb b/lib/kubevirt/models/v1_device_status_info.rb deleted file mode 100644 index 4dceda1..0000000 --- a/lib/kubevirt/models/v1_device_status_info.rb +++ /dev/null @@ -1,174 +0,0 @@ -=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.20.0 - -=end - -require 'date' -require 'time' - -module Kubevirt - class V1DeviceStatusInfo < ApiModelBase - attr_accessor :device_resource_claim_status - - # Name of the device as specified in spec.domain.devices.gpus.name or spec.domain.devices.hostDevices.name - attr_accessor :name - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'device_resource_claim_status' => :'deviceResourceClaimStatus', - :'name' => :'name' - } - 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 - { - :'device_resource_claim_status' => :'V1DeviceResourceClaimStatus', - :'name' => :'String' - } - 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::V1DeviceStatusInfo` 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::V1DeviceStatusInfo`. 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?(:'device_resource_claim_status') - self.device_resource_claim_status = attributes[:'device_resource_claim_status'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - else - self.name = '' - 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 - if @name.nil? - invalid_properties.push('invalid value for "name", name cannot be nil.') - end - - 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' - return false if @name.nil? - true - end - - # Custom attribute writer method with validation - # @param [Object] name Value to be assigned - def name=(name) - if name.nil? - fail ArgumentError, 'name cannot be nil' - end - - @name = name - 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 && - device_resource_claim_status == o.device_resource_claim_status && - name == o.name - 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 - [device_resource_claim_status, name].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/v1_virtual_machine_instance_status.rb b/lib/kubevirt/models/v1_virtual_machine_instance_status.rb index 08e45ee..f782282 100644 --- a/lib/kubevirt/models/v1_virtual_machine_instance_status.rb +++ b/lib/kubevirt/models/v1_virtual_machine_instance_status.rb @@ -29,8 +29,6 @@ class V1VirtualMachineInstanceStatus < ApiModelBase attr_accessor :current_cpu_topology - attr_accessor :device_status - # EvacuationNodeName is used to track the eviction process of a VMI. It stores the name of the node that we want to evacuate. It is meant to be used by KubeVirt core components only and can't be set or modified by users. attr_accessor :evacuation_node_name @@ -121,7 +119,6 @@ def self.attribute_map :'changed_block_tracking' => :'changedBlockTracking', :'conditions' => :'conditions', :'current_cpu_topology' => :'currentCPUTopology', - :'device_status' => :'deviceStatus', :'evacuation_node_name' => :'evacuationNodeName', :'fs_freeze_status' => :'fsFreezeStatus', :'guest_os_info' => :'guestOSInfo', @@ -165,7 +162,6 @@ def self.openapi_types :'changed_block_tracking' => :'V1ChangedBlockTrackingStatus', :'conditions' => :'Array', :'current_cpu_topology' => :'V1CPUTopology', - :'device_status' => :'V1DeviceStatus', :'evacuation_node_name' => :'String', :'fs_freeze_status' => :'String', :'guest_os_info' => :'V1VirtualMachineInstanceGuestOSInfo', @@ -237,10 +233,6 @@ def initialize(attributes = {}) self.current_cpu_topology = attributes[:'current_cpu_topology'] end - if attributes.key?(:'device_status') - self.device_status = attributes[:'device_status'] - end - if attributes.key?(:'evacuation_node_name') self.evacuation_node_name = attributes[:'evacuation_node_name'] end @@ -377,7 +369,6 @@ def ==(o) changed_block_tracking == o.changed_block_tracking && conditions == o.conditions && current_cpu_topology == o.current_cpu_topology && - device_status == o.device_status && evacuation_node_name == o.evacuation_node_name && fs_freeze_status == o.fs_freeze_status && guest_os_info == o.guest_os_info && @@ -411,7 +402,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [vsockcid, active_pods, changed_block_tracking, conditions, current_cpu_topology, device_status, evacuation_node_name, fs_freeze_status, guest_os_info, interfaces, kernel_boot_status, launcher_container_image_version, machine, memory, migrated_volumes, migration_method, migration_state, migration_transport, node_name, phase, phase_transition_timestamps, qos_class, reason, runtime_user, selinux_context, topology_hints, virtual_machine_revision_name, volume_status].hash + [vsockcid, active_pods, changed_block_tracking, conditions, current_cpu_topology, evacuation_node_name, fs_freeze_status, guest_os_info, interfaces, kernel_boot_status, launcher_container_image_version, machine, memory, migrated_volumes, migration_method, migration_state, migration_transport, node_name, phase, phase_transition_timestamps, qos_class, reason, runtime_user, selinux_context, topology_hints, virtual_machine_revision_name, volume_status].hash end # Builds the object from hash diff --git a/spec/models/v1_device_attribute_spec.rb b/spec/models/v1_device_attribute_spec.rb deleted file mode 100644 index 3e45509..0000000 --- a/spec/models/v1_device_attribute_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -=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.20.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for Kubevirt::V1DeviceAttribute -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe Kubevirt::V1DeviceAttribute do - #let(:instance) { Kubevirt::V1DeviceAttribute.new } - - describe 'test an instance of V1DeviceAttribute' do - it 'should create an instance of V1DeviceAttribute' do - # uncomment below to test the instance creation - #expect(instance).to be_instance_of(Kubevirt::V1DeviceAttribute) - end - end - - describe 'test attribute "m_dev_uuid"' do - it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - end - end - - describe 'test attribute "pci_address"' 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/v1_device_resource_claim_status_spec.rb b/spec/models/v1_device_resource_claim_status_spec.rb deleted file mode 100644 index afbdaa5..0000000 --- a/spec/models/v1_device_resource_claim_status_spec.rb +++ /dev/null @@ -1,48 +0,0 @@ -=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.20.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for Kubevirt::V1DeviceResourceClaimStatus -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe Kubevirt::V1DeviceResourceClaimStatus do - #let(:instance) { Kubevirt::V1DeviceResourceClaimStatus.new } - - describe 'test an instance of V1DeviceResourceClaimStatus' do - it 'should create an instance of V1DeviceResourceClaimStatus' do - # uncomment below to test the instance creation - #expect(instance).to be_instance_of(Kubevirt::V1DeviceResourceClaimStatus) - end - end - - describe 'test attribute "attributes"' do - it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - end - end - - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - end - end - - describe 'test attribute "resource_claim_name"' 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/v1_device_status_info_spec.rb b/spec/models/v1_device_status_info_spec.rb deleted file mode 100644 index 22ba1ea..0000000 --- a/spec/models/v1_device_status_info_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -=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.20.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for Kubevirt::V1DeviceStatusInfo -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe Kubevirt::V1DeviceStatusInfo do - #let(:instance) { Kubevirt::V1DeviceStatusInfo.new } - - describe 'test an instance of V1DeviceStatusInfo' do - it 'should create an instance of V1DeviceStatusInfo' do - # uncomment below to test the instance creation - #expect(instance).to be_instance_of(Kubevirt::V1DeviceStatusInfo) - end - end - - describe 'test attribute "device_resource_claim_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 "name"' 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/v1_device_status_spec.rb b/spec/models/v1_device_status_spec.rb deleted file mode 100644 index 0e8998b..0000000 --- a/spec/models/v1_device_status_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -=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.20.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for Kubevirt::V1DeviceStatus -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe Kubevirt::V1DeviceStatus do - #let(:instance) { Kubevirt::V1DeviceStatus.new } - - describe 'test an instance of V1DeviceStatus' do - it 'should create an instance of V1DeviceStatus' do - # uncomment below to test the instance creation - #expect(instance).to be_instance_of(Kubevirt::V1DeviceStatus) - end - end - - describe 'test attribute "gpu_statuses"' do - it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - end - end - - describe 'test attribute "host_device_statuses"' 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/v1_virtual_machine_instance_status_spec.rb b/spec/models/v1_virtual_machine_instance_status_spec.rb index cc2f235..5f76df5 100644 --- a/spec/models/v1_virtual_machine_instance_status_spec.rb +++ b/spec/models/v1_virtual_machine_instance_status_spec.rb @@ -57,12 +57,6 @@ end end - describe 'test attribute "device_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 "evacuation_node_name"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/