Ack. On 12/14/2009 07:29 PM, Chris Lumens wrote:
In conjunction with the filtering UI patches, this is meant to help setups where you have a whole lot of disks and don't want to see one dialog after another for every single disk. --- storage/devicetree.py | 45 ++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 40 insertions(+), 5 deletions(-) diff --git a/storage/devicetree.py b/storage/devicetree.py index 6e1eb98..bc4a97e 100644 --- a/storage/devicetree.py +++ b/storage/devicetree.py @@ -126,8 +126,18 @@ def getLUKSPassphrase(intf, device, globalPassphrase): return (passphrase, isglobal) +ignoreAllDisks = False +reinitAllDisks = False + # Don't really know where to put this. def questionInitializeDisk(intf=None, path=None, description=None): + global ignoreAllDisks, reinitAllDisks + + if ignoreAllDisks: + return False + elif reinitAllDisks: + return True + retVal = False # The less destructive default if not intf or not path: pass @@ -154,15 +164,33 @@ def questionInitializeDisk(intf=None, path=None, description=None): 'description': description, 'details': details}, type="custom", custom_buttons = [ _("_Ignore drive"), - _("_Re-initialize drive") ], + _("Ignore _all"), + _("_Re-initialize drive"), + _("Re-initialize a_ll") ], custom_icon="question") if rc == 0: pass - else: + elif rc == 1: + ignoreAllDisks = True + elif rc == 2: + retVal = True + elif rc == 3: + reinitAllDisks = True retVal = True + return retVal +ignoreAllLVMs = False +reinitAllLVMs = False + def questionReinitILVM(intf=None, pv_names=None, lv_name=None, vg_name=None): + global ignoreAllLVMs, reinitAllLVMs + + if ignoreAllLVMs: + return False + elif reinitAllLVMs: + return True + retVal = False # The less destructive default if not intf or not pv_names or (lv_name is None and vg_name is None): pass @@ -181,12 +209,19 @@ def questionReinitILVM(intf=None, pv_names=None, lv_name=None, vg_name=None): "contents.") % na, type="custom", custom_buttons = [ _("_Ignore"), - _("_Re-initialize") ], + _("Ignore _all"), + _("_Re-initialize"), + _("Re-initialize a_ll") ], custom_icon="question") if rc == 0: pass - else: - retVal = True # thie means clobber. + elif rc == 1: + ignoreAllLVMs = True + elif rc == 2: + retVal = True + elif rc == 3: + reinitAllLVMs = True + retVal = True return retVal
_______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list