diff --git a/cinder/scheduler/filters/capabilities_filter.py b/cinder/scheduler/filters/capabilities_filter.py index c9a7d4b0a55..e6e3c2d5190 100644 --- a/cinder/scheduler/filters/capabilities_filter.py +++ b/cinder/scheduler/filters/capabilities_filter.py @@ -14,7 +14,6 @@ # under the License. from oslo_log import log as logging -import six from cinder.scheduler import filters from cinder.scheduler.filters import extra_specs_ops @@ -35,7 +34,7 @@ class CapabilitiesFilter(filters.BaseHostFilter): if not extra_specs: return True - for key, req in six.iteritems(extra_specs): + for key, req in extra_specs.items(): # Either not scoped format, or in capabilities scope scope = key.split(':') diff --git a/cinder/tests/unit/scheduler/fake_hosts.py b/cinder/tests/unit/scheduler/fake_hosts.py index 8cc988f049f..04660c9763d 100644 --- a/cinder/tests/unit/scheduler/fake_hosts.py +++ b/cinder/tests/unit/scheduler/fake_hosts.py @@ -17,8 +17,6 @@ Fakes For filters tests. """ -import six - class FakeHostManager(object): """Defines fake hosts. @@ -49,5 +47,5 @@ class FakeHostManager(object): class FakeHostState(object): def __init__(self, host, attribute_dict): self.host = host - for (key, val) in six.iteritems(attribute_dict): + for (key, val) in attribute_dict.items(): setattr(self, key, val) diff --git a/cinder/tests/unit/volume/drivers/netapp/test_common.py b/cinder/tests/unit/volume/drivers/netapp/test_common.py index db3a6362743..34caf4162d4 100644 --- a/cinder/tests/unit/volume/drivers/netapp/test_common.py +++ b/cinder/tests/unit/volume/drivers/netapp/test_common.py @@ -13,7 +13,6 @@ # under the License. import mock -import six from cinder import exception from cinder import test @@ -91,7 +90,7 @@ class NetAppDriverFactoryTestCase(test.TestCase): registry = na_common.NETAPP_UNIFIED_DRIVER_REGISTRY - for family in six.iterkeys(registry): + for family in registry: for protocol, full_class_name in registry[family].items(): driver = na_common.NetAppDriver.create_driver( family, protocol, **kwargs) diff --git a/cinder/volume/drivers/vmware/volumeops.py b/cinder/volume/drivers/vmware/volumeops.py index 9acbea3add4..1b980e9849e 100644 --- a/cinder/volume/drivers/vmware/volumeops.py +++ b/cinder/volume/drivers/vmware/volumeops.py @@ -23,7 +23,6 @@ from oslo_utils import units from oslo_vmware import exceptions from oslo_vmware import pbm from oslo_vmware import vim_util -import six from six.moves import urllib from cinder.i18n import _, _LE, _LI @@ -688,7 +687,7 @@ class VMwareVolumeOps(object): cf = self._session.vim.client.factory option_values = [] - for key, value in six.iteritems(extra_config): + for key, value in extra_config.items(): opt = cf.create('ns0:OptionValue') opt.key = key opt.value = value