Class: IbmPowerHmc::SharedMemoryPool

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

Overview

Shared Memory Pool

Constant Summary collapse

ATTRS =
{
  :pool_mb => "CurrentPoolMemory",
  :available_mb => "CurrentAvailablePoolMemory",
  :max_mb => "CurrentMaximumPoolMemory",
  :sys_mb =>"SystemFirmwarePoolMemory",
  :pool_id => "PoolID",
  :dedup => "MemoryDeduplicationEnabled"
}.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

#lpar_uuidsObject



921
922
923
924
925
926
927
# File 'lib/ibm_power_hmc/schema/uom.rb', line 921

def lpar_uuids
  REXML::XPath.match(xml, "PagingDevices/ReservedStorageDevice").map do |dev|
    if (lpar = dev.elements["AssociatedLogicalPartition"])
      uuid_from_href(lpar.attributes["href"])
    end
  end.compact
end

#paging_vios_uuidsObject



913
914
915
916
917
918
919
# File 'lib/ibm_power_hmc/schema/uom.rb', line 913

def paging_vios_uuids
  ["PagingServicePartitionOne", "PagingServicePartitionTwo"].map do |attr|
    if (vios_href = singleton(attr, "href"))
      uuid_from_href(vios_href)
    end
  end
end

#sys_uuidObject



929
930
931
# File 'lib/ibm_power_hmc/schema/uom.rb', line 929

def sys_uuid
  uuid_from_href(href, -3)
end