Class: NutanixVmm::VmmV40AhvConfigVm
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- NutanixVmm::VmmV40AhvConfigVm
- Defined in:
- lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb
Overview
VM configuration.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#apc_config ⇒ Object
Returns the value of attribute apc_config.
-
#availability_zone ⇒ Object
Returns the value of attribute availability_zone.
-
#bios_uuid ⇒ Object
BIOS UUID of the VM of type UUID.
-
#boot_config ⇒ Object
Returns the value of attribute boot_config.
-
#categories ⇒ Object
Categories for the VM.
-
#cd_roms ⇒ Object
CD-ROMs attached to the VM.
-
#cluster ⇒ Object
Returns the value of attribute cluster.
-
#create_time ⇒ Object
VM creation time.
-
#description ⇒ Object
VM description.
-
#disks ⇒ Object
Disks attached to the VM.
-
#enabled_cpu_features ⇒ Object
The list of additional CPU features to be enabled.
-
#ext_id ⇒ Object
A globally unique identifier of an instance that is suitable for external consumption.
-
#generation_uuid ⇒ Object
Generation UUID of the VM of type UUID.
-
#gpus ⇒ Object
GPUs attached to the VM.
-
#guest_customization ⇒ Object
Returns the value of attribute guest_customization.
-
#guest_tools ⇒ Object
Returns the value of attribute guest_tools.
-
#hardware_clock_timezone ⇒ Object
VM hardware clock timezone in IANA TZDB format (America/Los_Angeles).
-
#host ⇒ Object
Returns the value of attribute host.
-
#is_agent_vm ⇒ Object
Indicates whether the VM is an agent VM or not.
-
#is_branding_enabled ⇒ Object
Indicates whether to remove AHV branding from VM firmware tables or not.
-
#is_cpu_hotplug_enabled ⇒ Object
Indicates whether the VM CPU hotplug is enabled.
-
#is_cpu_passthrough_enabled ⇒ Object
Indicates whether to passthrough the host CPU features to the guest or not.
-
#is_cross_cluster_migration_in_progress ⇒ Object
Indicates whether the VM is currently undergoing cross cluster migration.
-
#is_gpu_console_enabled ⇒ Object
Indicates whether the vGPU console is enabled or not.
-
#is_live_migrate_capable ⇒ Object
Indicates whether the VM is capable of live migrating to another host or not, based on its configuration.
-
#is_memory_overcommit_enabled ⇒ Object
Indicates whether the memory overcommit feature should be enabled for the VM or not.
-
#is_scsi_controller_enabled ⇒ Object
Indicates whether the VM SCSI controller is enabled.
-
#is_vcpu_hard_pinning_enabled ⇒ Object
Indicates whether the vCPUs should be hard pinned to specific pCPUs or not.
-
#is_vga_console_enabled ⇒ Object
Indicates whether the VGA console should be disabled or not.
-
#links ⇒ Object
A HATEOAS style link for the response.
-
#machine_type ⇒ Object
Returns the value of attribute machine_type.
-
#memory_size_bytes ⇒ Object
Memory size in bytes.
-
#name ⇒ Object
VM name.
-
#nics ⇒ Object
NICs attached to the VM.
-
#num_cores_per_socket ⇒ Object
Number of cores per socket.
-
#num_numa_nodes ⇒ Object
Number of NUMA nodes.
-
#num_sockets ⇒ Object
Number of vCPU sockets.
-
#num_threads_per_core ⇒ Object
Number of threads per core.
-
#ownership_info ⇒ Object
Returns the value of attribute ownership_info.
-
#pcie_devices ⇒ Object
PCIe devices attached to the VM.
-
#power_state ⇒ Object
Returns the value of attribute power_state.
-
#protection_policy_state ⇒ Object
Returns the value of attribute protection_policy_state.
-
#protection_type ⇒ Object
Returns the value of attribute protection_type.
-
#serial_ports ⇒ Object
Serial ports configured on the VM.
-
#source ⇒ Object
Returns the value of attribute source.
-
#storage_config ⇒ Object
Returns the value of attribute storage_config.
-
#tenant_id ⇒ Object
A globally unique identifier that represents the tenant that owns this entity.
-
#update_time ⇒ Object
VM last updated time.
-
#vtpm_config ⇒ Object
Returns the value of attribute vtpm_config.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3).
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ VmmV40AhvConfigVm
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ VmmV40AhvConfigVm
Initializes the object
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 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 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 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 309 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `NutanixVmm::VmmV40AhvConfigVm` 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 `NutanixVmm::VmmV40AhvConfigVm`. 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?(:'tenant_id') self.tenant_id = attributes[:'tenant_id'] end if attributes.key?(:'ext_id') self.ext_id = attributes[:'ext_id'] end if attributes.key?(:'links') if (value = attributes[:'links']).is_a?(Array) self.links = value end end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'create_time') self.create_time = attributes[:'create_time'] end if attributes.key?(:'update_time') self.update_time = attributes[:'update_time'] end if attributes.key?(:'source') self.source = attributes[:'source'] end if attributes.key?(:'num_sockets') self.num_sockets = attributes[:'num_sockets'] end if attributes.key?(:'num_cores_per_socket') self.num_cores_per_socket = attributes[:'num_cores_per_socket'] end if attributes.key?(:'num_threads_per_core') self.num_threads_per_core = attributes[:'num_threads_per_core'] end if attributes.key?(:'num_numa_nodes') self.num_numa_nodes = attributes[:'num_numa_nodes'] end if attributes.key?(:'memory_size_bytes') self.memory_size_bytes = attributes[:'memory_size_bytes'] end if attributes.key?(:'is_vcpu_hard_pinning_enabled') self.is_vcpu_hard_pinning_enabled = attributes[:'is_vcpu_hard_pinning_enabled'] end if attributes.key?(:'is_cpu_passthrough_enabled') self.is_cpu_passthrough_enabled = attributes[:'is_cpu_passthrough_enabled'] end if attributes.key?(:'enabled_cpu_features') if (value = attributes[:'enabled_cpu_features']).is_a?(Array) self.enabled_cpu_features = value end end if attributes.key?(:'is_memory_overcommit_enabled') self.is_memory_overcommit_enabled = attributes[:'is_memory_overcommit_enabled'] end if attributes.key?(:'is_gpu_console_enabled') self.is_gpu_console_enabled = attributes[:'is_gpu_console_enabled'] end if attributes.key?(:'is_cpu_hotplug_enabled') self.is_cpu_hotplug_enabled = attributes[:'is_cpu_hotplug_enabled'] end if attributes.key?(:'is_scsi_controller_enabled') self.is_scsi_controller_enabled = attributes[:'is_scsi_controller_enabled'] end if attributes.key?(:'generation_uuid') self.generation_uuid = attributes[:'generation_uuid'] end if attributes.key?(:'bios_uuid') self.bios_uuid = attributes[:'bios_uuid'] end if attributes.key?(:'categories') if (value = attributes[:'categories']).is_a?(Array) self.categories = value end end if attributes.key?(:'ownership_info') self.ownership_info = attributes[:'ownership_info'] end if attributes.key?(:'host') self.host = attributes[:'host'] end if attributes.key?(:'cluster') self.cluster = attributes[:'cluster'] end if attributes.key?(:'availability_zone') self.availability_zone = attributes[:'availability_zone'] end if attributes.key?(:'guest_customization') self.guest_customization = attributes[:'guest_customization'] end if attributes.key?(:'guest_tools') self.guest_tools = attributes[:'guest_tools'] end if attributes.key?(:'hardware_clock_timezone') self.hardware_clock_timezone = attributes[:'hardware_clock_timezone'] else self.hardware_clock_timezone = 'UTC' end if attributes.key?(:'is_branding_enabled') self.is_branding_enabled = attributes[:'is_branding_enabled'] end if attributes.key?(:'boot_config') self.boot_config = attributes[:'boot_config'] end if attributes.key?(:'is_vga_console_enabled') self.is_vga_console_enabled = attributes[:'is_vga_console_enabled'] end if attributes.key?(:'machine_type') self.machine_type = attributes[:'machine_type'] end if attributes.key?(:'power_state') self.power_state = attributes[:'power_state'] end if attributes.key?(:'vtpm_config') self.vtpm_config = attributes[:'vtpm_config'] end if attributes.key?(:'is_agent_vm') self.is_agent_vm = attributes[:'is_agent_vm'] end if attributes.key?(:'apc_config') self.apc_config = attributes[:'apc_config'] end if attributes.key?(:'is_live_migrate_capable') self.is_live_migrate_capable = attributes[:'is_live_migrate_capable'] end if attributes.key?(:'is_cross_cluster_migration_in_progress') self.is_cross_cluster_migration_in_progress = attributes[:'is_cross_cluster_migration_in_progress'] end if attributes.key?(:'storage_config') self.storage_config = attributes[:'storage_config'] end if attributes.key?(:'disks') if (value = attributes[:'disks']).is_a?(Array) self.disks = value end end if attributes.key?(:'cd_roms') if (value = attributes[:'cd_roms']).is_a?(Array) self.cd_roms = value end end if attributes.key?(:'nics') if (value = attributes[:'nics']).is_a?(Array) self.nics = value end end if attributes.key?(:'gpus') if (value = attributes[:'gpus']).is_a?(Array) self.gpus = value end end if attributes.key?(:'serial_ports') if (value = attributes[:'serial_ports']).is_a?(Array) self.serial_ports = value end end if attributes.key?(:'protection_type') self.protection_type = attributes[:'protection_type'] end if attributes.key?(:'protection_policy_state') self.protection_policy_state = attributes[:'protection_policy_state'] end if attributes.key?(:'pcie_devices') if (value = attributes[:'pcie_devices']).is_a?(Array) self.pcie_devices = value end end end |
Instance Attribute Details
#apc_config ⇒ Object
Returns the value of attribute apc_config.
119 120 121 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 119 def apc_config @apc_config end |
#availability_zone ⇒ Object
Returns the value of attribute availability_zone.
93 94 95 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 93 def availability_zone @availability_zone end |
#bios_uuid ⇒ Object
BIOS UUID of the VM of type UUID.
82 83 84 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 82 def bios_uuid @bios_uuid end |
#boot_config ⇒ Object
Returns the value of attribute boot_config.
105 106 107 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 105 def boot_config @boot_config end |
#categories ⇒ Object
Categories for the VM.
85 86 87 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 85 def categories @categories end |
#cd_roms ⇒ Object
CD-ROMs attached to the VM.
133 134 135 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 133 def cd_roms @cd_roms end |
#cluster ⇒ Object
Returns the value of attribute cluster.
91 92 93 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 91 def cluster @cluster end |
#create_time ⇒ Object
VM creation time.
35 36 37 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 35 def create_time @create_time end |
#description ⇒ Object
VM description.
32 33 34 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 32 def description @description end |
#disks ⇒ Object
Disks attached to the VM.
130 131 132 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 130 def disks @disks end |
#enabled_cpu_features ⇒ Object
The list of additional CPU features to be enabled. HardwareVirtualization: Indicates whether hardware assisted virtualization should be enabled for the Guest OS or not. Once enabled, the Guest OS can deploy a nested hypervisor.
64 65 66 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 64 def enabled_cpu_features @enabled_cpu_features end |
#ext_id ⇒ Object
A globally unique identifier of an instance that is suitable for external consumption.
23 24 25 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 23 def ext_id @ext_id end |
#generation_uuid ⇒ Object
Generation UUID of the VM of type UUID.
79 80 81 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 79 def generation_uuid @generation_uuid end |
#gpus ⇒ Object
GPUs attached to the VM.
139 140 141 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 139 def gpus @gpus end |
#guest_customization ⇒ Object
Returns the value of attribute guest_customization.
95 96 97 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 95 def guest_customization @guest_customization end |
#guest_tools ⇒ Object
Returns the value of attribute guest_tools.
97 98 99 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 97 def guest_tools @guest_tools end |
#hardware_clock_timezone ⇒ Object
VM hardware clock timezone in IANA TZDB format (America/Los_Angeles).
100 101 102 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 100 def hardware_clock_timezone @hardware_clock_timezone end |
#host ⇒ Object
Returns the value of attribute host.
89 90 91 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 89 def host @host end |
#is_agent_vm ⇒ Object
Indicates whether the VM is an agent VM or not. When their host enters maintenance mode, once the normal VMs are evacuated, the agent VMs are powered off. When the host is restored, agent VMs are powered on before the normal VMs are restored. In other words, agent VMs cannot be HA-protected or live migrated.
117 118 119 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 117 def is_agent_vm @is_agent_vm end |
#is_branding_enabled ⇒ Object
Indicates whether to remove AHV branding from VM firmware tables or not.
103 104 105 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 103 def is_branding_enabled @is_branding_enabled end |
#is_cpu_hotplug_enabled ⇒ Object
Indicates whether the VM CPU hotplug is enabled.
73 74 75 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 73 def is_cpu_hotplug_enabled @is_cpu_hotplug_enabled end |
#is_cpu_passthrough_enabled ⇒ Object
Indicates whether to passthrough the host CPU features to the guest or not. Enabling this will make VM incapable of live migration.
61 62 63 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 61 def is_cpu_passthrough_enabled @is_cpu_passthrough_enabled end |
#is_cross_cluster_migration_in_progress ⇒ Object
Indicates whether the VM is currently undergoing cross cluster migration.
125 126 127 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 125 def is_cross_cluster_migration_in_progress @is_cross_cluster_migration_in_progress end |
#is_gpu_console_enabled ⇒ Object
Indicates whether the vGPU console is enabled or not.
70 71 72 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 70 def is_gpu_console_enabled @is_gpu_console_enabled end |
#is_live_migrate_capable ⇒ Object
Indicates whether the VM is capable of live migrating to another host or not, based on its configuration.
122 123 124 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 122 def is_live_migrate_capable @is_live_migrate_capable end |
#is_memory_overcommit_enabled ⇒ Object
Indicates whether the memory overcommit feature should be enabled for the VM or not. If enabled, parts of the VM memory may reside outside of the hypervisor physical memory. Once enabled, it should be expected that the VM may suffer performance degradation.
67 68 69 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 67 def is_memory_overcommit_enabled @is_memory_overcommit_enabled end |
#is_scsi_controller_enabled ⇒ Object
Indicates whether the VM SCSI controller is enabled.
76 77 78 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 76 def is_scsi_controller_enabled @is_scsi_controller_enabled end |
#is_vcpu_hard_pinning_enabled ⇒ Object
Indicates whether the vCPUs should be hard pinned to specific pCPUs or not.
58 59 60 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 58 def is_vcpu_hard_pinning_enabled @is_vcpu_hard_pinning_enabled end |
#is_vga_console_enabled ⇒ Object
Indicates whether the VGA console should be disabled or not.
108 109 110 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 108 def is_vga_console_enabled @is_vga_console_enabled end |
#links ⇒ Object
A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource.
26 27 28 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 26 def links @links end |
#machine_type ⇒ Object
Returns the value of attribute machine_type.
110 111 112 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 110 def machine_type @machine_type end |
#memory_size_bytes ⇒ Object
Memory size in bytes.
55 56 57 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 55 def memory_size_bytes @memory_size_bytes end |
#name ⇒ Object
VM name.
29 30 31 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 29 def name @name end |
#nics ⇒ Object
NICs attached to the VM.
136 137 138 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 136 def nics @nics end |
#num_cores_per_socket ⇒ Object
Number of cores per socket.
46 47 48 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 46 def num_cores_per_socket @num_cores_per_socket end |
#num_numa_nodes ⇒ Object
Number of NUMA nodes. 0 means NUMA is disabled.
52 53 54 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 52 def num_numa_nodes @num_numa_nodes end |
#num_sockets ⇒ Object
Number of vCPU sockets.
43 44 45 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 43 def num_sockets @num_sockets end |
#num_threads_per_core ⇒ Object
Number of threads per core.
49 50 51 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 49 def num_threads_per_core @num_threads_per_core end |
#ownership_info ⇒ Object
Returns the value of attribute ownership_info.
87 88 89 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 87 def ownership_info @ownership_info end |
#pcie_devices ⇒ Object
PCIe devices attached to the VM.
149 150 151 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 149 def pcie_devices @pcie_devices end |
#power_state ⇒ Object
Returns the value of attribute power_state.
112 113 114 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 112 def power_state @power_state end |
#protection_policy_state ⇒ Object
Returns the value of attribute protection_policy_state.
146 147 148 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 146 def protection_policy_state @protection_policy_state end |
#protection_type ⇒ Object
Returns the value of attribute protection_type.
144 145 146 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 144 def protection_type @protection_type end |
#serial_ports ⇒ Object
Serial ports configured on the VM.
142 143 144 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 142 def serial_ports @serial_ports end |
#source ⇒ Object
Returns the value of attribute source.
40 41 42 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 40 def source @source end |
#storage_config ⇒ Object
Returns the value of attribute storage_config.
127 128 129 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 127 def storage_config @storage_config end |
#tenant_id ⇒ Object
A globally unique identifier that represents the tenant that owns this entity. The system automatically assigns it, and it and is immutable from an API consumer perspective (some use cases may cause this Id to change - For instance, a use case may require the transfer of ownership of the entity, but these cases are handled automatically on the server).
20 21 22 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 20 def tenant_id @tenant_id end |
#update_time ⇒ Object
VM last updated time.
38 39 40 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 38 def update_time @update_time end |
#vtpm_config ⇒ Object
Returns the value of attribute vtpm_config.
114 115 116 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 114 def vtpm_config @vtpm_config end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
229 230 231 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 229 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
234 235 236 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 234 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
174 175 176 177 178 179 180 181 182 183 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 226 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 174 def self.attribute_map { :'tenant_id' => :'tenantId', :'ext_id' => :'extId', :'links' => :'links', :'name' => :'name', :'description' => :'description', :'create_time' => :'createTime', :'update_time' => :'updateTime', :'source' => :'source', :'num_sockets' => :'numSockets', :'num_cores_per_socket' => :'numCoresPerSocket', :'num_threads_per_core' => :'numThreadsPerCore', :'num_numa_nodes' => :'numNumaNodes', :'memory_size_bytes' => :'memorySizeBytes', :'is_vcpu_hard_pinning_enabled' => :'isVcpuHardPinningEnabled', :'is_cpu_passthrough_enabled' => :'isCpuPassthroughEnabled', :'enabled_cpu_features' => :'enabledCpuFeatures', :'is_memory_overcommit_enabled' => :'isMemoryOvercommitEnabled', :'is_gpu_console_enabled' => :'isGpuConsoleEnabled', :'is_cpu_hotplug_enabled' => :'isCpuHotplugEnabled', :'is_scsi_controller_enabled' => :'isScsiControllerEnabled', :'generation_uuid' => :'generationUuid', :'bios_uuid' => :'biosUuid', :'categories' => :'categories', :'ownership_info' => :'ownershipInfo', :'host' => :'host', :'cluster' => :'cluster', :'availability_zone' => :'availabilityZone', :'guest_customization' => :'guestCustomization', :'guest_tools' => :'guestTools', :'hardware_clock_timezone' => :'hardwareClockTimezone', :'is_branding_enabled' => :'isBrandingEnabled', :'boot_config' => :'bootConfig', :'is_vga_console_enabled' => :'isVgaConsoleEnabled', :'machine_type' => :'machineType', :'power_state' => :'powerState', :'vtpm_config' => :'vtpmConfig', :'is_agent_vm' => :'isAgentVm', :'apc_config' => :'apcConfig', :'is_live_migrate_capable' => :'isLiveMigrateCapable', :'is_cross_cluster_migration_in_progress' => :'isCrossClusterMigrationInProgress', :'storage_config' => :'storageConfig', :'disks' => :'disks', :'cd_roms' => :'cdRoms', :'nics' => :'nics', :'gpus' => :'gpus', :'serial_ports' => :'serialPorts', :'protection_type' => :'protectionType', :'protection_policy_state' => :'protectionPolicyState', :'pcie_devices' => :'pcieDevices' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 1072 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_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3)
301 302 303 304 305 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 301 def self.openapi_all_of [ :'CommonV10ResponseExternalizableAbstractModel' ] end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
294 295 296 297 298 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 294 def self.openapi_nullable Set.new([ :'ext_id', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 239 def self.openapi_types { :'tenant_id' => :'String', :'ext_id' => :'String', :'links' => :'Array<CommonV10ResponseApiLink>', :'name' => :'String', :'description' => :'String', :'create_time' => :'Time', :'update_time' => :'Time', :'source' => :'VmmV40AhvConfigVmSourceReference', :'num_sockets' => :'Integer', :'num_cores_per_socket' => :'Integer', :'num_threads_per_core' => :'Integer', :'num_numa_nodes' => :'Integer', :'memory_size_bytes' => :'Integer', :'is_vcpu_hard_pinning_enabled' => :'Boolean', :'is_cpu_passthrough_enabled' => :'Boolean', :'enabled_cpu_features' => :'Array<VmmV40AhvConfigCpuFeature>', :'is_memory_overcommit_enabled' => :'Boolean', :'is_gpu_console_enabled' => :'Boolean', :'is_cpu_hotplug_enabled' => :'Boolean', :'is_scsi_controller_enabled' => :'Boolean', :'generation_uuid' => :'String', :'bios_uuid' => :'String', :'categories' => :'Array<VmmV40AhvConfigCategoryReference>', :'ownership_info' => :'VmmV40AhvConfigOwnershipInfo', :'host' => :'VmmV40AhvConfigHostReference', :'cluster' => :'VmmV40AhvConfigClusterReference', :'availability_zone' => :'VmmV40AhvConfigAvailabilityZoneReference', :'guest_customization' => :'VmmV40AhvConfigGuestCustomizationParams', :'guest_tools' => :'VmmV40AhvConfigGuestTools', :'hardware_clock_timezone' => :'String', :'is_branding_enabled' => :'Boolean', :'boot_config' => :'VmmV40AhvConfigVmAllOfBootConfig', :'is_vga_console_enabled' => :'Boolean', :'machine_type' => :'VmmV40AhvConfigMachineType', :'power_state' => :'VmmV40AhvConfigPowerState', :'vtpm_config' => :'VmmV40AhvConfigVtpmConfig', :'is_agent_vm' => :'Boolean', :'apc_config' => :'VmmV40AhvConfigApcConfig', :'is_live_migrate_capable' => :'Boolean', :'is_cross_cluster_migration_in_progress' => :'Boolean', :'storage_config' => :'VmmV40AhvConfigADSFVmStorageConfig', :'disks' => :'Array<VmmV40AhvConfigDisk>', :'cd_roms' => :'Array<VmmV40AhvConfigCdRom>', :'nics' => :'Array<VmmV40AhvConfigNic>', :'gpus' => :'Array<VmmV40AhvConfigGpu>', :'serial_ports' => :'Array<VmmV40AhvConfigSerialPort>', :'protection_type' => :'VmmV40AhvConfigProtectionType', :'protection_policy_state' => :'VmmV40AhvConfigProtectionPolicyState', :'pcie_devices' => :'Array<VmmV40AhvConfigPcieDevice>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 1003 def ==(o) return true if self.equal?(o) self.class == o.class && tenant_id == o.tenant_id && ext_id == o.ext_id && links == o.links && name == o.name && description == o.description && create_time == o.create_time && update_time == o.update_time && source == o.source && num_sockets == o.num_sockets && num_cores_per_socket == o.num_cores_per_socket && num_threads_per_core == o.num_threads_per_core && num_numa_nodes == o.num_numa_nodes && memory_size_bytes == o.memory_size_bytes && is_vcpu_hard_pinning_enabled == o.is_vcpu_hard_pinning_enabled && is_cpu_passthrough_enabled == o.is_cpu_passthrough_enabled && enabled_cpu_features == o.enabled_cpu_features && is_memory_overcommit_enabled == o.is_memory_overcommit_enabled && is_gpu_console_enabled == o.is_gpu_console_enabled && is_cpu_hotplug_enabled == o.is_cpu_hotplug_enabled && is_scsi_controller_enabled == o.is_scsi_controller_enabled && generation_uuid == o.generation_uuid && bios_uuid == o.bios_uuid && categories == o.categories && ownership_info == o.ownership_info && host == o.host && cluster == o.cluster && availability_zone == o.availability_zone && guest_customization == o.guest_customization && guest_tools == o.guest_tools && hardware_clock_timezone == o.hardware_clock_timezone && is_branding_enabled == o.is_branding_enabled && boot_config == o.boot_config && is_vga_console_enabled == o.is_vga_console_enabled && machine_type == o.machine_type && power_state == o.power_state && vtpm_config == o.vtpm_config && is_agent_vm == o.is_agent_vm && apc_config == o.apc_config && is_live_migrate_capable == o.is_live_migrate_capable && is_cross_cluster_migration_in_progress == o.is_cross_cluster_migration_in_progress && storage_config == o.storage_config && disks == o.disks && cd_roms == o.cd_roms && nics == o.nics && gpus == o.gpus && serial_ports == o.serial_ports && protection_type == o.protection_type && protection_policy_state == o.protection_policy_state && pcie_devices == o.pcie_devices end |
#eql?(o) ⇒ Boolean
1059 1060 1061 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 1059 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
1065 1066 1067 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 1065 def hash [tenant_id, ext_id, links, name, description, create_time, update_time, source, num_sockets, num_cores_per_socket, num_threads_per_core, num_numa_nodes, memory_size_bytes, is_vcpu_hard_pinning_enabled, is_cpu_passthrough_enabled, enabled_cpu_features, is_memory_overcommit_enabled, is_gpu_console_enabled, is_cpu_hotplug_enabled, is_scsi_controller_enabled, generation_uuid, bios_uuid, categories, ownership_info, host, cluster, availability_zone, guest_customization, guest_tools, hardware_clock_timezone, is_branding_enabled, boot_config, is_vga_console_enabled, machine_type, power_state, vtpm_config, is_agent_vm, apc_config, is_live_migrate_capable, is_cross_cluster_migration_in_progress, storage_config, disks, cd_roms, nics, gpus, serial_ports, protection_type, protection_policy_state, pcie_devices].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 542 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if !@tenant_id.nil? && @tenant_id !~ pattern invalid_properties.push("invalid value for \"tenant_id\", must conform to the pattern #{pattern}.") end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if !@ext_id.nil? && @ext_id !~ pattern invalid_properties.push("invalid value for \"ext_id\", must conform to the pattern #{pattern}.") end if !@links.nil? && @links.length > 20 invalid_properties.push('invalid value for "links", number of items must be less than or equal to 20.') end if !@links.nil? && @links.length < 0 invalid_properties.push('invalid value for "links", number of items must be greater than or equal to 0.') end if !@name.nil? && @name.to_s.length > 80 invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 80.') end if !@num_sockets.nil? && @num_sockets < 1 invalid_properties.push('invalid value for "num_sockets", must be greater than or equal to 1.') end if !@num_cores_per_socket.nil? && @num_cores_per_socket < 1 invalid_properties.push('invalid value for "num_cores_per_socket", must be greater than or equal to 1.') end if !@num_threads_per_core.nil? && @num_threads_per_core < 1 invalid_properties.push('invalid value for "num_threads_per_core", must be greater than or equal to 1.') end if !@memory_size_bytes.nil? && @memory_size_bytes < 1 invalid_properties.push('invalid value for "memory_size_bytes", must be greater than or equal to 1.') end if !@enabled_cpu_features.nil? && @enabled_cpu_features.length > 256 invalid_properties.push('invalid value for "enabled_cpu_features", number of items must be less than or equal to 256.') end if !@enabled_cpu_features.nil? && @enabled_cpu_features.length < 0 invalid_properties.push('invalid value for "enabled_cpu_features", number of items must be greater than or equal to 0.') end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if !@generation_uuid.nil? && @generation_uuid !~ pattern invalid_properties.push("invalid value for \"generation_uuid\", must conform to the pattern #{pattern}.") end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if !@bios_uuid.nil? && @bios_uuid !~ pattern invalid_properties.push("invalid value for \"bios_uuid\", must conform to the pattern #{pattern}.") end if !@categories.nil? && @categories.length > 256 invalid_properties.push('invalid value for "categories", number of items must be less than or equal to 256.') end if !@categories.nil? && @categories.length < 0 invalid_properties.push('invalid value for "categories", number of items must be greater than or equal to 0.') end if !@hardware_clock_timezone.nil? && @hardware_clock_timezone.to_s.length > 64 invalid_properties.push('invalid value for "hardware_clock_timezone", the character length must be smaller than or equal to 64.') end if !@disks.nil? && @disks.length > 1024 invalid_properties.push('invalid value for "disks", number of items must be less than or equal to 1024.') end if !@disks.nil? && @disks.length < 0 invalid_properties.push('invalid value for "disks", number of items must be greater than or equal to 0.') end if !@cd_roms.nil? && @cd_roms.length > 10 invalid_properties.push('invalid value for "cd_roms", number of items must be less than or equal to 10.') end if !@cd_roms.nil? && @cd_roms.length < 0 invalid_properties.push('invalid value for "cd_roms", number of items must be greater than or equal to 0.') end if !@nics.nil? && @nics.length > 64 invalid_properties.push('invalid value for "nics", number of items must be less than or equal to 64.') end if !@nics.nil? && @nics.length < 0 invalid_properties.push('invalid value for "nics", number of items must be greater than or equal to 0.') end if !@gpus.nil? && @gpus.length > 16 invalid_properties.push('invalid value for "gpus", number of items must be less than or equal to 16.') end if !@gpus.nil? && @gpus.length < 0 invalid_properties.push('invalid value for "gpus", number of items must be greater than or equal to 0.') end if !@serial_ports.nil? && @serial_ports.length > 4 invalid_properties.push('invalid value for "serial_ports", number of items must be less than or equal to 4.') end if !@serial_ports.nil? && @serial_ports.length < 0 invalid_properties.push('invalid value for "serial_ports", number of items must be greater than or equal to 0.') end if !@pcie_devices.nil? && @pcie_devices.length > 64 invalid_properties.push('invalid value for "pcie_devices", number of items must be less than or equal to 64.') end if !@pcie_devices.nil? && @pcie_devices.length < 0 invalid_properties.push('invalid value for "pcie_devices", number of items must be greater than or equal to 0.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 1094 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
666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 |
# File 'lib/nutanix_vmm/models/vmm_v40_ahv_config_vm.rb', line 666 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if !@tenant_id.nil? && @tenant_id !~ Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) return false if !@ext_id.nil? && @ext_id !~ Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) return false if !@links.nil? && @links.length > 20 return false if !@links.nil? && @links.length < 0 return false if !@name.nil? && @name.to_s.length > 80 return false if !@num_sockets.nil? && @num_sockets < 1 return false if !@num_cores_per_socket.nil? && @num_cores_per_socket < 1 return false if !@num_threads_per_core.nil? && @num_threads_per_core < 1 return false if !@memory_size_bytes.nil? && @memory_size_bytes < 1 return false if !@enabled_cpu_features.nil? && @enabled_cpu_features.length > 256 return false if !@enabled_cpu_features.nil? && @enabled_cpu_features.length < 0 return false if !@generation_uuid.nil? && @generation_uuid !~ Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) return false if !@bios_uuid.nil? && @bios_uuid !~ Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) return false if !@categories.nil? && @categories.length > 256 return false if !@categories.nil? && @categories.length < 0 return false if !@hardware_clock_timezone.nil? && @hardware_clock_timezone.to_s.length > 64 return false if !@disks.nil? && @disks.length > 1024 return false if !@disks.nil? && @disks.length < 0 return false if !@cd_roms.nil? && @cd_roms.length > 10 return false if !@cd_roms.nil? && @cd_roms.length < 0 return false if !@nics.nil? && @nics.length > 64 return false if !@nics.nil? && @nics.length < 0 return false if !@gpus.nil? && @gpus.length > 16 return false if !@gpus.nil? && @gpus.length < 0 return false if !@serial_ports.nil? && @serial_ports.length > 4 return false if !@serial_ports.nil? && @serial_ports.length < 0 return false if !@pcie_devices.nil? && @pcie_devices.length > 64 return false if !@pcie_devices.nil? && @pcie_devices.length < 0 true end |