Class: Kubevirt::V1KubeVirtConfiguration

Inherits:
ApiModelBase show all
Defined in:
lib/kubevirt/models/v1_kube_virt_configuration.rb

Overview

KubeVirtConfiguration holds all kubevirt configurations

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiModelBase

_deserialize, #_to_hash, #to_body, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ V1KubeVirtConfiguration

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 235

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `Kubevirt::V1KubeVirtConfiguration` 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::V1KubeVirtConfiguration`. 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?(:'additional_guest_memory_overhead_ratio')
    self.additional_guest_memory_overhead_ratio = attributes[:'additional_guest_memory_overhead_ratio']
  end

  if attributes.key?(:'api_configuration')
    self.api_configuration = attributes[:'api_configuration']
  end

  if attributes.key?(:'architecture_configuration')
    self.architecture_configuration = attributes[:'architecture_configuration']
  end

  if attributes.key?(:'auto_cpu_limit_namespace_label_selector')
    self.auto_cpu_limit_namespace_label_selector = attributes[:'auto_cpu_limit_namespace_label_selector']
  end

  if attributes.key?(:'changed_block_tracking_label_selectors')
    self.changed_block_tracking_label_selectors = attributes[:'changed_block_tracking_label_selectors']
  end

  if attributes.key?(:'common_instancetypes_deployment')
    self.common_instancetypes_deployment = attributes[:'common_instancetypes_deployment']
  end

  if attributes.key?(:'controller_configuration')
    self.controller_configuration = attributes[:'controller_configuration']
  end

  if attributes.key?(:'cpu_model')
    self.cpu_model = attributes[:'cpu_model']
  end

  if attributes.key?(:'cpu_request')
    self.cpu_request = attributes[:'cpu_request']
  end

  if attributes.key?(:'default_runtime_class')
    self.default_runtime_class = attributes[:'default_runtime_class']
  end

  if attributes.key?(:'developer_configuration')
    self.developer_configuration = attributes[:'developer_configuration']
  end

  if attributes.key?(:'emulated_machines')
    if (value = attributes[:'emulated_machines']).is_a?(Array)
      self.emulated_machines = value
    end
  end

  if attributes.key?(:'eviction_strategy')
    self.eviction_strategy = attributes[:'eviction_strategy']
  end

  if attributes.key?(:'handler_configuration')
    self.handler_configuration = attributes[:'handler_configuration']
  end

  if attributes.key?(:'image_pull_policy')
    self.image_pull_policy = attributes[:'image_pull_policy']
  end

  if attributes.key?(:'instancetype')
    self.instancetype = attributes[:'instancetype']
  end

  if attributes.key?(:'ksm_configuration')
    self.ksm_configuration = attributes[:'ksm_configuration']
  end

  if attributes.key?(:'live_update_configuration')
    self.live_update_configuration = attributes[:'live_update_configuration']
  end

  if attributes.key?(:'machine_type')
    self.machine_type = attributes[:'machine_type']
  end

  if attributes.key?(:'mediated_devices_configuration')
    self.mediated_devices_configuration = attributes[:'mediated_devices_configuration']
  end

  if attributes.key?(:'mem_balloon_stats_period')
    self.mem_balloon_stats_period = attributes[:'mem_balloon_stats_period']
  end

  if attributes.key?(:'migrations')
    self.migrations = attributes[:'migrations']
  end

  if attributes.key?(:'min_cpu_model')
    self.min_cpu_model = attributes[:'min_cpu_model']
  end

  if attributes.key?(:'network')
    self.network = attributes[:'network']
  end

  if attributes.key?(:'obsolete_cpu_models')
    if (value = attributes[:'obsolete_cpu_models']).is_a?(Hash)
      self.obsolete_cpu_models = value
    end
  end

  if attributes.key?(:'ovmf_path')
    self.ovmf_path = attributes[:'ovmf_path']
  end

  if attributes.key?(:'permitted_host_devices')
    self.permitted_host_devices = attributes[:'permitted_host_devices']
  end

  if attributes.key?(:'seccomp_configuration')
    self.seccomp_configuration = attributes[:'seccomp_configuration']
  end

  if attributes.key?(:'selinux_launcher_type')
    self.selinux_launcher_type = attributes[:'selinux_launcher_type']
  end

  if attributes.key?(:'smbios')
    self.smbios = attributes[:'smbios']
  end

  if attributes.key?(:'support_container_resources')
    if (value = attributes[:'support_container_resources']).is_a?(Array)
      self.support_container_resources = value
    end
  end

  if attributes.key?(:'supported_guest_agent_versions')
    if (value = attributes[:'supported_guest_agent_versions']).is_a?(Array)
      self.supported_guest_agent_versions = value
    end
  end

  if attributes.key?(:'tls_configuration')
    self.tls_configuration = attributes[:'tls_configuration']
  end

  if attributes.key?(:'virtual_machine_instances_per_node')
    self.virtual_machine_instances_per_node = attributes[:'virtual_machine_instances_per_node']
  end

  if attributes.key?(:'virtual_machine_options')
    self.virtual_machine_options = attributes[:'virtual_machine_options']
  end

  if attributes.key?(:'vm_rollout_strategy')
    self.vm_rollout_strategy = attributes[:'vm_rollout_strategy']
  end

  if attributes.key?(:'vm_state_storage_class')
    self.vm_state_storage_class = attributes[:'vm_state_storage_class']
  end

  if attributes.key?(:'webhook_configuration')
    self.webhook_configuration = attributes[:'webhook_configuration']
  end
end

Instance Attribute Details

#additional_guest_memory_overhead_ratioObject

AdditionalGuestMemoryOverheadRatio can be used to increase the virtualization infrastructure overhead. This is useful, since the calculation of this overhead is not accurate and cannot be entirely known in advance. The ratio that is being set determines by which factor to increase the overhead calculated by Kubevirt. A higher ratio means that the VMs would be less compromised by node pressures, but would mean that fewer VMs could be scheduled to a node. If not set, the default is 1.



20
21
22
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 20

def additional_guest_memory_overhead_ratio
  @additional_guest_memory_overhead_ratio
end

#api_configurationObject

Returns the value of attribute api_configuration.



22
23
24
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 22

def api_configuration
  @api_configuration
end

#architecture_configurationObject

Returns the value of attribute architecture_configuration.



24
25
26
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 24

def architecture_configuration
  @architecture_configuration
end

#auto_cpu_limit_namespace_label_selectorObject

Returns the value of attribute auto_cpu_limit_namespace_label_selector.



26
27
28
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 26

def auto_cpu_limit_namespace_label_selector
  @auto_cpu_limit_namespace_label_selector
end

#changed_block_tracking_label_selectorsObject

Returns the value of attribute changed_block_tracking_label_selectors.



28
29
30
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 28

def changed_block_tracking_label_selectors
  @changed_block_tracking_label_selectors
end

#common_instancetypes_deploymentObject

Returns the value of attribute common_instancetypes_deployment.



30
31
32
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 30

def common_instancetypes_deployment
  @common_instancetypes_deployment
end

#controller_configurationObject

Returns the value of attribute controller_configuration.



32
33
34
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 32

def controller_configuration
  @controller_configuration
end

#cpu_modelObject

Returns the value of attribute cpu_model.



34
35
36
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 34

def cpu_model
  @cpu_model
end

#cpu_requestObject

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: 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.



37
38
39
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 37

def cpu_request
  @cpu_request
end

#default_runtime_classObject

Returns the value of attribute default_runtime_class.



39
40
41
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 39

def default_runtime_class
  @default_runtime_class
end

#developer_configurationObject

Returns the value of attribute developer_configuration.



41
42
43
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 41

def developer_configuration
  @developer_configuration
end

#emulated_machinesObject

Deprecated. Use architectureConfiguration instead.



44
45
46
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 44

def emulated_machines
  @emulated_machines
end

#eviction_strategyObject

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.



47
48
49
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 47

def eviction_strategy
  @eviction_strategy
end

#handler_configurationObject

Returns the value of attribute handler_configuration.



49
50
51
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 49

def handler_configuration
  @handler_configuration
end

#image_pull_policyObject

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



52
53
54
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 52

def image_pull_policy
  @image_pull_policy
end

#instancetypeObject

Returns the value of attribute instancetype.



54
55
56
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 54

def instancetype
  @instancetype
end

#ksm_configurationObject

Returns the value of attribute ksm_configuration.



56
57
58
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 56

def ksm_configuration
  @ksm_configuration
end

#live_update_configurationObject

Returns the value of attribute live_update_configuration.



58
59
60
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 58

def live_update_configuration
  @live_update_configuration
end

#machine_typeObject

Deprecated. Use architectureConfiguration instead.



61
62
63
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 61

def machine_type
  @machine_type
end

#mediated_devices_configurationObject

Returns the value of attribute mediated_devices_configuration.



63
64
65
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 63

def mediated_devices_configuration
  @mediated_devices_configuration
end

#mem_balloon_stats_periodObject

Returns the value of attribute mem_balloon_stats_period.



65
66
67
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 65

def mem_balloon_stats_period
  @mem_balloon_stats_period
end

#migrationsObject

Returns the value of attribute migrations.



67
68
69
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 67

def migrations
  @migrations
end

#min_cpu_modelObject

deprecated



70
71
72
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 70

def min_cpu_model
  @min_cpu_model
end

#networkObject

Returns the value of attribute network.



72
73
74
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 72

def network
  @network
end

#obsolete_cpu_modelsObject

Returns the value of attribute obsolete_cpu_models.



74
75
76
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 74

def obsolete_cpu_models
  @obsolete_cpu_models
end

#ovmf_pathObject

Deprecated. Use architectureConfiguration instead.



77
78
79
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 77

def ovmf_path
  @ovmf_path
end

#permitted_host_devicesObject

Returns the value of attribute permitted_host_devices.



79
80
81
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 79

def permitted_host_devices
  @permitted_host_devices
end

#seccomp_configurationObject

Returns the value of attribute seccomp_configuration.



81
82
83
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 81

def seccomp_configuration
  @seccomp_configuration
end

#selinux_launcher_typeObject

Returns the value of attribute selinux_launcher_type.



83
84
85
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 83

def selinux_launcher_type
  @selinux_launcher_type
end

#smbiosObject

Returns the value of attribute smbios.



85
86
87
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 85

def smbios
  @smbios
end

#support_container_resourcesObject

SupportContainerResources specifies the resource requirements for various types of supporting containers such as container disks/virtiofs/sidecars and hotplug attachment pods. If omitted a sensible default will be supplied.



88
89
90
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 88

def support_container_resources
  @support_container_resources
end

#supported_guest_agent_versionsObject

deprecated



91
92
93
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 91

def supported_guest_agent_versions
  @supported_guest_agent_versions
end

#tls_configurationObject

Returns the value of attribute tls_configuration.



93
94
95
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 93

def tls_configuration
  @tls_configuration
end

#virtual_machine_instances_per_nodeObject

Returns the value of attribute virtual_machine_instances_per_node.



95
96
97
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 95

def virtual_machine_instances_per_node
  @virtual_machine_instances_per_node
end

#virtual_machine_optionsObject

Returns the value of attribute virtual_machine_options.



97
98
99
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 97

def virtual_machine_options
  @virtual_machine_options
end

#vm_rollout_strategyObject

VMRolloutStrategy defines how live-updatable fields, like CPU sockets, memory, tolerations, and affinity, are propagated from a VM to its VMI.



100
101
102
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 100

def vm_rollout_strategy
  @vm_rollout_strategy
end

#vm_state_storage_classObject

VMStateStorageClass is the name of the storage class to use for the PVCs created to preserve VM state, like TPM.



103
104
105
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 103

def vm_state_storage_class
  @vm_state_storage_class
end

#webhook_configurationObject

Returns the value of attribute webhook_configuration.



105
106
107
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 105

def webhook_configuration
  @webhook_configuration
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



174
175
176
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 174

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



179
180
181
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 179

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 130

def self.attribute_map
  {
    :'additional_guest_memory_overhead_ratio' => :'additionalGuestMemoryOverheadRatio',
    :'api_configuration' => :'apiConfiguration',
    :'architecture_configuration' => :'architectureConfiguration',
    :'auto_cpu_limit_namespace_label_selector' => :'autoCPULimitNamespaceLabelSelector',
    :'changed_block_tracking_label_selectors' => :'changedBlockTrackingLabelSelectors',
    :'common_instancetypes_deployment' => :'commonInstancetypesDeployment',
    :'controller_configuration' => :'controllerConfiguration',
    :'cpu_model' => :'cpuModel',
    :'cpu_request' => :'cpuRequest',
    :'default_runtime_class' => :'defaultRuntimeClass',
    :'developer_configuration' => :'developerConfiguration',
    :'emulated_machines' => :'emulatedMachines',
    :'eviction_strategy' => :'evictionStrategy',
    :'handler_configuration' => :'handlerConfiguration',
    :'image_pull_policy' => :'imagePullPolicy',
    :'instancetype' => :'instancetype',
    :'ksm_configuration' => :'ksmConfiguration',
    :'live_update_configuration' => :'liveUpdateConfiguration',
    :'machine_type' => :'machineType',
    :'mediated_devices_configuration' => :'mediatedDevicesConfiguration',
    :'mem_balloon_stats_period' => :'memBalloonStatsPeriod',
    :'migrations' => :'migrations',
    :'min_cpu_model' => :'minCPUModel',
    :'network' => :'network',
    :'obsolete_cpu_models' => :'obsoleteCPUModels',
    :'ovmf_path' => :'ovmfPath',
    :'permitted_host_devices' => :'permittedHostDevices',
    :'seccomp_configuration' => :'seccompConfiguration',
    :'selinux_launcher_type' => :'selinuxLauncherType',
    :'smbios' => :'smbios',
    :'support_container_resources' => :'supportContainerResources',
    :'supported_guest_agent_versions' => :'supportedGuestAgentVersions',
    :'tls_configuration' => :'tlsConfiguration',
    :'virtual_machine_instances_per_node' => :'virtualMachineInstancesPerNode',
    :'virtual_machine_options' => :'virtualMachineOptions',
    :'vm_rollout_strategy' => :'vmRolloutStrategy',
    :'vm_state_storage_class' => :'vmStateStorageClass',
    :'webhook_configuration' => :'webhookConfiguration'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 497

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

.openapi_nullableObject

List of attributes with nullable: true



228
229
230
231
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 228

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 184

def self.openapi_types
  {
    :'additional_guest_memory_overhead_ratio' => :'String',
    :'api_configuration' => :'V1ReloadableComponentConfiguration',
    :'architecture_configuration' => :'V1ArchConfiguration',
    :'auto_cpu_limit_namespace_label_selector' => :'K8sIoApimachineryPkgApisMetaV1LabelSelector',
    :'changed_block_tracking_label_selectors' => :'V1ChangedBlockTrackingSelectors',
    :'common_instancetypes_deployment' => :'V1CommonInstancetypesDeployment',
    :'controller_configuration' => :'V1ReloadableComponentConfiguration',
    :'cpu_model' => :'String',
    :'cpu_request' => :'Object',
    :'default_runtime_class' => :'String',
    :'developer_configuration' => :'V1DeveloperConfiguration',
    :'emulated_machines' => :'Array<String>',
    :'eviction_strategy' => :'String',
    :'handler_configuration' => :'V1ReloadableComponentConfiguration',
    :'image_pull_policy' => :'String',
    :'instancetype' => :'V1InstancetypeConfiguration',
    :'ksm_configuration' => :'V1KSMConfiguration',
    :'live_update_configuration' => :'V1LiveUpdateConfiguration',
    :'machine_type' => :'String',
    :'mediated_devices_configuration' => :'V1MediatedDevicesConfiguration',
    :'mem_balloon_stats_period' => :'Integer',
    :'migrations' => :'V1MigrationConfiguration',
    :'min_cpu_model' => :'String',
    :'network' => :'V1NetworkConfiguration',
    :'obsolete_cpu_models' => :'Hash<String, Boolean>',
    :'ovmf_path' => :'String',
    :'permitted_host_devices' => :'V1PermittedHostDevices',
    :'seccomp_configuration' => :'V1SeccompConfiguration',
    :'selinux_launcher_type' => :'String',
    :'smbios' => :'V1SMBiosConfiguration',
    :'support_container_resources' => :'Array<V1SupportContainerResources>',
    :'supported_guest_agent_versions' => :'Array<String>',
    :'tls_configuration' => :'V1TLSConfiguration',
    :'virtual_machine_instances_per_node' => :'Integer',
    :'virtual_machine_options' => :'V1VirtualMachineOptions',
    :'vm_rollout_strategy' => :'String',
    :'vm_state_storage_class' => :'String',
    :'webhook_configuration' => :'V1ReloadableComponentConfiguration'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 439

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      additional_guest_memory_overhead_ratio == o.additional_guest_memory_overhead_ratio &&
      api_configuration == o.api_configuration &&
      architecture_configuration == o.architecture_configuration &&
      auto_cpu_limit_namespace_label_selector == o.auto_cpu_limit_namespace_label_selector &&
      changed_block_tracking_label_selectors == o.changed_block_tracking_label_selectors &&
      common_instancetypes_deployment == o.common_instancetypes_deployment &&
      controller_configuration == o.controller_configuration &&
      cpu_model == o.cpu_model &&
      cpu_request == o.cpu_request &&
      default_runtime_class == o.default_runtime_class &&
      developer_configuration == o.developer_configuration &&
      emulated_machines == o.emulated_machines &&
      eviction_strategy == o.eviction_strategy &&
      handler_configuration == o.handler_configuration &&
      image_pull_policy == o.image_pull_policy &&
      instancetype == o.instancetype &&
      ksm_configuration == o.ksm_configuration &&
      live_update_configuration == o.live_update_configuration &&
      machine_type == o.machine_type &&
      mediated_devices_configuration == o.mediated_devices_configuration &&
      mem_balloon_stats_period == o.mem_balloon_stats_period &&
      migrations == o.migrations &&
      min_cpu_model == o.min_cpu_model &&
      network == o.network &&
      obsolete_cpu_models == o.obsolete_cpu_models &&
      ovmf_path == o.ovmf_path &&
      permitted_host_devices == o.permitted_host_devices &&
      seccomp_configuration == o.seccomp_configuration &&
      selinux_launcher_type == o.selinux_launcher_type &&
      smbios == o.smbios &&
      support_container_resources == o.support_container_resources &&
      supported_guest_agent_versions == o.supported_guest_agent_versions &&
      tls_configuration == o.tls_configuration &&
      virtual_machine_instances_per_node == o.virtual_machine_instances_per_node &&
      virtual_machine_options == o.virtual_machine_options &&
      vm_rollout_strategy == o.vm_rollout_strategy &&
      vm_state_storage_class == o.vm_state_storage_class &&
      webhook_configuration == o.webhook_configuration
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


484
485
486
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 484

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



490
491
492
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 490

def hash
  [additional_guest_memory_overhead_ratio, api_configuration, architecture_configuration, auto_cpu_limit_namespace_label_selector, changed_block_tracking_label_selectors, common_instancetypes_deployment, controller_configuration, cpu_model, cpu_request, default_runtime_class, developer_configuration, emulated_machines, eviction_strategy, handler_configuration, image_pull_policy, instancetype, ksm_configuration, live_update_configuration, machine_type, mediated_devices_configuration, mem_balloon_stats_period, migrations, min_cpu_model, network, obsolete_cpu_models, ovmf_path, permitted_host_devices, seccomp_configuration, selinux_launcher_type, smbios, support_container_resources, supported_guest_agent_versions, tls_configuration, virtual_machine_instances_per_node, virtual_machine_options, vm_rollout_strategy, vm_state_storage_class, webhook_configuration].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



412
413
414
415
416
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 412

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  invalid_properties
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



519
520
521
522
523
524
525
526
527
528
529
530
531
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 519

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

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



420
421
422
423
424
425
# File 'lib/kubevirt/models/v1_kube_virt_configuration.rb', line 420

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  image_pull_policy_validator = EnumAttributeValidator.new('String', ["Always", "IfNotPresent", "Never"])
  return false unless image_pull_policy_validator.valid?(@image_pull_policy)
  true
end