Looks good. Regards, Hans Radek Vykydal wrote:
The bug manifests itself in edit raid ui dialog of existing raid array. * storage/devices.py: For existing partitions use parents to get number of total devices in array, for new partitions use value from device instance which is initialized when the instance is created * iw.raid_dialog_gui.py: Initialize number of total devices when creating raid array in UI. --- iw/raid_dialog_gui.py | 1 + storage/devices.py | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/iw/raid_dialog_gui.py b/iw/raid_dialog_gui.py index d45b582..099a9c9 100644 --- a/iw/raid_dialog_gui.py +++ b/iw/raid_dialog_gui.py @@ -246,6 +246,7 @@ class RaidEditor: level=level, format=format, parents=raidmembers, + totalDevices=len(raidmembers), memberDevices=members) actions.append(ActionCreateDevice(request)) actions.append(ActionCreateFormat(request)) diff --git a/storage/devices.py b/storage/devices.py index 13d85b8..f72d39d 100644 --- a/storage/devices.py +++ b/storage/devices.py @@ -1867,7 +1867,7 @@ class MDRaidArrayDevice(StorageDevice): def totalDevices(self): """ Total number of devices in the array, including spares. """ count = len(self.parents) - if self.exists: + if not self.exists: count = self._totalDevices return count
_______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list