summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs/gluster/auth_ops.py
diff options
context:
space:
mode:
authorVitalii Koriakov <vkoriako@redhat.com>2018-11-05 13:14:44 +0200
committerVijay Avuthu <vavuthu@redhat.com>2018-11-08 11:02:58 +0000
commit35bc2eb0685109cf2e4d0053c1c6d3af6206e614 (patch)
treee6190903bdfb6bc86fe72881abb09482afab5bfb /glustolibs-gluster/glustolibs/gluster/auth_ops.py
parent0adfb628fbbd7a2edd5c2be6e8c8c1c5c8ecbba0 (diff)
Convert auth_ops.py and lib_utils.py to python3
Change-Id: I8baf97066c5ae47e2a298581eeb74374fc09a21e Signed-off-by: Vitalii Koriakov <vkoriako@redhat.com>
Diffstat (limited to 'glustolibs-gluster/glustolibs/gluster/auth_ops.py')
-rw-r--r--glustolibs-gluster/glustolibs/gluster/auth_ops.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/auth_ops.py b/glustolibs-gluster/glustolibs/gluster/auth_ops.py
index da8ac0827..260120c02 100644
--- a/glustolibs-gluster/glustolibs/gluster/auth_ops.py
+++ b/glustolibs-gluster/glustolibs/gluster/auth_ops.py
@@ -48,7 +48,7 @@ def set_auth_allow(volname, server, auth_dict):
# If authentication has to be set on sub-dirs, convert the key-value pair
# to gluster authentication set command format.
if 'all' not in auth_dict:
- for key, value in auth_dict.iteritems():
+ for key, value in list(auth_dict.items()):
auth_cmds.append("%s(%s)" % (key, "|".join(value)))
auth_cmd = ("gluster volume set %s auth.allow \"%s\""
@@ -111,7 +111,7 @@ def verify_auth_allow(volname, server, auth_dict):
# When authentication has to be verified on on sub-dirs, convert the key-
# value pair to a format which matches the value of auth.allow option.
- for key, value in auth_dict.iteritems():
+ for key, value in list(auth_dict.items()):
auth_details.append("%s(%s)" % (key, "|".join(value)))
# Check whether the required clients names are listed in auth.allow option
@@ -168,7 +168,7 @@ def verify_auth_reject(volname, server, auth_dict):
# When authentication has to be verified on on sub-dirs, convert the key-
# value pair to a format which matches the value of auth.reject option.
- for key, value in auth_dict.iteritems():
+ for key, value in list(auth_dict.items()):
auth_details.append("%s(%s)" % (key, "|".join(value)))
# Check if the required clients names are listed in auth.reject option
@@ -208,7 +208,7 @@ def set_auth_reject(volname, server, auth_dict):
# If authentication has to be set on sub-dirs, convert the key-value pair
# to gluster authentication set command format.
if 'all' not in auth_dict:
- for key, value in auth_dict.iteritems():
+ for key, value in list(auth_dict.items()):
auth_cmds.append("%s(%s)" % (key, "|".join(value)))
auth_cmd = ("gluster volume set %s auth.reject \"%s\""