[PATCH] Display WWIDs in the filter UI for FCoE devices (#1080316).

Brian C. Lane bcl at redhat.com
Tue Apr 1 20:31:23 UTC 2014


On Tue, Apr 01, 2014 at 04:25:08PM -0400, Chris Lumens wrote:
> ---
>  pyanaconda/ui/gui/spokes/filter.py | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/pyanaconda/ui/gui/spokes/filter.py b/pyanaconda/ui/gui/spokes/filter.py
> index 22e2ee5..92757d6 100644
> --- a/pyanaconda/ui/gui/spokes/filter.py
> +++ b/pyanaconda/ui/gui/spokes/filter.py
> @@ -28,6 +28,7 @@ import itertools
>  from blivet import arch
>  from blivet.devices import DASDDevice, FcoeDiskDevice, iScsiDiskDevice, MultipathDevice, MDRaidArrayDevice, ZFCPDiskDevice
>  from blivet.fcoe import has_fcoe
> +from blivet.udev import udev_get_device, udev_device_get_wwid
>  
>  from pyanaconda.flags import flags
>  from pyanaconda.i18n import _, N_, P_
> @@ -137,6 +138,14 @@ class FilterPage(object):
>              combo.set_active(0)
>  
>      def _long_identifier(self, disk):
> +        # For FCoE devices that have a serial number, we want to display that as
> +        # the WWID.  If nothing's found, just default to the link or name below.
> +        if isinstance(disk, FcoeDiskDevice):
> +            info = udev_get_device(disk.sysfsPath)
> +            wwid = udev_device_get_wwid(info)
> +            if wwid:
> +                return wwid
> +
>          # For iSCSI devices, we want the long ip-address:port-iscsi-tgtname-lun-XX
>          # identifier, but blivet doesn't expose that in any useful way and I don't
>          # want to go asking udev.  Instead, we dig around in the deviceLinks and
> -- 
> 1.8.3.1

Ack

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)


More information about the anaconda-patches mailing list