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

Update run_whatif_loop.py

parent 8a54f049
No related branches found
No related tags found
No related merge requests found
from elasticsearch import Elasticsearch
import whatif_loop
import yaml
import warnings
import config
warnings.filterwarnings('ignore')
with open('/code/app/config.yml') as f:
parameters = yaml.safe_load(f)
print('parameters: ', parameters)
host = parameters['ip']
port = parameters['port']
elastic_host = parameters['elasticsearch_ip']
elastic_port = parameters['elasticsearch_port']
elasticsearch_url = "http://" + elastic_host + ":" + elastic_port
es = Elasticsearch(elasticsearch_url)
#whatif_send_url = "http://" + host + ":" + port + parameters['to_send_whatif']
whatif_send_url = parameters['san_api_url']
whatif_loop.whatif_loop_fun(es, whatif_send_url)
def run_whatif_loop_fun():
elasticsearch_url = config.elasticsearch_url
es = Elasticsearch(elasticsearch_url)
whatif_send_url = config.whatif_send_url
whatif_loop.whatif_loop_fun(es, whatif_send_url)
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