Skip to content
Snippets Groups Projects
Commit 8221143b authored by Chukwuemeka Michael Muonagor's avatar Chukwuemeka Michael Muonagor
Browse files

Update policy_configurator.py

parent f5a0c38c
No related merge requests found
......@@ -152,10 +152,11 @@ def policy_configurator_fun_2(workflow_url, stored_intents_url, elasticsearch_ur
send_workflows.send_workflow_fun(workflow_url, base_data)
time.sleep(1)
else:
resp1 = es.search(index="stored_intents", size=100, query={"match_all": {}})
total = resp1['hits']['total']['value']
base_data['id'] = total + 1
es.index(index="stored_intents", id=base_data['id'], document=base_data)
#resp1 = es.search(index="stored_intents", size=100, query={"match_all": {}})
#total = resp1['hits']['total']['value']
#base_data['id'] = total + 1
#es.index(index="stored_intents", id=base_data['id'], document=base_data)
es.index(index="stored_intents", id=str(1), document=base_data)
# send the policies as intents to be stored on the stored_intents api
store_intent.store_intent_fun(stored_intents_url, base_data)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment