mise a jour
This commit is contained in:
parent
770f84e959
commit
47e1c04cd8
1 changed files with 3 additions and 3 deletions
|
@ -3,7 +3,7 @@
|
||||||
'''In our topology, we assume the container running this script has ip address 10.10.10.10
|
'''In our topology, we assume the container running this script has ip address 10.10.10.10
|
||||||
(useful information according to our topology: useless otherwise)
|
(useful information according to our topology: useless otherwise)
|
||||||
'''
|
'''
|
||||||
from flask import Flask
|
from flask import Flask, jsonify
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
@ -36,9 +36,9 @@ DEV = "--local_ip 127.0.0.1 --local_port 9001 --local_name
|
||||||
|
|
||||||
@app.route("/getmyconfig/<string:my_ip>")
|
@app.route("/getmyconfig/<string:my_ip>")
|
||||||
def configurations_giver(my_ip):
|
def configurations_giver(my_ip):
|
||||||
configs = ""
|
configs = {"verdict":"oops"}
|
||||||
if my_ip==SVR_IP:
|
if my_ip==SVR_IP:
|
||||||
configs = SERVER%('srv')
|
configs["local_ip"] = "127.0.0.1"
|
||||||
elif my_ip==GWI1_IP:
|
elif my_ip==GWI1_IP:
|
||||||
configs = GATEWAY_I%('gwi1',SVR_IP,'srv')
|
configs = GATEWAY_I%('gwi1',SVR_IP,'srv')
|
||||||
elif my_ip==GWI2_IP:
|
elif my_ip==GWI2_IP:
|
||||||
|
|
Loading…
Reference in a new issue