Skip to content

Commit

Permalink
Add a static method providing list of available PE sizes
Browse files Browse the repository at this point in the history
Physical Extent sizes are related to LVM volume groups thus LVMVolumeGroupDevice
seems to be the best candidate for such method.
  • Loading branch information
vpodzime committed Feb 19, 2015
1 parent 9f32234 commit f8a3b29
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions blivet/devices/lvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ class LVMVolumeGroupDevice(ContainerDevice):
_formatClassName = property(lambda s: "lvmpv")
_formatUUIDAttr = property(lambda s: "vgUuid")

@staticmethod
def get_supported_pe_sizes():
return [Size(pe_size) for pe_size in blockdev.lvm_get_supported_pe_sizes()]

def __init__(self, name, parents=None, size=None, free=None,
peSize=None, peCount=None, peFree=None, pvCount=None,
uuid=None, exists=False, sysfsPath=''):
Expand Down

0 comments on commit f8a3b29

Please sign in to comment.