Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   64 Studio User (http://www.linux-archive.org/64-studio-user/)
-   -   For iSCSI devices, put the path into the UI instead of a WWID. (http://www.linux-archive.org/64-studio-user/297473-iscsi-devices-put-path-into-ui-instead-wwid.html)

Chris Lumens 12-18-2009 06:41 PM

For iSCSI devices, put the path into the UI instead of a WWID.
 
---
iw/filter_gui.py | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/iw/filter_gui.py b/iw/filter_gui.py
index b540621..46c26c8 100644
--- a/iw/filter_gui.py
+++ b/iw/filter_gui.py
@@ -437,6 +437,7 @@ class FilterWindow(InstallWindow):
np.ds.addColumn(_("Capacity"), CAPACITY_COL)
np.ds.addColumn(_("Vendor"), VENDOR_COL)
np.ds.addColumn(_("Interconnect"), INTERCONNECT_COL)
+ np.ds.addColumn(_("Serial Number"), SERIAL_COL, displayed=False)
return np

def _makeSearch(self):
@@ -547,11 +548,17 @@ class FilterWindow(InstallWindow):
partedDevice = parted.Device(path="/dev/" + udev_device_get_name(d))
d["XXX_SIZE"] = int(partedDevice.getSize())

+ # This isn't so great, but for iSCSI devices the path contains a lot
+ # of useful identifiying info that should be displayed.
+ if udev_device_is_iscsi(d):
+ id = udev_device_get_path(d)
+ else:
+ id = udev_device_get_wwid(d)
+
tuple = (d, True, False, udev_device_get_name(d),
partedDevice.model, str(d["XXX_SIZE"]) + " MB",
udev_device_get_vendor(d), udev_device_get_bus(d),
- udev_device_get_serial(d), udev_device_get_wwid(d),
- "", "", "", "")
+ udev_device_get_serial(d), id, "", "", "", "")
_addTuple(tuple)

for rs in block.getRaidSets():
--
1.6.5.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 07:52 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.