icds/Dockerfiles/forContainerNet/bootserver/bootstrap_server.py
Abdel-Kader Chabi-Sika-Boni ffaef824cb mise a jour
2020-12-31 20:28:08 +01:00

18 lines
520 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__)
@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)