diff --git a/saharaclient/api/base.py b/saharaclient/api/base.py index 2674354e..38a2848b 100644 --- a/saharaclient/api/base.py +++ b/saharaclient/api/base.py @@ -16,7 +16,6 @@ import copy import json -import six from six.moves.urllib import parse from saharaclient._i18n import _ @@ -34,12 +33,12 @@ class Resource(object): self._add_details(info) def _set_defaults(self, info): - for name, value in six.iteritems(self.defaults): + for name, value in self.defaults.items(): if name not in info: info[name] = value def _add_details(self, info): - for (k, v) in six.iteritems(info): + for (k, v) in info.items(): try: setattr(self, k, v) self._info[k] = v @@ -87,12 +86,12 @@ class ResourceManager(object): return found[0] def _copy_if_defined(self, data, **kwargs): - for var_name, var_value in six.iteritems(kwargs): + for var_name, var_value in kwargs.items(): if var_value is not None: data[var_name] = var_value def _copy_if_updated(self, data, **kwargs): - for var_name, var_value in six.iteritems(kwargs): + for var_name, var_value in kwargs.items(): if not isinstance(var_value, NotUpdated): data[var_name] = var_value diff --git a/saharaclient/osc/v1/plugins.py b/saharaclient/osc/v1/plugins.py index e38ba55c..0ff3fa34 100644 --- a/saharaclient/osc/v1/plugins.py +++ b/saharaclient/osc/v1/plugins.py @@ -22,7 +22,6 @@ from osc_lib import exceptions from osc_lib import utils as osc_utils from oslo_log import log as logging from oslo_serialization import jsonutils -import six from saharaclient.osc.v1 import utils @@ -30,11 +29,11 @@ from saharaclient.osc.v1 import utils def _serialize_label_items(plugin): labels = {} pl_labels = plugin.get('plugin_labels', {}) - for label, data in six.iteritems(pl_labels): + for label, data in pl_labels.items(): labels['plugin: %s' % label] = data['status'] vr_labels = plugin.get('version_labels', {}) - for version, version_data in six.iteritems(vr_labels): - for label, data in six.iteritems(version_data): + for version, version_data in vr_labels.items(): + for label, data in version_data.items(): labels[ 'plugin version %s: %s' % (version, label)] = data['status'] labels = utils.prepare_data(labels, list(labels.keys())) diff --git a/saharaclient/osc/v1/utils.py b/saharaclient/osc/v1/utils.py index fd514507..714d96af 100644 --- a/saharaclient/osc/v1/utils.py +++ b/saharaclient/osc/v1/utils.py @@ -13,7 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import six import time from oslo_utils import timeutils @@ -53,7 +52,7 @@ def get_resource_id(manager, name_or_id): def create_dict_from_kwargs(**kwargs): - return dict((k, v) for (k, v) in six.iteritems(kwargs) if v is not None) + return dict((k, v) for (k, v) in kwargs.items() if v is not None) def prepare_data(data, fields): diff --git a/saharaclient/tests/unit/base.py b/saharaclient/tests/unit/base.py index 209dcbe3..c2cd255e 100644 --- a/saharaclient/tests/unit/base.py +++ b/saharaclient/tests/unit/base.py @@ -12,7 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -import six import testtools from saharaclient.api import base @@ -33,7 +32,7 @@ class BaseTestCase(testtools.TestCase): input_auth_token=self.TOKEN) def assertFields(self, body, obj): - for key, value in six.iteritems(body): + for key, value in body.items(): self.assertEqual(value, getattr(obj, key))