remove use of proto_default in routes, handled by bird/traceroute functions now
This commit is contained in:
parent
eb91179101
commit
a2d31a3a6c
22
lg.py
22
lg.py
@ -234,7 +234,7 @@ SUMMARY_UNWANTED_PROTOS = ["Kernel", "Static", "Device", "BFD", "Direct"]
|
|||||||
|
|
||||||
@app.route("/summary/<hosts>")
|
@app.route("/summary/<hosts>")
|
||||||
@app.route("/summary/<hosts>/<proto>")
|
@app.route("/summary/<hosts>/<proto>")
|
||||||
def summary(hosts, proto=app.config.get("PROTO_DEFAULT", "ipv4")):
|
def summary(hosts, proto="ipv4"):
|
||||||
set_session("summary", hosts, proto, "")
|
set_session("summary", hosts, proto, "")
|
||||||
command = "show protocols"
|
command = "show protocols"
|
||||||
|
|
||||||
@ -288,7 +288,7 @@ def summary(hosts, proto=app.config.get("PROTO_DEFAULT", "ipv4")):
|
|||||||
|
|
||||||
@app.route("/detail/<hosts>")
|
@app.route("/detail/<hosts>")
|
||||||
@app.route("/detail/<hosts>/<proto>")
|
@app.route("/detail/<hosts>/<proto>")
|
||||||
def detail(hosts, proto=app.config.get("PROTO_DEFAULT", "ipv4")):
|
def detail(hosts, proto="ipv4"):
|
||||||
name = get_query()
|
name = get_query()
|
||||||
|
|
||||||
if not name:
|
if not name:
|
||||||
@ -321,7 +321,7 @@ def detail(hosts, proto=app.config.get("PROTO_DEFAULT", "ipv4")):
|
|||||||
|
|
||||||
@app.route("/traceroute/<hosts>")
|
@app.route("/traceroute/<hosts>")
|
||||||
@app.route("/traceroute/<hosts>/<proto>")
|
@app.route("/traceroute/<hosts>/<proto>")
|
||||||
def traceroute(hosts, proto=app.config.get("PROTO_DEFAULT", "ipv4")):
|
def traceroute(hosts, proto="ipv4"):
|
||||||
q = get_query()
|
q = get_query()
|
||||||
|
|
||||||
if not q:
|
if not q:
|
||||||
@ -372,49 +372,49 @@ def traceroute(hosts, proto=app.config.get("PROTO_DEFAULT", "ipv4")):
|
|||||||
|
|
||||||
@app.route("/adv/<hosts>")
|
@app.route("/adv/<hosts>")
|
||||||
@app.route("/adv/<hosts>/<proto>")
|
@app.route("/adv/<hosts>/<proto>")
|
||||||
def show_route_filter(hosts, proto=app.config.get("PROTO_DEFAULT", "ipv4")):
|
def show_route_filter(hosts, proto="ipv4"):
|
||||||
return show_route("adv", hosts, proto)
|
return show_route("adv", hosts, proto)
|
||||||
|
|
||||||
|
|
||||||
@app.route("/adv_bgpmap/<hosts>")
|
@app.route("/adv_bgpmap/<hosts>")
|
||||||
@app.route("/adv_bgpmap/<hosts>/<proto>")
|
@app.route("/adv_bgpmap/<hosts>/<proto>")
|
||||||
def show_route_filter_bgpmap(hosts, proto=app.config.get("PROTO_DEFAULT", "ipv4")):
|
def show_route_filter_bgpmap(hosts, proto="ipv4"):
|
||||||
return show_route("adv_bgpmap", hosts, proto)
|
return show_route("adv_bgpmap", hosts, proto)
|
||||||
|
|
||||||
|
|
||||||
@app.route("/where/<hosts>")
|
@app.route("/where/<hosts>")
|
||||||
@app.route("/where/<hosts>/<proto>")
|
@app.route("/where/<hosts>/<proto>")
|
||||||
def show_route_where(hosts, proto=app.config.get("PROTO_DEFAULT", "ipv4")):
|
def show_route_where(hosts, proto="ipv4"):
|
||||||
return show_route("where", hosts, proto)
|
return show_route("where", hosts, proto)
|
||||||
|
|
||||||
|
|
||||||
@app.route("/where_detail/<hosts>")
|
@app.route("/where_detail/<hosts>")
|
||||||
@app.route("/where_detail/<hosts>/<proto>")
|
@app.route("/where_detail/<hosts>/<proto>")
|
||||||
def show_route_where_detail(hosts, proto=app.config.get("PROTO_DEFAULT", "ipv4")):
|
def show_route_where_detail(hosts, proto="ipv4"):
|
||||||
return show_route("where_detail", hosts, proto)
|
return show_route("where_detail", hosts, proto)
|
||||||
|
|
||||||
|
|
||||||
@app.route("/where_bgpmap/<hosts>")
|
@app.route("/where_bgpmap/<hosts>")
|
||||||
@app.route("/where_bgpmap/<hosts>/<proto>")
|
@app.route("/where_bgpmap/<hosts>/<proto>")
|
||||||
def show_route_where_bgpmap(hosts, proto=app.config.get("PROTO_DEFAULT", "ipv4")):
|
def show_route_where_bgpmap(hosts, proto="ipv4"):
|
||||||
return show_route("where_bgpmap", hosts, proto)
|
return show_route("where_bgpmap", hosts, proto)
|
||||||
|
|
||||||
|
|
||||||
@app.route("/prefix/<hosts>")
|
@app.route("/prefix/<hosts>")
|
||||||
@app.route("/prefix/<hosts>/<proto>")
|
@app.route("/prefix/<hosts>/<proto>")
|
||||||
def show_route_for(hosts, proto=app.config.get("PROTO_DEFAULT", "ipv4")):
|
def show_route_for(hosts, proto="ipv4"):
|
||||||
return show_route("prefix", hosts, proto)
|
return show_route("prefix", hosts, proto)
|
||||||
|
|
||||||
|
|
||||||
@app.route("/prefix_detail/<hosts>")
|
@app.route("/prefix_detail/<hosts>")
|
||||||
@app.route("/prefix_detail/<hosts>/<proto>")
|
@app.route("/prefix_detail/<hosts>/<proto>")
|
||||||
def show_route_for_detail(hosts, proto=app.config.get("PROTO_DEFAULT", "ipv4")):
|
def show_route_for_detail(hosts, proto="ipv4"):
|
||||||
return show_route("prefix_detail", hosts, proto)
|
return show_route("prefix_detail", hosts, proto)
|
||||||
|
|
||||||
|
|
||||||
@app.route("/prefix_bgpmap/<hosts>")
|
@app.route("/prefix_bgpmap/<hosts>")
|
||||||
@app.route("/prefix_bgpmap/<hosts>/<proto>")
|
@app.route("/prefix_bgpmap/<hosts>/<proto>")
|
||||||
def show_route_for_bgpmap(hosts, proto=app.config.get("PROTO_DEFAULT", "ipv4")):
|
def show_route_for_bgpmap(hosts, proto="ipv4"):
|
||||||
return show_route("prefix_bgpmap", hosts, proto)
|
return show_route("prefix_bgpmap", hosts, proto)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user