Class: IbmPowerHmc::VirtualIOServer
- Inherits:
-
BasePartition
- Object
- AbstractNonRest
- AbstractRest
- BasePartition
- IbmPowerHmc::VirtualIOServer
- Defined in:
- lib/ibm_power_hmc/schema/uom.rb
Overview
VIOS information
Constant Summary
Constants inherited from BasePartition
Constants inherited from AbstractNonRest
Instance Attribute Summary
Attributes inherited from AbstractRest
#content_type, #etag, #href, #published, #uuid
Attributes inherited from AbstractNonRest
Instance Method Summary collapse
- #capabilities ⇒ Object
- #pvs ⇒ Object
- #rep ⇒ Object
- #seas ⇒ Object
- #trunks ⇒ Object
-
#vfc_mapping_delete!(location) ⇒ Object
Remove VFC mapping (vfchostX) from XML.
-
#vfc_mapping_unmap!(location) ⇒ Object
Remove FC adapter mapping (fcsX) from XML.
- #vfc_mappings ⇒ Object
- #vg_uuids ⇒ Object
-
#vscsi_mapping_delete!(location) ⇒ Object
Remove VSCSI mapping (vhostX) from XML.
-
#vscsi_mapping_unmap!(target) ⇒ Object
Remove VSCSI target (vtscsiX) from XML.
- #vscsi_mappings ⇒ Object
Methods inherited from BasePartition
#group_uuids, #io_adapters, #io_slots, #lhea_ports, #net_adap_uuids, #paging_vios_uuid, #paging_vios_uuids, #shared_processor_pool_uuid, #sriov_elp_uuids, #sys_uuid
Methods inherited from AbstractRest
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
#capabilities ⇒ Object
339 340 341 342 343 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 339 def capabilities xml.get_elements("VirtualIOServerCapabilities/*").map do |elem| elem.name if elem.text&.strip == "true" end.compact.concat(super) end |
#pvs ⇒ Object
345 346 347 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 345 def pvs collection_of("PhysicalVolumes", "PhysicalVolume") end |
#rep ⇒ Object
353 354 355 356 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 353 def rep elem = xml.elements["MediaRepositories/VirtualMediaRepository"] VirtualMediaRepository.new(elem) unless elem.nil? end |
#seas ⇒ Object
395 396 397 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 395 def seas collection_of("SharedEthernetAdapters", "SharedEthernetAdapter") end |
#trunks ⇒ Object
399 400 401 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 399 def trunks collection_of("TrunkAdapters", "TrunkAdapter") end |
#vfc_mapping_delete!(location) ⇒ Object
Remove VFC mapping (vfchostX) from XML
380 381 382 383 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 380 def vfc_mapping_delete!(location) mapping = vfc_mappings.find { |m| m.server&.location == location } mapping.xml.parent.delete(mapping.xml) unless mapping.nil? end |
#vfc_mapping_unmap!(location) ⇒ Object
Remove FC adapter mapping (fcsX) from XML
386 387 388 389 390 391 392 393 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 386 def vfc_mapping_unmap!(location) mapping = vfc_mappings.find { |m| m.port && m.server&.location == location } return if mapping.nil? mapping.port.xml.parent.delete(mapping.port.xml) mapping.server.map_port = nil mapping.server.xml.delete(mapping.server.port.xml) unless mapping.server.port.nil? end |
#vfc_mappings ⇒ Object
375 376 377 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 375 def vfc_mappings collection_of("VirtualFibreChannelMappings", "VirtualFibreChannelMapping") end |
#vg_uuids ⇒ Object
349 350 351 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 349 def vg_uuids uuids_from_links("StoragePools") end |
#vscsi_mapping_delete!(location) ⇒ Object
Remove VSCSI mapping (vhostX) from XML
363 364 365 366 367 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 363 def vscsi_mapping_delete!(location) vscsi_mappings.each do |mapping| mapping.xml.parent.delete(mapping.xml) if mapping.server&.location == location end end |
#vscsi_mapping_unmap!(target) ⇒ Object
Remove VSCSI target (vtscsiX) from XML
370 371 372 373 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 370 def vscsi_mapping_unmap!(target) mapping = vscsi_mappings.find { |m| m.device&.target == target } mapping.xml.parent.delete(mapping.xml) unless mapping.nil? end |
#vscsi_mappings ⇒ Object
358 359 360 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 358 def vscsi_mappings collection_of("VirtualSCSIMappings", "VirtualSCSIMapping") end |