)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"f3f1de9815acc5d3cc8071f8db109df5d4a6811a","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Adds an expected_errors decorator for v3 API methods which allows"},{"line_number":10,"context_line":"the specification of what exceptions can be raised within the"},{"line_number":11,"context_line":"method. If an unexpected error occurs a 422 is instead returned"},{"line_number":12,"context_line":"which includes the original error plus a request to lodge a bug"},{"line_number":13,"context_line":"report"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Partially implements blueprint v3-api-expected-errors"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAPH%2F%2FsDw%3D","line":12,"updated":"2013-05-27 01:25:15.000000000","message":"even smaller than a femto-nit ... but ... lodge seems odd to me, how about \"file\"?","commit_id":"43a7b637567104e0b7d73cfe7c77a10521435b1d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e2f5a6611dcb885b3fb17a437d8d5a379556bb78","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Adds an expected_errors decorator for v3 API methods which allows"},{"line_number":10,"context_line":"the specification of what exceptions can be raised within the"},{"line_number":11,"context_line":"method. If an unexpected error occurs a 422 is instead returned"},{"line_number":12,"context_line":"which plus a request to file a bug report"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partially implements blueprint v3-api-expected-errors"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAPX%2F%2Fr2Q%3D","line":11,"updated":"2013-06-12 20:10:31.000000000","message":"Need to update to 500.","commit_id":"1c3ca75d14f2321b90f3cc9ada2f89ff717c6241"},{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"100610c9cd8b8a46a4cd86691fa71c78c33da741","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Adds an expected_errors decorator for v3 API methods which allows"},{"line_number":10,"context_line":"the specification of what exceptions can be raised within the"},{"line_number":11,"context_line":"method. If an unexpected error occurs a 422 is instead returned"},{"line_number":12,"context_line":"which plus a request to file a bug report"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partially implements blueprint v3-api-expected-errors"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAPX%2F%2Fq3k%3D","line":11,"in_reply_to":"AAAAPX%2F%2Fr2Q%3D","updated":"2013-06-13 04:16:30.000000000","message":"oh yes, very good catch. thanks!","commit_id":"1c3ca75d14f2321b90f3cc9ada2f89ff717c6241"}],"nova/api/openstack/extensions.py":[{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"f3f1de9815acc5d3cc8071f8db109df5d4a6811a","unresolved":false,"context_lines":[{"line_number":476,"context_line":"                                                               e_value, e_tb))"},{"line_number":477,"context_line":"                msg \u003d _(\u0027Unexpected API Error. Please report this to \u0027"},{"line_number":478,"context_line":"                        \u0027http://bugs.launchpad.net/nova/\\n%s\u0027) % error"},{"line_number":479,"context_line":"                raise webob.exc.HTTPUnprocessableEntity(explanation\u003dmsg)"},{"line_number":480,"context_line":"        return wrapped"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"    return decorator"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2FsDk%3D","line":479,"updated":"2013-05-27 01:25:15.000000000","message":"I really don\u0027t think we should be including a traceback in an API response, ever","commit_id":"43a7b637567104e0b7d73cfe7c77a10521435b1d"},{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"965f255dc4bdb928efec53160ff62c4af4477854","unresolved":false,"context_lines":[{"line_number":476,"context_line":"                                                               e_value, e_tb))"},{"line_number":477,"context_line":"                msg \u003d _(\u0027Unexpected API Error. Please report this to \u0027"},{"line_number":478,"context_line":"                        \u0027http://bugs.launchpad.net/nova/\\n%s\u0027) % error"},{"line_number":479,"context_line":"                raise webob.exc.HTTPUnprocessableEntity(explanation\u003dmsg)"},{"line_number":480,"context_line":"        return wrapped"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"    return decorator"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2FsCI%3D","line":479,"in_reply_to":"AAAAPH%2F%2FsDk%3D","updated":"2013-05-27 01:58:11.000000000","message":"Ok I\u0027ll remove the traceback. Given that it may be difficult to work out what happened without a traceback do you think it be good to instead LOG it and ask for the bug report to include the nova-api log file if possible?","commit_id":"43a7b637567104e0b7d73cfe7c77a10521435b1d"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"8c488c823a0c4cd89aad06c7867f5c5e72b685b1","unresolved":false,"context_lines":[{"line_number":476,"context_line":"                msg \u003d _(\u0027Unexpected API Error. Please report this at \u0027"},{"line_number":477,"context_line":"                        \u0027http://bugs.launchpad.net/nova/ and attach the Nova \u0027"},{"line_number":478,"context_line":"                        \u0027API log if possible.\\n%s\u0027) % e_type"},{"line_number":479,"context_line":"                raise webob.exc.HTTPUnprocessableEntity(explanation\u003dmsg)"},{"line_number":480,"context_line":"        return wrapped"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"    return decorator"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2FhVw%3D","line":479,"updated":"2013-05-31 11:27:10.000000000","message":"this is a webdav error code, I don\u0027t think we should be using it. We did a big purge of these in cinder at the end of grizzly because they shouldn\u0027t be used.","commit_id":"ccc3f3b6f5e011cd6452c735e16d1328cca75ad6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e2f5a6611dcb885b3fb17a437d8d5a379556bb78","unresolved":false,"context_lines":[{"line_number":459,"context_line":"    \"\"\"Decorator for v3 API methods which specifies expected exceptions."},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"    Specify which exceptions may occur when an API method is called. If an"},{"line_number":462,"context_line":"    unexpected exception occurs then return a 422 instead and ask the user"},{"line_number":463,"context_line":"    of the API to file a bug report.\"\"\""},{"line_number":464,"context_line":"    def decorator(f):"},{"line_number":465,"context_line":"        @functools.wraps(f)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPX%2F%2Fr2A%3D","line":462,"updated":"2013-06-12 20:10:31.000000000","message":"Need to update to 500.","commit_id":"1c3ca75d14f2321b90f3cc9ada2f89ff717c6241"},{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"100610c9cd8b8a46a4cd86691fa71c78c33da741","unresolved":false,"context_lines":[{"line_number":459,"context_line":"    \"\"\"Decorator for v3 API methods which specifies expected exceptions."},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"    Specify which exceptions may occur when an API method is called. If an"},{"line_number":462,"context_line":"    unexpected exception occurs then return a 422 instead and ask the user"},{"line_number":463,"context_line":"    of the API to file a bug report.\"\"\""},{"line_number":464,"context_line":"    def decorator(f):"},{"line_number":465,"context_line":"        @functools.wraps(f)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPX%2F%2Fq3g%3D","line":462,"in_reply_to":"AAAAPX%2F%2Fr2A%3D","updated":"2013-06-13 04:16:30.000000000","message":"Done","commit_id":"1c3ca75d14f2321b90f3cc9ada2f89ff717c6241"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"11817360ef30a1cd09981d1b19da977f5d40d160","unresolved":false,"context_lines":[{"line_number":479,"context_line":"                e_type, _e_value, _e_tb \u003d sys.exc_info()"},{"line_number":480,"context_line":"                msg \u003d _(\u0027Unexpected API Error. Please report this at \u0027"},{"line_number":481,"context_line":"                    \u0027http://bugs.launchpad.net/nova/ and attach the Nova \u0027"},{"line_number":482,"context_line":"                    \u0027API log if possible.\\n%s\u0027) % e_type"},{"line_number":483,"context_line":"                raise webob.exc.HTTPInternalServerError(explanation\u003dmsg)"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"        return wrapped"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPn%2F%2F7Sk%3D","line":482,"updated":"2013-06-18 05:30:16.000000000","message":"The value of \u0027e_type\u0027 looks like same with \u0027type(exc)\u0027, how about use type(exc) directly instead of \u0027sys.exc_info()\u0027?","commit_id":"949186451a6471c5861445d778f3aa13d225a474"}],"nova/tests/api/openstack/compute/test_v3_extensions.py":[{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"7132a8fb1e97d3fe75375669e2e5569cb42ad622","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def test_extensions_unexpected_error(self):"},{"line_number":59,"context_line":"        def fake_fixed_ip_get_by_address_detailed(context, address):"},{"line_number":60,"context_line":"            raise webob.exc.HTTPConflict"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        self.stubs.Set(db, \u0027fixed_ip_get_by_address_detailed\u0027,"},{"line_number":63,"context_line":"                       fake_fixed_ip_get_by_address_detailed)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2FpfU%3D","line":60,"updated":"2013-05-28 16:31:56.000000000","message":"This looks wrong.  Without trailing parenthesis, you\u0027re raising the class itself rather than an instance of the class.\n\nThough I see this in other places in the Nova code.  Is there something weird about this exception that makes this the preferred way?","commit_id":"840db3cb199118d9ddb5a855e2de3ec1e8d1c0e6"},{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"90336c512df91db48eb3c0c4e3a49ae5d2cd4f6f","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def test_extensions_unexpected_error(self):"},{"line_number":59,"context_line":"        def fake_fixed_ip_get_by_address_detailed(context, address):"},{"line_number":60,"context_line":"            raise webob.exc.HTTPConflict"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        self.stubs.Set(db, \u0027fixed_ip_get_by_address_detailed\u0027,"},{"line_number":63,"context_line":"                       fake_fixed_ip_get_by_address_detailed)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2FpEU%3D","line":60,"in_reply_to":"AAAAPH%2F%2FpfU%3D","updated":"2013-05-28 18:42:32.000000000","message":"No, its just wrong. I\u0027ll fix it. As you say this kind of thing is done in quite a few other places in Nova. I guess a cleanup would be good?","commit_id":"840db3cb199118d9ddb5a855e2de3ec1e8d1c0e6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e2f5a6611dcb885b3fb17a437d8d5a379556bb78","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            raise webob.exc.HTTPConflict()"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        self.stubs.Set(db, \u0027fixed_ip_get_by_address_detailed\u0027,"},{"line_number":152,"context_line":"                       fake_fixed_ip_get_by_address_detailed)"},{"line_number":153,"context_line":"        controller \u003d fixed_ips.FixedIPController()"},{"line_number":154,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v3/fake/os-fixed-ips/192.168.1.1\u0027)"},{"line_number":155,"context_line":"        self.assertRaises(webob.exc.HTTPInternalServerError, controller.show,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPX%2F%2Fr2s%3D","line":152,"updated":"2013-06-12 20:10:31.000000000","message":"Do we prefer to use mox StubOutWithMock and AndRaise instead of the stub Set?","commit_id":"1c3ca75d14f2321b90f3cc9ada2f89ff717c6241"},{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"100610c9cd8b8a46a4cd86691fa71c78c33da741","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            raise webob.exc.HTTPConflict()"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        self.stubs.Set(db, \u0027fixed_ip_get_by_address_detailed\u0027,"},{"line_number":152,"context_line":"                       fake_fixed_ip_get_by_address_detailed)"},{"line_number":153,"context_line":"        controller \u003d fixed_ips.FixedIPController()"},{"line_number":154,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v3/fake/os-fixed-ips/192.168.1.1\u0027)"},{"line_number":155,"context_line":"        self.assertRaises(webob.exc.HTTPInternalServerError, controller.show,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPX%2F%2Fq3c%3D","line":152,"in_reply_to":"AAAAPX%2F%2Fr2s%3D","updated":"2013-06-13 04:16:30.000000000","message":"I\u0027ve seen both techniques used in unittests. I don\u0027t think it matters.","commit_id":"1c3ca75d14f2321b90f3cc9ada2f89ff717c6241"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e2f5a6611dcb885b3fb17a437d8d5a379556bb78","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        self.stubs.Set(db, \u0027fixed_ip_get_by_address_detailed\u0027,"},{"line_number":152,"context_line":"                       fake_fixed_ip_get_by_address_detailed)"},{"line_number":153,"context_line":"        controller \u003d fixed_ips.FixedIPController()"},{"line_number":154,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v3/fake/os-fixed-ips/192.168.1.1\u0027)"},{"line_number":155,"context_line":"        self.assertRaises(webob.exc.HTTPInternalServerError, controller.show,"},{"line_number":156,"context_line":"                          req, \u0027192.168.1.1\u0027)"},{"line_number":157,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPX%2F%2Fr4Q%3D","line":154,"updated":"2013-06-12 20:10:31.000000000","message":"Should this be:\n\n req \u003d fakes.HTTPRequestV3.blank(\u0027/fake/os-fixed-ips/192.168.1.1\u0027)","commit_id":"1c3ca75d14f2321b90f3cc9ada2f89ff717c6241"},{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"100610c9cd8b8a46a4cd86691fa71c78c33da741","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        self.stubs.Set(db, \u0027fixed_ip_get_by_address_detailed\u0027,"},{"line_number":152,"context_line":"                       fake_fixed_ip_get_by_address_detailed)"},{"line_number":153,"context_line":"        controller \u003d fixed_ips.FixedIPController()"},{"line_number":154,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v3/fake/os-fixed-ips/192.168.1.1\u0027)"},{"line_number":155,"context_line":"        self.assertRaises(webob.exc.HTTPInternalServerError, controller.show,"},{"line_number":156,"context_line":"                          req, \u0027192.168.1.1\u0027)"},{"line_number":157,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPX%2F%2Fq3Y%3D","line":154,"in_reply_to":"AAAAPX%2F%2Fr4Q%3D","updated":"2013-06-13 04:16:30.000000000","message":"ah yes, though the fake/ is no longer needed.(not that it actually affects the test as the request object is just a dummy and not used).","commit_id":"1c3ca75d14f2321b90f3cc9ada2f89ff717c6241"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e2f5a6611dcb885b3fb17a437d8d5a379556bb78","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        controller \u003d fixed_ips.FixedIPController()"},{"line_number":165,"context_line":"        body \u003d {\u0027reserve\u0027: None}"},{"line_number":166,"context_line":"        req \u003d fakes.HTTPRequest.blank("},{"line_number":167,"context_line":"            \u0027/v3/fake/os-fixed-ips/192.168.1.1/action\u0027)"},{"line_number":168,"context_line":"        self.assertRaises(webob.exc.HTTPInternalServerError, controller.action,"},{"line_number":169,"context_line":"                          req, \u0027192.168.1.1\u0027, body)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPX%2F%2Fr30%3D","line":167,"updated":"2013-06-12 20:10:31.000000000","message":"Similar question as above.","commit_id":"1c3ca75d14f2321b90f3cc9ada2f89ff717c6241"},{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"100610c9cd8b8a46a4cd86691fa71c78c33da741","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        controller \u003d fixed_ips.FixedIPController()"},{"line_number":165,"context_line":"        body \u003d {\u0027reserve\u0027: None}"},{"line_number":166,"context_line":"        req \u003d fakes.HTTPRequest.blank("},{"line_number":167,"context_line":"            \u0027/v3/fake/os-fixed-ips/192.168.1.1/action\u0027)"},{"line_number":168,"context_line":"        self.assertRaises(webob.exc.HTTPInternalServerError, controller.action,"},{"line_number":169,"context_line":"                          req, \u0027192.168.1.1\u0027, body)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPX%2F%2Fq3U%3D","line":167,"in_reply_to":"AAAAPX%2F%2Fr30%3D","updated":"2013-06-13 04:16:30.000000000","message":"Done","commit_id":"1c3ca75d14f2321b90f3cc9ada2f89ff717c6241"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"11817360ef30a1cd09981d1b19da977f5d40d160","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        self.stubs.Set(db, \u0027fixed_ip_get_by_address_detailed\u0027,"},{"line_number":152,"context_line":"                       fake_fixed_ip_get_by_address_detailed)"},{"line_number":153,"context_line":"        controller \u003d fixed_ips.FixedIPController()"},{"line_number":154,"context_line":"        req \u003d fakes.HTTPRequestV3.blank(\u0027/os-fixed-ips/192.168.1.1\u0027)"},{"line_number":155,"context_line":"        self.assertRaises(webob.exc.HTTPInternalServerError, controller.show,"},{"line_number":156,"context_line":"                          req, \u0027192.168.1.1\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPn%2F%2F7QY%3D","line":153,"updated":"2013-06-18 05:30:16.000000000","message":"This unittest needn\u0027t depend on other extension. How about test the decorator directly?\nfor example:\n\n\n@extensions.expected_errors(404)\ndef fake_func()\n     webob.exc.HTTPConflict()\n\nself.assertRaise(b.exc.HTTPInternalServerError, fake_func)","commit_id":"949186451a6471c5861445d778f3aa13d225a474"}]}
