summaryrefslogtreecommitdiff
path: root/openstackclient/network
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2020-10-09 19:37:48 +0000
committerGerrit Code Review <review@openstack.org>2020-10-09 19:37:48 +0000
commita48c05b90a376ce33e2f0a2d321b8c851a6ef0b0 (patch)
treeda430ebd4695049d4fdc06b8892f7103d6b0f5cc /openstackclient/network
parent960004dcc733e88841d372e160b9e43669796c80 (diff)
parentc2df9215e19752714e83fcad82c8ae3708f85d7a (diff)
downloadpython-openstackclient-a48c05b90a376ce33e2f0a2d321b8c851a6ef0b0.tar.gz
Merge "Remove usage of six"
Diffstat (limited to 'openstackclient/network')
-rw-r--r--openstackclient/network/common.py22
1 files changed, 10 insertions, 12 deletions
diff --git a/openstackclient/network/common.py b/openstackclient/network/common.py
index e68628b3..47ffbe77 100644
--- a/openstackclient/network/common.py
+++ b/openstackclient/network/common.py
@@ -18,7 +18,6 @@ import logging
import openstack.exceptions
from osc_lib.command import command
from osc_lib import exceptions
-import six
from openstackclient.i18n import _
@@ -54,8 +53,7 @@ def check_missing_extension_if_error(client_manager, attrs):
raise
-@six.add_metaclass(abc.ABCMeta)
-class NetDetectionMixin(object):
+class NetDetectionMixin(metaclass=abc.ABCMeta):
"""Convenience methods for nova-network vs. neutron decisions.
A live environment detects which network type it is running and creates its
@@ -166,8 +164,8 @@ class NetDetectionMixin(object):
pass
-@six.add_metaclass(abc.ABCMeta)
-class NetworkAndComputeCommand(NetDetectionMixin, command.Command):
+class NetworkAndComputeCommand(NetDetectionMixin, command.Command,
+ metaclass=abc.ABCMeta):
"""Network and Compute Command
Command class for commands that support implementation via
@@ -178,8 +176,8 @@ class NetworkAndComputeCommand(NetDetectionMixin, command.Command):
pass
-@six.add_metaclass(abc.ABCMeta)
-class NetworkAndComputeDelete(NetworkAndComputeCommand):
+class NetworkAndComputeDelete(NetworkAndComputeCommand,
+ metaclass=abc.ABCMeta):
"""Network and Compute Delete
Delete class for commands that support implementation via
@@ -222,8 +220,8 @@ class NetworkAndComputeDelete(NetworkAndComputeCommand):
raise exceptions.CommandError(msg)
-@six.add_metaclass(abc.ABCMeta)
-class NetworkAndComputeLister(NetDetectionMixin, command.Lister):
+class NetworkAndComputeLister(NetDetectionMixin, command.Lister,
+ metaclass=abc.ABCMeta):
"""Network and Compute Lister
Lister class for commands that support implementation via
@@ -234,8 +232,8 @@ class NetworkAndComputeLister(NetDetectionMixin, command.Lister):
pass
-@six.add_metaclass(abc.ABCMeta)
-class NetworkAndComputeShowOne(NetDetectionMixin, command.ShowOne):
+class NetworkAndComputeShowOne(NetDetectionMixin, command.ShowOne,
+ metaclass=abc.ABCMeta):
"""Network and Compute ShowOne
ShowOne class for commands that support implementation via
@@ -255,5 +253,5 @@ class NetworkAndComputeShowOne(NetDetectionMixin, command.ShowOne):
except openstack.exceptions.HttpException as exc:
msg = _("Error while executing command: %s") % exc.message
if exc.details:
- msg += ", " + six.text_type(exc.details)
+ msg += ", " + str(exc.details)
raise exceptions.CommandError(msg)