Ejemplo n.º 1
0
def set_machine_metadata(request):
    """Sets metadata for a machine, given the backend and machine id."""
    backend_id = request.matchdict['backend']
    machine_id = request.matchdict['machine']
    try:
        tag = request.json_body['tag']
    except:
        raise RequiredParameterMissingError('tag')
    user = user_from_request(request)
    methods.set_machine_metadata(user, backend_id, machine_id, tag)
    return OK
Ejemplo n.º 2
0
def set_machine_metadata(request):
    """Sets metadata for a machine, given the backend and machine id."""
    backend_id = request.matchdict['backend']
    machine_id = request.matchdict['machine']
    try:
        tag = request.json_body['tag']
    except:
        raise RequiredParameterMissingError('tag')
    user = user_from_request(request)
    methods.set_machine_metadata(user, backend_id, machine_id, tag)
    return OK