1
0
Fork 0
mirror of https://github.com/sileht/bird-lg.git synced 2024-11-25 16:24:43 +01:00

Fix adv show route

This commit is contained in:
Mehdi Abaakouk 2012-01-27 00:22:30 +01:00
parent da0b3bc565
commit 0549b361a9

4
lg.py
View file

@ -161,7 +161,7 @@ def traceroute(hosts, proto):
@app.route("/adv/<hosts>/<proto>") @app.route("/adv/<hosts>/<proto>")
def show_route_filter(hosts, proto): def show_route_filter(hosts, proto):
return show_route("", hosts, proto) return show_route("adv", hosts, proto)
@app.route("/where/<hosts>/<proto>") @app.route("/where/<hosts>/<proto>")
def show_route_where(hosts, proto): def show_route_where(hosts, proto):
@ -185,7 +185,7 @@ def show_route(req_type, hosts, proto):
all = (req_type.endswith("detail") and " all" or "" ) all = (req_type.endswith("detail") and " all" or "" )
if not req_type: if req_type.startswith("adv"):
command = "show route " + expression command = "show route " + expression
elif req_type.startswith("where"): elif req_type.startswith("where"):
command = "show route where net ~ [ " + expression + " ]" + all command = "show route where net ~ [ " + expression + " ]" + all