diff options
| author | Zuul <zuul@review.opendev.org> | 2019-04-26 03:16:10 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2019-04-26 03:16:10 +0000 |
| commit | 9c6941accdfd55cfdb1ca028bb8a5ab0d323ae51 (patch) | |
| tree | ecc3a4acbd1a67e4a607c042c0076bda2021d53d | |
| parent | 8d6a89f502fbca69f3b8f12b64b9256255f9a8a1 (diff) | |
| parent | 0707191d43396026a6ddd18213b06e1b26d94e9e (diff) | |
| download | python-cinderclient-9c6941accdfd55cfdb1ca028bb8a5ab0d323ae51.tar.gz | |
Merge "Remove bash-completion calls from base.py"
| -rw-r--r-- | cinderclient/base.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/cinderclient/base.py b/cinderclient/base.py index da83573..b17d745 100644 --- a/cinderclient/base.py +++ b/cinderclient/base.py @@ -91,12 +91,8 @@ class Manager(common_base.HookableMixin): except KeyError: pass - # FIXME(eharney): This is probably a bug - we should only call - # completion_cache for the shell, not here. - with self.completion_cache('human_id', obj_class, mode="w"): - with self.completion_cache('uuid', obj_class, mode="w"): - items_new = [obj_class(self, res, loaded=True) - for res in data if res] + items_new = [obj_class(self, res, loaded=True) + for res in data if res] if limit: limit = int(limit) margin = limit - len(items) @@ -330,9 +326,7 @@ class Manager(common_base.HookableMixin): if return_raw: return common_base.DictWithMeta(body[response_key], resp) - with self.completion_cache('human_id', self.resource_class, mode="a"): - with self.completion_cache('uuid', self.resource_class, mode="a"): - return self.resource_class(self, body[response_key], resp=resp) + return self.resource_class(self, body[response_key], resp=resp) def _delete(self, url): resp, body = self.api.client.delete(url) |
