diff --git a/keystoneclient/base.py b/keystoneclient/base.py index 712fbdccf..c57ee62ca 100644 --- a/keystoneclient/base.py +++ b/keystoneclient/base.py @@ -18,6 +18,7 @@ Base utilities to build API operation managers and objects on top of. """ +import abc import urllib from keystoneclient import exceptions @@ -116,6 +117,13 @@ class ManagerWithFind(Manager): """ Like a `Manager`, but with additional `find()`/`findall()` methods. """ + + __metaclass__ = abc.ABCMeta + + @abc.abstractmethod + def list(self): + pass + def find(self, **kwargs): """ Find a single item with attributes matching ``**kwargs``. diff --git a/keystoneclient/v2_0/tokens.py b/keystoneclient/v2_0/tokens.py index c129db771..4618b0c56 100644 --- a/keystoneclient/v2_0/tokens.py +++ b/keystoneclient/v2_0/tokens.py @@ -18,7 +18,7 @@ class Token(base.Resource): return self._info['token'].get('tenant', None) -class TokenManager(base.ManagerWithFind): +class TokenManager(base.Manager): resource_class = Token def authenticate(self, username=None, tenant_id=None, tenant_name=None,