diff options
author | Jeremy Katz <katzj@redhat.com> | 2002-06-09 02:02:46 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2002-06-09 02:02:46 +0000 |
commit | 15d4de1f2d6f3f45b96cc640daf478751f83a8b4 (patch) | |
tree | 05d02aee8b60a991ebbabac04edaf3639a6332b1 /partRequests.py | |
parent | 30b06571c537b320ce8efcf3f127869341d22893 (diff) | |
download | anaconda-15d4de1f2d6f3f45b96cc640daf478751f83a8b4.tar.gz anaconda-15d4de1f2d6f3f45b96cc640daf478751f83a8b4.tar.xz anaconda-15d4de1f2d6f3f45b96cc640daf478751f83a8b4.zip |
add percent as a parameter for lvs so that we can specify an lv size as a percentage of the vg size
Diffstat (limited to 'partRequests.py')
-rw-r--r-- | partRequests.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/partRequests.py b/partRequests.py index 9ae27157e..9e5bacbc3 100644 --- a/partRequests.py +++ b/partRequests.py @@ -685,7 +685,7 @@ class LogicalVolumeRequestSpec(RequestSpec): def __init__(self, fstype, format = None, mountpoint = None, size = None, volgroup = None, lvname = None, - preexist = 0): + preexist = 0, percent = None): """Create a new VolumeGroupRequestSpec object. fstype is the fsset filesystem type. @@ -695,6 +695,7 @@ class LogicalVolumeRequestSpec(RequestSpec): volgroup is the request ID of the volume group. lvname is the name of the logical volume. preexist is whether the logical volume previously existed or not. + percent is the percentage of the volume group's space this should use. """ RequestSpec.__init__(self, fstype = fstype, format = format, @@ -704,6 +705,10 @@ class LogicalVolumeRequestSpec(RequestSpec): self.logicalVolumeName = lvname self.volumeGroup = volgroup + self.percent = percent + + if not percent and not size: + raise RuntimeError, "Logical Volume must specify either percentage of vgsize or size" def __str__(self): if self.fstype: |