diff options
author | Brant Knudson <bknudson@us.ibm.com> | 2016-01-13 21:36:13 +0000 |
---|---|---|
committer | Brant Knudson <bknudson@us.ibm.com> | 2016-01-13 21:36:13 +0000 |
commit | d20b300589863bcf165945beb129ebcc3621a14f (patch) | |
tree | e33102d0f075091be0dc7f8f7d03ff4a9099ab46 /keystoneclient/base.py | |
parent | c28d40814962b3a8ccb81e5e7d7f832c8f0a3c9a (diff) | |
download | python-keystoneclient-d20b300589863bcf165945beb129ebcc3621a14f.tar.gz |
Revert "Support `truncated` flag returned by keystone"2.1.1
This reverts commit c28d40814962b3a8ccb81e5e7d7f832c8f0a3c9a.
This is causing stable keystone to fail. keystone has tests
that verify that the returned value of the list
operation == [], which fails since the return value is now
an object and not a list.
Change-Id: Ieb143574271b991d3e19e864497073fbedf46bcb
Diffstat (limited to 'keystoneclient/base.py')
-rw-r--r-- | keystoneclient/base.py | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/keystoneclient/base.py b/keystoneclient/base.py index b61305d..a03ecee 100644 --- a/keystoneclient/base.py +++ b/keystoneclient/base.py @@ -20,7 +20,6 @@ Base utilities to build API operation managers and objects on top of. """ import abc -import collections import copy import functools import warnings @@ -77,23 +76,6 @@ def filter_kwargs(f): return func -class KeystoneReturnedList(collections.Sequence): - """A list of entities with additional attributes.""" - - def __init__(self, collection, truncated=False): - self.collection = collection - self.truncated = truncated - - def __getitem__(self, i): - return self.collection[i] - - def __len__(self): - return len(self.collection) - - def sort(self, *args, **kwargs): - return self.collection.sort(*args, **kwargs) - - class Manager(object): """Basic manager type providing common operations. @@ -145,7 +127,6 @@ class Manager(object): obj_class = self.resource_class data = body[response_key] - truncated = body.get('truncated', False) # NOTE(ja): keystone returns values as list as {'values': [ ... ]} # unlike other services which just return the list... try: @@ -153,8 +134,7 @@ class Manager(object): except (KeyError, TypeError): pass - objects = [obj_class(self, res, loaded=True) for res in data if res] - return KeystoneReturnedList(objects, truncated=truncated) + return [obj_class(self, res, loaded=True) for res in data if res] def _get(self, url, response_key, **kwargs): """Get an object from collection. |