mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 22:24:23 +01:00
Changes cli to be protocol agnostic and defines https on config file
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# PISA-WT-SERVER
|
# PISA-WT-SERVER
|
||||||
DEFAULT_PISA_API_SERVER = "teos.pisa.watch"
|
DEFAULT_PISA_API_SERVER = "https://teos.pisa.watch"
|
||||||
DEFAULT_PISA_API_PORT = 9814
|
DEFAULT_PISA_API_PORT = 443
|
||||||
|
|
||||||
# WT-CLI
|
# WT-CLI
|
||||||
DATA_FOLDER = "~/.wt_cli/"
|
DATA_FOLDER = "~/.wt_cli/"
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ def post_appointment(data):
|
|||||||
logger.info("Sending appointment to PISA")
|
logger.info("Sending appointment to PISA")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
add_appointment_endpoint = "http://{}:{}".format(pisa_api_server, pisa_api_port)
|
add_appointment_endpoint = "{}:{}".format(pisa_api_server, pisa_api_port)
|
||||||
return requests.post(url=add_appointment_endpoint, json=json.dumps(data), timeout=5)
|
return requests.post(url=add_appointment_endpoint, json=json.dumps(data), timeout=5)
|
||||||
|
|
||||||
except ConnectTimeout:
|
except ConnectTimeout:
|
||||||
@@ -337,7 +337,7 @@ def get_appointment(locator):
|
|||||||
logger.error("The provided locator is not valid", locator=locator)
|
logger.error("The provided locator is not valid", locator=locator)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
get_appointment_endpoint = "http://{}:{}/get_appointment".format(pisa_api_server, pisa_api_port)
|
get_appointment_endpoint = "{}:{}/get_appointment".format(pisa_api_server, pisa_api_port)
|
||||||
parameters = "?locator={}".format(locator)
|
parameters = "?locator={}".format(locator)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user