Exemple #1
0
async def vmmaster_command(request):
    session_id = request.match_info.get("session_id")
    return helpers.form_response(200, {}, "vmmaster command %s" % session_id)
Exemple #2
0
async def get_session(request):
    session_id = request.match_info.get("session_id")
    session = request.app.sessions[int(session_id)]
    return helpers.form_response(200, {}, {"session": session})
Exemple #3
0
async def get_proxy_request(request):
    session_id = request.match_info.get("session_id")
    session = request.app.sessions[int(session_id)]
    status, headers, body = await commands.transparent(request, session)
    return helpers.form_response(status, headers, body)
Exemple #4
0
async def create_session(request):
    session = await commands.create_vmmaster_session(request)
    status, headers, body = await commands.start_vmmaster_session(request, session)
    return helpers.form_response(status, headers, body)
Exemple #5
0
async def delete_session(request):
    session_id = request.match_info.get("session_id")
    await commands.service_command_send(request, "SESSION_CLOSING")
    del request.app.sessions[int(session_id)]
    return helpers.form_response(200, {}, "Session %s closed" % session_id)
Exemple #6
0
async def vmmaster_command(request):
    session_id = request.match_info.get("session_id")
    return helpers.form_response(200, {}, "vmmaster command %s" % session_id)
Exemple #7
0
async def get_proxy_request(request):
    session_id = request.match_info.get("session_id")
    session = request.app.sessions[int(session_id)]
    status, headers, body = await commands.transparent(request, session)
    return helpers.form_response(status, headers, body)
Exemple #8
0
async def get_session(request):
    session_id = request.match_info.get("session_id")
    session = request.app.sessions[int(session_id)]
    return helpers.form_response(200, {}, {"session": session})
Exemple #9
0
async def delete_session(request):
    session_id = request.match_info.get("session_id")
    await commands.service_command_send(request, "SESSION_CLOSING")
    del request.app.sessions[int(session_id)]
    return helpers.form_response(200, {}, "Session %s closed" % session_id)
Exemple #10
0
async def create_session(request):
    session = await commands.create_vmmaster_session(request)
    status, headers, body = await commands.start_vmmaster_session(
        request, session)
    return helpers.form_response(status, headers, body)