Merge "Add waiter for test_live_migration_with_trunk"
diff --git a/requirements.txt b/requirements.txt
index eae5427..c71cabe 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -13,7 +13,6 @@
stestr>=1.0.0 # Apache-2.0
oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0
oslo.utils>=4.7.0 # Apache-2.0
-six>=1.10.0 # MIT
fixtures>=3.0.0 # Apache-2.0/BSD
PyYAML>=3.12 # MIT
python-subunit>=1.0.0 # Apache-2.0/BSD
diff --git a/tempest/api/compute/servers/test_novnc.py b/tempest/api/compute/servers/test_novnc.py
index a9c0e56..1308b19 100644
--- a/tempest/api/compute/servers/test_novnc.py
+++ b/tempest/api/compute/servers/test_novnc.py
@@ -15,8 +15,6 @@
import struct
import urllib.parse as urlparse
-
-import six
import urllib3
from tempest.api.compute import base
@@ -122,7 +120,7 @@
'Expected authentication type None.')
# Send to the server that we only support authentication
# type None
- self._websocket.send_frame(six.int2byte(1))
+ self._websocket.send_frame(bytes((1,)))
# The server should send 4 bytes of 0's if security
# handshake succeeded
@@ -135,7 +133,7 @@
'Server did not think security was successful.')
# Say to leave the desktop as shared as part of client initialization
- self._websocket.send_frame(six.int2byte(1))
+ self._websocket.send_frame(bytes((1,)))
# Get the server initialization packet back and make sure it is the
# right structure where bytes 20-24 is the name length and
# 24-N is the name
diff --git a/tempest/api/compute/servers/test_server_tags.py b/tempest/api/compute/servers/test_server_tags.py
index 619f480..c988788 100644
--- a/tempest/api/compute/servers/test_server_tags.py
+++ b/tempest/api/compute/servers/test_server_tags.py
@@ -13,8 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-import six
-
from tempest.api.compute import base
from tempest.common import utils
from tempest.lib.common.utils import data_utils
@@ -84,11 +82,11 @@
new_tags = [data_utils.rand_name('tag'), data_utils.rand_name('tag')]
replaced_tags = self.client.update_all_tags(
self.server['id'], new_tags)['tags']
- six.assertCountEqual(self, new_tags, replaced_tags)
+ self.assertCountEqual(new_tags, replaced_tags)
# List the tags and check that the tags were replaced.
fetched_tags = self.client.list_tags(self.server['id'])['tags']
- six.assertCountEqual(self, new_tags, fetched_tags)
+ self.assertCountEqual(new_tags, fetched_tags)
@decorators.idempotent_id('a63b2a74-e918-4b7c-bcab-10c855f3a57e')
def test_delete_all_tags(self):
diff --git a/tempest/api/identity/v2/test_tokens.py b/tempest/api/identity/v2/test_tokens.py
index a928ad9..d3776b8 100644
--- a/tempest/api/identity/v2/test_tokens.py
+++ b/tempest/api/identity/v2/test_tokens.py
@@ -14,7 +14,6 @@
# under the License.
from oslo_utils import timeutils
-import six
from tempest.api.identity import base
from tempest.lib import decorators
@@ -36,7 +35,7 @@
body = token_client.auth(username, password, tenant_name)
self.assertNotEmpty(body['token']['id'])
- self.assertIsInstance(body['token']['id'], six.string_types)
+ self.assertIsInstance(body['token']['id'], str)
now = timeutils.utcnow()
expires_at = timeutils.normalize_time(
diff --git a/tempest/api/identity/v3/test_tokens.py b/tempest/api/identity/v3/test_tokens.py
index b201285..55fcead 100644
--- a/tempest/api/identity/v3/test_tokens.py
+++ b/tempest/api/identity/v3/test_tokens.py
@@ -16,7 +16,6 @@
import operator
from oslo_utils import timeutils
-import six
from tempest.api.identity import base
from tempest.lib import decorators
@@ -88,7 +87,7 @@
auth_data=True)
self.assertNotEmpty(token_id)
- self.assertIsInstance(token_id, six.string_types)
+ self.assertIsInstance(token_id, str)
now = timeutils.utcnow()
expires_at = timeutils.normalize_time(
diff --git a/tempest/api/network/test_allowed_address_pair.py b/tempest/api/network/test_allowed_address_pair.py
index 0b9d381..905bf13 100644
--- a/tempest/api/network/test_allowed_address_pair.py
+++ b/tempest/api/network/test_allowed_address_pair.py
@@ -13,8 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-import six
-
from tempest.api.network import base
from tempest.common import utils
from tempest.lib.common.utils import data_utils
@@ -99,8 +97,7 @@
body = self.ports_client.update_port(
port_id, allowed_address_pairs=allowed_address_pairs)
allowed_address_pair = body['port']['allowed_address_pairs']
- six.assertCountEqual(self, allowed_address_pair,
- allowed_address_pairs)
+ self.assertCountEqual(allowed_address_pair, allowed_address_pairs)
@decorators.idempotent_id('9599b337-272c-47fd-b3cf-509414414ac4')
def test_update_port_with_address_pair(self):
diff --git a/tempest/api/network/test_networks.py b/tempest/api/network/test_networks.py
index 7646b63..caaf964 100644
--- a/tempest/api/network/test_networks.py
+++ b/tempest/api/network/test_networks.py
@@ -13,7 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
import netaddr
-import six
import testtools
from tempest.api.network import base
@@ -595,9 +594,9 @@
subnets = [sub['id'] for sub in body['subnets']
if sub['network_id'] == network['id']]
test_subnet_ids = [sub['id'] for sub in (subnet1, subnet2)]
- six.assertCountEqual(self, subnets,
- test_subnet_ids,
- 'Subnet are not in the same network')
+ self.assertCountEqual(subnets,
+ test_subnet_ids,
+ 'Subnet are not in the same network')
class NetworksIpV6TestAttrs(BaseNetworkTestResources):
diff --git a/tempest/api/object_storage/test_account_services.py b/tempest/api/object_storage/test_account_services.py
index ffea6f6..4966ec4 100644
--- a/tempest/api/object_storage/test_account_services.py
+++ b/tempest/api/object_storage/test_account_services.py
@@ -14,8 +14,6 @@
# under the License.
import random
-
-import six
import testtools
from tempest.api.object_storage import base
@@ -43,7 +41,7 @@
def resource_setup(cls):
super(AccountTest, cls).resource_setup()
for i in range(ord('a'), ord('f') + 1):
- name = data_utils.rand_name(name='%s-' % six.int2byte(i))
+ name = data_utils.rand_name(name='%s-' % bytes((i,)))
cls.container_client.update_container(name)
cls.addClassResourceCleanup(base.delete_containers,
[name],
diff --git a/tempest/api/volume/admin/test_multi_backend.py b/tempest/api/volume/admin/test_multi_backend.py
index a5de987..83733bd 100644
--- a/tempest/api/volume/admin/test_multi_backend.py
+++ b/tempest/api/volume/admin/test_multi_backend.py
@@ -10,7 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-import six
from tempest.api.volume import base
from tempest.common import waiters
from tempest import config
@@ -149,4 +148,4 @@
# assert that volumes are each created on separate hosts:
msg = ("volumes %s were created in the same backend" % ", "
.join(volume_hosts))
- six.assertCountEqual(self, volume_hosts, set(volume_hosts), msg)
+ self.assertCountEqual(volume_hosts, set(volume_hosts), msg)
diff --git a/tempest/lib/common/api_version_utils.py b/tempest/lib/common/api_version_utils.py
index 80dbc1d..db5c8c3 100644
--- a/tempest/lib/common/api_version_utils.py
+++ b/tempest/lib/common/api_version_utils.py
@@ -12,7 +12,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-import six
import testtools
from tempest.lib.common import api_version_request
@@ -117,7 +116,7 @@
:param response_header: Response header where microversion is
expected to be present.
"""
- if not isinstance(api_microversion, six.string_types):
+ if not isinstance(api_microversion, str):
raise TypeError('api_microversion must be a string')
api_microversion_header_name = api_microversion_header_name.lower()
if (api_microversion_header_name not in response_header or
diff --git a/tempest/lib/common/dynamic_creds.py b/tempest/lib/common/dynamic_creds.py
index f334c36..d86522a 100644
--- a/tempest/lib/common/dynamic_creds.py
+++ b/tempest/lib/common/dynamic_creds.py
@@ -16,7 +16,6 @@
import netaddr
from oslo_log import log as logging
-import six
from tempest.lib.common import cred_client
from tempest.lib.common import cred_provider
@@ -556,7 +555,7 @@
if not self._creds:
return
self._clear_isolated_net_resources()
- for creds in six.itervalues(self._creds):
+ for creds in self._creds.values():
try:
self.creds_client.delete_user(creds.user_id)
except lib_exc.NotFound:
diff --git a/tempest/lib/common/http.py b/tempest/lib/common/http.py
index 8c1a802..33f871b 100644
--- a/tempest/lib/common/http.py
+++ b/tempest/lib/common/http.py
@@ -13,7 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-import six
import urllib3
@@ -89,7 +88,7 @@
for key, value in info.getheaders().items():
# We assume HTTP header name to be string, not random
# bytes, thus ensure we have string keys.
- self[six.u(key).lower()] = value
+ self[str(key).lower()] = value
self.status = info.status
self['status'] = str(self.status)
self.reason = info.reason
diff --git a/tempest/lib/common/rest_client.py b/tempest/lib/common/rest_client.py
index 2331b9c..573d64e 100644
--- a/tempest/lib/common/rest_client.py
+++ b/tempest/lib/common/rest_client.py
@@ -24,7 +24,6 @@
from oslo_log import log as logging
from oslo_log import versionutils
from oslo_serialization import jsonutils as json
-import six
from tempest.lib.common import http
from tempest.lib.common import jsonschema_validator
@@ -509,7 +508,7 @@
if not hasattr(body, "keys") or len(body.keys()) != 1:
return body
# Just return the "wrapped" element
- _, first_item = six.next(six.iteritems(body))
+ _, first_item = tuple(body.items())[0]
if isinstance(first_item, (dict, list)):
return first_item
except (ValueError, IndexError):
diff --git a/tempest/lib/common/ssh.py b/tempest/lib/common/ssh.py
index 60107d7..ee15375 100644
--- a/tempest/lib/common/ssh.py
+++ b/tempest/lib/common/ssh.py
@@ -21,7 +21,6 @@
import warnings
from oslo_log import log as logging
-import six
from tempest.lib import exceptions
@@ -66,7 +65,7 @@
self.username = username
self.port = port
self.password = password
- if isinstance(pkey, six.string_types):
+ if isinstance(pkey, str):
pkey = paramiko.RSAKey.from_private_key(
io.StringIO(str(pkey)))
self.pkey = pkey
diff --git a/tempest/lib/common/utils/data_utils.py b/tempest/lib/common/utils/data_utils.py
index b6671b5..1e94f86 100644
--- a/tempest/lib/common/utils/data_utils.py
+++ b/tempest/lib/common/utils/data_utils.py
@@ -19,7 +19,6 @@
import uuid
from oslo_utils import uuidutils
-import six.moves
def rand_uuid():
@@ -171,7 +170,7 @@
"""
if size > 1 << 20:
raise RuntimeError('Size should be less than 1MiB')
- return b''.join([six.int2byte(random.randint(0, 255))
+ return b''.join([bytes((random.randint(0, 255),))
for i in range(size)])
diff --git a/tempest/lib/common/utils/linux/remote_client.py b/tempest/lib/common/utils/linux/remote_client.py
index 71fed02..d84dd28 100644
--- a/tempest/lib/common/utils/linux/remote_client.py
+++ b/tempest/lib/common/utils/linux/remote_client.py
@@ -15,7 +15,6 @@
import netaddr
from oslo_log import log as logging
-import six
from tempest.lib.common import ssh
from tempest.lib.common.utils import test_utils
@@ -55,8 +54,8 @@
except Exception:
msg = 'Could not get console_log for server %s'
LOG.debug(msg, self.server['id'])
- # re-raise the original ssh timeout exception
- six.reraise(*original_exception)
+ # raise the original ssh timeout exception
+ raise
finally:
# Delete the traceback to avoid circular references
_, _, trace = original_exception
diff --git a/tempest/lib/decorators.py b/tempest/lib/decorators.py
index 25ff473..a4633ca 100644
--- a/tempest/lib/decorators.py
+++ b/tempest/lib/decorators.py
@@ -16,7 +16,6 @@
import uuid
from oslo_log import log as logging
-import six
import testtools
from tempest.lib import exceptions as lib_exc
@@ -110,7 +109,7 @@
def idempotent_id(id):
"""Stub for metadata decorator"""
- if not isinstance(id, six.string_types):
+ if not isinstance(id, str):
raise TypeError('Test idempotent_id must be string not %s'
'' % type(id).__name__)
uuid.UUID(id)
@@ -140,7 +139,7 @@
# Check to see if the attr should be conditional applied.
if 'condition' in kwargs and not kwargs.get('condition'):
return f
- if 'type' in kwargs and isinstance(kwargs['type'], six.string_types):
+ if 'type' in kwargs and isinstance(kwargs['type'], str):
f = testtools.testcase.attr(kwargs['type'])(f)
elif 'type' in kwargs and isinstance(kwargs['type'], list):
for attr in kwargs['type']:
diff --git a/tempest/lib/services/compute/assisted_volume_snapshots_client.py b/tempest/lib/services/compute/assisted_volume_snapshots_client.py
index 8b67491..7a949df 100644
--- a/tempest/lib/services/compute/assisted_volume_snapshots_client.py
+++ b/tempest/lib/services/compute/assisted_volume_snapshots_client.py
@@ -13,8 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
+from urllib import parse as urllib
+
from oslo_serialization import jsonutils as json
-from six.moves.urllib import parse as urllib
from tempest.lib.common import rest_client
from tempest.lib.services.compute import base_compute_client
diff --git a/tempest/lib/services/identity/v3/identity_providers_client.py b/tempest/lib/services/identity/v3/identity_providers_client.py
index af6a245..002bc8c 100644
--- a/tempest/lib/services/identity/v3/identity_providers_client.py
+++ b/tempest/lib/services/identity/v3/identity_providers_client.py
@@ -13,8 +13,9 @@
# License for the specific language governing permissions and limitations under
# the License.
+from urllib import parse as urllib
+
from oslo_serialization import jsonutils as json
-from six.moves.urllib import parse as urllib
from tempest.lib.common import rest_client
diff --git a/tempest/lib/services/identity/v3/mappings_client.py b/tempest/lib/services/identity/v3/mappings_client.py
index 9ec5384..a924b33 100644
--- a/tempest/lib/services/identity/v3/mappings_client.py
+++ b/tempest/lib/services/identity/v3/mappings_client.py
@@ -13,8 +13,9 @@
# License for the specific language governing permissions and limitations under
# the License.
+from urllib import parse as urllib
+
from oslo_serialization import jsonutils as json
-from six.moves.urllib import parse as urllib
from tempest.lib.common import rest_client
diff --git a/tempest/lib/services/identity/v3/oauth_token_client.py b/tempest/lib/services/identity/v3/oauth_token_client.py
index 236b224..564d6d6 100644
--- a/tempest/lib/services/identity/v3/oauth_token_client.py
+++ b/tempest/lib/services/identity/v3/oauth_token_client.py
@@ -20,8 +20,6 @@
import time
from urllib import parse as urlparse
-import six
-
from oslo_serialization import jsonutils as json
from tempest.lib.common import rest_client
@@ -35,7 +33,7 @@
safe = b'~'
s = s.encode('utf-8') if isinstance(s, str) else s
s = urlparse.quote(s, safe)
- if isinstance(s, six.binary_type):
+ if isinstance(s, bytes):
s = s.decode('utf-8')
return s
diff --git a/tempest/lib/services/identity/v3/protocols_client.py b/tempest/lib/services/identity/v3/protocols_client.py
index 2e0221b..19aa426 100644
--- a/tempest/lib/services/identity/v3/protocols_client.py
+++ b/tempest/lib/services/identity/v3/protocols_client.py
@@ -13,8 +13,9 @@
# License for the specific language governing permissions and limitations under
# the License.
+from urllib import parse as urllib
+
from oslo_serialization import jsonutils as json
-from six.moves.urllib import parse as urllib
from tempest.lib.common import rest_client
diff --git a/tempest/lib/services/identity/v3/service_providers_client.py b/tempest/lib/services/identity/v3/service_providers_client.py
index b84cf43..5d4f014 100644
--- a/tempest/lib/services/identity/v3/service_providers_client.py
+++ b/tempest/lib/services/identity/v3/service_providers_client.py
@@ -13,8 +13,9 @@
# License for the specific language governing permissions and limitations under
# the License.
+from urllib import parse as urllib
+
from oslo_serialization import jsonutils as json
-from six.moves.urllib import parse as urllib
from tempest.lib.common import rest_client
diff --git a/tempest/lib/services/volume/v1/volumes_client.py b/tempest/lib/services/volume/v1/volumes_client.py
index 9fca800..5d8d73b 100644
--- a/tempest/lib/services/volume/v1/volumes_client.py
+++ b/tempest/lib/services/volume/v1/volumes_client.py
@@ -16,7 +16,6 @@
from urllib import parse as urllib
from oslo_serialization import jsonutils as json
-import six
from tempest.lib.common import rest_client
from tempest.lib import exceptions as lib_exc
@@ -31,7 +30,7 @@
If params is a string it will be left as it is, but if it's not it will
be urlencoded.
"""
- if isinstance(params, six.string_types):
+ if isinstance(params, str):
return params
return urllib.urlencode(params)
diff --git a/tempest/lib/services/volume/v3/volumes_client.py b/tempest/lib/services/volume/v3/volumes_client.py
index 147a79b..9c6fe68 100644
--- a/tempest/lib/services/volume/v3/volumes_client.py
+++ b/tempest/lib/services/volume/v3/volumes_client.py
@@ -16,7 +16,6 @@
from urllib import parse as urllib
from oslo_serialization import jsonutils as json
-import six
from tempest.lib.api_schema.response.volume import volumes as schema
from tempest.lib.common import rest_client
@@ -33,7 +32,7 @@
If params is a string it will be left as it is, but if it's not it will
be urlencoded.
"""
- if isinstance(params, six.string_types):
+ if isinstance(params, str):
return params
return urllib.urlencode(params)
diff --git a/tempest/test.py b/tempest/test.py
index 655b9a4..8ea3b16 100644
--- a/tempest/test.py
+++ b/tempest/test.py
@@ -20,7 +20,6 @@
import debtcollector.moves
import fixtures
from oslo_log import log as logging
-import six
import testtools
from tempest import clients
@@ -179,7 +178,7 @@
etype, cls.__name__)
cls.tearDownClass()
try:
- six.reraise(etype, value, trace)
+ raise value.with_traceback(trace)
finally:
del trace # to avoid circular refs
finally:
@@ -233,7 +232,7 @@
# the first one
if re_raise and etype is not None:
try:
- six.reraise(etype, value, trace)
+ raise value.with_traceback(trace)
finally:
del trace # to avoid circular refs
@@ -384,7 +383,7 @@
# This may raise an exception in case credentials are not available
# In that case we want to let the exception through and the test
# fail accordingly
- if isinstance(credentials_type, six.string_types):
+ if isinstance(credentials_type, str):
manager = cls.get_client_manager(
credential_type=credentials_type)
setattr(cls, 'os_%s' % credentials_type, manager)
@@ -859,7 +858,7 @@
"""
# Get a manager for the given credentials_type, but at least
# always fall back on getting the manager for primary credentials
- if isinstance(credentials_type, six.string_types):
+ if isinstance(credentials_type, str):
manager = cls.get_client_manager(credential_type=credentials_type)
elif isinstance(credentials_type, list):
scope = 'project'
diff --git a/tempest/tests/lib/common/test_preprov_creds.py b/tempest/tests/lib/common/test_preprov_creds.py
index fe7fcd2..f2131dc 100644
--- a/tempest/tests/lib/common/test_preprov_creds.py
+++ b/tempest/tests/lib/common/test_preprov_creds.py
@@ -144,8 +144,7 @@
# Emulate the lock existing on the filesystem
self.useFixture(fixtures.MockPatch(
'os.path.isfile', return_value=True))
- with mock.patch('six.moves.builtins.open', mock.mock_open(),
- create=True):
+ with mock.patch('builtins.open', mock.mock_open(), create=True):
test_account_class = (
preprov_creds.PreProvisionedCredentialProvider(
**self.fixed_params))
@@ -157,8 +156,7 @@
# Emulate the lock not existing on the filesystem
self.useFixture(fixtures.MockPatch(
'os.path.isfile', return_value=False))
- with mock.patch('six.moves.builtins.open', mock.mock_open(),
- create=True):
+ with mock.patch('builtins.open', mock.mock_open(), create=True):
test_account_class = (
preprov_creds.PreProvisionedCredentialProvider(
**self.fixed_params))
@@ -177,7 +175,7 @@
'os.path.isfile', return_value=False))
test_account_class = preprov_creds.PreProvisionedCredentialProvider(
**self.fixed_params)
- with mock.patch('six.moves.builtins.open', mock.mock_open(),
+ with mock.patch('builtins.open', mock.mock_open(),
create=True) as open_mock:
test_account_class._get_free_hash(hash_list)
lock_path = os.path.join(self.fixed_params['accounts_lock_dir'],
@@ -196,8 +194,7 @@
'os.path.isfile', return_value=True))
test_account_class = preprov_creds.PreProvisionedCredentialProvider(
**self.fixed_params)
- with mock.patch('six.moves.builtins.open', mock.mock_open(),
- create=True):
+ with mock.patch('builtins.open', mock.mock_open(), create=True):
self.assertRaises(lib_exc.InvalidCredentials,
test_account_class._get_free_hash, hash_list)
@@ -217,7 +214,7 @@
return True
self.patchobject(os.path, 'isfile', _fake_is_file)
- with mock.patch('six.moves.builtins.open', mock.mock_open(),
+ with mock.patch('builtins.open', mock.mock_open(),
create=True) as open_mock:
test_account_class._get_free_hash(hash_list)
lock_path = os.path.join(self.fixed_params['accounts_lock_dir'],
diff --git a/tempest/tests/lib/common/test_rest_client.py b/tempest/tests/lib/common/test_rest_client.py
index 5948056..c5f6d7a 100644
--- a/tempest/tests/lib/common/test_rest_client.py
+++ b/tempest/tests/lib/common/test_rest_client.py
@@ -17,7 +17,6 @@
import fixtures
import jsonschema
from oslo_serialization import jsonutils as json
-import six
from tempest.lib.common import http
from tempest.lib.common import rest_client
@@ -93,7 +92,7 @@
class TestRestClientHeadersJSON(TestRestClientHTTPMethods):
def _verify_headers(self, resp):
- resp = dict((k.lower(), v) for k, v in six.iteritems(resp))
+ resp = dict((k.lower(), v) for k, v in resp.items())
self.assertEqual(self.header_value, resp['accept'])
self.assertEqual(self.header_value, resp['content-type'])
diff --git a/tempest/tests/lib/services/test_clients.py b/tempest/tests/lib/services/test_clients.py
index f83064a..6c79db6 100644
--- a/tempest/tests/lib/services/test_clients.py
+++ b/tempest/tests/lib/services/test_clients.py
@@ -16,7 +16,6 @@
from unittest import mock
import fixtures
-import six
import testtools
from tempest.lib import auth
@@ -270,8 +269,7 @@
'module_path': 'This neither',
'client_names': ['SomeClient1']}]}
msg = "(?=.*{0})(?=.*{1})".format(
- *[x[1][0]['module_path'] for x in six.iteritems(
- fake_service_clients)])
+ *[x[1][0]['module_path'] for x in fake_service_clients.items()])
self.useFixture(fixtures.MockPatchObject(
clients.ClientsRegistry(), 'get_service_clients',
return_value=fake_service_clients))
@@ -300,8 +298,8 @@
'module_path': 'fake_path_2',
'client_names': ['SomeClient2']}]}
msg = "(?=.*{0})(?=.*{1})".format(
- *[x[1][0]['service_version'] for x in six.iteritems(
- fake_service_clients)])
+ *[x[1][0]['service_version'] for x in
+ fake_service_clients.items()])
self.useFixture(fixtures.MockPatchObject(
clients.ClientsRegistry(), 'get_service_clients',
return_value=fake_service_clients))
diff --git a/tempest/tests/lib/test_ssh.py b/tempest/tests/lib/test_ssh.py
index 035bdb0..886d99c 100644
--- a/tempest/tests/lib/test_ssh.py
+++ b/tempest/tests/lib/test_ssh.py
@@ -16,7 +16,6 @@
import socket
from unittest import mock
-import six
import testtools
from tempest.lib.common import ssh
@@ -240,7 +239,7 @@
return chan_mock, poll_mock, select_mock, client_mock
- _utf8_string = six.unichr(1071)
+ _utf8_string = chr(1071)
_utf8_bytes = _utf8_string.encode("utf-8")
@mock.patch('select.POLLIN', SELECT_POLLIN, create=True)
diff --git a/tools/check_logs.py b/tools/check_logs.py
index cc74b17..8ab3af2 100755
--- a/tools/check_logs.py
+++ b/tools/check_logs.py
@@ -23,7 +23,6 @@
import sys
import urllib.request as urlreq
-import six
import yaml
# DEVSTACK_GATE_GRENADE is either unset if grenade is not running
@@ -137,7 +136,7 @@
with open(ALLOW_LIST_FILE) as stream:
loaded = yaml.safe_load(stream)
if loaded:
- for (name, l) in six.iteritems(loaded):
+ for (name, l) in loaded.values():
for w in l:
assert 'module' in w, 'no module in %s' % name
assert 'message' in w, 'no message in %s' % name