diff options
author | Jeremy Katz <katzj@redhat.com> | 2002-01-31 00:40:40 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2002-01-31 00:40:40 +0000 |
commit | 30b367e85f87e92af2fc588b0aba06afff67fc75 (patch) | |
tree | 296d5d1ae5ecc72fab6c9d8a2fce8e953568e372 /partitioning.py | |
parent | e8823027c502fb60f76b237cf7b0328f4137a936 (diff) | |
download | anaconda-30b367e85f87e92af2fc588b0aba06afff67fc75.tar.gz anaconda-30b367e85f87e92af2fc588b0aba06afff67fc75.tar.xz anaconda-30b367e85f87e92af2fc588b0aba06afff67fc75.zip |
msf didn't commit his version of this function... mine seems to be compatible though :)
Diffstat (limited to 'partitioning.py')
-rw-r--r-- | partitioning.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/partitioning.py b/partitioning.py index d24395d5d..e24893bd9 100644 --- a/partitioning.py +++ b/partitioning.py @@ -1050,6 +1050,24 @@ class Partitions: return retval + def getLVMRequests(self): + retval = {} + for request in self.requests: + if request.type == REQUEST_VG: + if request.volumeGroupName not in retval.keys(): + retval[request.volumeGroupName] = [] + elif request.type == REQUEST_LV: + vg = self.getRequestByID(request.volumeGroup) + if not vg: + raise RuntimeError, "Have a logical volume without a volume group" + vgname = vg.volumeGroupName + if vgname in retval.keys(): + retval[vgname].append(request) + else: + retval[vgname] = [ request ] + + return retval + def isRaidMember(self, request): raiddev = self.getRaidRequests() if not raiddev or not request.device: |