[anaconda:rhel7/master] Cover both possible ways that GUI WWID may have been set (#1074184)

Vratislav Podzimek vpodzime at redhat.com
Tue Mar 11 07:38:25 UTC 2014


On Mon, 2014-03-10 at 12:28 -0400, mulhern wrote:
> Resolves: rhbz#1074184
> 
> All the pages on the filter screen interact with the same backing store,
> and each page can add different items to that backing store.
> Although Multipath page uses wwid attribute of multipath device Other page
> synthesizes a wwid using the internal _long_identifier() method.
> When filtering by wwid in Search page, need to check for both possible
> values of WWID. Do not need to check for both when filtering on Multipath
> page, as all devices for which ismember is True are multipath.
> Moved _long_identifier() method up into parent class, so that SearchPage
> could access it directly.
> 
> Signed-off-by: mulhern <amulhern at redhat.com>
> ---
>  pyanaconda/ui/gui/spokes/filter.py | 26 +++++++++++++-------------
>  1 file changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/pyanaconda/ui/gui/spokes/filter.py b/pyanaconda/ui/gui/spokes/filter.py
> index af40ac2..ba0b144 100644
> --- a/pyanaconda/ui/gui/spokes/filter.py
> +++ b/pyanaconda/ui/gui/spokes/filter.py
> @@ -136,6 +136,18 @@ class FilterPage(object):
>          if items:
>              combo.set_active(0)
>  
> +    def _long_identifier(self, disk):
> +        # 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
> +        # default to the name if we can't figure anything else out.
> +        for link in disk.deviceLinks:
> +            if "by-path" in link:
> +                lastSlash = link.rindex("/")+1
Please add spaces around the '+' operator.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list