We don't want to show biosraid, multipath, &c disks in the GUI. --- iw/partition_gui.py | 3 +++ storage/formats/__init__.py | 6 ++++++ storage/formats/disklabel.py | 1 + storage/formats/dmraid.py | 1 + storage/formats/multipath.py | 1 + 5 files changed, 12 insertions(+), 0 deletions(-) diff --git a/iw/partition_gui.py b/iw/partition_gui.py index a17fd70..d239cd3 100644 --- a/iw/partition_gui.py +++ b/iw/partition_gui.py @@ -909,6 +909,9 @@ class PartitionWindow(InstallWindow): return None def addDevice(self, device, treeiter): + if device.format.hidden: + return + if device.format.type == "luks": # we'll want to grab format info from the mapped # device, not the encrypted one diff --git a/storage/formats/__init__.py b/storage/formats/__init__.py index ab33211..2c3d9c8 100644 --- a/storage/formats/__init__.py +++ b/storage/formats/__init__.py @@ -151,6 +151,7 @@ class DeviceFormat(object): _minSize = 0 # minimum size in MB _dump = False _check = False + _hidden = False # hide devices with this formatting? def __init__(self, *args, **kwargs): """ Create a DeviceFormat instance. @@ -366,6 +367,11 @@ class DeviceFormat(object): """ Minimum size (in MB) for this format type. """ return self._minSize + @property + def hidden(self): + """ Whether devices with this formatting should be hidden in UIs. """ + return self._hidden + def writeKS(self, f): return diff --git a/storage/formats/disklabel.py b/storage/formats/disklabel.py index faf04f4..a49bd6e 100644 --- a/storage/formats/disklabel.py +++ b/storage/formats/disklabel.py @@ -44,6 +44,7 @@ class DiskLabel(DeviceFormat): _name = None _formattable = True # can be formatted _supported = False # is supported + _hidden = True # hide devices with this formatting? def __init__(self, *args, **kwargs): """ Create a DiskLabel instance. diff --git a/storage/formats/dmraid.py b/storage/formats/dmraid.py index 5bdb7f6..547c5a3 100644 --- a/storage/formats/dmraid.py +++ b/storage/formats/dmraid.py @@ -57,6 +57,7 @@ class DMRaidMember(DeviceFormat): _bootable = False # can be used as boot _maxSize = 0 # maximum size in MB _minSize = 0 # minimum size in MB + _hidden = True # hide devices with this formatting? def __init__(self, *args, **kwargs): """ Create a DeviceFormat instance. diff --git a/storage/formats/multipath.py b/storage/formats/multipath.py index fe2702e..4a4b407 100644 --- a/storage/formats/multipath.py +++ b/storage/formats/multipath.py @@ -47,6 +47,7 @@ class MultipathMember(DeviceFormat): _bootable = False # can be used as boot _maxSize = 0 # maximum size in MB _minSize = 0 # minimum size in MB + _hidden = True # hide devices with this formatting? def __init__(self, *args, **kwargs): """ Create a DeviceFormat instance. -- 1.6.5.2 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list