Ejemplo n.º 1
0
def bird():
    check_accesslist()

    if request.path == "/bird": b = BirdSocket(file="/var/run/bird.ctl")
    elif request.path == "/bird6": b = BirdSocket(file="/var/run/bird6.ctl")
    else: return "No bird socket selected"

    query = request.args.get("q","")
    query = unquote(query)

    status, result = b.cmd(query)
    b.close()
    # FIXME: use status
    return result
Ejemplo n.º 2
0
def bird():
    check_accesslist()

    if request.path == "/bird": b = BirdSocket(file="/var/run/bird.ctl")
    elif request.path == "/bird6": b = BirdSocket(file="/var/run/bird6.ctl")
    else: return "No bird socket selected"

    query = request.args.get("q", "")
    query = unquote(query)

    status, result = b.cmd(query)
    b.close()
    # FIXME: use status
    return result
Ejemplo n.º 3
0
def bird():
    check_accesslist()

    if request.path == "/bird": b = BirdSocket(file=app.config.get("BIRD_SOCKET"))
    elif request.path == "/bird6": b = BirdSocket(file=app.config.get("BIRD6_SOCKET"))
    else: return "No bird socket selected"

    query = request.args.get("q","")
    query = unquote(query)

    status, result = b.cmd(query)
    b.close()
    # FIXME: use status
    return result