Class: LVM::PhysicalVolumes
- Inherits:
-
Object
- Object
- LVM::PhysicalVolumes
- Defined in:
- lib/lvm/physical_volumes.rb
Instance Method Summary collapse
-
#each ⇒ Object
Gather all information about physical volumes.
-
#initialize(options) ⇒ PhysicalVolumes
constructor
A new instance of PhysicalVolumes.
- #list ⇒ Object
Methods included from Volumes
Constructor Details
#initialize(options) ⇒ PhysicalVolumes
Returns a new instance of PhysicalVolumes.
12 13 14 15 |
# File 'lib/lvm/physical_volumes.rb', line 12 def initialize() @pvs = PVS.new() @pvsseg = PVSSEG.new() end |
Instance Method Details
#each ⇒ Object
Gather all information about physical volumes.
See VolumeGroups.each for a better representation of LVM data.
20 21 22 23 24 25 26 27 28 |
# File 'lib/lvm/physical_volumes.rb', line 20 def each pvs = @pvs.list pvsseg = @pvsseg.list pvs.each do |pv| pv.segments = pvsseg.select { |seg| seg.pv_uuid == pv.uuid } yield pv end end |
#list ⇒ Object
30 31 32 |
# File 'lib/lvm/physical_volumes.rb', line 30 def list each {} end |