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

Martin Kolman mkolman at redhat.com
Fri Sep 19 14:59:20 UTC 2014


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



More information about the anaconda-patches mailing list