add script for syncing docs

This commit is contained in:
2022-08-25 09:02:14 +02:00
parent f65f57fc57
commit 94f4df5276
6 changed files with 240 additions and 4 deletions

View File

@ -141,6 +141,17 @@ class Services(object):
res.append(res_doc)
return res
def docs_by_service_type(self, service_type):
"""List documents of the service
:param str service_type: Service type
:returns: generator for documents
"""
for doc in self.all_docs:
if doc["service_type"] != service_type:
continue
yield copy.deepcopy(doc)
def all_docs_full(self, environment):
"""Return list or documents with full service data
"""