Class: IntersightClient::VirtualizationVmwareVirtualMachine
- Inherits:
-
VirtualizationBaseVirtualMachine
- Object
- MoBaseMo
- VirtualizationBaseSourceDevice
- VirtualizationBaseVirtualMachine
- IntersightClient::VirtualizationVmwareVirtualMachine
- Defined in:
- lib/intersight_client/models/virtualization_vmware_virtual_machine.rb
Overview
The VMware Virtual machine. It has details such as power state, IP address, resource consumption, etc. Basic elements come from the base class and VMware specific details are provided here.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#annotation ⇒ Object
List of annotations provided to this VM by user.
-
#class_id ⇒ Object
The fully-qualified name of the instantiated, concrete type.
-
#cluster ⇒ Object
Returns the value of attribute cluster.
-
#config_name ⇒ Object
The configuration name for this VM.
-
#connection_state ⇒ Object
Shows if virtual machine is connected to vCenter.
-
#cpu_hot_add_enabled ⇒ Object
Indicates if the capability to add CPUs to a running VM is enabled.
-
#cpu_shares ⇒ Object
Returns the value of attribute cpu_shares.
-
#cpu_socket_info ⇒ Object
Returns the value of attribute cpu_socket_info.
-
#custom_attributes ⇒ Object
Returns the value of attribute custom_attributes.
-
#datacenter ⇒ Object
Returns the value of attribute datacenter.
-
#datastores ⇒ Object
An array of relationships to virtualizationVmwareDatastore resources.
-
#default_power_off_type ⇒ Object
Indicates how the VM will be powered off (soft, hard etc.).
-
#dhcp_enabled ⇒ Object
Shows if DHCP is used for IP/DNS on this VM.
-
#disk_commit_info ⇒ Object
Returns the value of attribute disk_commit_info.
-
#dns_server_list ⇒ Object
Returns the value of attribute dns_server_list.
-
#dns_suffix_list ⇒ Object
Returns the value of attribute dns_suffix_list.
-
#extra_config ⇒ Object
Additional custom configuration settings applied to this VM.
-
#folder ⇒ Object
The folder name associated with this VM.
-
#guest_state ⇒ Object
The state of the guest OS running on this VM.
-
#host ⇒ Object
Returns the value of attribute host.
-
#host_compatibility ⇒ Object
Minimum host ESXi version required for the virtual machine.
-
#instance_uuid ⇒ Object
UUID assigned by vCenter to every VM.
-
#inventory_path ⇒ Object
Inventory path to the VM.
-
#is_template ⇒ Object
If true, indicates that the entity refers to a template of a virtual machine and not a real virtual machine.
-
#mac_address ⇒ Object
Returns the value of attribute mac_address.
-
#mem_shares ⇒ Object
Returns the value of attribute mem_shares.
-
#memory_hot_add_enabled ⇒ Object
Adding memory to a running VM.
-
#network_count ⇒ Object
Indicates how many networks are used by this VM.
-
#networks ⇒ Object
An array of relationships to virtualizationBaseNetwork resources.
-
#object_type ⇒ Object
The fully-qualified name of the instantiated, concrete type.
-
#parent_folder ⇒ Object
Returns the value of attribute parent_folder.
-
#port_groups ⇒ Object
Returns the value of attribute port_groups.
-
#protected_vm ⇒ Object
Shows if this is a protected VM.
-
#remote_display_info ⇒ Object
Returns the value of attribute remote_display_info.
-
#remote_display_vnc_enabled ⇒ Object
Shows if support for a remote VNC access is enabled.
-
#resource_pool ⇒ Object
Name of the resource pool to which this VM belongs (optional).
-
#resource_pool_owner ⇒ Object
Who owns the resource pool.
-
#resource_pool_parent ⇒ Object
The parent of the current resource pool to which this VM belongs.
-
#tool_running_status ⇒ Object
Indicates if guest tools are running on this VM.
-
#tools_version ⇒ Object
The version of the guest tools, usually not specified.
-
#virtual_disks ⇒ Object
Returns the value of attribute virtual_disks.
-
#virtual_network_interfaces ⇒ Object
Returns the value of attribute virtual_network_interfaces.
-
#vm_disk_count ⇒ Object
Shows the number of disks assigned to this VM.
-
#vm_overall_status ⇒ Object
The operational state of the VM.
-
#vm_path ⇒ Object
Path to the vmx file of the VM.
-
#vm_version ⇒ Object
Information about the version of this VM (vmx-09, vmx-11 etc.).
-
#vm_vnic_count ⇒ Object
How many vnics are present.
-
#vnic_device_config_id ⇒ Object
Information related to the guest info’s VNIC virtual device.
Attributes inherited from VirtualizationBaseVirtualMachine
#boot_time, #capacity, #cpu_utilization, #guest_info, #hypervisor_type, #identity, #ip_address, #memory_capacity, #memory_utilization, #name, #power_state, #processor_capacity, #provider, #state, #uuid, #vm_creation_time
Attributes inherited from VirtualizationBaseSourceDevice
Attributes inherited from MoBaseMo
#account_moid, #ancestors, #create_time, #display_names, #domain_group_moid, #mod_time, #moid, #owners, #parent, #permission_resources, #shared_scope, #tags, #version_context
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns the key-value map of all the JSON attributes this model knows about, including the ones defined in its parent(s).
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about, including the ones defined in its parent(s).
-
.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_discriminator_name ⇒ Object
discriminator’s property name in 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.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ VirtualizationVmwareVirtualMachine
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ VirtualizationVmwareVirtualMachine
Initializes the object
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 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 323 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `IntersightClient::VirtualizationVmwareVirtualMachine` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `#{self.class.name}`. Please check the name to make sure it's valid. List of attributes: " + self.class.acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize super(attributes) if attributes.key?(:'class_id') self.class_id = attributes[:'class_id'] else self.class_id = 'virtualization.VmwareVirtualMachine' end if attributes.key?(:'object_type') self.object_type = attributes[:'object_type'] else self.object_type = 'virtualization.VmwareVirtualMachine' end if attributes.key?(:'annotation') self.annotation = attributes[:'annotation'] end if attributes.key?(:'config_name') self.config_name = attributes[:'config_name'] end if attributes.key?(:'connection_state') self.connection_state = attributes[:'connection_state'] end if attributes.key?(:'cpu_hot_add_enabled') self.cpu_hot_add_enabled = attributes[:'cpu_hot_add_enabled'] end if attributes.key?(:'cpu_shares') self.cpu_shares = attributes[:'cpu_shares'] end if attributes.key?(:'cpu_socket_info') self.cpu_socket_info = attributes[:'cpu_socket_info'] end if attributes.key?(:'custom_attributes') if (value = attributes[:'custom_attributes']).is_a?(Array) self.custom_attributes = value end end if attributes.key?(:'default_power_off_type') self.default_power_off_type = attributes[:'default_power_off_type'] end if attributes.key?(:'dhcp_enabled') self.dhcp_enabled = attributes[:'dhcp_enabled'] end if attributes.key?(:'disk_commit_info') self.disk_commit_info = attributes[:'disk_commit_info'] end if attributes.key?(:'dns_server_list') if (value = attributes[:'dns_server_list']).is_a?(Array) self.dns_server_list = value end end if attributes.key?(:'dns_suffix_list') if (value = attributes[:'dns_suffix_list']).is_a?(Array) self.dns_suffix_list = value end end if attributes.key?(:'extra_config') self.extra_config = attributes[:'extra_config'] end if attributes.key?(:'folder') self.folder = attributes[:'folder'] end if attributes.key?(:'guest_state') self.guest_state = attributes[:'guest_state'] else self.guest_state = 'Unknown' end if attributes.key?(:'host_compatibility') self.host_compatibility = attributes[:'host_compatibility'] end if attributes.key?(:'instance_uuid') self.instance_uuid = attributes[:'instance_uuid'] end if attributes.key?(:'inventory_path') self.inventory_path = attributes[:'inventory_path'] end if attributes.key?(:'is_template') self.is_template = attributes[:'is_template'] end if attributes.key?(:'mac_address') if (value = attributes[:'mac_address']).is_a?(Array) self.mac_address = value end end if attributes.key?(:'mem_shares') self.mem_shares = attributes[:'mem_shares'] end if attributes.key?(:'memory_hot_add_enabled') self.memory_hot_add_enabled = attributes[:'memory_hot_add_enabled'] end if attributes.key?(:'network_count') self.network_count = attributes[:'network_count'] end if attributes.key?(:'port_groups') if (value = attributes[:'port_groups']).is_a?(Array) self.port_groups = value end end if attributes.key?(:'protected_vm') self.protected_vm = attributes[:'protected_vm'] end if attributes.key?(:'remote_display_info') self.remote_display_info = attributes[:'remote_display_info'] end if attributes.key?(:'remote_display_vnc_enabled') self.remote_display_vnc_enabled = attributes[:'remote_display_vnc_enabled'] end if attributes.key?(:'resource_pool') self.resource_pool = attributes[:'resource_pool'] end if attributes.key?(:'resource_pool_owner') self.resource_pool_owner = attributes[:'resource_pool_owner'] end if attributes.key?(:'resource_pool_parent') self.resource_pool_parent = attributes[:'resource_pool_parent'] end if attributes.key?(:'tool_running_status') self.tool_running_status = attributes[:'tool_running_status'] end if attributes.key?(:'tools_version') self.tools_version = attributes[:'tools_version'] end if attributes.key?(:'virtual_disks') if (value = attributes[:'virtual_disks']).is_a?(Array) self.virtual_disks = value end end if attributes.key?(:'virtual_network_interfaces') if (value = attributes[:'virtual_network_interfaces']).is_a?(Array) self.virtual_network_interfaces = value end end if attributes.key?(:'vm_disk_count') self.vm_disk_count = attributes[:'vm_disk_count'] end if attributes.key?(:'vm_overall_status') self.vm_overall_status = attributes[:'vm_overall_status'] end if attributes.key?(:'vm_path') self.vm_path = attributes[:'vm_path'] end if attributes.key?(:'vm_version') self.vm_version = attributes[:'vm_version'] end if attributes.key?(:'vm_vnic_count') self.vm_vnic_count = attributes[:'vm_vnic_count'] end if attributes.key?(:'vnic_device_config_id') self.vnic_device_config_id = attributes[:'vnic_device_config_id'] end if attributes.key?(:'cluster') self.cluster = attributes[:'cluster'] end if attributes.key?(:'datacenter') self.datacenter = attributes[:'datacenter'] end if attributes.key?(:'datastores') if (value = attributes[:'datastores']).is_a?(Array) self.datastores = value end end if attributes.key?(:'host') self.host = attributes[:'host'] end if attributes.key?(:'networks') if (value = attributes[:'networks']).is_a?(Array) self.networks = value end end if attributes.key?(:'parent_folder') self.parent_folder = attributes[:'parent_folder'] end end |
Instance Attribute Details
#annotation ⇒ Object
List of annotations provided to this VM by user. Can be long.
26 27 28 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 26 def annotation @annotation end |
#class_id ⇒ Object
The fully-qualified name of the instantiated, concrete type. This property is used as a discriminator to identify the type of the payload when marshaling and unmarshaling data.
20 21 22 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 20 def class_id @class_id end |
#cluster ⇒ Object
Returns the value of attribute cluster.
133 134 135 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 133 def cluster @cluster end |
#config_name ⇒ Object
The configuration name for this VM. This maybe the same as the guest hostname.
29 30 31 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 29 def config_name @config_name end |
#connection_state ⇒ Object
Shows if virtual machine is connected to vCenter. Values are Connected, Disconnected, Orphaned, Inaccessible, and Invalid.
32 33 34 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 32 def connection_state @connection_state end |
#cpu_hot_add_enabled ⇒ Object
Indicates if the capability to add CPUs to a running VM is enabled.
35 36 37 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 35 def cpu_hot_add_enabled @cpu_hot_add_enabled end |
#cpu_shares ⇒ Object
Returns the value of attribute cpu_shares.
37 38 39 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 37 def cpu_shares @cpu_shares end |
#cpu_socket_info ⇒ Object
Returns the value of attribute cpu_socket_info.
39 40 41 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 39 def cpu_socket_info @cpu_socket_info end |
#custom_attributes ⇒ Object
Returns the value of attribute custom_attributes.
41 42 43 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 41 def custom_attributes @custom_attributes end |
#datacenter ⇒ Object
Returns the value of attribute datacenter.
135 136 137 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 135 def datacenter @datacenter end |
#datastores ⇒ Object
An array of relationships to virtualizationVmwareDatastore resources.
138 139 140 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 138 def datastores @datastores end |
#default_power_off_type ⇒ Object
Indicates how the VM will be powered off (soft, hard etc.).
44 45 46 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 44 def default_power_off_type @default_power_off_type end |
#dhcp_enabled ⇒ Object
Shows if DHCP is used for IP/DNS on this VM.
47 48 49 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 47 def dhcp_enabled @dhcp_enabled end |
#disk_commit_info ⇒ Object
Returns the value of attribute disk_commit_info.
49 50 51 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 49 def disk_commit_info @disk_commit_info end |
#dns_server_list ⇒ Object
Returns the value of attribute dns_server_list.
51 52 53 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 51 def dns_server_list @dns_server_list end |
#dns_suffix_list ⇒ Object
Returns the value of attribute dns_suffix_list.
53 54 55 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 53 def dns_suffix_list @dns_suffix_list end |
#extra_config ⇒ Object
Additional custom configuration settings applied to this VM. It is a set of name-value pairs stored as json.
56 57 58 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 56 def extra_config @extra_config end |
#folder ⇒ Object
The folder name associated with this VM.
59 60 61 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 59 def folder @folder end |
#guest_state ⇒ Object
The state of the guest OS running on this VM. Could be running, not running etc. * Unknown - Indicates that the guest OS state cannot be determined. * NotRunning - Indicates that the guest OS is not running. * Resetting - Indicates that the guest OS is resetting. * Running - Indicates that the guest OS is running normally. * ShuttingDown - Indicates that the guest OS is shutting down. * Standby - Indicates that the guest OS is in standby mode.
62 63 64 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 62 def guest_state @guest_state end |
#host ⇒ Object
Returns the value of attribute host.
140 141 142 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 140 def host @host end |
#host_compatibility ⇒ Object
Minimum host ESXi version required for the virtual machine.
65 66 67 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 65 def host_compatibility @host_compatibility end |
#instance_uuid ⇒ Object
UUID assigned by vCenter to every VM.
68 69 70 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 68 def instance_uuid @instance_uuid end |
#inventory_path ⇒ Object
Inventory path to the VM. Example - /DC/vm/folder/VMName.
71 72 73 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 71 def inventory_path @inventory_path end |
#is_template ⇒ Object
If true, indicates that the entity refers to a template of a virtual machine and not a real virtual machine.
74 75 76 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 74 def is_template @is_template end |
#mac_address ⇒ Object
Returns the value of attribute mac_address.
76 77 78 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 76 def mac_address @mac_address end |
#mem_shares ⇒ Object
Returns the value of attribute mem_shares.
78 79 80 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 78 def mem_shares @mem_shares end |
#memory_hot_add_enabled ⇒ Object
Adding memory to a running VM.
81 82 83 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 81 def memory_hot_add_enabled @memory_hot_add_enabled end |
#network_count ⇒ Object
Indicates how many networks are used by this VM.
84 85 86 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 84 def network_count @network_count end |
#networks ⇒ Object
An array of relationships to virtualizationBaseNetwork resources.
143 144 145 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 143 def networks @networks end |
#object_type ⇒ Object
The fully-qualified name of the instantiated, concrete type. The value should be the same as the ‘ClassId’ property.
23 24 25 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 23 def object_type @object_type end |
#parent_folder ⇒ Object
Returns the value of attribute parent_folder.
145 146 147 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 145 def parent_folder @parent_folder end |
#port_groups ⇒ Object
Returns the value of attribute port_groups.
86 87 88 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 86 def port_groups @port_groups end |
#protected_vm ⇒ Object
Shows if this is a protected VM. VMs can be in protection groups.
89 90 91 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 89 def protected_vm @protected_vm end |
#remote_display_info ⇒ Object
Returns the value of attribute remote_display_info.
91 92 93 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 91 def remote_display_info @remote_display_info end |
#remote_display_vnc_enabled ⇒ Object
Shows if support for a remote VNC access is enabled.
94 95 96 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 94 def remote_display_vnc_enabled @remote_display_vnc_enabled end |
#resource_pool ⇒ Object
Name of the resource pool to which this VM belongs (optional).
97 98 99 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 97 def resource_pool @resource_pool end |
#resource_pool_owner ⇒ Object
Who owns the resource pool.
100 101 102 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 100 def resource_pool_owner @resource_pool_owner end |
#resource_pool_parent ⇒ Object
The parent of the current resource pool to which this VM belongs.
103 104 105 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 103 def resource_pool_parent @resource_pool_parent end |
#tool_running_status ⇒ Object
Indicates if guest tools are running on this VM. Could be set to guestToolNotRunning or guestToolsRunning.
106 107 108 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 106 def tool_running_status @tool_running_status end |
#tools_version ⇒ Object
The version of the guest tools, usually not specified.
109 110 111 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 109 def tools_version @tools_version end |
#virtual_disks ⇒ Object
Returns the value of attribute virtual_disks.
111 112 113 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 111 def virtual_disks @virtual_disks end |
#virtual_network_interfaces ⇒ Object
Returns the value of attribute virtual_network_interfaces.
113 114 115 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 113 def virtual_network_interfaces @virtual_network_interfaces end |
#vm_disk_count ⇒ Object
Shows the number of disks assigned to this VM.
116 117 118 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 116 def vm_disk_count @vm_disk_count end |
#vm_overall_status ⇒ Object
The operational state of the VM. Could be Available, Provisioned, Maintenance mode, Deleting, etc.
119 120 121 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 119 def vm_overall_status @vm_overall_status end |
#vm_path ⇒ Object
Path to the vmx file of the VM. Example - [datastore3] VCSA-134/VCSA-134.vmx.
122 123 124 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 122 def vm_path @vm_path end |
#vm_version ⇒ Object
Information about the version of this VM (vmx-09, vmx-11 etc.).
125 126 127 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 125 def vm_version @vm_version end |
#vm_vnic_count ⇒ Object
How many vnics are present.
128 129 130 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 128 def vm_vnic_count @vm_vnic_count end |
#vnic_device_config_id ⇒ Object
Information related to the guest info’s VNIC virtual device. It is a comma-separated list.
131 132 133 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 131 def vnic_device_config_id @vnic_device_config_id end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns the key-value map of all the JSON attributes this model knows about, including the ones defined in its parent(s)
229 230 231 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 229 def self.acceptable_attribute_map attribute_map.merge(superclass.acceptable_attribute_map) end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about, including the ones defined in its parent(s)
224 225 226 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 224 def self.acceptable_attributes attribute_map.values.concat(superclass.acceptable_attributes) end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
170 171 172 173 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 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 170 def self.attribute_map { :'class_id' => :'ClassId', :'object_type' => :'ObjectType', :'annotation' => :'Annotation', :'config_name' => :'ConfigName', :'connection_state' => :'ConnectionState', :'cpu_hot_add_enabled' => :'CpuHotAddEnabled', :'cpu_shares' => :'CpuShares', :'cpu_socket_info' => :'CpuSocketInfo', :'custom_attributes' => :'CustomAttributes', :'default_power_off_type' => :'DefaultPowerOffType', :'dhcp_enabled' => :'DhcpEnabled', :'disk_commit_info' => :'DiskCommitInfo', :'dns_server_list' => :'DnsServerList', :'dns_suffix_list' => :'DnsSuffixList', :'extra_config' => :'ExtraConfig', :'folder' => :'Folder', :'guest_state' => :'GuestState', :'host_compatibility' => :'HostCompatibility', :'instance_uuid' => :'InstanceUuid', :'inventory_path' => :'InventoryPath', :'is_template' => :'IsTemplate', :'mac_address' => :'MacAddress', :'mem_shares' => :'MemShares', :'memory_hot_add_enabled' => :'MemoryHotAddEnabled', :'network_count' => :'NetworkCount', :'port_groups' => :'PortGroups', :'protected_vm' => :'ProtectedVm', :'remote_display_info' => :'RemoteDisplayInfo', :'remote_display_vnc_enabled' => :'RemoteDisplayVncEnabled', :'resource_pool' => :'ResourcePool', :'resource_pool_owner' => :'ResourcePoolOwner', :'resource_pool_parent' => :'ResourcePoolParent', :'tool_running_status' => :'ToolRunningStatus', :'tools_version' => :'ToolsVersion', :'virtual_disks' => :'VirtualDisks', :'virtual_network_interfaces' => :'VirtualNetworkInterfaces', :'vm_disk_count' => :'VmDiskCount', :'vm_overall_status' => :'VmOverallStatus', :'vm_path' => :'VmPath', :'vm_version' => :'VmVersion', :'vm_vnic_count' => :'VmVnicCount', :'vnic_device_config_id' => :'VnicDeviceConfigId', :'cluster' => :'Cluster', :'datacenter' => :'Datacenter', :'datastores' => :'Datastores', :'host' => :'Host', :'networks' => :'Networks', :'parent_folder' => :'ParentFolder' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
702 703 704 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 702 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3)
309 310 311 312 313 314 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 309 def self.openapi_all_of [ :'VirtualizationBaseVirtualMachine', :'VirtualizationVmwareVirtualMachineAllOf' ] end |
.openapi_discriminator_name ⇒ Object
discriminator’s property name in OpenAPI v3
317 318 319 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 317 def self.openapi_discriminator_name :'ClassId' end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 288 def self.openapi_nullable Set.new([ :'cpu_shares', :'cpu_socket_info', :'custom_attributes', :'disk_commit_info', :'dns_server_list', :'dns_suffix_list', :'extra_config', :'mac_address', :'mem_shares', :'port_groups', :'remote_display_info', :'virtual_disks', :'virtual_network_interfaces', :'datastores', :'networks', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
234 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 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 234 def self.openapi_types { :'class_id' => :'String', :'object_type' => :'String', :'annotation' => :'String', :'config_name' => :'String', :'connection_state' => :'String', :'cpu_hot_add_enabled' => :'Boolean', :'cpu_shares' => :'VirtualizationVmwareVmCpuShareInfo', :'cpu_socket_info' => :'VirtualizationVmwareVmCpuSocketInfo', :'custom_attributes' => :'Array<String>', :'default_power_off_type' => :'String', :'dhcp_enabled' => :'Boolean', :'disk_commit_info' => :'VirtualizationVmwareVmDiskCommitInfo', :'dns_server_list' => :'Array<String>', :'dns_suffix_list' => :'Array<String>', :'extra_config' => :'Object', :'folder' => :'String', :'guest_state' => :'String', :'host_compatibility' => :'String', :'instance_uuid' => :'String', :'inventory_path' => :'String', :'is_template' => :'Boolean', :'mac_address' => :'Array<String>', :'mem_shares' => :'VirtualizationVmwareVmMemoryShareInfo', :'memory_hot_add_enabled' => :'Boolean', :'network_count' => :'Integer', :'port_groups' => :'Array<String>', :'protected_vm' => :'Boolean', :'remote_display_info' => :'VirtualizationVmwareRemoteDisplayInfo', :'remote_display_vnc_enabled' => :'Boolean', :'resource_pool' => :'String', :'resource_pool_owner' => :'String', :'resource_pool_parent' => :'String', :'tool_running_status' => :'String', :'tools_version' => :'String', :'virtual_disks' => :'Array<Integer>', :'virtual_network_interfaces' => :'Array<Integer>', :'vm_disk_count' => :'Integer', :'vm_overall_status' => :'String', :'vm_path' => :'String', :'vm_version' => :'String', :'vm_vnic_count' => :'Integer', :'vnic_device_config_id' => :'String', :'cluster' => :'VirtualizationVmwareClusterRelationship', :'datacenter' => :'VirtualizationVmwareDatacenterRelationship', :'datastores' => :'Array<VirtualizationVmwareDatastoreRelationship>', :'host' => :'VirtualizationVmwareHostRelationship', :'networks' => :'Array<VirtualizationBaseNetworkRelationship>', :'parent_folder' => :'VirtualizationVmwareFolderRelationship' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 634 def ==(o) return true if self.equal?(o) self.class == o.class && class_id == o.class_id && object_type == o.object_type && annotation == o.annotation && config_name == o.config_name && connection_state == o.connection_state && cpu_hot_add_enabled == o.cpu_hot_add_enabled && cpu_shares == o.cpu_shares && cpu_socket_info == o.cpu_socket_info && custom_attributes == o.custom_attributes && default_power_off_type == o.default_power_off_type && dhcp_enabled == o.dhcp_enabled && disk_commit_info == o.disk_commit_info && dns_server_list == o.dns_server_list && dns_suffix_list == o.dns_suffix_list && extra_config == o.extra_config && folder == o.folder && guest_state == o.guest_state && host_compatibility == o.host_compatibility && instance_uuid == o.instance_uuid && inventory_path == o.inventory_path && is_template == o.is_template && mac_address == o.mac_address && mem_shares == o.mem_shares && memory_hot_add_enabled == o.memory_hot_add_enabled && network_count == o.network_count && port_groups == o.port_groups && protected_vm == o.protected_vm && remote_display_info == o.remote_display_info && remote_display_vnc_enabled == o.remote_display_vnc_enabled && resource_pool == o.resource_pool && resource_pool_owner == o.resource_pool_owner && resource_pool_parent == o.resource_pool_parent && tool_running_status == o.tool_running_status && tools_version == o.tools_version && virtual_disks == o.virtual_disks && virtual_network_interfaces == o.virtual_network_interfaces && vm_disk_count == o.vm_disk_count && vm_overall_status == o.vm_overall_status && vm_path == o.vm_path && vm_version == o.vm_version && vm_vnic_count == o.vm_vnic_count && vnic_device_config_id == o.vnic_device_config_id && cluster == o.cluster && datacenter == o.datacenter && datastores == o.datastores && host == o.host && networks == o.networks && parent_folder == o.parent_folder && super(o) end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 733 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = IntersightClient.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
804 805 806 807 808 809 810 811 812 813 814 815 816 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 804 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 709 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) super(attributes) VirtualizationVmwareVirtualMachine.openapi_types.each_pair do |key, type| if attributes[VirtualizationVmwareVirtualMachine.attribute_map[key]].nil? && VirtualizationVmwareVirtualMachine.openapi_nullable.include?(key) self.send("#{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[VirtualizationVmwareVirtualMachine.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[VirtualizationVmwareVirtualMachine.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[VirtualizationVmwareVirtualMachine.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[VirtualizationVmwareVirtualMachine.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
689 690 691 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 689 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
695 696 697 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 695 def hash [class_id, object_type, annotation, config_name, connection_state, cpu_hot_add_enabled, cpu_shares, cpu_socket_info, custom_attributes, default_power_off_type, dhcp_enabled, disk_commit_info, dns_server_list, dns_suffix_list, extra_config, folder, guest_state, host_compatibility, instance_uuid, inventory_path, is_template, mac_address, mem_shares, memory_hot_add_enabled, network_count, port_groups, protected_vm, remote_display_info, remote_display_vnc_enabled, resource_pool, resource_pool_owner, resource_pool_parent, tool_running_status, tools_version, virtual_disks, virtual_network_interfaces, vm_disk_count, vm_overall_status, vm_path, vm_version, vm_vnic_count, vnic_device_config_id, cluster, datacenter, datastores, host, networks, parent_folder].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 558 def list_invalid_properties invalid_properties = super if @class_id.nil? invalid_properties.push('invalid value for "class_id", class_id cannot be nil.') end if @object_type.nil? invalid_properties.push('invalid value for "object_type", object_type cannot be nil.') end pattern = Regexp.new(/^$|^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/) if !@instance_uuid.nil? && @instance_uuid !~ pattern invalid_properties.push("invalid value for \"instance_uuid\", must conform to the pattern #{pattern}.") end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
780 781 782 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 780 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
786 787 788 789 790 791 792 793 794 795 796 797 798 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 786 def to_hash hash = super VirtualizationVmwareVirtualMachine.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = VirtualizationVmwareVirtualMachine.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
774 775 776 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 774 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
578 579 580 581 582 583 584 585 586 587 588 589 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_machine.rb', line 578 def valid? return false if @class_id.nil? class_id_validator = EnumAttributeValidator.new('String', ["virtualization.VmwareVirtualMachine"]) return false unless class_id_validator.valid?(@class_id) return false if @object_type.nil? object_type_validator = EnumAttributeValidator.new('String', ["virtualization.VmwareVirtualMachine"]) return false unless object_type_validator.valid?(@object_type) guest_state_validator = EnumAttributeValidator.new('String', ["Unknown", "NotRunning", "Resetting", "Running", "ShuttingDown", "Standby"]) return false unless guest_state_validator.valid?(@guest_state) return false if !@instance_uuid.nil? && @instance_uuid !~ Regexp.new(/^$|^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/) true && super end |