Remove six from Datera driver

Change-Id: I641f08499b72134dd47b11661482c612f1bc28d1
This commit is contained in:
Takashi Kajinami 2024-05-21 17:06:38 +09:00
parent 7382bea3a7
commit 11f2f60d16
3 changed files with 4 additions and 7 deletions

View File

@ -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']:

View File

@ -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']:

View File

@ -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