Exemplo n.º 1
0
def playground_list():
    """ Return list of coprs which are part of playground """
    query = CoprsLogic.get_playground()
    repos = query.all()
    output = {"output": "ok", "repos": []}
    for repo in repos:
        output["repos"].append({"username": repo.owner.name,
                                "coprname": repo.name,
                                "chroots": [chroot.name for chroot in repo.active_chroots]})

    jsonout = flask.jsonify(output)
    jsonout.status_code = 200
    return jsonout
Exemplo n.º 2
0
def playground_list():
    """ Return list of coprs which are part of playground """
    query = CoprsLogic.get_playground()
    repos = query.all()
    output = {"output": "ok", "repos": []}
    for repo in repos:
        output["repos"].append({
            "username":
            repo.owner_name,
            "coprname":
            repo.name,
            "chroots": [chroot.name for chroot in repo.active_chroots]
        })

    jsonout = flask.jsonify(output)
    jsonout.status_code = 200
    return jsonout