Sha256: cc39f2fc639d094043e9328ab04ef9ba90bf43b63db929d72834365506ac8c5e
Contents?: true
Size: 734 Bytes
Versions: 2
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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fog-1.22.0 | lib/fog/vsphere/requests/compute/get_vm_first_scsi_controller.rb |
fog-1.21.0 | lib/fog/vsphere/requests/compute/get_vm_first_scsi_controller.rb |