icds/Dockerfiles/forContainerNet/bootserver/bootstrap_server.py
2020-12-31 22:29:19 +01:00

35 lines
761 B
Python
Executable file

#!/usr/bin/python
'''In our topology, we assume the container running this script has ip address 10.10.10.10/24
(useful information according to our topology: useless otherwise)
'''
from flask import Flask
app = Flask(__name__)
SVR_IP = ''
GWI1_IP = ''
GWI2_IP = ''
GWF1_IP = ''
DEV1_GWF1_IP = ''
DEV2_GWF1_IP = ''
DEV3_GWF1_IP = ''
GWF2_IP = ''
DEV1_GWF2_IP = ''
DEV2_GWF2_IP = ''
DEV3_GWF2_IP = ''
GWF3_IP = ''
DEV1_GWF3_IP = ''
DEV2_GWF3_IP = ''
DEV3_GWF3_IP = ''
@app.route("/getmyconfig/<string:my_ip>")
def configurations_giver(my_ip):
configs = ""
if my_ip=='10.0.0.3':
configs = '--local_name xxx --remote_ip xxx --remote_name xxx'
return configs
if __name__=='__main__':
app.run(debug=False, host='0.0.0.0', port=5555)