[blivet][rhel7-branch/master][PATCH] Don't mix target and discovery credentials (#1037564)

Anne Mulhern amulhern at redhat.com
Fri Sep 19 15:15:06 UTC 2014





----- Original Message -----
> From: "Martin Kolman" <mkolman at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Friday, September 19, 2014 10:59:20 AM
> Subject: [blivet][rhel7-branch/master][PATCH] Don't mix target and discovery	credentials (#1037564)
> 
> The (optional) discovery credentials are different to the more commonly
> seen ISCSI CHAP/reverse CHAP credentials and care needs to be taken to
> not mix them together.
> 
> Resolves: rhbz#1037564
> Signed-off-by: Martin Kolman <mkolman at redhat.com>
> ---
>  blivet/iscsi.py | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/blivet/iscsi.py b/blivet/iscsi.py
> index 1360c1b..cedaa90 100644
> --- a/blivet/iscsi.py
> +++ b/blivet/iscsi.py
> @@ -324,11 +324,14 @@ class iscsi(object):
>      # NOTE: the same credentials are used for discovery and login
>      #       (unlike in UI)
>      def addTarget(self, ipaddr, port="3260", user=None, pw=None,
> -                  user_in=None, pw_in=None, target=None, iface=None):
> +                  user_in=None, pw_in=None, target=None, iface=None,
> +                  discover_user=None, discover_pw=None,
> +                  discover_user_in=None, discover_pw_in=None):
>          found = 0
>          logged_in = 0
>  
> -        found_nodes = self.discover(ipaddr, port, user, pw, user_in, pw_in)
> +        found_nodes = self.discover(ipaddr, port, discover_user,
> discover_pw,
> +                                    discover_user_in, discover_pw_in)
>          if found_nodes == None:
>              raise IOError(_("No iSCSI nodes discovered"))
>  
> --
> 1.9.3
> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 

Probably time to add a docstring to that method, document those new parameters
and the old ones as well.

- mulhern


More information about the anaconda-patches mailing list