diff --git a/lg.py b/lg.py index 8e5477c..bfd97f6 100644 --- a/lg.py +++ b/lg.py @@ -234,7 +234,7 @@ SUMMARY_UNWANTED_PROTOS = ["Kernel", "Static", "Device", "BFD", "Direct"] @app.route("/summary/") @app.route("/summary//") -def summary(hosts, proto=app.config.get("PROTO_DEFAULT", "ipv4")): +def summary(hosts, proto="ipv4"): set_session("summary", hosts, proto, "") command = "show protocols" @@ -288,7 +288,7 @@ def summary(hosts, proto=app.config.get("PROTO_DEFAULT", "ipv4")): @app.route("/detail/") @app.route("/detail//") -def detail(hosts, proto=app.config.get("PROTO_DEFAULT", "ipv4")): +def detail(hosts, proto="ipv4"): name = get_query() if not name: @@ -321,7 +321,7 @@ def detail(hosts, proto=app.config.get("PROTO_DEFAULT", "ipv4")): @app.route("/traceroute/") @app.route("/traceroute//") -def traceroute(hosts, proto=app.config.get("PROTO_DEFAULT", "ipv4")): +def traceroute(hosts, proto="ipv4"): q = get_query() if not q: @@ -372,49 +372,49 @@ def traceroute(hosts, proto=app.config.get("PROTO_DEFAULT", "ipv4")): @app.route("/adv/") @app.route("/adv//") -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) @app.route("/adv_bgpmap/") @app.route("/adv_bgpmap//") -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) @app.route("/where/") @app.route("/where//") -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) @app.route("/where_detail/") @app.route("/where_detail//") -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) @app.route("/where_bgpmap/") @app.route("/where_bgpmap//") -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) @app.route("/prefix/") @app.route("/prefix//") -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) @app.route("/prefix_detail/") @app.route("/prefix_detail//") -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) @app.route("/prefix_bgpmap/") @app.route("/prefix_bgpmap//") -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)