def METHOD_NAME(self, context, op, rsc, rc, op_status=None, node=''):
    "usage: op <operation> <resource> <exit_code> [<op_status>] [<node>]"
    if rc in constants.lrm_exit_codes:
        num_rc = constants.lrm_exit_codes[rc]
    else:
        num_rc = rc
    if not num_rc.isdigit():
        context.fatal_error("Invalid exit code '%s'" % num_rc)
    num_op_status = op_status
    if op_status:
        if op_status in constants.lrm_status_codes:
            num_op_status = constants.lrm_status_codes[op_status]
        if not num_op_status.isdigit():
            context.fatal_error("Invalid operation status '%s'" % num_op_status)
    return cib_status.edit_op(op, rsc, num_rc, num_op_status, node)