Class: IbmPowerHmc::ManagedSystem

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

Overview

Managed System information

Constant Summary collapse

ATTRS =
{
  :name => "SystemName",
  :state => "State",
  :hostname => "Hostname",
  :ipaddr => "PrimaryIPAddress",
  :description => "Description",
  :location => "SystemLocation", # Rack/Unit
  :ref_code => "ReferenceCode",
  :fwversion => "SystemFirmware",
  :memory => "AssociatedSystemMemoryConfiguration/InstalledSystemMemory",
  :avail_mem => "AssociatedSystemMemoryConfiguration/CurrentAvailableSystemMemory",
  :cpus => "AssociatedSystemProcessorConfiguration/InstalledSystemProcessorUnits",
  :avail_cpus => "AssociatedSystemProcessorConfiguration/CurrentAvailableSystemProcessorUnits",
  :mtype => "MachineTypeModelAndSerialNumber/MachineType",
  :model => "MachineTypeModelAndSerialNumber/Model",
  :serial => "MachineTypeModelAndSerialNumber/SerialNumber",
  :vtpm_version => "AssociatedSystemSecurity/VirtualTrustedPlatformModuleVersion",
  :vtpm_lpars => "AssociatedSystemSecurity/AvailableVirtualTrustedPlatformModulePartitions",
  :is_classic_hmc_mgmt => "IsClassicHMCManagement",
  :is_hmc_mgmt_master => "IsHMCPowerVMManagementMaster"
}.freeze

Instance Attribute Summary

Attributes inherited from AbstractRest

#content_type, #etag, #href, #published, #uuid

Attributes inherited from AbstractNonRest

#xml

Instance Method Summary collapse

Methods inherited from AbstractRest

#initialize, #to_s

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::AbstractRest

Instance Method Details

#capabilitiesObject



77
78
79
80
81
# File 'lib/ibm_power_hmc/schema/uom.rb', line 77

def capabilities
  xml.get_elements("AssociatedSystemCapabilities/*").map do |elem|
    elem.name if elem.text&.strip == "true"
  end.compact
end

#cpu_compat_modesObject



83
84
85
86
87
# File 'lib/ibm_power_hmc/schema/uom.rb', line 83

def cpu_compat_modes
  xml.get_elements("AssociatedSystemProcessorConfiguration/SupportedPartitionProcessorCompatibilityModes").map do |elem|
    elem.text&.strip
  end.compact
end

#group_uuidsObject



69
70
71
# File 'lib/ibm_power_hmc/schema/uom.rb', line 69

def group_uuids
  uuids_from_links("AssociatedGroups")
end

#io_adaptersObject

Deprecated: use io_slots.io_adapter



98
99
100
# File 'lib/ibm_power_hmc/schema/uom.rb', line 98

def io_adapters
  collection_of("AssociatedSystemIOConfiguration/IOSlots/IOSlot/RelatedIOAdapter", "IOAdapter")
end

#io_slotsObject



102
103
104
# File 'lib/ibm_power_hmc/schema/uom.rb', line 102

def io_slots
  collection_of("AssociatedSystemIOConfiguration/IOSlots", "IOSlot")
end

#lpars_uuidsObject



89
90
91
# File 'lib/ibm_power_hmc/schema/uom.rb', line 89

def lpars_uuids
  uuids_from_links("AssociatedLogicalPartitions")
end

#networks_uuidsObject



110
111
112
# File 'lib/ibm_power_hmc/schema/uom.rb', line 110

def networks_uuids
  uuids_from_links("AssociatedSystemIOConfiguration/AssociatedSystemVirtualNetwork/VirtualNetworks")
end

#timeObject



73
74
75
# File 'lib/ibm_power_hmc/schema/uom.rb', line 73

def time
  timestamp("SystemTime")
end

#vioses_uuidsObject



93
94
95
# File 'lib/ibm_power_hmc/schema/uom.rb', line 93

def vioses_uuids
  uuids_from_links("AssociatedVirtualIOServers")
end

#vswitches_uuidsObject



106
107
108
# File 'lib/ibm_power_hmc/schema/uom.rb', line 106

def vswitches_uuids
  uuids_from_links("AssociatedSystemIOConfiguration/AssociatedSystemVirtualNetwork/VirtualSwitches")
end