Module | Fog::Compute::Vsphere::Shared
In: | lib/fog/vsphere/compute.rb lib/fog/vsphere/requests/compute/find_vm_by_ref.rb lib/fog/vsphere/requests/compute/vm_clone.rb lib/fog/vsphere/requests/compute/vm_create.rb

### Methods

convert_vm_mob_ref_to_attr_hash find_vm_by_ref

### Constants

ATTR_TO_PROP

=

{ :id => 'config.instanceUuid', :name => 'name', :uuid => 'config.uuid', :instance_uuid => 'config.instanceUuid', :hostname => 'summary.guest.hostName', :operatingsystem => 'summary.guest.guestFullName', :ipaddress => 'guest.ipAddress', :power_state => 'runtime.powerState', :connection_state => 'runtime.connectionState', :hypervisor => 'runtime.host', :tools_state => 'guest.toolsStatus', :tools_version => 'guest.toolsVersionStatus', :is_a_template => 'config.template', :memory_mb => 'config.hardware.memoryMB', :cpus => 'config.hardware.numCPU', }

### Attributes

vsphere_is_vcenter | [R] |
vsphere_rev | [R] |
vsphere_server | [R] |
vsphere_username | [R] |

### Public Instance methods

convert_vm_mob_ref_to_attr_hash(vm_mob_ref)

Utility method to convert a VMware managed object into an attribute hash. This should only really be necessary for the real class. This method is expected to be called by the request methods in order to massage VMware Managed Object References into Attribute Hashes.

find_vm_by_ref(options = {})

REVISIT: This is a naive implementation and not very efficient since we find ALL VM‘s and then iterate over them looking for the managed object reference id… There should be an easier way to obtain a reference to a VM using only the name or the _ref. This request is primarily intended to reload the attributes of a cloning VM which does not yet have an instance_uuid

[Validate]