Add udev_device_get_multipath_name() to find the name of a consituent's device, and also reorganize a little. Also use this in FilterWindow() --- iw/filter_gui.py | 3 ++- storage/udev.py | 14 ++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/iw/filter_gui.py b/iw/filter_gui.py index 42ac4c1..171b46f 100644 --- a/iw/filter_gui.py +++ b/iw/filter_gui.py @@ -629,7 +629,8 @@ class FilterWindow(InstallWindow): # However, we do need all the paths making up this multipath set. paths = "\n".join(map(udev_device_get_name, mpath)) - tuple = (mpath[0], True, _active(name), "", model, + tuple = (mpath[0], True, _active(name), + udev_device_get_multipath_name(mpath[0]), model str(mpath[0]["XXX_SIZE"]) + " MB", udev_device_get_vendor(mpath[0]), udev_device_get_bus(mpath[0]), diff --git a/storage/udev.py b/storage/udev.py index 42b27e6..2d1561f 100644 --- a/storage/udev.py +++ b/storage/udev.py @@ -155,10 +155,6 @@ def udev_device_get_label(udev_info): """ Get the label from the device's format as reported by udev. """ return udev_info.get("ID_FS_LABEL") -def udev_device_is_multipath_member(info): - """ Return True if the device is part of a multipath. """ - return info.get("ID_FS_TYPE") == "multipath_member" - def udev_device_is_dm(info): """ Return True if the device is a device-mapper device. """ return info.has_key("DM_NAME") @@ -444,6 +440,16 @@ def udev_device_get_multipath_partition_disk(info): diskname = udev_device_get_dmraid_partition_disk(info) return diskname +def udev_device_is_multipath_member(info): + """ Return True if the device is part of a multipath. """ + return info.get("ID_FS_TYPE") == "multipath_member" + +def udev_device_get_multipath_name(info): + """ Return the name of the multipath that the device is a member of. """ + if udev_device_is_multipath_member(info): + return info['ID_MPATH_NAME'] + return None + # iscsi disks have ID_PATH in the form of: # ip-${iscsi_address}:${iscsi_port}-iscsi-${iscsi_tgtname}-lun-${lun} def udev_device_is_iscsi(info): -- 1.6.5.2 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list