Function
Some checks are pending
gl/check check status: pending (2dbeaff11318d4fcbc34c96c43f9a7dcd149e2dc)
Some checks are pending
gl/check check status: pending (2dbeaff11318d4fcbc34c96c43f9a7dcd149e2dc)
This commit is contained in:
parent
7e6a69ad28
commit
2dbeaff113
@ -88,6 +88,10 @@ def main():
|
|||||||
data=data
|
data=data
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def filter_docs(metadata):
|
||||||
|
allowed_types = ["umn", "api-ref", "dev"]
|
||||||
|
metadata['docs'] = [doc for doc in metadata['docs'] if doc['type'] in allowed_types]
|
||||||
|
return metadata
|
||||||
|
|
||||||
def getData(environment, all_doc_types):
|
def getData(environment, all_doc_types):
|
||||||
metadatadata = metadata.service_types_with_doc_types(
|
metadatadata = metadata.service_types_with_doc_types(
|
||||||
@ -95,11 +99,9 @@ def getData(environment, all_doc_types):
|
|||||||
)
|
)
|
||||||
print(all_doc_types)
|
print(all_doc_types)
|
||||||
if not all_doc_types:
|
if not all_doc_types:
|
||||||
for i, doc in enumerate(metadatadata["docs"], 0):
|
final_data = filter_docs(metadatadata)
|
||||||
if doc["type"] not in ["umn", "api-ref", "dev"]:
|
print(final_data)
|
||||||
metadatadata["docs"].pop(i)
|
return final_data
|
||||||
print(metadatadata)
|
|
||||||
return metadatadata
|
|
||||||
|
|
||||||
|
|
||||||
def indexData(deleteIndex, hosts, index, username, password, data):
|
def indexData(deleteIndex, hosts, index, username, password, data):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user