)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"02ec0566ddee3df39ec76161c8e6e40b2b2ae0ad","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Handle ConnectFailure from keystone when neutron is down"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Keystone raises an exception ConnectFailure 500 code with when neutron"},{"line_number":10,"context_line":"server is down. As such we convert it to 504 and list the correct"},{"line_number":11,"context_line":"error message telling neutron server connection has failed"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"9a89bdaa_ff917653","line":9,"range":{"start_line":9,"start_character":53,"end_line":9,"end_character":57},"updated":"2016-09-06 14:08:53.000000000","message":"s/with//","commit_id":"8f643c58e0738f98d6f07ca709547981c7225deb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"208ebe3616628ea01f180c1accc607a598f45c3c","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Handle ConnectFailure from keystone when neutron is down"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Keystone raises an exception ConnectFailure 500 code with when neutron"},{"line_number":10,"context_line":"server is down. As such we convert it to 504 and list the correct"},{"line_number":11,"context_line":"error message telling neutron server connection has failed"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"9a89bdaa_a6f447f2","line":9,"range":{"start_line":9,"start_character":53,"end_line":9,"end_character":62},"updated":"2016-09-06 15:10:13.000000000","message":"s/with when/when/","commit_id":"ed573ae63bd75332635107765623ab45502ffb40"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"676ee991f18fd5334ce46bd46256057c8a317301","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Handle ConnectFailure from keystone when neutron is down"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Keystone raises an exception ConnectFailure 500 code with when neutron"},{"line_number":10,"context_line":"server is down. As such we convert it to 504 and list the correct"},{"line_number":11,"context_line":"error message telling neutron server connection has failed"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"9a89bdaa_25466cbf","line":9,"range":{"start_line":9,"start_character":53,"end_line":9,"end_character":62},"in_reply_to":"9a89bdaa_a6f447f2","updated":"2016-09-06 15:40:28.000000000","message":"Done","commit_id":"ed573ae63bd75332635107765623ab45502ffb40"}],"nova/api/openstack/extensions.py":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"aaa56ae5c91c5e95984652bf49609620e03d534f","unresolved":false,"context_lines":[{"line_number":477,"context_line":"                    # like python-novaclient handle this error to"},{"line_number":478,"context_line":"                    # generate new token and do another attempt."},{"line_number":479,"context_line":"                    raise"},{"line_number":480,"context_line":"                elif isinstance(exc, exception.NeutronConnectionFailed):"},{"line_number":481,"context_line":"                    # Handle an error which has happened"},{"line_number":482,"context_line":"                    # due to failure to connect with the neutron server."},{"line_number":483,"context_line":"                    raise"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"                LOG.exception(_LE(\"Unexpected exception in API method\"))"},{"line_number":486,"context_line":"                msg \u003d _(\u0027Unexpected API Error. Please report this at \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_100f322f","line":483,"range":{"start_line":480,"start_character":0,"end_line":483,"end_character":25},"updated":"2016-06-22 21:35:45.000000000","message":"This should be unexpected error, and I think the detail of error should not be returned to API users.\nIt is enough to know the detail from operators instead.\n\nSo it is not necessary to add here and better to put the detail as log.","commit_id":"9c7688b1fee35e0b11c500a35fe2f1c5e474f158"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"9bb4513761a8413d319e7abcc31854df41495be7","unresolved":false,"context_lines":[{"line_number":477,"context_line":"                    # like python-novaclient handle this error to"},{"line_number":478,"context_line":"                    # generate new token and do another attempt."},{"line_number":479,"context_line":"                    raise"},{"line_number":480,"context_line":"                elif isinstance(exc, exception.NeutronConnectionFailed):"},{"line_number":481,"context_line":"                    # Handle an error which has happened"},{"line_number":482,"context_line":"                    # due to failure to connect with the neutron server."},{"line_number":483,"context_line":"                    raise"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"                LOG.exception(_LE(\"Unexpected exception in API method\"))"},{"line_number":486,"context_line":"                msg \u003d _(\u0027Unexpected API Error. Please report this at \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_ab4ccc42","line":483,"range":{"start_line":480,"start_character":0,"end_line":483,"end_character":25},"in_reply_to":"3aaa91ec_100f322f","updated":"2016-06-23 14:08:41.000000000","message":"Not really relevant to this change, but I\u0027m curious why this block of elif? If they are all going to just `raise` why not:\n\n    else: raise\n\n?","commit_id":"9c7688b1fee35e0b11c500a35fe2f1c5e474f158"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"9213a58b3f05d52a3172ac776625dab6635fd6fc","unresolved":false,"context_lines":[{"line_number":477,"context_line":"                    # like python-novaclient handle this error to"},{"line_number":478,"context_line":"                    # generate new token and do another attempt."},{"line_number":479,"context_line":"                    raise"},{"line_number":480,"context_line":"                elif isinstance(exc, exception.NeutronConnectionFailed):"},{"line_number":481,"context_line":"                    # Handle an error which has happened"},{"line_number":482,"context_line":"                    # due to failure to connect with the neutron server."},{"line_number":483,"context_line":"                    raise"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"                LOG.exception(_LE(\"Unexpected exception in API method\"))"},{"line_number":486,"context_line":"                msg \u003d _(\u0027Unexpected API Error. Please report this at \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"9ad45d7e_97581e34","line":483,"range":{"start_line":480,"start_character":0,"end_line":483,"end_character":25},"in_reply_to":"3aaa91ec_100f322f","updated":"2016-08-10 06:13:59.000000000","message":"The api user should at least know the direction of a possible problem and as such this detail might be helpful","commit_id":"9c7688b1fee35e0b11c500a35fe2f1c5e474f158"}],"nova/exception.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"9bb4513761a8413d319e7abcc31854df41495be7","unresolved":false,"context_lines":[{"line_number":193,"context_line":"class NeutronConnectionFailed(NovaException):"},{"line_number":194,"context_line":"    ec2_code \u003d \u0027NeutronConnectionFailed\u0027"},{"line_number":195,"context_line":"    msg_fmt \u003d _(\"Unable To connect to the neutron server\")"},{"line_number":196,"context_line":"    code \u003d 503"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"class Forbidden(NovaException):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_b0555751","line":196,"updated":"2016-06-23 14:08:41.000000000","message":"I don\u0027t think 503 is correct here. 503 means the nova api server is unavailable, not something it is trying to use unavailable. A better choice could be 502 or 504 depending on what actually went wrong while trying to reach the neutron server.\n\nIf neutron responded but the response was something that could not be interpreted then 502 might be the right choice.\n\n504 is the right choice if the connection to the neutron server timed out. I would say that in this context \"tried to connect but the server is not there\" is close enough to be equivalent.\n\nsee: http://tools.ietf.org/html/rfc7231#section-6.6.5","commit_id":"9c7688b1fee35e0b11c500a35fe2f1c5e474f158"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"9213a58b3f05d52a3172ac776625dab6635fd6fc","unresolved":false,"context_lines":[{"line_number":193,"context_line":"class NeutronConnectionFailed(NovaException):"},{"line_number":194,"context_line":"    ec2_code \u003d \u0027NeutronConnectionFailed\u0027"},{"line_number":195,"context_line":"    msg_fmt \u003d _(\"Unable To connect to the neutron server\")"},{"line_number":196,"context_line":"    code \u003d 503"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"class Forbidden(NovaException):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9ad45d7e_3778528f","line":196,"in_reply_to":"3aaa91ec_b0555751","updated":"2016-08-10 06:13:59.000000000","message":"I agree that 504 is better, would make the change","commit_id":"9c7688b1fee35e0b11c500a35fe2f1c5e474f158"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c8fc3bd7a0442761792c23f546d884b778bed08f","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"class NeutronConnectionFailed(NovaException):"},{"line_number":152,"context_line":"    ec2_code \u003d \u0027NeutronConnectionFailed\u0027"},{"line_number":153,"context_line":"    msg_fmt \u003d _(\"Unable To connect to the neutron server\")"},{"line_number":154,"context_line":"    code \u003d 504"},{"line_number":155,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_11542cc8","line":152,"updated":"2016-08-10 11:35:48.000000000","message":"where this is used?","commit_id":"d1d7fe95dd09702963b8ea9e975517083648f276"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"06728104f480125dabb1200e37746436d0c14df2","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"class NeutronConnectionFailed(NovaException):"},{"line_number":152,"context_line":"    ec2_code \u003d \u0027NeutronConnectionFailed\u0027"},{"line_number":153,"context_line":"    msg_fmt \u003d _(\"Unable To connect to the neutron server\")"},{"line_number":154,"context_line":"    code \u003d 504"},{"line_number":155,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_961e4d5d","line":152,"in_reply_to":"9ad45d7e_11542cc8","updated":"2016-08-10 12:34:30.000000000","message":"this is used in  nova/network/neutronv2/api.py","commit_id":"d1d7fe95dd09702963b8ea9e975517083648f276"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"50412e8ff8e6f4695bdbac459ce2b03286437351","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"class NeutronConnectionFailed(NovaException):"},{"line_number":152,"context_line":"    ec2_code \u003d \u0027NeutronConnectionFailed\u0027"},{"line_number":153,"context_line":"    msg_fmt \u003d _(\"Unable To connect to the neutron server\")"},{"line_number":154,"context_line":"    code \u003d 504"},{"line_number":155,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_5be787ab","line":152,"range":{"start_line":152,"start_character":4,"end_line":152,"end_character":40},"updated":"2016-08-11 18:41:06.000000000","message":"ec2_code has been removed since I681d461029bbc3a05aaa150f2d154eb8bdf5ff0f\n\nWe don\u0027t need it anymore.","commit_id":"ffbbb6472e690d6a54db466f17ff8ee13d6bb872"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"3177d42f0e59a614b0343d6f4f7d1acbe8580da4","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"class NeutronConnectionFailed(NovaException):"},{"line_number":152,"context_line":"    ec2_code \u003d \u0027NeutronConnectionFailed\u0027"},{"line_number":153,"context_line":"    msg_fmt \u003d _(\"Unable To connect to the neutron server\")"},{"line_number":154,"context_line":"    code \u003d 504"},{"line_number":155,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_597f7814","line":152,"range":{"start_line":152,"start_character":4,"end_line":152,"end_character":40},"in_reply_to":"9ad45d7e_5be787ab","updated":"2016-08-12 10:11:03.000000000","message":"Thanks for pointing that out kenichi","commit_id":"ffbbb6472e690d6a54db466f17ff8ee13d6bb872"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d8d9e0366964e16b51ecd19c5cab0441c48ff23a","unresolved":false,"context_lines":[{"line_number":151,"context_line":"class NeutronConnectionFailed(NovaException):"},{"line_number":152,"context_line":"    ec2_code \u003d \u0027NeutronConnectionFailed\u0027"},{"line_number":153,"context_line":"    msg_fmt \u003d _(\"Unable To connect to the neutron server\")"},{"line_number":154,"context_line":"    code \u003d 504"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"class Forbidden(NovaException):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_0d6cc833","line":154,"updated":"2016-08-11 14:13:22.000000000","message":"I guess I don\u0027t understand why this should be handled differently than the ConnectionFailed exceptions directly above it for Glance and Cinder.","commit_id":"ffbbb6472e690d6a54db466f17ff8ee13d6bb872"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"3177d42f0e59a614b0343d6f4f7d1acbe8580da4","unresolved":false,"context_lines":[{"line_number":151,"context_line":"class NeutronConnectionFailed(NovaException):"},{"line_number":152,"context_line":"    ec2_code \u003d \u0027NeutronConnectionFailed\u0027"},{"line_number":153,"context_line":"    msg_fmt \u003d _(\"Unable To connect to the neutron server\")"},{"line_number":154,"context_line":"    code \u003d 504"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"class Forbidden(NovaException):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_96e092ce","line":154,"in_reply_to":"9ad45d7e_0d6cc833","updated":"2016-08-12 10:11:03.000000000","message":"Jay, those are somewhat similar . Both have wrapppers on client and catch exceptions","commit_id":"ffbbb6472e690d6a54db466f17ff8ee13d6bb872"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"fa1a4c3e89fa0bcaf44f80b4841ccc11f2879382","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"class NeutronConnectionFailed(NovaException):"},{"line_number":152,"context_line":"    msg_fmt \u003d _(\"Unable To connect to the neutron server\")"},{"line_number":153,"context_line":"    code \u003d 504"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"class Forbidden(NovaException):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_742a8d91","line":153,"updated":"2016-08-23 11:15:34.000000000","message":"We should get additional input on whether 503 or 504 is more appropriate here.\n\nIf you are trying to encapsulate any reason why we aren\u0027t talking to the neutron api, then 503 may be better.\n\n(I think I\u0027ve suggested both during my reviews of this, so clearly it\u0027s a bit confusing :) )","commit_id":"7617202d4cdbf5e139594dd4205adc709a59d431"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"7ad2d6a3205c20cf41f6f9c3f48c950d1353289f","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"class NeutronConnectionFailed(NovaException):"},{"line_number":152,"context_line":"    msg_fmt \u003d _(\"Unable To connect to the neutron server\")"},{"line_number":153,"context_line":"    code \u003d 504"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"class Forbidden(NovaException):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_cd0df191","line":153,"in_reply_to":"1ac06dbe_742a8d91","updated":"2016-09-06 13:44:37.000000000","message":"I don\u0027t think we need to encapsulate the reason, being clear about the failure would help. The status code is really confusing but let\u0027s stick to 504 as that seems more apt. I would make the reason visible in the exception as well as the error message.","commit_id":"7617202d4cdbf5e139594dd4205adc709a59d431"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"02ec0566ddee3df39ec76161c8e6e40b2b2ae0ad","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"class NeutronConnectionFailed(NovaException):"},{"line_number":152,"context_line":"    msg_fmt \u003d _(\"Unable To connect to the neutron server: %(reason)s\")"},{"line_number":153,"context_line":"    code \u003d 504"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"9a89bdaa_5f2c2202","line":152,"range":{"start_line":152,"start_character":17,"end_line":152,"end_character":56},"updated":"2016-09-06 14:08:53.000000000","message":"\"Unable to connect to the Networking service: \"\n\nI don\u0027t think we need to say \u0027Neutron\u0027 in the error message given the docs refer to it as the OpenStack Networking service.","commit_id":"8f643c58e0738f98d6f07ca709547981c7225deb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"208ebe3616628ea01f180c1accc607a598f45c3c","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"class NeutronConnectionFailed(NovaException):"},{"line_number":152,"context_line":"    msg_fmt \u003d _(\"Unable To connect to the Networking service: %(reason)s\")"},{"line_number":153,"context_line":"    code \u003d 504"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_e6de4f6c","line":152,"range":{"start_line":152,"start_character":24,"end_line":152,"end_character":26},"updated":"2016-09-06 15:10:13.000000000","message":"s/To/to/","commit_id":"ed573ae63bd75332635107765623ab45502ffb40"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"676ee991f18fd5334ce46bd46256057c8a317301","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"class NeutronConnectionFailed(NovaException):"},{"line_number":152,"context_line":"    msg_fmt \u003d _(\"Unable To connect to the Networking service: %(reason)s\")"},{"line_number":153,"context_line":"    code \u003d 504"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_251d8cbd","line":152,"range":{"start_line":152,"start_character":24,"end_line":152,"end_character":26},"in_reply_to":"9a89bdaa_e6de4f6c","updated":"2016-09-06 15:40:28.000000000","message":"Done","commit_id":"ed573ae63bd75332635107765623ab45502ffb40"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"9ae8c344fbf999f07d38572b4b9bd050328d37a3","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"class NeutronConnectionFailed(NovaException):"},{"line_number":152,"context_line":"    msg_fmt \u003d _(\"Unable to connect to the Networking service: %(reason)s\")"},{"line_number":153,"context_line":"    code \u003d 504"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a89bdaa_88b58def","line":152,"updated":"2016-09-06 15:52:36.000000000","message":"We don\u0027t want relay to users the reason why Nova is unable to connect to the networking service.","commit_id":"587be2dbf4ab6e29dc1d6f36ab48916a135d216c"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"aa31abc15f70c48aee84546f33e036c15b46ba18","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"class NeutronConnectionFailed(NovaException):"},{"line_number":152,"context_line":"    msg_fmt \u003d _(\"Unable to connect to the Networking service: %(reason)s\")"},{"line_number":153,"context_line":"    code \u003d 504"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a89bdaa_349cd8bf","line":152,"in_reply_to":"9a89bdaa_88b58def","updated":"2016-09-07 05:17:33.000000000","message":"Done","commit_id":"587be2dbf4ab6e29dc1d6f36ab48916a135d216c"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"11e64e80711ac56d4e230df989bbb5c6c4059abc","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"class NeutronConnectionFailed(NovaException):"},{"line_number":152,"context_line":"    msg_fmt \u003d _(\"Unable to connect to the Networking service\")"},{"line_number":153,"context_line":"    code \u003d 504"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"class Forbidden(NovaException):"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a89bdaa_b44b5a86","line":153,"range":{"start_line":153,"start_character":4,"end_line":153,"end_character":14},"updated":"2016-09-07 12:25:00.000000000","message":"So this based on the exception\u003c-\u003ehttp*exception auto translation in the wsgi layer. But I think that isn\u0027t what we want, and that is the reason we have expected_error decorator. But i\u0027m ok for now, we can clean up later.","commit_id":"011385f154c155d06190d3b3eedc3da876f75d9e"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"c2779d699ae9817ab5d2e5d7d690faa31f12a4f7","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"class NeutronConnectionFailed(NovaException):"},{"line_number":152,"context_line":"    msg_fmt \u003d _(\"Unable to connect to the Networking service\")"},{"line_number":153,"context_line":"    code \u003d 504"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"class Forbidden(NovaException):"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a89bdaa_348825c5","line":153,"range":{"start_line":153,"start_character":4,"end_line":153,"end_character":14},"in_reply_to":"9a89bdaa_b44b5a86","updated":"2016-09-07 13:36:55.000000000","message":"Ok.","commit_id":"011385f154c155d06190d3b3eedc3da876f75d9e"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"274fc8b75dd721a05fdf3d4ec5b2ee6052b97ef6","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"class NeutronConnectionFailed(NovaException):"},{"line_number":152,"context_line":"    msg_fmt \u003d _(\"Unable to connect to the Networking service\")"},{"line_number":153,"context_line":"    code \u003d 504"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"class Forbidden(NovaException):"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a89bdaa_ea501b61","line":153,"updated":"2016-09-09 12:12:31.000000000","message":"It concerns me that Neutron connection failures look different than Glance or Cinder connect failures.","commit_id":"3eb3b8045cb186dea7150c9331de5a71e73e5a49"}],"nova/network/neutronv2/api.py":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"aaa56ae5c91c5e95984652bf49609620e03d534f","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                raise exception.Unauthorized()"},{"line_number":105,"context_line":"            except keystone_exception.ConnectFailure:"},{"line_number":106,"context_line":"                # Unable to connect to neutron, as such raising"},{"line_number":107,"context_line":"                # an exception for that"},{"line_number":108,"context_line":"                raise exception.NeutronConnectionFailed()"},{"line_number":109,"context_line":"            return ret"},{"line_number":110,"context_line":"        return wrapper"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_b04d7e74","line":108,"range":{"start_line":107,"start_character":0,"end_line":108,"end_character":57},"updated":"2016-06-22 21:35:45.000000000","message":"Here should output the detail of error to log for debugging on production clouds because that is unexpected.","commit_id":"9c7688b1fee35e0b11c500a35fe2f1c5e474f158"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"33e62ec953f16bd7b1645f36146bfd35aaa38bb9","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                raise exception.Unauthorized()"},{"line_number":105,"context_line":"            except keystone_exception.ConnectFailure:"},{"line_number":106,"context_line":"                # Unable to connect to neutron, as such raising"},{"line_number":107,"context_line":"                # an exception for that"},{"line_number":108,"context_line":"                raise exception.NeutronConnectionFailed()"},{"line_number":109,"context_line":"            return ret"},{"line_number":110,"context_line":"        return wrapper"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9ad45d7e_f7451ab3","line":108,"range":{"start_line":107,"start_character":0,"end_line":108,"end_character":57},"in_reply_to":"3aaa91ec_b04d7e74","updated":"2016-08-10 06:37:03.000000000","message":"I agree keninchi. Would make the chnage","commit_id":"9c7688b1fee35e0b11c500a35fe2f1c5e474f158"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"50412e8ff8e6f4695bdbac459ce2b03286437351","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            except keystone_exception.ConnectFailure:"},{"line_number":115,"context_line":"                # Unable to connect to neutron, as such raising"},{"line_number":116,"context_line":"                # an exception for that"},{"line_number":117,"context_line":"                LOG.error(_LE(\"Nova was unable to connect to Neutron \""},{"line_number":118,"context_line":"                              \"server, please verify Neutron server is\""},{"line_number":119,"context_line":"                              \" running.\"))"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"                raise exception.NeutronConnectionFailed()"},{"line_number":122,"context_line":"            return ret"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_bb29639d","line":119,"range":{"start_line":117,"start_character":30,"end_line":119,"end_character":41},"updated":"2016-08-11 18:41:06.000000000","message":"Why don\u0027t the log include the message of keystone_exception.ConnectFailure ?\nThat would be useful for investigating a root problem of this kind of integration problem.","commit_id":"ffbbb6472e690d6a54db466f17ff8ee13d6bb872"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"3177d42f0e59a614b0343d6f4f7d1acbe8580da4","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            except keystone_exception.ConnectFailure:"},{"line_number":115,"context_line":"                # Unable to connect to neutron, as such raising"},{"line_number":116,"context_line":"                # an exception for that"},{"line_number":117,"context_line":"                LOG.error(_LE(\"Nova was unable to connect to Neutron \""},{"line_number":118,"context_line":"                              \"server, please verify Neutron server is\""},{"line_number":119,"context_line":"                              \" running.\"))"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"                raise exception.NeutronConnectionFailed()"},{"line_number":122,"context_line":"            return ret"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_c17246b0","line":119,"range":{"start_line":117,"start_character":30,"end_line":119,"end_character":41},"in_reply_to":"9ad45d7e_bb29639d","updated":"2016-08-12 10:11:03.000000000","message":"Done","commit_id":"ffbbb6472e690d6a54db466f17ff8ee13d6bb872"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"76dbbef8ca497260cf5ae24d6d84839ba222efdb","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                raise exception.NeutronAdminCredentialConfigurationInvalid()"},{"line_number":112,"context_line":"            except neutron_client_exc.Forbidden as e:"},{"line_number":113,"context_line":"                raise exception.Forbidden(e)"},{"line_number":114,"context_line":"            except keystone_exception.ConnectFailure as e:"},{"line_number":115,"context_line":"                # Unable to connect to neutron, as such raising"},{"line_number":116,"context_line":"                # an exception for that"},{"line_number":117,"context_line":"                LOG.error(_LE(\"Nova was unable to connect to Neutron \""}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_a8d4c5bc","line":114,"range":{"start_line":114,"start_character":12,"end_line":114,"end_character":58},"updated":"2016-08-23 00:29:15.000000000","message":"Humm. To be honest, I don\u0027t tend to prefer this way because this code is not so readable. The above exception doesn\u0027t mean/show Neutron connection error directly but the patch handles it as Neutron connection error.\n\nThis module file is for Neutron, so we can understand it. but I was a little confused when I saw this code at the first time.\n\nIn addition, the keystoneauth raises the other exceptions around this exception like:\n\n 587         try:\n 588             try:\n 589                 resp \u003d self.session.request(method, url, **kwargs)\n 590             except requests.exceptions.SSLError as e:\n 591                 msg \u003d \u0027SSL exception connecting to %(url)s: %(error)s\u0027 % {\n 592                     \u0027url\u0027: url, \u0027error\u0027: e}\n 593                 raise exceptions.SSLError(msg)\n 594             except requests.exceptions.Timeout:\n 595                 msg \u003d \u0027Request to %s timed out\u0027 % url\n 596                 raise exceptions.ConnectTimeout(msg)\n 597             except requests.exceptions.ConnectionError:\n 598                 msg \u003d \u0027Unable to establish connection to %s\u0027 % url\n 599                 raise exceptions.ConnectFailure(msg)\n 600             except requests.exceptions.RequestException as e:\n 601                 msg \u003d \u0027Unexpected exception for %(url)s: %(error)s\u0027 % {\n 602                     \u0027url\u0027: url, \u0027error\u0027: e}\n 603                 raise exceptions.UnknownConnectionError(msg, e)\n\nThese original messages show the reasons directly, and I don\u0027t think it is so hard to debug this problem on productions actually even if not merging this patch.\nIf we cover all above cases, the code becomes more difficult.\n\nIdeally, 500 should not be returned as this commit. I agree with that completely. However, unreadable code is hard to be maintained in long-term. This is just my opinion.","commit_id":"7617202d4cdbf5e139594dd4205adc709a59d431"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"7ad2d6a3205c20cf41f6f9c3f48c950d1353289f","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                raise exception.NeutronAdminCredentialConfigurationInvalid()"},{"line_number":112,"context_line":"            except neutron_client_exc.Forbidden as e:"},{"line_number":113,"context_line":"                raise exception.Forbidden(e)"},{"line_number":114,"context_line":"            except keystone_exception.ConnectFailure as e:"},{"line_number":115,"context_line":"                # Unable to connect to neutron, as such raising"},{"line_number":116,"context_line":"                # an exception for that"},{"line_number":117,"context_line":"                LOG.error(_LE(\"Nova was unable to connect to Neutron \""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_cd5b3186","line":114,"range":{"start_line":114,"start_character":12,"end_line":114,"end_character":58},"in_reply_to":"1ac06dbe_a8d4c5bc","updated":"2016-09-06 13:44:37.000000000","message":"I have tried to make sure the correct message is shown along with a reason. Please take a look.","commit_id":"7617202d4cdbf5e139594dd4205adc709a59d431"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"fa1a4c3e89fa0bcaf44f80b4841ccc11f2879382","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                # an exception for that"},{"line_number":117,"context_line":"                LOG.error(_LE(\"Nova was unable to connect to Neutron \""},{"line_number":118,"context_line":"                              \"server, please verify Neutron server is\""},{"line_number":119,"context_line":"                              \" running.%s\"), six.text_type(e))"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"                raise exception.NeutronConnectionFailed()"},{"line_number":122,"context_line":"            return ret"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_d4c8a124","line":119,"updated":"2016-08-23 11:15:34.000000000","message":"You probably want a space before the %s if you are going to do it this way.","commit_id":"7617202d4cdbf5e139594dd4205adc709a59d431"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"7ad2d6a3205c20cf41f6f9c3f48c950d1353289f","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                # an exception for that"},{"line_number":117,"context_line":"                LOG.error(_LE(\"Nova was unable to connect to Neutron \""},{"line_number":118,"context_line":"                              \"server, please verify Neutron server is\""},{"line_number":119,"context_line":"                              \" running.%s\"), six.text_type(e))"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"                raise exception.NeutronConnectionFailed()"},{"line_number":122,"context_line":"            return ret"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_edd555b9","line":119,"in_reply_to":"1ac06dbe_d4c8a124","updated":"2016-09-06 13:44:37.000000000","message":"Done","commit_id":"7617202d4cdbf5e139594dd4205adc709a59d431"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"fa1a4c3e89fa0bcaf44f80b4841ccc11f2879382","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                              \"server, please verify Neutron server is\""},{"line_number":119,"context_line":"                              \" running.%s\"), six.text_type(e))"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"                raise exception.NeutronConnectionFailed()"},{"line_number":122,"context_line":"            return ret"},{"line_number":123,"context_line":"        return wrapper"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_b49b6517","line":121,"updated":"2016-08-23 11:15:34.000000000","message":"I agree that re-raising as a more generic exception (so it can be turned into something other than a 500) is the right thing here, but I would prefer that the original exception message be preserved in the exception, not just the logged error, by passin e to the new exception.\n\nUnless, of course, there is some reason we want to hide that information from the end user?","commit_id":"7617202d4cdbf5e139594dd4205adc709a59d431"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"7ad2d6a3205c20cf41f6f9c3f48c950d1353289f","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                              \"server, please verify Neutron server is\""},{"line_number":119,"context_line":"                              \" running.%s\"), six.text_type(e))"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"                raise exception.NeutronConnectionFailed()"},{"line_number":122,"context_line":"            return ret"},{"line_number":123,"context_line":"        return wrapper"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_4d50015e","line":121,"in_reply_to":"1ac06dbe_b49b6517","updated":"2016-09-06 13:44:37.000000000","message":"Done","commit_id":"7617202d4cdbf5e139594dd4205adc709a59d431"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"208ebe3616628ea01f180c1accc607a598f45c3c","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            except keystone_exception.ConnectFailure as e:"},{"line_number":115,"context_line":"                # Unable to connect to neutron, as such raising"},{"line_number":116,"context_line":"                # an exception for that"},{"line_number":117,"context_line":"                LOG.error(_LE(\"Nova was unable to connect to Networking \""},{"line_number":118,"context_line":"                              \"service. Reason: %s\"), six.text_type(e))"},{"line_number":119,"context_line":"                raise exception.NeutronConnectionFailed(reason\u003dsix.text_type(e))"},{"line_number":120,"context_line":"            return ret"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_0648932c","line":117,"range":{"start_line":117,"start_character":61,"end_line":117,"end_character":71},"updated":"2016-09-06 15:10:13.000000000","message":"For the record, this is not a user-visible error log message, so I think it\u0027s OK to say we can\u0027t connect to the neutron server in here.","commit_id":"ed573ae63bd75332635107765623ab45502ffb40"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"676ee991f18fd5334ce46bd46256057c8a317301","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            except keystone_exception.ConnectFailure as e:"},{"line_number":115,"context_line":"                # Unable to connect to neutron, as such raising"},{"line_number":116,"context_line":"                # an exception for that"},{"line_number":117,"context_line":"                LOG.error(_LE(\"Nova was unable to connect to Networking \""},{"line_number":118,"context_line":"                              \"service. Reason: %s\"), six.text_type(e))"},{"line_number":119,"context_line":"                raise exception.NeutronConnectionFailed(reason\u003dsix.text_type(e))"},{"line_number":120,"context_line":"            return ret"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_4561b038","line":117,"range":{"start_line":117,"start_character":61,"end_line":117,"end_character":71},"in_reply_to":"9a89bdaa_0648932c","updated":"2016-09-06 15:40:28.000000000","message":"Okay!","commit_id":"ed573ae63bd75332635107765623ab45502ffb40"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"9ae8c344fbf999f07d38572b4b9bd050328d37a3","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                # an exception for that"},{"line_number":117,"context_line":"                LOG.error(_LE(\"Nova was unable to connect to Networking \""},{"line_number":118,"context_line":"                              \"service. Reason: %s\"), six.text_type(e))"},{"line_number":119,"context_line":"                raise exception.NeutronConnectionFailed(reason\u003dsix.text_type(e))"},{"line_number":120,"context_line":"            return ret"},{"line_number":121,"context_line":"        return wrapper"},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a89bdaa_68a5a9b3","line":119,"updated":"2016-09-06 15:52:36.000000000","message":"As said before no need to dispatch the reason to users.","commit_id":"587be2dbf4ab6e29dc1d6f36ab48916a135d216c"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"aa31abc15f70c48aee84546f33e036c15b46ba18","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                # an exception for that"},{"line_number":117,"context_line":"                LOG.error(_LE(\"Nova was unable to connect to Networking \""},{"line_number":118,"context_line":"                              \"service. Reason: %s\"), six.text_type(e))"},{"line_number":119,"context_line":"                raise exception.NeutronConnectionFailed(reason\u003dsix.text_type(e))"},{"line_number":120,"context_line":"            return ret"},{"line_number":121,"context_line":"        return wrapper"},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a89bdaa_f46350da","line":119,"in_reply_to":"9a89bdaa_68a5a9b3","updated":"2016-09-07 05:17:33.000000000","message":"Done","commit_id":"587be2dbf4ab6e29dc1d6f36ab48916a135d216c"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"274fc8b75dd721a05fdf3d4ec5b2ee6052b97ef6","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            except keystone_exception.ConnectFailure as e:"},{"line_number":115,"context_line":"                # Unable to connect to neutron, as such raising"},{"line_number":116,"context_line":"                # an exception for that"},{"line_number":117,"context_line":"                LOG.error(_LE(\"Nova was unable to connect to Networking \""},{"line_number":118,"context_line":"                              \"service. Reason: %s\"), six.text_type(e))"},{"line_number":119,"context_line":"                raise exception.NeutronConnectionFailed()"},{"line_number":120,"context_line":"            return ret"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a89bdaa_ca01973b","line":117,"updated":"2016-09-09 12:12:31.000000000","message":"I think this message is good for sure, I\u0027m unsure if we really want to translate the exception though.","commit_id":"3eb3b8045cb186dea7150c9331de5a71e73e5a49"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"3a1d87fb42b612766c7a852ea58e104d6b009241","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            except keystone_exception.ConnectFailure as e:"},{"line_number":115,"context_line":"                # Unable to connect to neutron, as such raising"},{"line_number":116,"context_line":"                # an exception for that"},{"line_number":117,"context_line":"                LOG.error(_LE(\"Nova was unable to connect to Networking \""},{"line_number":118,"context_line":"                              \"service. Reason: %s\"), six.text_type(e))"},{"line_number":119,"context_line":"                raise exception.NeutronConnectionFailed()"},{"line_number":120,"context_line":"            return ret"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a8ec9b2_de789a92","line":117,"in_reply_to":"9a89bdaa_ca01973b","updated":"2016-09-13 21:15:49.000000000","message":"Heh, we (ESL guys) tend to prefer seeing log on our own LANG even if the original message has clear meaning, so I don\u0027t think we should avoid translating here.","commit_id":"3eb3b8045cb186dea7150c9331de5a71e73e5a49"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"dad392de4ac0a29ccaea1a0baa6435e47d98a90e","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                # an exception for that"},{"line_number":117,"context_line":"                LOG.error(_LE(\"Nova was unable to connect to Networking \""},{"line_number":118,"context_line":"                              \"service. Reason: %s\"), six.text_type(e))"},{"line_number":119,"context_line":"                raise exception.NeutronConnectionFailed()"},{"line_number":120,"context_line":"            return ret"},{"line_number":121,"context_line":"        return wrapper"},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9a89bdaa_847223ac","line":119,"updated":"2016-09-09 12:32:50.000000000","message":"I\u0027m +2 if we dump changing the exception at this point, and remove the code that expects the new exception.","commit_id":"3eb3b8045cb186dea7150c9331de5a71e73e5a49"}],"nova/tests/functional/api_sample_tests/test_networks.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c8fc3bd7a0442761792c23f546d884b778bed08f","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    def test_network_neutron_connection_failed(self, mock_get):"},{"line_number":86,"context_line":"        uuid \u003d test_networks.FAKE_NETWORKS[0][\u0027uuid\u0027]"},{"line_number":87,"context_line":"        response \u003d self._do_get(\u0027os-networks/%s\u0027 % uuid)"},{"line_number":88,"context_line":"        self.assertEqual(503, response.status_code)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def test_network_create(self):"},{"line_number":91,"context_line":"        response \u003d self._do_post(\"os-networks\","}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_5107c4c9","line":88,"updated":"2016-08-10 11:35:48.000000000","message":"The exception defines error code 504 and you assert 503 here. Why?","commit_id":"d1d7fe95dd09702963b8ea9e975517083648f276"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"06728104f480125dabb1200e37746436d0c14df2","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    def test_network_neutron_connection_failed(self, mock_get):"},{"line_number":86,"context_line":"        uuid \u003d test_networks.FAKE_NETWORKS[0][\u0027uuid\u0027]"},{"line_number":87,"context_line":"        response \u003d self._do_get(\u0027os-networks/%s\u0027 % uuid)"},{"line_number":88,"context_line":"        self.assertEqual(503, response.status_code)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def test_network_create(self):"},{"line_number":91,"context_line":"        response \u003d self._do_post(\"os-networks\","}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_56017504","line":88,"in_reply_to":"9ad45d7e_5107c4c9","updated":"2016-08-10 12:34:30.000000000","message":"Apologies, missed it from my previous change. I would correct it","commit_id":"d1d7fe95dd09702963b8ea9e975517083648f276"}],"nova/tests/unit/api/openstack/test_wsgi.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"fa1a4c3e89fa0bcaf44f80b4841ccc11f2879382","unresolved":false,"context_lines":[{"line_number":468,"context_line":"        self.assertRaises("},{"line_number":469,"context_line":"            exception.Unauthorized, req.get_response, app)"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"    def test_connection_failed(self):"},{"line_number":472,"context_line":"        class Controller(object):"},{"line_number":473,"context_line":"            def index(self, req):"},{"line_number":474,"context_line":"                raise exception.NeutronConnectionFailed()"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_14aeb980","line":471,"updated":"2016-08-23 11:15:34.000000000","message":"This test doesn\u0027t test anything other than itself.","commit_id":"7617202d4cdbf5e139594dd4205adc709a59d431"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"7ad2d6a3205c20cf41f6f9c3f48c950d1353289f","unresolved":false,"context_lines":[{"line_number":468,"context_line":"        self.assertRaises("},{"line_number":469,"context_line":"            exception.Unauthorized, req.get_response, app)"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"    def test_connection_failed(self):"},{"line_number":472,"context_line":"        class Controller(object):"},{"line_number":473,"context_line":"            def index(self, req):"},{"line_number":474,"context_line":"                raise exception.NeutronConnectionFailed()"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_a84edb93","line":471,"in_reply_to":"1ac06dbe_14aeb980","updated":"2016-09-06 13:44:37.000000000","message":"I had the same reaction when I looked at the test first time:). But you can just look around to see most of the tests being written in this way. \n\nI believe the use of this test is testing if the exception that has been raised is able to be come till the api class properly and not handled somewhere, please correct me if I am wrong.","commit_id":"7617202d4cdbf5e139594dd4205adc709a59d431"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"5106cbcd88e016b1570933a0a4aaa1e67a67f599","unresolved":false,"context_lines":[{"line_number":468,"context_line":"        self.assertRaises("},{"line_number":469,"context_line":"            exception.Unauthorized, req.get_response, app)"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"    def test_connection_failed(self):"},{"line_number":472,"context_line":"        class Controller(object):"},{"line_number":473,"context_line":"            def index(self, req):"},{"line_number":474,"context_line":"                raise exception.NeutronConnectionFailed()"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a89bdaa_eaa2684a","line":471,"updated":"2016-09-07 09:30:21.000000000","message":"I remain confused about what this test is actually doing?","commit_id":"011385f154c155d06190d3b3eedc3da876f75d9e"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"c2779d699ae9817ab5d2e5d7d690faa31f12a4f7","unresolved":false,"context_lines":[{"line_number":468,"context_line":"        self.assertRaises("},{"line_number":469,"context_line":"            exception.Unauthorized, req.get_response, app)"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"    def test_connection_failed(self):"},{"line_number":472,"context_line":"        class Controller(object):"},{"line_number":473,"context_line":"            def index(self, req):"},{"line_number":474,"context_line":"                raise exception.NeutronConnectionFailed()"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a89bdaa_f4ea3d73","line":471,"in_reply_to":"9a89bdaa_941bb6c9","updated":"2016-09-07 13:36:55.000000000","message":"Done","commit_id":"011385f154c155d06190d3b3eedc3da876f75d9e"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"d0e2ce64417c45ec66c0e3275c85f9737e013381","unresolved":false,"context_lines":[{"line_number":468,"context_line":"        self.assertRaises("},{"line_number":469,"context_line":"            exception.Unauthorized, req.get_response, app)"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"    def test_connection_failed(self):"},{"line_number":472,"context_line":"        class Controller(object):"},{"line_number":473,"context_line":"            def index(self, req):"},{"line_number":474,"context_line":"                raise exception.NeutronConnectionFailed()"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a89bdaa_941bb6c9","line":471,"in_reply_to":"9a89bdaa_e071a9a9","updated":"2016-09-07 12:22:06.000000000","message":"Actually you should add decorator \u0027expected_error\u0027 before the line 473. Then this test become meaningful, you want to ensure NeutronConnectionFailed can raise to wsgi infrastructure layer.","commit_id":"011385f154c155d06190d3b3eedc3da876f75d9e"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"ca3500d7f90862175fa2fd118b2203cc1e7462ad","unresolved":false,"context_lines":[{"line_number":468,"context_line":"        self.assertRaises("},{"line_number":469,"context_line":"            exception.Unauthorized, req.get_response, app)"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"    def test_connection_failed(self):"},{"line_number":472,"context_line":"        class Controller(object):"},{"line_number":473,"context_line":"            def index(self, req):"},{"line_number":474,"context_line":"                raise exception.NeutronConnectionFailed()"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a89bdaa_e071a9a9","line":471,"in_reply_to":"9a89bdaa_eaa2684a","updated":"2016-09-07 09:46:27.000000000","message":"What we want here is to ensure that the exception raised from controller is not going to be translated to an error 500 but still remains as a 504.","commit_id":"011385f154c155d06190d3b3eedc3da876f75d9e"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"c068dcf8f4701bb0aafca6894fe342eb27909a98","unresolved":false,"context_lines":[{"line_number":468,"context_line":"        self.assertRaises("},{"line_number":469,"context_line":"            exception.Unauthorized, req.get_response, app)"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"    def test_connection_failed(self):"},{"line_number":472,"context_line":"        class Controller(object):"},{"line_number":473,"context_line":"            def index(self, req):"},{"line_number":474,"context_line":"                raise exception.NeutronConnectionFailed()"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a89bdaa_0d776ba0","line":471,"in_reply_to":"9a89bdaa_f4ea3d73","updated":"2016-09-08 08:03:04.000000000","message":"Yes Alex, you are right we missed to add the decorator.","commit_id":"011385f154c155d06190d3b3eedc3da876f75d9e"}]}
