Remove six

This plugin no longer supports python 2 thus usage of six is no longer
needed.

Change-Id: Ifec8c68edc0c67f0dae937a9cf48598b5725d3f6
This commit is contained in:
Takashi Kajinami 2024-02-08 21:47:21 +09:00
parent 2dab92c317
commit e675206288
3 changed files with 8 additions and 11 deletions

View File

@ -13,7 +13,6 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
# #
import six
from keystoneauth1.identity import v3 from keystoneauth1.identity import v3
from keystoneauth1 import session from keystoneauth1 import session
@ -211,7 +210,7 @@ class RatingClientV1(BaseRatingClient):
args.pop('self') args.pop('self')
uri = '/rating/module_config/hashmap/mappings/' uri = '/rating/module_config/hashmap/mappings/'
request_body = dict((k, v) request_body = dict((k, v)
for k, v in six.iteritems(args) if v is not None) for k, v in args.items() if v is not None)
return self._do_request('GET', uri, return self._do_request('GET', uri,
body=self.serialize(request_body)) body=self.serialize(request_body))
@ -226,7 +225,7 @@ class RatingClientV1(BaseRatingClient):
args.pop('self') args.pop('self')
uri = '/rating/module_config/hashmap/mappings/' uri = '/rating/module_config/hashmap/mappings/'
request_body = dict((k, v) request_body = dict((k, v)
for k, v in six.iteritems(args) if v is not None) for k, v in args.items() if v is not None)
return self._do_request('POST', uri, return self._do_request('POST', uri,
body=self.serialize(request_body), body=self.serialize(request_body),
expected_code=201) expected_code=201)
@ -247,7 +246,7 @@ class RatingClientV1(BaseRatingClient):
args.pop('self') args.pop('self')
uri = '/rating/module_config/hashmap/mappings/' uri = '/rating/module_config/hashmap/mappings/'
request_body = dict((k, v) request_body = dict((k, v)
for k, v in six.iteritems(args) if v is not None) for k, v in args.items() if v is not None)
return self._do_request('PUT', uri, return self._do_request('PUT', uri,
body=self.serialize(request_body), body=self.serialize(request_body),
expected_code=302) expected_code=302)
@ -312,7 +311,7 @@ class RatingClientV1(BaseRatingClient):
args.pop('self') args.pop('self')
uri = '/rating/module_config/hashmap/thresholds/' uri = '/rating/module_config/hashmap/thresholds/'
request_body = dict((k, v) request_body = dict((k, v)
for k, v in six.iteritems(args) if v is not None) for k, v in args.items() if v is not None)
return self._do_request('GET', uri, return self._do_request('GET', uri,
body=self.serialize(request_body)) body=self.serialize(request_body))
@ -323,7 +322,7 @@ class RatingClientV1(BaseRatingClient):
args.pop('self') args.pop('self')
uri = '/rating/module_config/hashmap/thresholds/' uri = '/rating/module_config/hashmap/thresholds/'
request_body = dict((k, v) request_body = dict((k, v)
for k, v in six.iteritems(args) if v is not None) for k, v in args.items() if v is not None)
return self._do_request('POST', uri, return self._do_request('POST', uri,
body=self.serialize(request_body), body=self.serialize(request_body),
expected_code=201) expected_code=201)
@ -335,7 +334,7 @@ class RatingClientV1(BaseRatingClient):
args.pop('self') args.pop('self')
uri = '/rating/module_config/hashmap/thresholds/' uri = '/rating/module_config/hashmap/thresholds/'
request_body = dict((k, v) request_body = dict((k, v)
for k, v in six.iteritems(args) if v is not None) for k, v in args.items() if v is not None)
return self._do_request('PUT', uri, return self._do_request('PUT', uri,
body=self.serialize(request_body), body=self.serialize(request_body),
expected_code=302) expected_code=302)
@ -364,7 +363,7 @@ class RatingClientV1(BaseRatingClient):
def _get_pyscript_request_body(name, data, checksum, script_id): def _get_pyscript_request_body(name, data, checksum, script_id):
args = locals() args = locals()
request_body = dict((k, v) request_body = dict((k, v)
for k, v in six.iteritems(args) if v is not None) for k, v in args.items() if v is not None)
return request_body return request_body
def create_pyscript(self, name, data, checksum=None, script_id=None): def create_pyscript(self, name, data, checksum=None, script_id=None):

View File

@ -13,7 +13,6 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
# #
import six
from tempest import config from tempest import config
from tempest.lib import exceptions from tempest.lib import exceptions
@ -74,7 +73,7 @@ class BaseRatingTest(tempest.test.BaseTestCase):
@classmethod @classmethod
def resource_cleanup(cls): def resource_cleanup(cls):
super(BaseRatingTest, cls).resource_cleanup() super(BaseRatingTest, cls).resource_cleanup()
for method, item_ids in six.iteritems(cls._created_resources): for method, item_ids in cls._created_resources.items():
delete_method = 'delete_' + method delete_method = 'delete_' + method
delete_method = getattr(cls.rating_client, delete_method) delete_method = getattr(cls.rating_client, delete_method)
for item_id in item_ids: for item_id in item_ids:

View File

@ -7,5 +7,4 @@ oslo.config>=3.18.0 # Apache-2.0
oslo.serialization>=2.14.0 # Apache-2.0 oslo.serialization>=2.14.0 # Apache-2.0
pbr>=2.0 # Apache-2.0 pbr>=2.0 # Apache-2.0
python-keystoneclient>=3.6.0 # Apache-2.0 python-keystoneclient>=3.6.0 # Apache-2.0
six>=1.9.0 # MIT
tempest>=15.0.0 # Apache-2.0 tempest>=15.0.0 # Apache-2.0