Ejemplo n.º 1
0
def installerGetAddCPERequest():
    from features.add_cpe_requests.add_cpe_requests import AddCPERequests
    try:
        res = AddCPERequests().init().get_add_cpe_request_by_installer_id(request.form["installer_id"])
        return jsonify({"result":"True", "data": res})
    except Exception as e :
        return jsonify({"result" : "error", "details" : str(e)})
Ejemplo n.º 2
0
def approverGetAddCPERequest():
    from features.add_cpe_requests.add_cpe_requests import AddCPERequests
    try:
        res = AddCPERequests().init().get_add_cpe_request()
        return jsonify({"result":"True", "data": res})
    except Exception as e :
        return jsonify({"result" : "error", "details" : str(e)})
Ejemplo n.º 3
0
def approverDeleteAddCPERequest():
    from features.add_cpe_requests.add_cpe_requests import AddCPERequests
    try:
        AddCPERequests().init().delete_add_cpe_request(request.form["add_cpe_request_id"])
        return jsonify({"result":"True"})
    except Exception as e :
        return jsonify({"result" : "error", "details" : str(e)})
Ejemplo n.º 4
0
def approverApproveRequestAddCPE():
    from features.add_cpe_requests.add_cpe_requests import AddCPERequests
    try:
        task_id = AddCPERequests().init().approve_add_cpe_request(
            request.form["approver_id"], request.form["add_cpe_request_id"])
        return jsonify({"result":"Executed", "task_id" : task_id})
    except Exception as e :
        return jsonify({"result" : "error", "details" : str(e)})
Ejemplo n.º 5
0
def installerRequestAddCPE():
    from features.add_cpe_requests.add_cpe_requests import AddCPERequests
    try:
        print(request.form)
        add_cpe_request_id = AddCPERequests().init().request_add_cpe_request(
            request.form["installer_id"], request.form["mac"], request.form["comment"],
            request.form["station_key"], request.form["access_point"])
        return jsonify({"result":"Requested", "add_cpe_request_id" : add_cpe_request_id})
    except Exception as e :
        return jsonify({"result" : "error", "details" : str(e)})