summaryrefslogtreecommitdiff
path: root/keystoneclient/v3/auth.py
diff options
context:
space:
mode:
Diffstat (limited to 'keystoneclient/v3/auth.py')
-rw-r--r--keystoneclient/v3/auth.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/keystoneclient/v3/auth.py b/keystoneclient/v3/auth.py
index 6b8d6e9..4d85e24 100644
--- a/keystoneclient/v3/auth.py
+++ b/keystoneclient/v3/auth.py
@@ -16,10 +16,12 @@ from keystoneauth1 import plugin
from keystoneclient import base
from keystoneclient.v3 import domains
from keystoneclient.v3 import projects
+from keystoneclient.v3 import system
Domain = domains.Domain
Project = projects.Project
+System = system.System
class AuthManager(base.Manager):
@@ -31,6 +33,7 @@ class AuthManager(base.Manager):
_PROJECTS_URL = '/auth/projects'
_DOMAINS_URL = '/auth/domains'
+ _SYSTEM_URL = '/auth/system'
def projects(self):
"""List projects that the specified token can be rescoped to.
@@ -67,3 +70,23 @@ class AuthManager(base.Manager):
'domains',
obj_class=Domain,
endpoint_filter=endpoint_filter)
+
+ def systems(self):
+ """List Systems that the specified token can be rescoped to.
+
+ At the moment this is either empty or "all".
+
+ :returns: a list of systems.
+ :rtype: list of :class:`keystoneclient.v3.systems.System`.
+
+ """
+ try:
+ return self._list(self._SYSTEM_URL,
+ 'system',
+ obj_class=System)
+ except exceptions.EndpointNotFound:
+ endpoint_filter = {'interface': plugin.AUTH_INTERFACE}
+ return self._list(self._SYSTEM_URL,
+ 'system',
+ obj_class=System,
+ endpoint_filter=endpoint_filter)