)]}'
{"nova/network/manager.py":[{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"0dc9c8313b73ae11e959fc62bb947e16ec4bc893","unresolved":false,"context_lines":[{"line_number":1113,"context_line":"                        subnets_v4.append(next_subnet)"},{"line_number":1114,"context_line":"                        subnet \u003d next_subnet"},{"line_number":1115,"context_line":"                    else:"},{"line_number":1116,"context_line":"                        raise exception.CidrConflict(_(\u0027cidr already in use\u0027))"},{"line_number":1117,"context_line":"                for used_subnet in used_subnets:"},{"line_number":1118,"context_line":"                    if subnet in used_subnet:"},{"line_number":1119,"context_line":"                        msg \u003d _(\u0027requested cidr (%(cidr)s) conflicts with \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOH%2F%2F4Ng%3D","line":1116,"updated":"2013-03-22 13:56:34.000000000","message":"Raising a webob based exception all the way down in the network manager seems inappropriate.  Can you make the exception more generic?  In fact, if you look at other examples in nova.exception, you don\u0027t need to inherit from the base webob exception type to make sure it gets converted to a 409.","commit_id":"a0d69fb77f563fd695c4524fa27a8c01e9bfed8c"},{"author":{"_account_id":6348,"name":"xu-haiwei","email":"hai-xu@xr.jp.nec.com","username":"xu-haiwei"},"change_message_id":"46bb343b18b3a729a3b85a968b3a65bb9a43dc51","unresolved":false,"context_lines":[{"line_number":1113,"context_line":"                        subnets_v4.append(next_subnet)"},{"line_number":1114,"context_line":"                        subnet \u003d next_subnet"},{"line_number":1115,"context_line":"                    else:"},{"line_number":1116,"context_line":"                        raise exception.CidrConflict(_(\u0027cidr already in use\u0027))"},{"line_number":1117,"context_line":"                for used_subnet in used_subnets:"},{"line_number":1118,"context_line":"                    if subnet in used_subnet:"},{"line_number":1119,"context_line":"                        msg \u003d _(\u0027requested cidr (%(cidr)s) conflicts with \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOH%2F%2F2Y8%3D","line":1116,"in_reply_to":"AAAAOH%2F%2F37w%3D","updated":"2013-03-25 01:38:42.000000000","message":"Thank you for your comment. The ValueError in the existing sources are all changed to the HTTP 500 by default, but not all of them should be changed to HTTP 409. So I think  we should raise a new exception.","commit_id":"a0d69fb77f563fd695c4524fa27a8c01e9bfed8c"},{"author":{"_account_id":385,"name":"Jason Kölker","email":"jason@koelker.net","username":"jason-koelker"},"change_message_id":"093604c3a184bc5e5c88258f428f85b201b9ef69","unresolved":false,"context_lines":[{"line_number":1113,"context_line":"                        subnets_v4.append(next_subnet)"},{"line_number":1114,"context_line":"                        subnet \u003d next_subnet"},{"line_number":1115,"context_line":"                    else:"},{"line_number":1116,"context_line":"                        raise exception.CidrConflict(_(\u0027cidr already in use\u0027))"},{"line_number":1117,"context_line":"                for used_subnet in used_subnets:"},{"line_number":1118,"context_line":"                    if subnet in used_subnet:"},{"line_number":1119,"context_line":"                        msg \u003d _(\u0027requested cidr (%(cidr)s) conflicts with \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOH%2F%2F37w%3D","line":1116,"in_reply_to":"AAAAOH%2F%2F4Ng%3D","updated":"2013-03-22 16:04:40.000000000","message":"I agree with Russell. Catching the ValueError in the os-networks extension and returning the proper HTTP status code there is better and will work for non-nova-network api\u0027s like quantum if they also raise the ValueError.","commit_id":"a0d69fb77f563fd695c4524fa27a8c01e9bfed8c"},{"author":{"_account_id":6348,"name":"xu-haiwei","email":"hai-xu@xr.jp.nec.com","username":"xu-haiwei"},"change_message_id":"46bb343b18b3a729a3b85a968b3a65bb9a43dc51","unresolved":false,"context_lines":[{"line_number":1113,"context_line":"                        subnets_v4.append(next_subnet)"},{"line_number":1114,"context_line":"                        subnet \u003d next_subnet"},{"line_number":1115,"context_line":"                    else:"},{"line_number":1116,"context_line":"                        raise exception.CidrConflict(_(\u0027cidr already in use\u0027))"},{"line_number":1117,"context_line":"                for used_subnet in used_subnets:"},{"line_number":1118,"context_line":"                    if subnet in used_subnet:"},{"line_number":1119,"context_line":"                        msg \u003d _(\u0027requested cidr (%(cidr)s) conflicts with \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOH%2F%2F2cg%3D","line":1116,"in_reply_to":"AAAAOH%2F%2F4Ng%3D","updated":"2013-03-25 01:38:42.000000000","message":"Thank you for your comment. In fact I also tried the method of inheriting NovaException, it looks good, but the error message can\u0027t be changed. The error message shows \"ERROR: There was a conflict when trying to complete your request. (HTTP 409)\". So I inherited webob based exception to make the error message more readable by users.","commit_id":"a0d69fb77f563fd695c4524fa27a8c01e9bfed8c"}]}
