From 11f2f60d165b2eb95ec8140e4dbda489d40d0083 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Tue, 21 May 2024 17:06:38 +0900 Subject: [PATCH] Remove six from Datera driver Change-Id: I641f08499b72134dd47b11661482c612f1bc28d1 --- cinder/volume/drivers/datera/datera_api21.py | 3 +-- cinder/volume/drivers/datera/datera_api22.py | 3 +-- cinder/volume/drivers/datera/datera_iscsi.py | 5 ++--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/cinder/volume/drivers/datera/datera_api21.py b/cinder/volume/drivers/datera/datera_api21.py index 69d161e8729..9733fdfa376 100644 --- a/cinder/volume/drivers/datera/datera_api21.py +++ b/cinder/volume/drivers/datera/datera_api21.py @@ -26,7 +26,6 @@ from oslo_log import log as logging from oslo_serialization import jsonutils as json from oslo_utils import importutils from oslo_utils import units -import six from cinder.common import constants from cinder import exception @@ -1043,7 +1042,7 @@ class DateraApi(object): def _get_ip_pool_for_string_ip_2_1(self, ip, tenant): """Takes a string ipaddress and return the ip_pool API object dict """ pool = 'default' - ip_obj = ipaddress.ip_address(six.text_type(ip)) + ip_obj = ipaddress.ip_address(str(ip)) ip_pools = self.api.access_network_ip_pools.list(tenant=tenant) for ipdata in ip_pools: for adata in ipdata['network_paths']: diff --git a/cinder/volume/drivers/datera/datera_api22.py b/cinder/volume/drivers/datera/datera_api22.py index 1fa26c6660d..1732b9dbdb9 100644 --- a/cinder/volume/drivers/datera/datera_api22.py +++ b/cinder/volume/drivers/datera/datera_api22.py @@ -26,7 +26,6 @@ from oslo_log import log as logging from oslo_serialization import jsonutils as json from oslo_utils import importutils from oslo_utils import units -import six from cinder.common import constants from cinder import exception @@ -1107,7 +1106,7 @@ class DateraApi(object): def _get_ip_pool_for_string_ip_2_2(self, ip, tenant): """Takes a string ipaddress and return the ip_pool API object dict """ pool = 'default' - ip_obj = ipaddress.ip_address(six.text_type(ip)) + ip_obj = ipaddress.ip_address(str(ip)) ip_pools = self.api.access_network_ip_pools.list(tenant=tenant) for ipdata in ip_pools: for adata in ipdata['network_paths']: diff --git a/cinder/volume/drivers/datera/datera_iscsi.py b/cinder/volume/drivers/datera/datera_iscsi.py index 6ef4c213cdd..9b0087416fd 100644 --- a/cinder/volume/drivers/datera/datera_iscsi.py +++ b/cinder/volume/drivers/datera/datera_iscsi.py @@ -20,7 +20,6 @@ from eventlet.green import threading from oslo_config import cfg from oslo_log import log as logging from oslo_utils import importutils -import six from cinder import exception from cinder.i18n import _ @@ -103,9 +102,9 @@ CONF.import_opt('driver_use_ssl', 'cinder.volume.driver') CONF.register_opts(d_opts) -@six.add_metaclass(volume_utils.TraceWrapperWithABCMetaclass) @interface.volumedriver -class DateraDriver(san.SanISCSIDriver, api21.DateraApi, api22.DateraApi): +class DateraDriver(san.SanISCSIDriver, api21.DateraApi, api22.DateraApi, + metaclass=volume_utils.TraceWrapperWithABCMetaclass): """The OpenStack Datera iSCSI volume driver. .. code-block:: none