)]}'
{"designate/api/v1/__init__.py":[{"author":{"_account_id":8094,"name":"Vinod Mangalpally","email":"mrvinod@outlook.com","username":"vinodmr"},"change_message_id":"d2bff96ee9eeda91a3563a763cfc7c76cdd8a942","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        return str(value)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"def load_values(request, valid_keys):"},{"line_number":141,"context_line":"    \"\"\"Load valid atributes from request\"\"\""},{"line_number":142,"context_line":"    result \u003d {}"},{"line_number":143,"context_line":"    error_keys \u003d []"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_9f1d1013","line":140,"updated":"2014-08-01 20:41:20.000000000","message":"This could be called for creates and updates of all the relevant v1 api\u0027s and not just for creation of zones.","commit_id":"49a0e848d92ffc5dd4065732972ca9ba6b94f3cf"},{"author":{"_account_id":8094,"name":"Vinod Mangalpally","email":"mrvinod@outlook.com","username":"vinodmr"},"change_message_id":"d2bff96ee9eeda91a3563a763cfc7c76cdd8a942","unresolved":false,"context_lines":[{"line_number":151,"context_line":"    if error_keys:"},{"line_number":152,"context_line":"        error_msg \u003d \u0027Provided object does not match schema. Keys {0} are not \\"},{"line_number":153,"context_line":"                     valid in the request body\u0027, error_keys"},{"line_number":154,"context_line":"        LOG.warn(error_msg)"},{"line_number":155,"context_line":"        raise exceptions.InvalidObject(error_msg)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_ffb44c1e","line":154,"updated":"2014-08-01 20:41:20.000000000","message":"The exception should be logged.  So I don\u0027t think the warning is necessary here.  Also as Graham mentioned earlier, Designate now has i18n enabled, so you can use the translators - see designate/i18n.py or other uses of LOG.warn etc in the code.","commit_id":"49a0e848d92ffc5dd4065732972ca9ba6b94f3cf"}],"designate/api/v1/domains.py":[{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"07a78060ad3e0ef758b70ae2cc7b6287d81c5ead","unresolved":false,"context_lines":[{"line_number":51,"context_line":"def create_domain():"},{"line_number":52,"context_line":"    unwanted_attributes \u003d [\u0027created_at\u0027, \u0027updated_at\u0027, \u0027id\u0027, \u0027serial\u0027]"},{"line_number":53,"context_line":"    context \u003d flask.request.environ.get(\u0027context\u0027)"},{"line_number":54,"context_line":"    values \u003d _clear_unwanted_values(flask.request.json, unwanted_attributes)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    domain_schema.validate(values)"},{"line_number":57,"context_line":"    domain \u003d get_central_api().create_domain(context, Domain(**values))"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_812431b3","line":54,"updated":"2014-06-24 20:18:00.000000000","message":"I think we should test to see if unwanted values are in the request, and raise a 400, rather than silently stripping the content out","commit_id":"53763623a1e26ec3ea6d453b8f4a705ad7a41839"},{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"eb2b75df46f905bdf2a825125d825c8aa870d779","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        tmp \u003d req_values.pop(value, None)"},{"line_number":34,"context_line":"        if tmp:"},{"line_number":35,"context_line":"            LOG.warn(\"Attribut %s should not be given as \\"},{"line_number":36,"context_line":"                     API attributes\", value)"},{"line_number":37,"context_line":"            return True"},{"line_number":38,"context_line":"    return False"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_199c126a","line":36,"updated":"2014-07-30 22:02:27.000000000","message":"We now support log translation - this line should go to \n\nLOG.warn(_LW(\"Attribute %s should not be given as \\\n\t        API attributes\") % value)","commit_id":"ee19c1fb1085aa5230ab4138565288e9283b81fb"},{"author":{"_account_id":8094,"name":"Vinod Mangalpally","email":"mrvinod@outlook.com","username":"vinodmr"},"change_message_id":"d2bff96ee9eeda91a3563a763cfc7c76cdd8a942","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    try:"},{"line_number":49,"context_line":"        values \u003d load_values(flask.request, valid_attributes)"},{"line_number":50,"context_line":"    except exceptions.InvalidObject:"},{"line_number":51,"context_line":"        return flask.Response(status\u003d400)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    domain_schema.validate(values)"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_ff628ca5","line":50,"updated":"2014-08-01 20:41:20.000000000","message":"The middleware should be returning the appropriate response for the exception.  So there is no need for the try, except here","commit_id":"49a0e848d92ffc5dd4065732972ca9ba6b94f3cf"}]}
