Merge "Remove six"
diff --git a/ironic_tempest_plugin/common/waiters.py b/ironic_tempest_plugin/common/waiters.py
index c9d87bd..2b35279 100644
--- a/ironic_tempest_plugin/common/waiters.py
+++ b/ironic_tempest_plugin/common/waiters.py
@@ -13,7 +13,6 @@
# under the License.
from oslo_log import log
-import six
from tempest import config
from tempest.lib.common.utils import test_utils
from tempest.lib import exceptions as lib_exc
@@ -31,8 +30,8 @@
timeout = default_timeout
if interval is None:
interval = default_interval
- if (not isinstance(timeout, six.integer_types)
- or not isinstance(interval, six.integer_types)
+ if (not isinstance(timeout, int)
+ or not isinstance(interval, int)
or timeout < 0 or interval < 0):
raise AssertionError(
'timeout and interval should be >= 0 or None, current values are: '
diff --git a/ironic_tempest_plugin/services/baremetal/base.py b/ironic_tempest_plugin/services/baremetal/base.py
index 3c52fcd..2acad18 100644
--- a/ironic_tempest_plugin/services/baremetal/base.py
+++ b/ironic_tempest_plugin/services/baremetal/base.py
@@ -11,10 +11,11 @@
# under the License.
+import functools
+from http import client as http_client
+from urllib import parse as urllib_parse
+
from oslo_serialization import jsonutils as json
-import six
-from six.moves import http_client
-from six.moves.urllib import parse as urllib
from tempest.lib.common import api_version_utils
from tempest.lib.common import rest_client
@@ -36,7 +37,7 @@
def handle_errors(f):
"""A decorator that allows to ignore certain types of errors."""
- @six.wraps(f)
+ @functools.wraps(f)
def wrapper(*args, **kwargs):
param_name = 'ignore_errors'
ignored_errors = kwargs.get(param_name, tuple())
@@ -149,7 +150,7 @@
"""
uri = self._get_uri(resource, permanent=permanent)
if kwargs:
- uri += "?%s" % urllib.urlencode(kwargs)
+ uri += "?%s" % urllib_parse.urlencode(kwargs)
resp, body = self.get(uri, headers=headers,
extra_headers=extra_headers)
diff --git a/ironic_tempest_plugin/services/baremetal/v1/json/baremetal_client.py b/ironic_tempest_plugin/services/baremetal/v1/json/baremetal_client.py
index 9f001b8..26c37e0 100644
--- a/ironic_tempest_plugin/services/baremetal/v1/json/baremetal_client.py
+++ b/ironic_tempest_plugin/services/baremetal/v1/json/baremetal_client.py
@@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-from six.moves import http_client
+from http import client as http_client
from ironic_tempest_plugin.services.baremetal import base
diff --git a/ironic_tempest_plugin/tests/api/admin/test_nodes.py b/ironic_tempest_plugin/tests/api/admin/test_nodes.py
index 85c31e0..d6b262d 100644
--- a/ironic_tempest_plugin/tests/api/admin/test_nodes.py
+++ b/ironic_tempest_plugin/tests/api/admin/test_nodes.py
@@ -11,7 +11,6 @@
# under the License.
from oslo_utils import uuidutils
-import six
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
@@ -136,7 +135,7 @@
body = self.client.get_node_boot_device(self.node['uuid'])
self.assertIn('boot_device', body)
self.assertIn('persistent', body)
- self.assertIsInstance(body['boot_device'], six.string_types)
+ self.assertIsInstance(body['boot_device'], str)
self.assertIsInstance(body['persistent'], bool)
@decorators.idempotent_id('3622bc6f-3589-4bc2-89f3-50419c66b133')
diff --git a/ironic_tempest_plugin/tests/api/base.py b/ironic_tempest_plugin/tests/api/base.py
index d78f74a..c541dd3 100644
--- a/ironic_tempest_plugin/tests/api/base.py
+++ b/ironic_tempest_plugin/tests/api/base.py
@@ -10,7 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-import six
+import functools
+
from tempest import config
from tempest.lib.common import api_version_utils
from tempest.lib.common.utils import data_utils
@@ -41,7 +42,7 @@
"""Decorator that adds resources to the appropriate cleanup list."""
def decorator(f):
- @six.wraps(f)
+ @functools.wraps(f)
def wrapper(cls, *args, **kwargs):
resp, body = f(cls, *args, **kwargs)
diff --git a/ironic_tempest_plugin/tests/scenario/introspection_manager.py b/ironic_tempest_plugin/tests/scenario/introspection_manager.py
index 199bab1..af971d1 100644
--- a/ironic_tempest_plugin/tests/scenario/introspection_manager.py
+++ b/ironic_tempest_plugin/tests/scenario/introspection_manager.py
@@ -14,7 +14,6 @@
import time
from oslo_serialization import jsonutils as json
-import six
import tempest
from tempest import config
from tempest.lib.common.api_version_utils import LATEST_MICROVERSION
@@ -173,7 +172,7 @@
"""Waits for introspection of baremetal nodes to finish.
"""
- if isinstance(node_ids, six.text_type):
+ if isinstance(node_ids, str):
node_ids = [node_ids]
start = int(time.time())
not_introspected = {node_id for node_id in node_ids}
diff --git a/requirements.txt b/requirements.txt
index 54751e4..e012abf 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -8,5 +8,4 @@
oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0
oslo.utils>=3.33.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
-six>=1.10.0 # MIT
tempest>=17.1.0 # Apache-2.0