Class: IbmPowerHmc::IOSlot

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

Overview

I/O Slot information

Constant Summary collapse

ATTRS =
{
  :description => "Description",
  :lpar_id => "PartitionID",
  :lpar_name => "PartitionName",
  :lpar_type => "PartitionType",
  :pci_class => "PCIClass",
  :pci_dev => "PCIDeviceID",
  :pci_subsys_dev => "PCISubsystemDeviceID",
  :pci_man => "PCIManufacturerID",
  :pci_rev => "PCIRevisionID",
  :pci_vendor => "PCIVendorID",
  :pci_subsys_vendor => "PCISubsystemVendorID",
  :dr_name => "SlotDynamicReconfigurationConnectorName",
  :physloc => "SlotPhysicalLocationCode",
  :sriov_capable_dev => "SRIOVCapableDevice",
  :sriov_capable => "SRIOVCapableSlot",
  :vpd_model => "VitalProductDataModel",
  :vpd_serial => "VitalProductDataSerialNumber",
  :vpd_stale => "VitalProductDataStale",
  :vpd_type => "VitalProductDataType"
}.freeze

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

#featuresObject



146
147
148
149
150
# File 'lib/ibm_power_hmc/schema/uom.rb', line 146

def features
  xml.get_elements("FeatureCodes").map do |elem|
    elem.text&.strip
  end.compact
end

#io_adapterObject



139
140
141
142
143
144
# File 'lib/ibm_power_hmc/schema/uom.rb', line 139

def io_adapter
  elem = xml.elements["RelatedIOAdapter/*[1]"]
  Module.const_get("IbmPowerHmc::#{elem.name}").new(elem) unless elem.nil?
rescue NameError
  nil
end

#ior_devicesObject



152
153
154
# File 'lib/ibm_power_hmc/schema/uom.rb', line 152

def ior_devices
  collection_of("IORDevices", "IORDevice")
end