Class: IbmPowerHmc::VirtualSCSIMapping

Inherits:
AbstractNonRest show all
Defined in:
lib/ibm_power_hmc/schema/uom.rb

Overview

Virtual SCSI mapping information

Constant Summary

Constants inherited from AbstractNonRest

AbstractNonRest::ATTRS

Instance Attribute Summary

Attributes inherited from AbstractNonRest

#xml

Instance Method Summary collapse

Methods inherited from AbstractNonRest

#collection_of, #create_element, #initialize, marshal, #marshal, #singleton, #timestamp, #to_s, #uuid_from_href, #uuids_from_links

Constructor Details

This class inherits a constructor from IbmPowerHmc::AbstractNonRest

Instance Method Details

#clientObject



707
708
709
710
# File 'lib/ibm_power_hmc/schema/uom.rb', line 707

def client
  elem = xml.elements["ClientAdapter"]
  VirtualSCSIClientAdapter.new(elem) unless elem.nil?
end

#deviceObject



729
730
731
732
733
734
735
736
737
738
739
740
# File 'lib/ibm_power_hmc/schema/uom.rb', line 729

def device
  # Possible backing device types are:
  # LogicalVolumeVirtualTargetDevice, PhysicalVolumeVirtualTargetDevice,
  # SharedStoragePoolLogicalUnitVirtualTargetDevice, VirtualOpticalTargetDevice,
  # SharedFileSystemFileVirtualTargetDevice
  elem = xml.elements["TargetDevice/*[1]"]
  begin
    Module.const_get("IbmPowerHmc::#{elem.name}").new(elem) unless elem.nil?
  rescue NameError
    nil
  end
end

#lpar_uuidObject



702
703
704
705
# File 'lib/ibm_power_hmc/schema/uom.rb', line 702

def lpar_uuid
  href = singleton("AssociatedLogicalPartition", "href")
  uuid_from_href(href) unless href.nil?
end

#serverObject



712
713
714
715
# File 'lib/ibm_power_hmc/schema/uom.rb', line 712

def server
  elem = xml.elements["ServerAdapter"]
  VirtualSCSIServerAdapter.new(elem) unless elem.nil?
end

#storageObject



717
718
719
720
721
722
723
724
725
726
727
# File 'lib/ibm_power_hmc/schema/uom.rb', line 717

def storage
  # Possible storage types are:
  # LogicalUnit, PhysicalVolume, VirtualDisk, VirtualOpticalMedia,
  # SharedFileSystemFile
  elem = xml.elements["Storage/*[1]"]
  begin
    Module.const_get("IbmPowerHmc::#{elem.name}").new(elem) unless elem.nil?
  rescue NameError
    nil
  end
end