Drop using six library
Since we dropped python 2 support and testing in[1], there is no compatibility with Python2 now. We can stop using python six module. [1] https://review.opendev.org/#/c/698245/ Change-Id: I15771f129ada53f1f8ca6683c8d80d5675332db5
This commit is contained in:
parent
7d851c6401
commit
5b3a139c4a
|
@ -124,7 +124,6 @@ rfc3986==0.3.1
|
||||||
Routes==2.3.1
|
Routes==2.3.1
|
||||||
ryu==4.24
|
ryu==4.24
|
||||||
simplejson==3.5.1
|
simplejson==3.5.1
|
||||||
six==1.10.0
|
|
||||||
snowballstemmer==1.2.1
|
snowballstemmer==1.2.1
|
||||||
Sphinx==1.6.2
|
Sphinx==1.6.2
|
||||||
sphinxcontrib-websupport==1.0.1
|
sphinxcontrib-websupport==1.0.1
|
||||||
|
|
|
@ -15,11 +15,5 @@
|
||||||
|
|
||||||
import gettext
|
import gettext
|
||||||
|
|
||||||
import six
|
|
||||||
|
|
||||||
|
gettext.install('neutron')
|
||||||
if six.PY2:
|
|
||||||
# pylint: disable=unexpected-keyword-arg
|
|
||||||
gettext.install('neutron', unicode=1)
|
|
||||||
else:
|
|
||||||
gettext.install('neutron')
|
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
|
|
||||||
import six
|
|
||||||
|
|
||||||
from neutron.api.v2 import resource_helper
|
from neutron.api.v2 import resource_helper
|
||||||
|
|
||||||
from neutron_lib.api import converters
|
from neutron_lib.api import converters
|
||||||
|
@ -98,8 +96,7 @@ class Vpn_endpoint_groups(extensions.ExtensionDescriptor):
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
||||||
@six.add_metaclass(abc.ABCMeta)
|
class VPNEndpointGroupsPluginBase(object, metaclass=abc.ABCMeta):
|
||||||
class VPNEndpointGroupsPluginBase(object):
|
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def create_endpoint_group(self, context, endpoint_group):
|
def create_endpoint_group(self, context, endpoint_group):
|
||||||
|
|
|
@ -23,8 +23,6 @@ from neutron_lib import exceptions as nexception
|
||||||
from neutron_lib.plugins import constants as nconstants
|
from neutron_lib.plugins import constants as nconstants
|
||||||
from neutron_lib.services import base as service_base
|
from neutron_lib.services import base as service_base
|
||||||
|
|
||||||
import six
|
|
||||||
|
|
||||||
from neutron.api.v2 import resource_helper
|
from neutron.api.v2 import resource_helper
|
||||||
|
|
||||||
from neutron_vpnaas._i18n import _
|
from neutron_vpnaas._i18n import _
|
||||||
|
@ -514,8 +512,7 @@ class Vpnaas(extensions.ExtensionDescriptor):
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
||||||
@six.add_metaclass(abc.ABCMeta)
|
class VPNPluginBase(service_base.ServicePluginBase, metaclass=abc.ABCMeta):
|
||||||
class VPNPluginBase(service_base.ServicePluginBase):
|
|
||||||
|
|
||||||
def get_plugin_type(self):
|
def get_plugin_type(self):
|
||||||
return nconstants.VPN
|
return nconstants.VPN
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
# 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 configparser as ConfigParser
|
||||||
import errno
|
import errno
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
@ -24,15 +25,9 @@ from neutron_lib.utils import helpers
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from oslo_rootwrap import wrapper
|
from oslo_rootwrap import wrapper
|
||||||
import six
|
|
||||||
|
|
||||||
from neutron_vpnaas._i18n import _
|
from neutron_vpnaas._i18n import _
|
||||||
|
|
||||||
if six.PY3:
|
|
||||||
import configparser as ConfigParser
|
|
||||||
else:
|
|
||||||
import ConfigParser
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,8 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
import abc
|
import abc
|
||||||
|
|
||||||
import six
|
|
||||||
|
|
||||||
|
class DeviceDriver(object, metaclass=abc.ABCMeta):
|
||||||
@six.add_metaclass(abc.ABCMeta)
|
|
||||||
class DeviceDriver(object):
|
|
||||||
|
|
||||||
def __init__(self, agent, host):
|
def __init__(self, agent, host):
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -40,7 +40,6 @@ import oslo_messaging
|
||||||
from oslo_service import loopingcall
|
from oslo_service import loopingcall
|
||||||
from oslo_utils import encodeutils
|
from oslo_utils import encodeutils
|
||||||
from oslo_utils import fileutils
|
from oslo_utils import fileutils
|
||||||
import six
|
|
||||||
|
|
||||||
from neutron_vpnaas._i18n import _
|
from neutron_vpnaas._i18n import _
|
||||||
from neutron_vpnaas.extensions import vpnaas
|
from neutron_vpnaas.extensions import vpnaas
|
||||||
|
@ -134,8 +133,7 @@ def _get_template(template_file):
|
||||||
return JINJA_ENV.get_template(template_file)
|
return JINJA_ENV.get_template(template_file)
|
||||||
|
|
||||||
|
|
||||||
@six.add_metaclass(abc.ABCMeta)
|
class BaseSwanProcess(object, metaclass=abc.ABCMeta):
|
||||||
class BaseSwanProcess(object):
|
|
||||||
"""Swan Family Process Manager
|
"""Swan Family Process Manager
|
||||||
|
|
||||||
This class manages start/restart/stop ipsec process.
|
This class manages start/restart/stop ipsec process.
|
||||||
|
@ -796,8 +794,7 @@ class IPsecVpnDriverApi(object):
|
||||||
return cctxt.call(context, 'update_status', status=status)
|
return cctxt.call(context, 'update_status', status=status)
|
||||||
|
|
||||||
|
|
||||||
@six.add_metaclass(abc.ABCMeta)
|
class IPsecDriver(device_drivers.DeviceDriver, metaclass=abc.ABCMeta):
|
||||||
class IPsecDriver(device_drivers.DeviceDriver):
|
|
||||||
"""VPN Device Driver for IPSec.
|
"""VPN Device Driver for IPSec.
|
||||||
|
|
||||||
This class is designed for use with L3-agent now.
|
This class is designed for use with L3-agent now.
|
||||||
|
|
|
@ -20,15 +20,13 @@ from neutron_lib.plugins import directory
|
||||||
from neutron_lib import rpc as n_rpc
|
from neutron_lib import rpc as n_rpc
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
import six
|
|
||||||
|
|
||||||
from neutron_vpnaas.services.vpn.service_drivers import driver_validator
|
from neutron_vpnaas.services.vpn.service_drivers import driver_validator
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@six.add_metaclass(abc.ABCMeta)
|
class VpnDriver(object, metaclass=abc.ABCMeta):
|
||||||
class VpnDriver(object):
|
|
||||||
|
|
||||||
def __init__(self, service_plugin, validator=None):
|
def __init__(self, service_plugin, validator=None):
|
||||||
self.service_plugin = service_plugin
|
self.service_plugin = service_plugin
|
||||||
|
|
|
@ -16,7 +16,6 @@ import abc
|
||||||
|
|
||||||
import netaddr
|
import netaddr
|
||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
import six
|
|
||||||
|
|
||||||
from neutron.db.models import l3agent
|
from neutron.db.models import l3agent
|
||||||
from neutron.db.models import servicetype
|
from neutron.db.models import servicetype
|
||||||
|
@ -97,8 +96,7 @@ class IPsecVpnAgentApi(service_drivers.BaseIPsecVpnAgentApi):
|
||||||
topic, default_version, driver)
|
topic, default_version, driver)
|
||||||
|
|
||||||
|
|
||||||
@six.add_metaclass(abc.ABCMeta)
|
class BaseIPsecVPNDriver(service_drivers.VpnDriver, metaclass=abc.ABCMeta):
|
||||||
class BaseIPsecVPNDriver(service_drivers.VpnDriver):
|
|
||||||
"""Base VPN Service Driver class."""
|
"""Base VPN Service Driver class."""
|
||||||
|
|
||||||
def __init__(self, service_plugin, validator=None):
|
def __init__(self, service_plugin, validator=None):
|
||||||
|
|
|
@ -8,7 +8,6 @@ Jinja2>=2.10 # BSD License (3 clause)
|
||||||
netaddr>=0.7.18 # BSD
|
netaddr>=0.7.18 # BSD
|
||||||
SQLAlchemy>=1.2.0 # MIT
|
SQLAlchemy>=1.2.0 # MIT
|
||||||
alembic>=0.8.10 # MIT
|
alembic>=0.8.10 # MIT
|
||||||
six>=1.10.0 # MIT
|
|
||||||
neutron-lib>=1.18.0 # Apache-2.0
|
neutron-lib>=1.18.0 # Apache-2.0
|
||||||
oslo.concurrency>=3.26.0 # Apache-2.0
|
oslo.concurrency>=3.26.0 # Apache-2.0
|
||||||
oslo.config>=5.2.0 # Apache-2.0
|
oslo.config>=5.2.0 # Apache-2.0
|
||||||
|
|
Loading…
Reference in New Issue