From 39bc79e07783289a50dcbd08f33fa04ea5092e6c Mon Sep 17 00:00:00 2001 From: chabisik Date: Fri, 1 Jan 2021 18:27:07 +0100 Subject: [PATCH] mise a jour --- .../bootserver/bootstrap_server.py | 24 +++++++++---------- .../server/bootstrap_client.py | 3 ++- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Dockerfiles/forContainerNet/bootserver/bootstrap_server.py b/Dockerfiles/forContainerNet/bootserver/bootstrap_server.py index e6da308..9585a0d 100755 --- a/Dockerfiles/forContainerNet/bootserver/bootstrap_server.py +++ b/Dockerfiles/forContainerNet/bootserver/bootstrap_server.py @@ -59,28 +59,28 @@ def configurations_giver(my_ip): configs["local_port"] = 8282 configs["local_name"] = "gwf1" configs["remote_ip"] = GWI1_IP - configs["remote_port"] = 8181​ + configs["remote_port"] = 8181 configs["remote_name"] = "gwi1" configs["verdict"] = "yes" elif my_ip==GWF2_IP: configs["local_port"] = 8282 configs["local_name"] = "gwf2" configs["remote_ip"] = GWI1_IP - configs["remote_port"] = 8181​ + configs["remote_port"] = 8181 configs["remote_name"] = "gwi1" configs["verdict"] = "yes" elif my_ip==GWF3_IP: configs["local_port"] = 8282 configs["local_name"] = "gwf3" configs["remote_ip"] = GWI1_IP - configs["remote_port"] = 8181​ + configs["remote_port"] = 8181 configs["remote_name"] = "gwi1" configs["verdict"] = "yes" elif my_ip==DEV1_GWF1_IP: configs["local_port"] = 9001 configs["local_name"] = "dev1gwf1" configs["remote_ip"] = GWF1_IP - configs["remote_port"] = 8282​ + configs["remote_port"] = 8282 configs["remote_name"] = "gwf1" configs["send_period"] = 3000 configs["verdict"] = "yes" @@ -88,7 +88,7 @@ def configurations_giver(my_ip): configs["local_port"] = 9001 configs["local_name"] = "dev2gwf1" configs["remote_ip"] = GWF1_IP - configs["remote_port"] = 8282​ + configs["remote_port"] = 8282 configs["remote_name"] = "gwf1" configs["send_period"] = 3000 configs["verdict"] = "yes" @@ -96,7 +96,7 @@ def configurations_giver(my_ip): configs["local_port"] = 9001 configs["local_name"] = "dev3gwf1" configs["remote_ip"] = GWF1_IP - configs["remote_port"] = 8282​ + configs["remote_port"] = 8282 configs["remote_name"] = "gwf1" configs["send_period"] = 3000 configs["verdict"] = "yes" @@ -104,7 +104,7 @@ def configurations_giver(my_ip): configs["local_port"] = 9001 configs["local_name"] = "dev1gwf2" configs["remote_ip"] = GWF2_IP - configs["remote_port"] = 8282​ + configs["remote_port"] = 8282 configs["remote_name"] = "gwf2" configs["send_period"] = 3000 configs["verdict"] = "yes" @@ -112,7 +112,7 @@ def configurations_giver(my_ip): configs["local_port"] = 9001 configs["local_name"] = "dev2gwf2" configs["remote_ip"] = GWF2_IP - configs["remote_port"] = 8282​ + configs["remote_port"] = 8282 configs["remote_name"] = "gwf2" configs["send_period"] = 3000 configs["verdict"] = "yes" @@ -120,7 +120,7 @@ def configurations_giver(my_ip): configs["local_port"] = 9001 configs["local_name"] = "dev3gwf2" configs["remote_ip"] = GWF2_IP - configs["remote_port"] = 8282​ + configs["remote_port"] = 8282 configs["remote_name"] = "gwf2" configs["send_period"] = 3000 configs["verdict"] = "yes" @@ -128,7 +128,7 @@ def configurations_giver(my_ip): configs["local_port"] = 9001 configs["local_name"] = "dev1gwf3" configs["remote_ip"] = GWF3_IP - configs["remote_port"] = 8282​ + configs["remote_port"] = 8282 configs["remote_name"] = "gwf3" configs["send_period"] = 3000 configs["verdict"] = "yes" @@ -136,7 +136,7 @@ def configurations_giver(my_ip): configs["local_port"] = 9001 configs["local_name"] = "dev2gwf3" configs["remote_ip"] = GWF3_IP - configs["remote_port"] = 8282​ + configs["remote_port"] = 8282 configs["remote_name"] = "gwf3" configs["send_period"] = 3000 configs["verdict"] = "yes" @@ -144,7 +144,7 @@ def configurations_giver(my_ip): configs["local_port"] = 9001 configs["local_name"] = "dev3gwf3" configs["remote_ip"] = GWF3_IP - configs["remote_port"] = 8282​ + configs["remote_port"] = 8282 configs["remote_name"] = "gwf3" configs["send_period"] = 3000 configs["verdict"] = "yes" diff --git a/Dockerfiles/forContainerNet/server/bootstrap_client.py b/Dockerfiles/forContainerNet/server/bootstrap_client.py index b28292b..26e5c42 100755 --- a/Dockerfiles/forContainerNet/server/bootstrap_client.py +++ b/Dockerfiles/forContainerNet/server/bootstrap_client.py @@ -19,10 +19,11 @@ def retrieve_config(): print("Unable to join the bootstrap server") try: my_json_config = resp.json() + print("Extracted configs [succ] : %s"%(my_json_config)) except: print("Unable to extract configs from bootstrap server's answer") + print("Extracted configs [fail] : %s"%(my_json_config)) print("request url : ==>%s<=="%("http://%s/getmyconfig/%s"%(BOOTSTRAP_SERVER_ADDRESS, my_ip))) - print("received configs : %s"%(my_config)) if "verdict" in my_json_config and my_json_config["verdict"] == "yes": my_config = config_json_to_string(my_json_config) subprocess.check_output("node /mydir/*.js %s"%(my_config), shell=True)