Remove use of positional decorator
The positional decorator results in poorly maintainable code in a misguided effort to emulate python3's key-word-arg only notation and functionality. This patch removes keystonemiddleware's dependance on the positional decorator. Change-Id: I1be3b19d08daf18babac66f274787862c6d77a93
This commit is contained in:
parent
efb1fb99d8
commit
6f63f09735
@ -16,7 +16,6 @@ import fixtures
|
|||||||
from keystoneauth1 import fixture as client_fixtures
|
from keystoneauth1 import fixture as client_fixtures
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
from positional import positional
|
|
||||||
|
|
||||||
from keystonemiddleware import auth_token
|
from keystonemiddleware import auth_token
|
||||||
from keystonemiddleware.auth_token import _exceptions
|
from keystonemiddleware.auth_token import _exceptions
|
||||||
@ -43,7 +42,6 @@ class AuthTokenFixture(fixtures.Fixture):
|
|||||||
def tokens(self):
|
def tokens(self):
|
||||||
return self._token_data.keys()
|
return self._token_data.keys()
|
||||||
|
|
||||||
@positional(1)
|
|
||||||
def add_token_data(self, token_id=None, expires=None,
|
def add_token_data(self, token_id=None, expires=None,
|
||||||
user_id=None, user_name=None,
|
user_id=None, user_name=None,
|
||||||
user_domain_id=None, user_domain_name=None,
|
user_domain_id=None, user_domain_name=None,
|
||||||
@ -73,7 +71,6 @@ class AuthTokenFixture(fixtures.Fixture):
|
|||||||
token.add_role(name=role)
|
token.add_role(name=role)
|
||||||
self.add_token(token, token_id=token_id)
|
self.add_token(token, token_id=token_id)
|
||||||
|
|
||||||
@positional()
|
|
||||||
def add_token(self, token_data, token_id=None):
|
def add_token(self, token_data, token_id=None):
|
||||||
"""Add an existing token to the middleware.
|
"""Add an existing token to the middleware.
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@ oslo.log>=3.22.0 # Apache-2.0
|
|||||||
oslo.serialization!=2.19.1,>=1.10.0 # Apache-2.0
|
oslo.serialization!=2.19.1,>=1.10.0 # Apache-2.0
|
||||||
oslo.utils>=3.20.0 # Apache-2.0
|
oslo.utils>=3.20.0 # Apache-2.0
|
||||||
pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
||||||
positional>=1.1.1 # Apache-2.0
|
|
||||||
pycadf!=2.0.0,>=1.1.0 # Apache-2.0
|
pycadf!=2.0.0,>=1.1.0 # Apache-2.0
|
||||||
python-keystoneclient>=3.8.0 # Apache-2.0
|
python-keystoneclient>=3.8.0 # Apache-2.0
|
||||||
requests>=2.14.2 # Apache-2.0
|
requests>=2.14.2 # Apache-2.0
|
||||||
|
Loading…
Reference in New Issue
Block a user