Remove six usage muranoclient/apiclient
Change-Id: I992c890d3c679fde64bcffff170a1d3b8b1b124e
This commit is contained in:
parent
d6ab4160d2
commit
ae37b0db70
|
@ -21,7 +21,6 @@ import abc
|
|||
import argparse
|
||||
import os
|
||||
|
||||
import six
|
||||
from stevedore import extension
|
||||
|
||||
from muranoclient.apiclient import exceptions
|
||||
|
@ -85,7 +84,7 @@ def load_plugin_from_args(args):
|
|||
plugin.sufficient_options()
|
||||
return plugin
|
||||
|
||||
for plugin_auth_system in sorted(six.iterkeys(_discovered_plugins)):
|
||||
for plugin_auth_system in sorted(iter(_discovered_plugins.keys())):
|
||||
plugin_class = _discovered_plugins[plugin_auth_system]
|
||||
plugin = plugin_class()
|
||||
plugin.parse_opts(args)
|
||||
|
@ -97,8 +96,7 @@ def load_plugin_from_args(args):
|
|||
raise exceptions.AuthPluginOptionsMissing(["auth_system"])
|
||||
|
||||
|
||||
@six.add_metaclass(abc.ABCMeta)
|
||||
class BaseAuthPlugin(object):
|
||||
class BaseAuthPlugin(object, metaclass=abc.ABCMeta):
|
||||
"""Base class for authentication plugins.
|
||||
|
||||
An authentication plugin needs to override at least the authenticate
|
||||
|
|
|
@ -28,8 +28,7 @@ import copy
|
|||
|
||||
from oslo_utils import strutils
|
||||
from oslo_utils import uuidutils
|
||||
import six
|
||||
from six.moves.urllib import parse
|
||||
import parse
|
||||
|
||||
from muranoclient.apiclient import exceptions
|
||||
from muranoclient.i18n import _
|
||||
|
@ -204,8 +203,7 @@ class BaseManager(HookableMixin):
|
|||
return self.client.delete(url)
|
||||
|
||||
|
||||
@six.add_metaclass(abc.ABCMeta)
|
||||
class ManagerWithFind(BaseManager):
|
||||
class ManagerWithFind(BaseManager, metaclass=abc.ABCMeta):
|
||||
"""Manager with additional `find()`/`findall()` methods."""
|
||||
|
||||
@abc.abstractmethod
|
||||
|
|
|
@ -26,9 +26,8 @@ places where actual behavior differs from the spec.
|
|||
|
||||
import json
|
||||
|
||||
import parse
|
||||
import requests
|
||||
import six
|
||||
from six.moves.urllib import parse
|
||||
|
||||
from muranoclient.apiclient import client
|
||||
|
||||
|
@ -65,7 +64,7 @@ class TestResponse(requests.Response):
|
|||
else:
|
||||
self._content = text
|
||||
default_headers = {}
|
||||
if six.PY3 and isinstance(self._content, six.string_types):
|
||||
if isinstance(self._content, str):
|
||||
self._content = self._content.encode('utf-8', 'strict')
|
||||
self.headers = data.get('headers') or default_headers
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue