Skip to content

Commit

Permalink
Make Blivet.lvs return all LVs not just traditional/thick LVs
Browse files Browse the repository at this point in the history
Thin pools and thin LVs are also LVs so they should be included in the
result. Also don't use the to-be-deprecated-soon getDevicesByType() method.
  • Loading branch information
vpodzime committed Jun 8, 2015
1 parent 587a06e commit 5dd0f65
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions blivet/blivet.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,9 +408,8 @@ def lvs(self):
does not necessarily reflect the actual on-disk state of the
system's disks.
"""
lvs = self.devicetree.getDevicesByType("lvmlv")
lvs.sort(key=lambda d: d.name)
return lvs
lvs = (d for d in self.devices if d.type in ("lvmlv", "lvmthinpool", "lvmthinlv"))
return sorted(lvs, key=lambda d: d.name)

@property
def thinlvs(self):
Expand Down

0 comments on commit 5dd0f65

Please sign in to comment.