)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2dd6dfcbf8779140a86a983d3072e700e6a939e4","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Placement api: Add informative message to 404 response."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add informative messages to the 404 error response from"},{"line_number":10,"context_line":"inventor.py and usage.py"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This change also includes adding/altering existing Gabbi tests"},{"line_number":13,"context_line":"for 404 response and add resonse_strings validation checks for"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a629dbe_d0d9e223","line":10,"updated":"2016-11-09 16:33:41.000000000","message":"inventory.py","commit_id":"45ea2348884471e7966274d51e649fa8519491d7"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2dd6dfcbf8779140a86a983d3072e700e6a939e4","unresolved":false,"context_lines":[{"line_number":14,"context_line":"that."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This is follow up patch to"},{"line_number":17,"context_line":"https://review.openstack.org/#/c/387674/"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: Ica46a5479dec06b035f8b43d6738e9d124f6ae37"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a629dbe_70ead6ad","line":17,"updated":"2016-11-09 16:33:41.000000000","message":"Probably either base this change on that one, or refer to it by change id (If53f84ac5f7521e9926b97bdcce3cf77ec5b4ffd) instead of link.","commit_id":"45ea2348884471e7966274d51e649fa8519491d7"}],"nova/api/openstack/placement/handlers/inventory.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2dd6dfcbf8779140a86a983d3072e700e6a939e4","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    except exception.NotFound as exc:"},{"line_number":257,"context_line":"        raise webob.exc.HTTPNotFound("},{"line_number":258,"context_line":"        _(\u0027No inventory of class %s found for delete\u0027)"},{"line_number":259,"context_line":"                % resource_class)"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    response \u003d req.response"},{"line_number":262,"context_line":"    response.status \u003d 204"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_f0726610","line":259,"updated":"2016-11-09 16:33:41.000000000","message":"since the json_formatter stuff is not yet figured out, this needs that keyword arg (as show in the exception above)","commit_id":"45ea2348884471e7966274d51e649fa8519491d7"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2dd6dfcbf8779140a86a983d3072e700e6a939e4","unresolved":false,"context_lines":[{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    except exception.NotFound:"},{"line_number":284,"context_line":"        raise webob.exc.HTTPNotFound("},{"line_number":285,"context_line":"            _(\"No resource provider with uuid %s found\") % uuid)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    return _send_inventories(req.response, resource_provider, inventories)"},{"line_number":288,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_10c99a26","line":285,"updated":"2016-11-09 16:33:41.000000000","message":"ditto","commit_id":"45ea2348884471e7966274d51e649fa8519491d7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f7a92a635137a42fc153b938d91f09e8b311bcd1","unresolved":false,"context_lines":[{"line_number":255,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":256,"context_line":"    except exception.NotFound as exc:"},{"line_number":257,"context_line":"        raise webob.exc.HTTPNotFound("},{"line_number":258,"context_line":"        _(\u0027No inventory of class %(class)s found for delete: %(error)s\u0027)"},{"line_number":259,"context_line":"                % {\u0027class\u0027: resource_class, \u0027error\u0027: exc},"},{"line_number":260,"context_line":"                  json_formatter\u003dutil.json_error_formatter)"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    response \u003d req.response"},{"line_number":263,"context_line":"    response.status \u003d 204"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_1ac235e9","line":260,"range":{"start_line":258,"start_character":8,"end_line":260,"end_character":59},"updated":"2016-11-11 16:06:14.000000000","message":"Alignment is a bit funky here.","commit_id":"9194b447d396d4f4998659fc513885d882ce4166"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f7a92a635137a42fc153b938d91f09e8b311bcd1","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    except exception.NotFound as exc:"},{"line_number":285,"context_line":"        raise webob.exc.HTTPNotFound("},{"line_number":286,"context_line":"            _(\"No resource provider with uuid %(uuid)s found : %(error)s\") %"},{"line_number":287,"context_line":"             {\u0027uuid\u0027: uuid, \u0027error\u0027: exc},"},{"line_number":288,"context_line":"             json_formatter\u003dutil.json_error_formatter)"},{"line_number":289,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_9a5c854c","line":286,"range":{"start_line":286,"start_character":15,"end_line":286,"end_character":45},"updated":"2016-11-11 16:06:14.000000000","message":"This isn\u0027t scoped properly. You could get here if the inventory list is not found by resource provider uuid right? So this should be scoped to the ResourceProvider.get_by_uuid, and then it looks like you\u0027d need a separate one for the objects.InventoryList.get_all_by_resource_provider_uuid call.\n\nAlternatively, handle NotFound globally like you are, and don\u0027t provide a custom error message, as you can get the error message that already comes up and use exc.format_message().  The one issue I can see there potentially is if that NotFound isn\u0027t marked or translation...you\u0027d have to check that out.","commit_id":"9194b447d396d4f4998659fc513885d882ce4166"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"132f06394ae1cacfe8a0c651fc09db8d36b0fcd1","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    except exception.NotFound as exc:"},{"line_number":285,"context_line":"        raise webob.exc.HTTPNotFound("},{"line_number":286,"context_line":"            _(\"No resource provider with uuid %(uuid)s found : %(error)s\") %"},{"line_number":287,"context_line":"             {\u0027uuid\u0027: uuid, \u0027error\u0027: exc},"},{"line_number":288,"context_line":"             json_formatter\u003dutil.json_error_formatter)"},{"line_number":289,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_0561faa8","line":286,"in_reply_to":"9a629dbe_9a5c854c","updated":"2016-11-11 16:16:14.000000000","message":"get_all_by_resource_provider_uuid won\u0027t return a NotFound, it will return an empty InventoryList object.\n\nSo one option would be to only wrap the get_by_uuid. Is that better.","commit_id":"9194b447d396d4f4998659fc513885d882ce4166"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9a9b872f8557bfc60e14a27cebaca59fcef8eb5c","unresolved":false,"context_lines":[{"line_number":274,"context_line":"        context, uuid)"},{"line_number":275,"context_line":"    inventories \u003d objects.InventoryList.get_all_by_resource_provider_uuid("},{"line_number":276,"context_line":"        context, resource_provider.uuid)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"    return _send_inventories(req.response, resource_provider, inventories)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_815e90e7","side":"PARENT","line":277,"updated":"2016-11-23 22:49:43.000000000","message":"This is an unrelated change.","commit_id":"691bfb0d007303c47f231ebf9c682360c7cdcf12"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9a9b872f8557bfc60e14a27cebaca59fcef8eb5c","unresolved":false,"context_lines":[{"line_number":278,"context_line":"    try:"},{"line_number":279,"context_line":"        resource_provider \u003d objects.ResourceProvider.get_by_uuid("},{"line_number":280,"context_line":"            context, uuid)"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    except exception.NotFound as exc:"},{"line_number":283,"context_line":"        raise webob.exc.HTTPNotFound("},{"line_number":284,"context_line":"            _(\"No resource provider with uuid %(uuid)s found : %(error)s\") %"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_014c4041","line":281,"updated":"2016-11-23 22:49:43.000000000","message":"nit: don\u0027t need the extra blank line here","commit_id":"afb74f4a1702eac033dc620bdb33739a2c1a2187"}],"nova/api/openstack/placement/handlers/usage.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2dd6dfcbf8779140a86a983d3072e700e6a939e4","unresolved":false,"context_lines":[{"line_number":52,"context_line":"            context, uuid)"},{"line_number":53,"context_line":"    except exception.NotFound:"},{"line_number":54,"context_line":"        raise webob.exc.HTTPNotFound("},{"line_number":55,"context_line":"            _(\"No resource provider with uuid %s found\") % uuid)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    response \u003d req.response"},{"line_number":58,"context_line":"    response.body \u003d jsonutils.dumps("}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_f08ee6ce","line":55,"updated":"2016-11-09 16:33:41.000000000","message":"again with json_formatter","commit_id":"45ea2348884471e7966274d51e649fa8519491d7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f7a92a635137a42fc153b938d91f09e8b311bcd1","unresolved":false,"context_lines":[{"line_number":52,"context_line":"            context, uuid)"},{"line_number":53,"context_line":"    except exception.NotFound as exc:"},{"line_number":54,"context_line":"        raise webob.exc.HTTPNotFound("},{"line_number":55,"context_line":"            _(\"No resource provider with uuid %(uuid)s found: %(error)s\") %"},{"line_number":56,"context_line":"             {\u0027uuid\u0027: uuid, \u0027error\u0027: exc},"},{"line_number":57,"context_line":"             json_formatter\u003dutil.json_error_formatter)"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_3a3a99e7","line":55,"updated":"2016-11-11 16:06:14.000000000","message":"Similar comment as for the inventory list.","commit_id":"9194b447d396d4f4998659fc513885d882ce4166"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"132f06394ae1cacfe8a0c651fc09db8d36b0fcd1","unresolved":false,"context_lines":[{"line_number":52,"context_line":"            context, uuid)"},{"line_number":53,"context_line":"    except exception.NotFound as exc:"},{"line_number":54,"context_line":"        raise webob.exc.HTTPNotFound("},{"line_number":55,"context_line":"            _(\"No resource provider with uuid %(uuid)s found: %(error)s\") %"},{"line_number":56,"context_line":"             {\u0027uuid\u0027: uuid, \u0027error\u0027: exc},"},{"line_number":57,"context_line":"             json_formatter\u003dutil.json_error_formatter)"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_85234a55","line":55,"in_reply_to":"9a629dbe_3a3a99e7","updated":"2016-11-11 16:16:14.000000000","message":"Same response here.","commit_id":"9194b447d396d4f4998659fc513885d882ce4166"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9a9b872f8557bfc60e14a27cebaca59fcef8eb5c","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        context, uuid)"},{"line_number":48,"context_line":"    usage \u003d objects.UsageList.get_all_by_resource_provider_uuid("},{"line_number":49,"context_line":"        context, uuid)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    response \u003d req.response"},{"line_number":52,"context_line":"    response.body \u003d jsonutils.dumps("},{"line_number":53,"context_line":"        _serialize_usages(resource_provider, usage))"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_a1638cb0","side":"PARENT","line":50,"updated":"2016-11-23 22:49:43.000000000","message":"unrelated","commit_id":"691bfb0d007303c47f231ebf9c682360c7cdcf12"}]}
