class MiqHostStorageSystem

Attributes

invObj[R]

Public Class Methods

new(hssMor, invObj) click to toggle source
# File lib/VMwareWebService/MiqHostStorageSystem.rb, line 4
def initialize(hssMor, invObj)
  @invObj = invObj
  @hssMor = hssMor
end

Public Instance Methods

addInternetScsiSendTargets(iScsiHbaDevice, targets) click to toggle source
# File lib/VMwareWebService/MiqHostStorageSystem.rb, line 38
def addInternetScsiSendTargets(iScsiHbaDevice, targets)
  ta = targets.kind_of?(Array) ? targets : [targets]
  unless ta.first.kind_of?(VimHash)
    nta = VimArray.new("ArrayOfHostInternetScsiHbaSendTarget") do |nt|
      ta.each do |t|
        nt << VimHash.new("HostInternetScsiHbaSendTarget") { |st| st.address = t }
      end
    end
    ta = nta
  end
  @invObj.addInternetScsiSendTargets(@hssMor, iScsiHbaDevice, ta)
end
addInternetScsiStaticTargets(iScsiHbaDevice, targets) click to toggle source
# File lib/VMwareWebService/MiqHostStorageSystem.rb, line 51
def addInternetScsiStaticTargets(iScsiHbaDevice, targets)
  @invObj.addInternetScsiStaticTargets(@hssMor, iScsiHbaDevice, targets)
end
fileSystemVolumeInfo() click to toggle source
# File lib/VMwareWebService/MiqHostStorageSystem.rb, line 9
def fileSystemVolumeInfo
  @invObj.getMoProp(@hssMor, 'fileSystemVolumeInfo')['fileSystemVolumeInfo']
end
hostBusAdaptersByType(hbaType) click to toggle source

hbaType:

HostBlockHba, HostFibreChannelHba, HostInternetScsiHba, HostParallelScsiHba
# File lib/VMwareWebService/MiqHostStorageSystem.rb, line 25
def hostBusAdaptersByType(hbaType)
  storageDeviceInfo.hostBusAdapter.delete_if { |hba| hba.xsiType != hbaType }
end
multipathStateInfo() click to toggle source
# File lib/VMwareWebService/MiqHostStorageSystem.rb, line 13
def multipathStateInfo
  @invObj.getMoProp(@hssMor, 'multipathStateInfo')['multipathStateInfo']
end
softwareInternetScsiEnabled?() click to toggle source
# File lib/VMwareWebService/MiqHostStorageSystem.rb, line 29
def softwareInternetScsiEnabled?
  sise = @invObj.getMoProp(@hssMor, 'storageDeviceInfo.softwareInternetScsiEnabled')['storageDeviceInfo']['softwareInternetScsiEnabled']
  sise == 'true'
end
storageDeviceInfo() click to toggle source
# File lib/VMwareWebService/MiqHostStorageSystem.rb, line 17
def storageDeviceInfo
  @invObj.getMoProp(@hssMor, 'storageDeviceInfo')['storageDeviceInfo']
end
updateSoftwareInternetScsiEnabled(enabled) click to toggle source
# File lib/VMwareWebService/MiqHostStorageSystem.rb, line 34
def updateSoftwareInternetScsiEnabled(enabled)
  @invObj.updateSoftwareInternetScsiEnabled(@hssMor, enabled)
end