summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs
diff options
context:
space:
mode:
authorValerii Ponomarov <vponomar@redhat.com>2019-11-20 16:41:16 +0530
committerBala Konda Reddy M <bmekala@redhat.com>2019-11-21 09:06:42 +0000
commit082f516a33d14c836cd47293cb29c83ae80e294d (patch)
tree81ca6d0c76480d08cc1c418b57a05209d9115040 /glustolibs-gluster/glustolibs
parent489970dda8cc3fdf0b6c1fd26b1662d3ee853d94 (diff)
[py2to3] Replace usage of ".iteitems()" attr with ".items()"
Dict attribute called "iteritems()" is not supported in the py3. So, replace it's usage with another similar attr called "items()". Change-Id: I130b7f67f0a2d5da5ed6c3d792f5ff024ba148f4 Signed-off-by: Valerii Ponomarov <kiparis.kh@gmail.com>
Diffstat (limited to 'glustolibs-gluster/glustolibs')
-rw-r--r--glustolibs-gluster/glustolibs/gluster/gluster_base_class.py2
-rw-r--r--glustolibs-gluster/glustolibs/gluster/gluster_init.py8
-rwxr-xr-xglustolibs-gluster/glustolibs/gluster/quota_libs.py2
3 files changed, 6 insertions, 6 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py b/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
index 97a9fe3..b475edd 100644
--- a/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
+++ b/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
@@ -856,7 +856,7 @@ class GlusterBlockBaseClass(GlusterBaseClass):
# Log the block_info_dict
g.log.info("Logging Block Info:")
- for key, value in cls.block_info_dict.iteritems():
+ for key, value in cls.block_info_dict.items():
g.log.info("Glusto block info: %s\n %s" % (key, value))
return True
diff --git a/glustolibs-gluster/glustolibs/gluster/gluster_init.py b/glustolibs-gluster/glustolibs/gluster/gluster_init.py
index e59d36f..10812c2 100644
--- a/glustolibs-gluster/glustolibs/gluster/gluster_init.py
+++ b/glustolibs-gluster/glustolibs/gluster/gluster_init.py
@@ -40,7 +40,7 @@ def start_glusterd(servers):
results = g.run_parallel(servers, cmd)
_rc = True
- for server, ret_values in results.iteritems():
+ for server, ret_values in results.items():
retcode, _, _ = ret_values
if retcode != 0:
g.log.error("Unable to start glusterd on server %s", server)
@@ -69,7 +69,7 @@ def stop_glusterd(servers):
results = g.run_parallel(servers, cmd)
_rc = True
- for server, ret_values in results.iteritems():
+ for server, ret_values in results.items():
retcode, _, _ = ret_values
if retcode != 0:
g.log.error("Unable to stop glusterd on server %s", server)
@@ -98,7 +98,7 @@ def restart_glusterd(servers):
results = g.run_parallel(servers, cmd)
_rc = True
- for server, ret_values in results.iteritems():
+ for server, ret_values in results.items():
retcode, _, _ = ret_values
if retcode != 0:
g.log.error("Unable to restart glusterd on server %s", server)
@@ -131,7 +131,7 @@ def is_glusterd_running(servers):
cmd2_results = g.run_parallel(servers, cmd2)
_rc = 0
- for server, ret_values in cmd1_results.iteritems():
+ for server, ret_values in cmd1_results.items():
retcode, _, _ = ret_values
if retcode != 0:
g.log.error("glusterd is not running on the server %s", server)
diff --git a/glustolibs-gluster/glustolibs/gluster/quota_libs.py b/glustolibs-gluster/glustolibs/gluster/quota_libs.py
index 5da4d86..279b902 100755
--- a/glustolibs-gluster/glustolibs/gluster/quota_libs.py
+++ b/glustolibs-gluster/glustolibs/gluster/quota_libs.py
@@ -54,7 +54,7 @@ def quota_validate(mnode, volname, path, **kwargs):
listinfo = quotalist[path]
ret = True
- for key, value in kwargs.iteritems():
+ for key, value in kwargs.items():
if key and listinfo[key] != value:
g.log.error("%s = %s does not match with expected value %s",
key, str(listinfo[key]), str(value))