)]}'
{"nova/api/openstack/compute/legacy_v2/contrib/security_groups.py":[{"author":{"_account_id":20223,"name":"zhaolihui","email":"zhaolh@awcloud.com","username":"zhaolihui"},"change_message_id":"ce29692dad497936bb0614e852c95d543f62b3a5","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    except exception.InstanceNotFound as exp:"},{"line_number":61,"context_line":"        msg \u003d exp.format_message()"},{"line_number":62,"context_line":"        raise exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":63,"context_line":"    except exception.SecurityGroupLimitExceeded as exp:"},{"line_number":64,"context_line":"        msg \u003d exp.format_message()"},{"line_number":65,"context_line":"        raise exc.HTTPRequestEntityTooLarge(explanation\u003dmsg)"},{"line_number":66,"context_line":"    except exception.NoUniqueMatch as exp:"},{"line_number":67,"context_line":"        msg \u003d exp.format_message()"},{"line_number":68,"context_line":"        raise exc.HTTPConflict(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_818750d6","line":65,"range":{"start_line":63,"start_character":0,"end_line":65,"end_character":60},"updated":"2016-04-06 04:08:35.000000000","message":"the InvalidMetadataSize should relate to HTTPRequestEntityTooLarge","commit_id":"9d6652cc02e1c2ee1f5b77284aba886e082c2f61"},{"author":{"_account_id":20223,"name":"zhaolihui","email":"zhaolh@awcloud.com","username":"zhaolihui"},"change_message_id":"c4c937bbde1f3e4e9cbcf900d5b904e6085b4fda","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    except exception.InstanceNotFound as exp:"},{"line_number":61,"context_line":"        msg \u003d exp.format_message()"},{"line_number":62,"context_line":"        raise exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":63,"context_line":"    except exception.SecurityGroupLimitExceeded as exp:"},{"line_number":64,"context_line":"        msg \u003d exp.format_message()"},{"line_number":65,"context_line":"        raise exc.HTTPRequestEntityTooLarge(explanation\u003dmsg)"},{"line_number":66,"context_line":"    except exception.NoUniqueMatch as exp:"},{"line_number":67,"context_line":"        msg \u003d exp.format_message()"},{"line_number":68,"context_line":"        raise exc.HTTPConflict(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_a078852c","line":65,"range":{"start_line":63,"start_character":0,"end_line":65,"end_character":60},"in_reply_to":"9a061dce_4a19c887","updated":"2016-04-06 08:47:22.000000000","message":"Maybe it is not the best fit to raise HTTPForbidden when catched SecurityGroupLimitExceeded exception,and it is not correct to raise HTTPRequestEntityToolLarge when catched SecurityGroupLimitExceeded exception.\n\nAccording to https://github.com/Pylons/webob/blob/master/webob/exc.py\n\"\ncode \u003d 413\ntitle \u003d \u0027Request Entity Too Large\u0027\nexplanation \u003d (\u0027The body of your request was too large for this server.\u0027)\n\"\nHTTPRequestEntityTooLarge means the body was too large, not the security group limit exceeded.","commit_id":"9d6652cc02e1c2ee1f5b77284aba886e082c2f61"},{"author":{"_account_id":9631,"name":"sajuptpm","email":"sajuptpm@gmail.com","username":"sajuptpm"},"change_message_id":"59b1c95cc1ca81c7356515a1de8ac73b115d6e38","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    except exception.InstanceNotFound as exp:"},{"line_number":61,"context_line":"        msg \u003d exp.format_message()"},{"line_number":62,"context_line":"        raise exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":63,"context_line":"    except exception.SecurityGroupLimitExceeded as exp:"},{"line_number":64,"context_line":"        msg \u003d exp.format_message()"},{"line_number":65,"context_line":"        raise exc.HTTPRequestEntityTooLarge(explanation\u003dmsg)"},{"line_number":66,"context_line":"    except exception.NoUniqueMatch as exp:"},{"line_number":67,"context_line":"        msg \u003d exp.format_message()"},{"line_number":68,"context_line":"        raise exc.HTTPConflict(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_ec471c49","line":65,"range":{"start_line":63,"start_character":0,"end_line":65,"end_character":60},"in_reply_to":"9a061dce_818750d6","updated":"2016-04-06 07:17:05.000000000","message":"are you saying that HTTPForbidden is correct ?\nWe have to raise an exception with code:413, otherwise novaclient will not raise OverLimit exception.\n\nAccording to https://github.com/Pylons/webob/blob/master/webob/exc.py\n\n413 is mapped to HTTPRequestEntityTooLarge","commit_id":"9d6652cc02e1c2ee1f5b77284aba886e082c2f61"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"b8c3d77d9e76af2e700a56f8ef6204c6cc6f53ba","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    except exception.InstanceNotFound as exp:"},{"line_number":61,"context_line":"        msg \u003d exp.format_message()"},{"line_number":62,"context_line":"        raise exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":63,"context_line":"    except exception.SecurityGroupLimitExceeded as exp:"},{"line_number":64,"context_line":"        msg \u003d exp.format_message()"},{"line_number":65,"context_line":"        raise exc.HTTPRequestEntityTooLarge(explanation\u003dmsg)"},{"line_number":66,"context_line":"    except exception.NoUniqueMatch as exp:"},{"line_number":67,"context_line":"        msg \u003d exp.format_message()"},{"line_number":68,"context_line":"        raise exc.HTTPConflict(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_184be6b1","line":65,"range":{"start_line":63,"start_character":0,"end_line":65,"end_character":60},"in_reply_to":"9a061dce_a078852c","updated":"2016-04-10 05:56:56.000000000","message":"zhaolihui is right here and this change is completely against API-WG guideline:\n\nhttps://github.com/openstack/api-wg/blob/master/guidelines/http.rst#failure-code-clarifications\n\n* If the request results in the OpenStack user exceeding his or her quota, the\n  return code should be **403 Forbidden**. Do **not** use **413 Request\n  Entity Too Large**.","commit_id":"9d6652cc02e1c2ee1f5b77284aba886e082c2f61"},{"author":{"_account_id":20223,"name":"zhaolihui","email":"zhaolh@awcloud.com","username":"zhaolihui"},"change_message_id":"c4c937bbde1f3e4e9cbcf900d5b904e6085b4fda","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    except exception.InstanceNotFound as exp:"},{"line_number":61,"context_line":"        msg \u003d exp.format_message()"},{"line_number":62,"context_line":"        raise exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":63,"context_line":"    except exception.SecurityGroupLimitExceeded as exp:"},{"line_number":64,"context_line":"        msg \u003d exp.format_message()"},{"line_number":65,"context_line":"        raise exc.HTTPRequestEntityTooLarge(explanation\u003dmsg)"},{"line_number":66,"context_line":"    except exception.NoUniqueMatch as exp:"},{"line_number":67,"context_line":"        msg \u003d exp.format_message()"},{"line_number":68,"context_line":"        raise exc.HTTPConflict(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_8aff6066","line":65,"range":{"start_line":63,"start_character":0,"end_line":65,"end_character":60},"in_reply_to":"9a061dce_ec471c49","updated":"2016-04-06 08:47:22.000000000","message":"I mean that catched InvalidMetadataSize exception and then to raise HTTPRequestEntityTooLarge exception, not catched SecurityGroupLimitExceeded exception.","commit_id":"9d6652cc02e1c2ee1f5b77284aba886e082c2f61"},{"author":{"_account_id":9631,"name":"sajuptpm","email":"sajuptpm@gmail.com","username":"sajuptpm"},"change_message_id":"81862aad5843eaba6da57ba2d00efe55d8ad073c","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    except exception.InstanceNotFound as exp:"},{"line_number":61,"context_line":"        msg \u003d exp.format_message()"},{"line_number":62,"context_line":"        raise exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":63,"context_line":"    except exception.SecurityGroupLimitExceeded as exp:"},{"line_number":64,"context_line":"        msg \u003d exp.format_message()"},{"line_number":65,"context_line":"        raise exc.HTTPRequestEntityTooLarge(explanation\u003dmsg)"},{"line_number":66,"context_line":"    except exception.NoUniqueMatch as exp:"},{"line_number":67,"context_line":"        msg \u003d exp.format_message()"},{"line_number":68,"context_line":"        raise exc.HTTPConflict(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_4a19c887","line":65,"range":{"start_line":63,"start_character":0,"end_line":65,"end_character":60},"in_reply_to":"9a061dce_ec471c49","updated":"2016-04-06 08:20:05.000000000","message":"In novaclient 413 is mapped to OverLimit exception\n\nclass OverLimit(RetryAfterException):\n    http_status \u003d 413\n    message \u003d \"Over limit\"","commit_id":"9d6652cc02e1c2ee1f5b77284aba886e082c2f61"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"aacb6108b156122f6f374e5a02480f66b2ac79e5","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    except exception.NoUniqueMatch as exp:"},{"line_number":67,"context_line":"        msg \u003d exp.format_message()"},{"line_number":68,"context_line":"        raise exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"class SecurityGroupControllerBase(object):"},{"line_number":72,"context_line":"    \"\"\"Base class for Security Group controllers.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_00e97114","line":69,"updated":"2016-04-06 08:44:45.000000000","message":"so, you can\u0027t modify the v2.0 stable API this way. Even if we find a bug, we only touch the API in case of security bugs. See http://docs.openstack.org/developer/nova/code-review.html#rest-api\n\nFor modifying that, you rather need to modify the v2.1 path for security groups by providing a microversion with your change, ie. only return a 413 if the requested version is more or equal than v2.X (X being the microversion you\u0027re adding) - or keep returning a 409 if the version is less than v2.X.\n\nSee http://docs.openstack.org/developer/nova/api_microversion_dev.html for further docs to help you.","commit_id":"9d6652cc02e1c2ee1f5b77284aba886e082c2f61"}]}
