summaryrefslogtreecommitdiffstats
path: root/iw
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-02-07 20:25:30 +0000
committerJeremy Katz <katzj@redhat.com>2002-02-07 20:25:30 +0000
commit5bd2c24d83025448000e8b56f8db8002013a9501 (patch)
treea351ea54a5de9870d80de869b5d693b5675ed5c5 /iw
parentc7f2ba54e0956c597f48ce564764b9dcdb487d7d (diff)
downloadanaconda-5bd2c24d83025448000e8b56f8db8002013a9501.tar.gz
anaconda-5bd2c24d83025448000e8b56f8db8002013a9501.tar.xz
anaconda-5bd2c24d83025448000e8b56f8db8002013a9501.zip
stage2 of the partitioning.py cleanup
* move the following functions from partitioning.py -> raid.py isRaid5, isRaid1, isRaid0, get_raid_min_members, get_raid_max_spares * update other sources accordingly
Diffstat (limited to 'iw')
-rw-r--r--iw/partition_gui.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/iw/partition_gui.py b/iw/partition_gui.py
index dcf37b838..871d4f600 100644
--- a/iw/partition_gui.py
+++ b/iw/partition_gui.py
@@ -25,6 +25,7 @@ import string
import copy
import types
import checklist
+import raid
from iw_gui import *
from translate import _, N_
from partitioning import *
@@ -661,7 +662,7 @@ def createFSTypeMenu(fstype, fstypechangeCB, mountCombo,
def raidlevelchangeCB(widget, sparesb):
raidlevel = widget.get_data("level")
numparts = sparesb.get_data("numparts")
- maxspares = get_raid_max_spares(raidlevel, numparts)
+ maxspares = raid.get_raid_max_spares(raidlevel, numparts)
if maxspares > 0 and raidlevel != "RAID0":
sparesb.set_sensitive(1)
adj = sparesb.get_adjustment()
@@ -821,9 +822,9 @@ class PartitionWindow(InstallWindow):
# XXX this breaks when we try to refresh tree after a refresh
#
# XXX - this breaks self.refresh calls!!!
- lvmparent = self.tree.append(None)
- self.tree[lvmparent]['Device'] = _("LVM Physical Volumes")
-# lvmparent = None
+# lvmparent = self.tree.append(None)
+# self.tree[lvmparent]['Device'] = _("LVM Physical Volumes")
+ lvmparent = None
for vgname in lvmrequests.keys():
vgparent = self.tree.append(lvmparent)
self.tree[vgparent]['Device'] = _("LVM: %s") % (vgname,)
@@ -858,9 +859,9 @@ class PartitionWindow(InstallWindow):
raidrequests = self.partitions.getRaidRequests()
if raidrequests:
# XXX - this breaks self.refresh calls!!!
- raidparent = self.tree.append(None)
- self.tree[raidparent]['Device'] = _("RAID Devices")
-# raidparent = None
+# raidparent = self.tree.append(None)
+# self.tree[raidparent]['Device'] = _("RAID Devices")
+ raidparent = None
for request in raidrequests:
iter = self.tree.append(raidparent)
@@ -890,9 +891,9 @@ class PartitionWindow(InstallWindow):
# now normal partitions
# XXX - this breaks self.refresh calls!!!
- drvparent = self.tree.append(None)
- self.tree[drvparent]['Device'] = _("Hard Drives")
-# drvparent=None
+# drvparent = self.tree.append(None)
+# self.tree[drvparent]['Device'] = _("Hard Drives")
+ drvparent=None
for drive in drives:
disk = self.diskset.disks[drive]
@@ -1650,7 +1651,7 @@ class PartitionWindow(InstallWindow):
nspares = 0
if raidrequest.raidlevel:
- maxspares = get_raid_max_spares(raidrequest.raidlevel, numparts)
+ maxspares = raid.get_raid_max_spares(raidrequest.raidlevel, numparts)
else:
maxspares = 0