diff --git a/manila/scheduler/host_manager.py b/manila/scheduler/host_manager.py index 56d21d0486..d3ebd1f005 100644 --- a/manila/scheduler/host_manager.py +++ b/manila/scheduler/host_manager.py @@ -593,7 +593,7 @@ class HostManager(object): pool_key = '.'.join([host, pool.pool_name]) all_pools[pool_key] = pool - return six.itervalues(all_pools) + return all_pools.values() def get_pools(self, context, filters=None): """Returns a dict of all pools on all hosts HostManager knows about.""" diff --git a/manila/share/drivers/glusterfs/common.py b/manila/share/drivers/glusterfs/common.py index 8d5fc1f07a..fbd5c07fc0 100644 --- a/manila/share/drivers/glusterfs/common.py +++ b/manila/share/drivers/glusterfs/common.py @@ -225,7 +225,7 @@ class GlusterManager(object): raise exception.GlusterfsException(_( 'GlusterFS command %(command)s on volume %(volume)s failed' ) % {'volume': self.volume, 'command': command}) - if list(six.itervalues(ret)) != [0, 0]: + if list(ret.values()) != [0, 0]: errdct = {'volume': self.volume, 'command': commandstr, 'opErrstr': volxml_get(xmlout, 'opErrstr', default=None)} errdct.update(ret) diff --git a/manila/share/drivers/qnap/api.py b/manila/share/drivers/qnap/api.py index 40cad06e0a..e3aa7ea1a6 100644 --- a/manila/share/drivers/qnap/api.py +++ b/manila/share/drivers/qnap/api.py @@ -298,7 +298,7 @@ class QnapAPIExecutor(object): @_connection_checker def get_share_info(self, pool_id, **kwargs): """Execute get_share_info API.""" - for key, value in six.iteritems(kwargs): + for key, value in kwargs.items(): LOG.debug('%(key)s = %(val)s', {'key': key, 'val': value}) @@ -609,7 +609,7 @@ class QnapAPIExecutorTS(QnapAPIExecutor): @_connection_checker def get_snapshot_info(self, **kwargs): """Execute get_snapshot_info API.""" - for key, value in six.iteritems(kwargs): + for key, value in kwargs.items(): LOG.debug('%(key)s = %(val)s', {'key': key, 'val': value}) diff --git a/manila/test.py b/manila/test.py index bf0054dbe1..b6e3487e5e 100644 --- a/manila/test.py +++ b/manila/test.py @@ -350,7 +350,7 @@ class TestCase(base_test.BaseTestCase): def _dict_from_object(self, obj, ignored_keys): if ignored_keys is None: ignored_keys = [] - return {k: v for k, v in obj.iteritems() + return {k: v for k, v in obj.items() if k not in ignored_keys} def _assertEqualListsOfObjects(self, objs1, objs2, ignored_keys=None): diff --git a/manila/tests/data/test_helper.py b/manila/tests/data/test_helper.py index 0f44e0dc31..6afa91246b 100644 --- a/manila/tests/data/test_helper.py +++ b/manila/tests/data/test_helper.py @@ -14,7 +14,6 @@ # under the License. import os -import six import ddt import mock @@ -127,7 +126,7 @@ class DataServiceHelperTestCase(test.TestCase): data_copy_helper.CONF.data_node_access_ip = 'fake' data_copy_helper.CONF.data_node_access_admin_user = 'fake' expected = [{ - 'access_type': six.next(six.iteritems(mapping))[0], + 'access_type': list(mapping.keys())[0], 'access_level': constants.ACCESS_LEVEL_RW, 'access_to': 'fake', }]