lib/fog/vsphere/compute.rb in fog-1.22.1 vs lib/fog/vsphere/compute.rb in fog-1.23.0
- old
+ new
@@ -107,10 +107,11 @@
:memory_mb => 'config.hardware.memoryMB',
:cpus => 'config.hardware.numCPU',
:corespersocket => 'config.hardware.numCoresPerSocket',
:overall_status => 'overallStatus',
:guest_id => 'config.guestId',
+ :hardware_version => 'config.version',
}
def convert_vm_view_to_attr_hash(vms)
vms = @connection.serviceContent.propertyCollector.collectMultiple(vms,*ATTR_TO_PROP.values.uniq)
vms.map { |vm| props_to_attr_hash(*vm) }
@@ -151,10 +152,9 @@
# This inline rescue catches any standard error. While a VM is
# cloning, a call to the macs method will throw and NoMethodError
attrs['mac_addresses'] = Proc.new {vm_mob_ref.macs rescue nil}
# Rescue nil to catch testing while vm_mob_ref isn't reaL??
attrs['path'] = "/"+attrs['parent'].path.map(&:last).join('/') rescue nil
- attrs['relative_path'] = (attrs['path'].split('/').reject {|e| e.empty?} - ["Datacenters", attrs['datacenter'], "vm"]).join("/") rescue nil
end
end
# returns the parent object based on a type
# provides both real RbVmomi object and its name.
# e.g.