diff options
author | drebs <drebs@leap.se> | 2012-12-05 15:57:14 -0200 |
---|---|---|
committer | drebs <drebs@leap.se> | 2012-12-05 15:57:14 -0200 |
commit | 449429948583706393200d24972cbb2a83c43bdc (patch) | |
tree | 0f5dc5488b8b809f7867e874de19c094e83ba69a /openstack.py | |
parent | 6f639f25ac599e20b1afa0afeb97b3041aa53283 (diff) |
OpenStack backend can get all docs
Diffstat (limited to 'openstack.py')
-rw-r--r-- | openstack.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/openstack.py b/openstack.py index 31f59e10..ebb97ac5 100644 --- a/openstack.py +++ b/openstack.py @@ -55,7 +55,16 @@ class OpenStackDatabase(CommonBackend): def get_all_docs(self, include_deleted=False): """Get all documents from the database.""" - raise NotImplementedError(self.get_all_docs) + generation = self._get_generation() + results = [] + _, doc_ids = self._connection.get_container(self._container, + full_listing=True) + for doc_id in doc_ids: + doc = self._get_doc(doc_id) + if doc.content is None and not include_deleted: + continue + results.append(doc) + return (generation, results) def put_doc(self, doc): if doc.doc_id is None: |