Sha256: 389ebf028af7513eb4b2fe19b17542ef499ff310a706e960654c50da4f792447
Contents?: true
Size: 734 Bytes
Versions: 73
Compression:
Stored size: 734 Bytes
Contents
module Fog module Compute class Vsphere class Real def get_vm_first_scsi_controller(vm_id) Fog::Compute::Vsphere::SCSIController.new(get_vm_first_scsi_controller_raw(vm_id)) end def get_vm_first_scsi_controller_raw(vm_id) ctrl=get_vm_ref(vm_id).config.hardware.device.grep(RbVmomi::VIM::VirtualSCSIController).select{ | ctrl | ctrl.key == 1000 }.first { :type => ctrl.class.to_s, :shared_bus => ctrl.sharedBus.to_s, :unit_number => ctrl.scsiCtlrUnitNumber, :key => ctrl.key, } end end class Mock def get_vm_first_scsi_controller(vm_id) end end end end end
Version data entries
73 entries across 73 versions & 5 rubygems