Fix usage of NotImplementedError exceptions in auth classes
NotImplemented (which is a constant) was used instead the exception
NotImplementedError.
Change-Id: I9d6b75ae47c1ec31061234221a5dbf9ab6f9caee
diff --git a/tempest/auth.py b/tempest/auth.py
index 8d826cf..6bc9feb 100644
--- a/tempest/auth.py
+++ b/tempest/auth.py
@@ -68,10 +68,10 @@
"""
Decorate request with authentication data
"""
- raise NotImplemented
+ raise NotImplementedError
def _get_auth(self):
- raise NotImplemented
+ raise NotImplementedError
@classmethod
def check_credentials(cls, credentials):
@@ -98,7 +98,7 @@
self.cache = None
def is_expired(self, auth_data):
- raise NotImplemented
+ raise NotImplementedError
def auth_request(self, method, url, headers=None, body=None, filters=None):
"""
@@ -176,7 +176,7 @@
"""
Extracts the base_url based on provided filters
"""
- raise NotImplemented
+ raise NotImplementedError
class KeystoneAuthProvider(AuthProvider):
@@ -208,10 +208,10 @@
return _url, _headers, body
def _auth_client(self):
- raise NotImplemented
+ raise NotImplementedError
def _auth_params(self):
- raise NotImplemented
+ raise NotImplementedError
def _get_auth(self):
# Bypasses the cache
@@ -223,7 +223,7 @@
token, auth_data = auth_func(**auth_params)
return token, auth_data
else:
- raise NotImplemented
+ raise NotImplementedError
def get_token(self):
return self.auth_data[0]
@@ -250,7 +250,7 @@
else:
return xml_id.TokenClientXML()
else:
- raise NotImplemented
+ raise NotImplementedError
def _auth_params(self):
if self.client_type == 'tempest':
@@ -260,7 +260,7 @@
tenant=self.credentials.get('tenant_name', None),
auth_data=True)
else:
- raise NotImplemented
+ raise NotImplementedError
def base_url(self, filters, auth_data=None):
"""
@@ -334,7 +334,7 @@
else:
return xml_v3id.V3TokenClientXML()
else:
- raise NotImplemented
+ raise NotImplementedError
def _auth_params(self):
if self.client_type == 'tempest':
@@ -345,7 +345,7 @@
domain=self.credentials['domain_name'],
auth_data=True)
else:
- raise NotImplemented
+ raise NotImplementedError
def base_url(self, filters, auth_data=None):
"""