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