Merge "Replace six.iteritems() with .items()"
This commit is contained in:
commit
d54f16067c
@ -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."""
|
||||
|
@ -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)
|
||||
|
@ -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})
|
||||
|
||||
|
@ -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):
|
||||
|
@ -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',
|
||||
}]
|
||||
|
Loading…
Reference in New Issue
Block a user