summaryrefslogtreecommitdiff
path: root/keystoneclient/v3
diff options
context:
space:
mode:
authorJamie Lennox <jamielennox@gmail.com>2016-08-24 17:37:07 +1000
committerJamie Lennox <jamielennox@gmail.com>2016-08-24 18:52:36 +1000
commitf557170404ec2b7f5c562e55ad212b6e444655c8 (patch)
treead5dde2988ffd86e56c0194a772f2a77c5abdf23 /keystoneclient/v3
parent4b8158f9b499646aa80dadf8594a9efa4ef57b14 (diff)
downloadpython-keystoneclient-f557170404ec2b7f5c562e55ad212b6e444655c8.tar.gz
Use AUTH_INTERFACE object from keystoneauth
As keystoneclient and other services rely more on keystoneauth we should assume that keystoneauth is our base auth library, not keystoneclient and start to default to the objects provided from there. This will make it easier to remove these objects when the time comes. Use the AUTH_INTERFACE special object from keystoneauth in most places. This uses it everywhere that is actually session independant. For example it is not changed within the keystoneclient auth plugins themselves as they are directly compatible with keystoneauth. Change-Id: Ibc1224fca98c852106feb78c624b0b2f22b3a19d
Diffstat (limited to 'keystoneclient/v3')
-rw-r--r--keystoneclient/v3/auth.py7
-rw-r--r--keystoneclient/v3/contrib/federation/base.py4
-rw-r--r--keystoneclient/v3/contrib/oauth1/access_tokens.py5
-rw-r--r--keystoneclient/v3/contrib/oauth1/request_tokens.py4
4 files changed, 11 insertions, 9 deletions
diff --git a/keystoneclient/v3/auth.py b/keystoneclient/v3/auth.py
index caad4ac..6272dbc 100644
--- a/keystoneclient/v3/auth.py
+++ b/keystoneclient/v3/auth.py
@@ -10,7 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from keystoneclient import auth
+from keystoneauth1 import plugin
+
from keystoneclient import base
from keystoneclient import exceptions
from keystoneclient.v3 import domains
@@ -43,7 +44,7 @@ class AuthManager(base.Manager):
'projects',
obj_class=Project)
except exceptions.EndpointNotFound:
- endpoint_filter = {'interface': auth.AUTH_INTERFACE}
+ endpoint_filter = {'interface': plugin.AUTH_INTERFACE}
return self._list(self._PROJECTS_URL,
'projects',
obj_class=Project,
@@ -61,7 +62,7 @@ class AuthManager(base.Manager):
'domains',
obj_class=Domain)
except exceptions.EndpointNotFound:
- endpoint_filter = {'interface': auth.AUTH_INTERFACE}
+ endpoint_filter = {'interface': plugin.AUTH_INTERFACE}
return self._list(self._DOMAINS_URL,
'domains',
obj_class=Domain,
diff --git a/keystoneclient/v3/contrib/federation/base.py b/keystoneclient/v3/contrib/federation/base.py
index 99c8d5a..5e2e9e7 100644
--- a/keystoneclient/v3/contrib/federation/base.py
+++ b/keystoneclient/v3/contrib/federation/base.py
@@ -12,9 +12,9 @@
import abc
+from keystoneauth1 import plugin
import six
-from keystoneclient.auth import base as base_auth
from keystoneclient import base
from keystoneclient import exceptions
@@ -34,7 +34,7 @@ class EntityManager(base.Manager):
try:
tenant_list = self._list(url, self.object_type)
except exceptions.EndpointException:
- endpoint_filter = {'interface': base_auth.AUTH_INTERFACE}
+ endpoint_filter = {'interface': plugin.AUTH_INTERFACE}
tenant_list = self._list(url, self.object_type,
endpoint_filter=endpoint_filter)
return tenant_list
diff --git a/keystoneclient/v3/contrib/oauth1/access_tokens.py b/keystoneclient/v3/contrib/oauth1/access_tokens.py
index b2d0e31..37f1941 100644
--- a/keystoneclient/v3/contrib/oauth1/access_tokens.py
+++ b/keystoneclient/v3/contrib/oauth1/access_tokens.py
@@ -13,7 +13,8 @@
from __future__ import unicode_literals
-from keystoneclient import auth
+from keystoneauth1 import plugin
+
from keystoneclient import base
from keystoneclient.v3.contrib.oauth1 import utils
@@ -41,7 +42,7 @@ class AccessTokenManager(base.CrudManager):
resource_owner_secret=request_secret,
signature_method=oauth1.SIGNATURE_HMAC,
verifier=verifier)
- url = self.client.get_endpoint(interface=auth.AUTH_INTERFACE).rstrip(
+ url = self.client.get_endpoint(interface=plugin.AUTH_INTERFACE).rstrip(
'/')
url, headers, body = oauth_client.sign(url + endpoint,
http_method='POST')
diff --git a/keystoneclient/v3/contrib/oauth1/request_tokens.py b/keystoneclient/v3/contrib/oauth1/request_tokens.py
index b33dd2e..59f06bc 100644
--- a/keystoneclient/v3/contrib/oauth1/request_tokens.py
+++ b/keystoneclient/v3/contrib/oauth1/request_tokens.py
@@ -13,9 +13,9 @@
from __future__ import unicode_literals
+from keystoneauth1 import plugin
from six.moves.urllib import parse as urlparse
-from keystoneclient import auth
from keystoneclient import base
from keystoneclient.v3.contrib.oauth1 import utils
@@ -63,7 +63,7 @@ class RequestTokenManager(base.CrudManager):
client_secret=consumer_secret,
signature_method=oauth1.SIGNATURE_HMAC,
callback_uri="oob")
- url = self.client.get_endpoint(interface=auth.AUTH_INTERFACE).rstrip(
+ url = self.client.get_endpoint(interface=plugin.AUTH_INTERFACE).rstrip(
"/")
url, headers, body = oauth_client.sign(url + endpoint,
http_method='POST',