mise a jour
This commit is contained in:
parent
edf85fb28b
commit
39bc79e077
2 changed files with 14 additions and 13 deletions
|
@ -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"
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue