Change lg-proxy to lgproxy to easly import it in wsgi part2

This commit is contained in:
Mehdi Abaakouk 2014-02-18 11:57:44 +01:00
parent 63e978f84f
commit cbdaa9138c
4 changed files with 14 additions and 14 deletions

View File

@ -6,14 +6,14 @@ This is a looking glass for the Internet Routing Daemon "Bird".
Software is split in two parts:
- lg-proxy.py:
- lgproxy.py:
It must be installed and started on all bird nodes. It act as a proxy to make traceroute and bird query on the node.
Access restriction to this web service can be done in file "lg-proxy.cfg" (only IP address based restriction for now).
Access restriction to this web service can be done in file "lgproxy.cfg" (only IP address based restriction for now).
- lg.py:
This is the frontend, a web based UI that request informations to all lg-proxy.py nodes.
This is the frontend, a web based UI that request informations to all lgproxy.py nodes.
The domain and the list of all bird nodes can be done.
@ -21,15 +21,15 @@ Software is split in two parts:
***************
+--> * lg-proxy.py *
+--> * lgproxy.py *
| ***************
|
******** ******************* | ***************
* USER * ----> * webserver/lg.py *--+--> * lg-proxy.py *
* USER * ----> * webserver/lg.py *--+--> * lgproxy.py *
******** ******************* | ***************
|
| ***************
+--> * lg-proxy.py *
+--> * lgproxy.py *
***************
```

4
lg.py
View File

@ -105,9 +105,9 @@ def bird_command(host, proto, query):
def bird_proxy(host, proto, service, query):
"""Retreive data of a service from a running lg-proxy on a remote node
"""Retreive data of a service from a running lgproxy on a remote node
First and second arguments are the node and the port of the running lg-proxy
First and second arguments are the node and the port of the running lgproxy
Third argument is the service, can be "traceroute" or "bird"
Last argument, the query to pass to the service

View File

@ -1,7 +1,7 @@
DEBUG=False
LOG_FILE="/var/log/lg-proxy.log"
LOG_FILE="/var/log/lg-proxy/lg-proxy.log"
LOG_LEVEL="WARNING"
ACCESS_LIST = ["91.224.149.206", "178.33.111.110"]
IPV4_SOURCE="91.224.148.1"
IPV6_SOURCE="2a01:6600:8000::1"
ACCESS_LIST = ["91.224.149.206", "178.33.111.110", "2a01:6600:8081:ce00::1"]
IPV4_SOURCE=""
IPV6_SOURCE=""

View File

@ -32,7 +32,7 @@ from flask import Flask, request, abort
app = Flask(__name__)
app.debug = app.config["DEBUG"]
app.config.from_pyfile('lg-proxy.cfg')
app.config.from_pyfile('lgproxy.cfg')
file_handler = TimedRotatingFileHandler(filename=app.config["LOG_FILE"], when="midnight")
app.logger.setLevel(getattr(logging, app.config["LOG_LEVEL"].upper()))
@ -96,6 +96,6 @@ def bird():
if __name__ == "__main__":
app.logger.info("lg-proxy start")
app.logger.info("lgproxy start")
app.run("0.0.0.0")