Commit 76ce4446 authored by Bogdan's avatar Bogdan

Refactored: moved requestPost in the scripts folder so all schemas can acces it

parent f3ccc2db
from _add_use_case_scripts.car_sharing.tables.requestPost import postLayersToSwagger, postTableToSwagger from _add_use_case_scripts.requestPost import postLayersToSwagger, postTableToSwagger
def add_table(use_case: str, table_name:str): def add_table(use_case: str, table_name:str):
''' '''
......
from _add_use_case_scripts.car_sharing.tables.requestPost import postLayersToSwagger, postTableToSwagger from _add_use_case_scripts.requestPost import postLayersToSwagger, postTableToSwagger
def add_table(use_case: str, table_name: str): def add_table(use_case: str, table_name: str):
''' '''
......
from _add_use_case_scripts.car_sharing.tables.requestPost import postLayersToSwagger, postTableToSwagger from _add_use_case_scripts.requestPost import postLayersToSwagger, postTableToSwagger
def add_table(use_case: str, table_name: str): def add_table(use_case: str, table_name: str):
''' '''
......
from _add_use_case_scripts.car_sharing.tables.requestPost import postLayersToSwagger, postTableToSwagger from _add_use_case_scripts.requestPost import postLayersToSwagger, postTableToSwagger
def add_table(use_case: str, table_name: str): def add_table(use_case: str, table_name: str):
''' '''
......
from _add_use_case_scripts.car_sharing.tables.requestPost import postLayersToSwagger, postTableToSwagger from _add_use_case_scripts.requestPost import postLayersToSwagger, postTableToSwagger
def add_table(use_case: str, table_name: str): def add_table(use_case: str, table_name: str):
''' '''
......
from _add_use_case_scripts.car_sharing.tables.requestPost import postLayersToSwagger, postTableToSwagger from _add_use_case_scripts.requestPost import postLayersToSwagger, postTableToSwagger
def add_table(use_case: str, table_name: str): def add_table(use_case: str, table_name: str):
......
from _add_use_case_scripts.requestPost import postLayersToSwagger, postTableToSwagger
def add_table(use_case: str, table_name: str): def add_table(use_case: str, table_name: str):
''' '''
take the columns and add the mappings at the server take the columns and add the mappings at the server
...@@ -101,20 +102,7 @@ def add_layers(use_case:str, table_name: str): ...@@ -101,20 +102,7 @@ def add_layers(use_case:str, table_name: str):
} }
] ]
jwt = TokenManager.getInstance().getToken() postLayersToSwagger(use_case,layers)
for layer in layers:
url = f"https://articonf1.itec.aau.at:30420/api/layers"
response = requests.post(
url,
verify=False,
proxies = { "http":None, "https":None },
headers = { "Authorization": f"Bearer {jwt}"},
json = layer
)
print(url+": "+str(response.status_code))
def main(use_case: str): def main(use_case: str):
print("Classification") print("Classification")
......
from _add_use_case_scripts.requestPost import postLayersToSwagger, postTableToSwagger
def add_table(use_case: str, table_name: str): def add_table(use_case: str, table_name: str):
''' '''
take the columns and add the mappings at the server take the columns and add the mappings at the server
...@@ -77,20 +78,7 @@ def add_layers(use_case:str, table_name: str): ...@@ -77,20 +78,7 @@ def add_layers(use_case:str, table_name: str):
} }
] ]
jwt = TokenManager.getInstance().getToken() postLayersToSwagger(use_case,layers)
for layer in layers:
url = f"https://articonf1.itec.aau.at:30420/api/layers"
response = requests.post(
url,
verify=False,
proxies = { "http":None, "https":None },
headers = { "Authorization": f"Bearer {jwt}"},
json = layer
)
print(url+": "+str(response.status_code))
def main(use_case: str): def main(use_case: str):
print("event") print("event")
......
...@@ -96,20 +96,7 @@ def add_layers(use_case:str, table_name: str): ...@@ -96,20 +96,7 @@ def add_layers(use_case:str, table_name: str):
} }
] ]
jwt = TokenManager.getInstance().getToken() postLayersToSwagger(use_case,layers)
for layer in layers:
url = f"https://articonf1.itec.aau.at:30420/api/layers"
response = requests.post(
url,
verify=False,
proxies = { "http":None, "https":None },
headers = { "Authorization": f"Bearer {jwt}"},
json = layer
)
print(url+": "+str(response.status_code))
def main(use_case: str): def main(use_case: str):
print("purchase") print("purchase")
......
...@@ -50,20 +50,7 @@ def add_layers(use_case:str, table_name: str): ...@@ -50,20 +50,7 @@ def add_layers(use_case:str, table_name: str):
} }
] ]
jwt = TokenManager.getInstance().getToken() postLayersToSwagger(use_case,layers)
for layer in layers:
url = f"https://articonf1.itec.aau.at:30420/api/layers"
response = requests.post(
url,
verify=False,
proxies = { "http":None, "https":None },
headers = { "Authorization": f"Bearer {jwt}"},
json = layer
)
print(url+": "+str(response.status_code))
def main(use_case: str): def main(use_case: str):
print("tag") print("tag")
......
...@@ -209,20 +209,7 @@ def add_layers(use_case:str, table_name: str): ...@@ -209,20 +209,7 @@ def add_layers(use_case:str, table_name: str):
} }
] ]
jwt = TokenManager.getInstance().getToken() postLayersToSwagger(use_case,layers)
for layer in layers:
url = f"https://articonf1.itec.aau.at:30420/api/layers"
response = requests.post(
url,
verify=False,
proxies = { "http":None, "https":None },
headers = { "Authorization": f"Bearer {jwt}"},
json = layer
)
print(url+": "+str(response.status_code))
def main(use_case: str): def main(use_case: str):
print("video") print("video")
......
...@@ -48,20 +48,7 @@ def add_layers(use_case:str, table_name: str): ...@@ -48,20 +48,7 @@ def add_layers(use_case:str, table_name: str):
} }
] ]
jwt = TokenManager.getInstance().getToken() postLayersToSwagger(use_case,layers)
for layer in layers:
url = f"https://articonf1.itec.aau.at:30420/api/layers"
response = requests.post(
url,
verify=False,
proxies = { "http":None, "https":None },
headers = { "Authorization": f"Bearer {jwt}"},
json = layer
)
print(url+": "+str(response.status_code))
def main(use_case: str): def main(use_case: str):
......
...@@ -138,20 +138,7 @@ def add_layers(use_case:str, table_name: str): ...@@ -138,20 +138,7 @@ def add_layers(use_case:str, table_name: str):
} }
] ]
jwt = TokenManager.getInstance().getToken() postLayersToSwagger(use_case,layers)
for layer in layers:
url = f"https://articonf1.itec.aau.at:30420/api/layers"
response = requests.post(
url,
verify=False,
proxies = { "http":None, "https":None },
headers = { "Authorization": f"Bearer {jwt}"},
json = layer
)
print(url+": "+str(response.status_code))
def main(use_case: str): def main(use_case: str):
print("Video") print("Video")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment