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
342 343 344 345 346 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 342 def capabilities xml.get_elements("VirtualIOServerCapabilities/*").map do |elem| elem.name if elem.text&.strip == "true" end.compact.concat(super) end |
#pvs ⇒ Object
348 349 350 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 348 def pvs collection_of("PhysicalVolumes", "PhysicalVolume") end |
#rep ⇒ Object
356 357 358 359 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 356 def rep elem = xml.elements["MediaRepositories/VirtualMediaRepository"] VirtualMediaRepository.new(elem) unless elem.nil? end |
#seas ⇒ Object
398 399 400 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 398 def seas collection_of("SharedEthernetAdapters", "SharedEthernetAdapter") end |
#trunks ⇒ Object
402 403 404 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 402 def trunks collection_of("TrunkAdapters", "TrunkAdapter") end |
#vfc_mapping_delete!(location) ⇒ Object
Remove VFC mapping (vfchostX) from XML
383 384 385 386 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 383 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
389 390 391 392 393 394 395 396 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 389 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
378 379 380 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 378 def vfc_mappings collection_of("VirtualFibreChannelMappings", "VirtualFibreChannelMapping") end |
#vg_uuids ⇒ Object
352 353 354 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 352 def vg_uuids uuids_from_links("StoragePools") end |
#vscsi_mapping_delete!(location) ⇒ Object
Remove VSCSI mapping (vhostX) from XML
366 367 368 369 370 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 366 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
373 374 375 376 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 373 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
361 362 363 |
# File 'lib/ibm_power_hmc/schema/uom.rb', line 361 def vscsi_mappings collection_of("VirtualSCSIMappings", "VirtualSCSIMapping") end |