)]}'
{"nova/api/openstack/compute/agents.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"dc0c5a823e686037290d5ebf36cd4532a92f59bf","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        try:"},{"line_number":93,"context_line":"            utils.validate_integer(id, \u0027id\u0027)"},{"line_number":94,"context_line":"        except exception.InvalidInput as exc:"},{"line_number":95,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexc.format_message())"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        agent \u003d objects.Agent(context\u003dcontext, id\u003did)"},{"line_number":98,"context_line":"        agent.obj_reset_changes()"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a4dcd0f_1af0e3c8","line":95,"updated":"2015-08-14 14:04:55.000000000","message":"here","commit_id":"1a2ceba1d48279a5043dba6fb9cef22269a77228"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"dc0c5a823e686037290d5ebf36cd4532a92f59bf","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        try:"},{"line_number":126,"context_line":"            utils.validate_integer(id, \u0027id\u0027)"},{"line_number":127,"context_line":"        except exception.InvalidInput as exc:"},{"line_number":128,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dexc.format_message())"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        try:"},{"line_number":131,"context_line":"            agent \u003d objects.Agent(context\u003dcontext, id\u003did)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a4dcd0f_9a0dd3ea","line":128,"updated":"2015-08-14 14:04:55.000000000","message":"HTTPBadRequest?","commit_id":"1a2ceba1d48279a5043dba6fb9cef22269a77228"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"66a0036a83c74d0948df950d254486d01b0a0165","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        try:"},{"line_number":126,"context_line":"            utils.validate_integer(id, \u0027id\u0027)"},{"line_number":127,"context_line":"        except exception.InvalidInput as exc:"},{"line_number":128,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dexc.format_message())"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        try:"},{"line_number":131,"context_line":"            agent \u003d objects.Agent(context\u003dcontext, id\u003did)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa1b9901_3a4b965b","line":128,"in_reply_to":"1a4dcd0f_9a0dd3ea","updated":"2015-08-17 14:08:12.000000000","message":"I agree with HTTPBadRequest here.  The check you\u0027re using here is checking the validity of the input format, not whether it refers to a valid agent.  The HTTPNotFound is properly raised at line 134.","commit_id":"1a2ceba1d48279a5043dba6fb9cef22269a77228"}],"nova/api/openstack/compute/contrib/agents.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e9d1c0a64f60e4195b9c304ecddf391e34e897ce","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            agent.url \u003d url"},{"line_number":103,"context_line":"            agent.md5hash \u003d md5hash"},{"line_number":104,"context_line":"            agent.save()"},{"line_number":105,"context_line":"        except ValueError as ex:"},{"line_number":106,"context_line":"            msg \u003d _(\"Invalid request body: %s\") % ex"},{"line_number":107,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":108,"context_line":"        except exception.AgentBuildNotFound as ex:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_66fbfc47","side":"PARENT","line":105,"updated":"2015-06-11 09:10:19.000000000","message":"Tests were add to validate this - https://github.com/openstack/nova/commit/8cf7430eaad5a0e52096200850032d6692381d3b","commit_id":"b873badc0b60a3bf53cac03a6e220d151953911b"},{"author":{"_account_id":9420,"name":"Matthew Gilliard","email":"matthew.gilliard@hp.com","username":"gilliard"},"change_message_id":"c9a31de2f79460ecb00c812c76ad24bb5992f00f","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            agent.url \u003d url"},{"line_number":103,"context_line":"            agent.md5hash \u003d md5hash"},{"line_number":104,"context_line":"            agent.save()"},{"line_number":105,"context_line":"        except ValueError as ex:"},{"line_number":106,"context_line":"            msg \u003d _(\"Invalid request body: %s\") % ex"},{"line_number":107,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":108,"context_line":"        except exception.AgentBuildNotFound as ex:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_41b8ea10","side":"PARENT","line":105,"in_reply_to":"3afb71cf_66fbfc47","updated":"2015-06-11 09:20:03.000000000","message":"Those tests hit line 89 or 96 - nothing makes a ValueError here.  The test which is called \"test_agents_update_value_error\" actually causes InvalidInput (on line 92) not ValueError. So we should rename that test, I think.","commit_id":"b873badc0b60a3bf53cac03a6e220d151953911b"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"919f02da63c08c86f3ee4b7938e96df50eaf9710","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexc.format_message())"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        try:"},{"line_number":99,"context_line":"            agent \u003d objects.Agent(context\u003dcontext, id\u003did)"},{"line_number":100,"context_line":"            agent.obj_reset_changes()"},{"line_number":101,"context_line":"            agent.version \u003d version"},{"line_number":102,"context_line":"            agent.url \u003d url"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_dd5a03f2","line":99,"updated":"2015-06-17 14:32:21.000000000","message":"it will, if you pass the id as \u0027abcd\u0027, it will failed by the object\u0027s fields https://github.com/openstack/nova/blob/master/nova/objects/agent.py#L29","commit_id":"a82f741c2f03d5ab03b813273e77f79215d7e1d6"},{"author":{"_account_id":10795,"name":"Rajesh Tailor","email":"tailor.rajesh88@gmail.com","username":"rajeshtailor"},"change_message_id":"f1f007c52b3a0c841181fdc198f6c587890a0eb2","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexc.format_message())"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        try:"},{"line_number":99,"context_line":"            agent \u003d objects.Agent(context\u003dcontext, id\u003did)"},{"line_number":100,"context_line":"            agent.obj_reset_changes()"},{"line_number":101,"context_line":"            agent.version \u003d version"},{"line_number":102,"context_line":"            agent.url \u003d url"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_7bd63550","line":99,"in_reply_to":"fa32b979_c911de05","updated":"2015-06-18 10:53:19.000000000","message":"Hi Alex,\n\nThanks, your observation is correct. I will add validation check for id in above try block.","commit_id":"a82f741c2f03d5ab03b813273e77f79215d7e1d6"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"9055f223b15a6405a49d7d712239b7b3496ea7c1","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexc.format_message())"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        try:"},{"line_number":99,"context_line":"            agent \u003d objects.Agent(context\u003dcontext, id\u003did)"},{"line_number":100,"context_line":"            agent.obj_reset_changes()"},{"line_number":101,"context_line":"            agent.version \u003d version"},{"line_number":102,"context_line":"            agent.url \u003d url"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_c911de05","line":99,"in_reply_to":"fa32b979_d5641723","updated":"2015-06-17 16:38:08.000000000","message":"But it will return 500. there is example for delete\n\nDEBUG (connectionpool:383) \"DELETE /v2/475f5b67eb9a4f3f8bef785e66912a60/os-agents/abc HTTP/1.1\" 500 128\nDEBUG (session:226) RESP: [500] date: Wed, 17 Jun 2015 16:43:52 GMT connection: keep-alive content-type: application/json; charset\u003dUTF-8 content-length: 128 x-compute-request-id: req-2899b87c-97e7-4717-86b9-04f09ad2d09b \nRESP BODY: {\"computeFault\": {\"message\": \"The server has either erred or is incapable of performing the requested operation.\", \"code\": 500}}","commit_id":"a82f741c2f03d5ab03b813273e77f79215d7e1d6"},{"author":{"_account_id":642,"name":"Matt Dietz","email":"matthew.dietz@gmail.com","username":"cerberus"},"change_message_id":"53d31eaa7714ddd684deea537f1a5581019da96f","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexc.format_message())"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        try:"},{"line_number":99,"context_line":"            agent \u003d objects.Agent(context\u003dcontext, id\u003did)"},{"line_number":100,"context_line":"            agent.obj_reset_changes()"},{"line_number":101,"context_line":"            agent.version \u003d version"},{"line_number":102,"context_line":"            agent.url \u003d url"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_d5641723","line":99,"in_reply_to":"fa32b979_dd5a03f2","updated":"2015-06-17 15:29:35.000000000","message":"Doesn\u0027t that imply a larger problem with the underlying system? We\u0027d have had to either snuck in a string as the id or contrived like you could do for this test. In an of itself I\u0027m not convinced that\u0027s a thing that can happen, however.","commit_id":"a82f741c2f03d5ab03b813273e77f79215d7e1d6"}],"nova/api/openstack/compute/plugins/v3/agents.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"be528705979a883acbd8dd2a326d86a8ab05d3f6","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        try:"},{"line_number":126,"context_line":"            utils.validate_integer(id, \u0027id\u0027)"},{"line_number":127,"context_line":"        except exception.InvalidInput as exc:"},{"line_number":128,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dexc.format_message())"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        try:"},{"line_number":131,"context_line":"            agent \u003d objects.Agent(context\u003dcontext, id\u003did)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_60025c71","line":128,"updated":"2015-07-01 07:12:36.000000000","message":"you want to BadRequest? This is inconsistent with line 92","commit_id":"fbbb77031235f62df532de9fab7480f69e4dffea"},{"author":{"_account_id":10795,"name":"Rajesh Tailor","email":"tailor.rajesh88@gmail.com","username":"rajeshtailor"},"change_message_id":"e9f42fafa45b11791d338ccd8b41ae5fe95d2fa7","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        try:"},{"line_number":126,"context_line":"            utils.validate_integer(id, \u0027id\u0027)"},{"line_number":127,"context_line":"        except exception.InvalidInput as exc:"},{"line_number":128,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dexc.format_message())"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        try:"},{"line_number":131,"context_line":"            agent \u003d objects.Agent(context\u003dcontext, id\u003did)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_f9c8f7a9","line":128,"in_reply_to":"ba3cc151_0e457744","updated":"2015-07-03 06:37:05.000000000","message":"In delete call, When call reaches to restful api service, there it only requires id (either uuid or integer id) of resource to delete. If invalid id is provided, in that case it raises NotFound error.","commit_id":"fbbb77031235f62df532de9fab7480f69e4dffea"},{"author":{"_account_id":10795,"name":"Rajesh Tailor","email":"tailor.rajesh88@gmail.com","username":"rajeshtailor"},"change_message_id":"836cbb8d5a4d1fe4a0716b3d00654196c77e6543","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        try:"},{"line_number":126,"context_line":"            utils.validate_integer(id, \u0027id\u0027)"},{"line_number":127,"context_line":"        except exception.InvalidInput as exc:"},{"line_number":128,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dexc.format_message())"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        try:"},{"line_number":131,"context_line":"            agent \u003d objects.Agent(context\u003dcontext, id\u003did)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_0e457744","line":128,"in_reply_to":"ba3cc151_60025c71","updated":"2015-07-02 13:25:17.000000000","message":"To make it consistent with other delete api\u0027s, I have raised NotFound error.\n\n[1] nova delete \u003cserver_id_or_name\u003e\n\n[2] cinder delete \u003cserver_id_or_name\u003e\n\n[3] glance --os-image-api-version 2 image-delete\n \u003cimage_id\u003e\n\nIn above commands, If you pass invalid id (for eg. abcd), it raises NotFound error in every case.","commit_id":"fbbb77031235f62df532de9fab7480f69e4dffea"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"6e01f0962bdd921b7e0ff694493fd0d327bb4732","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        try:"},{"line_number":126,"context_line":"            utils.validate_integer(id, \u0027id\u0027)"},{"line_number":127,"context_line":"        except exception.InvalidInput as exc:"},{"line_number":128,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dexc.format_message())"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        try:"},{"line_number":131,"context_line":"            agent \u003d objects.Agent(context\u003dcontext, id\u003did)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_7d0b8f24","line":128,"updated":"2015-08-06 16:42:10.000000000","message":"I don\u0027t understand why update is BadRequest but delete is NotFound. It feels like they should both be the same on non valid id.","commit_id":"b454216113067e6bd83c638aa1c640dd138d4539"},{"author":{"_account_id":10795,"name":"Rajesh Tailor","email":"tailor.rajesh88@gmail.com","username":"rajeshtailor"},"change_message_id":"894c7f3c5f876aa2b7fc8706d0672625481e501a","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        try:"},{"line_number":126,"context_line":"            utils.validate_integer(id, \u0027id\u0027)"},{"line_number":127,"context_line":"        except exception.InvalidInput as exc:"},{"line_number":128,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dexc.format_message())"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        try:"},{"line_number":131,"context_line":"            agent \u003d objects.Agent(context\u003dcontext, id\u003did)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_d7025b0b","line":128,"in_reply_to":"1a4dcd0f_3f0ab68a","updated":"2015-08-10 06:54:53.000000000","message":"If the input parameters doesn\u0027t comply to the required format for POST/PUT request, then IMO you should return 400 error.\nIn case of agent-update (i.e. Line #95), id is passed as input parameter so it should not raise 404 error.","commit_id":"b454216113067e6bd83c638aa1c640dd138d4539"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"50625ba8f28fe3c926774d8fc7f2051ccf64dc86","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        try:"},{"line_number":126,"context_line":"            utils.validate_integer(id, \u0027id\u0027)"},{"line_number":127,"context_line":"        except exception.InvalidInput as exc:"},{"line_number":128,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dexc.format_message())"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        try:"},{"line_number":131,"context_line":"            agent \u003d objects.Agent(context\u003dcontext, id\u003did)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_b88d9bd4","line":128,"in_reply_to":"1a4dcd0f_7d0b8f24","updated":"2015-08-06 21:16:06.000000000","message":"In case of other cases like instance or volume delete, if you pass invalid uuid it returns NotFound error and not BadRequest.","commit_id":"b454216113067e6bd83c638aa1c640dd138d4539"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"3537232384b4866ca5d28a4fe976ccf607c0375a","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        try:"},{"line_number":126,"context_line":"            utils.validate_integer(id, \u0027id\u0027)"},{"line_number":127,"context_line":"        except exception.InvalidInput as exc:"},{"line_number":128,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dexc.format_message())"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        try:"},{"line_number":131,"context_line":"            agent \u003d objects.Agent(context\u003dcontext, id\u003did)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_3f0ab68a","line":128,"in_reply_to":"1a4dcd0f_b88d9bd4","updated":"2015-08-07 11:48:26.000000000","message":"ok, so the BadRequest on L95 should change.","commit_id":"b454216113067e6bd83c638aa1c640dd138d4539"}],"nova/tests/unit/api/openstack/compute/test_agents.py":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"0d6d93031e944f21ada13a24b9a160b917dbbd24","unresolved":false,"context_lines":[{"line_number":300,"context_line":"                \u0027url\u0027: 1111,"},{"line_number":301,"context_line":"                \u0027md5hash\u0027: \u0027add6bb58e139be103324d04d82d8f545\u0027}}"},{"line_number":302,"context_line":"        self.assertRaises(self.validation_error,"},{"line_number":303,"context_line":"                          self.controller.update, self.req, \u0027ab\u0027, body\u003dbody)"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    def test_agents_update_with_string_id(self):"},{"line_number":306,"context_line":"        body \u003d {\u0027para\u0027: {\u0027version\u0027: \u00277.0\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_3deb50b2","line":303,"updated":"2015-08-18 16:57:59.000000000","message":"Here should not be changed because the main purpose of this test is for detecting invalid url like 1111.\nAfter this change, the unit test contains multiple negative factors, that makes the purpose unclear.\n\nIf keeping 1 as the id, are there any problems?","commit_id":"cebf5183a143833b976068567c27ceae400f5127"},{"author":{"_account_id":10795,"name":"Rajesh Tailor","email":"tailor.rajesh88@gmail.com","username":"rajeshtailor"},"change_message_id":"241ae7fc6037288fe2f15b63f7565c2932d84cbf","unresolved":false,"context_lines":[{"line_number":300,"context_line":"                \u0027url\u0027: 1111,"},{"line_number":301,"context_line":"                \u0027md5hash\u0027: \u0027add6bb58e139be103324d04d82d8f545\u0027}}"},{"line_number":302,"context_line":"        self.assertRaises(self.validation_error,"},{"line_number":303,"context_line":"                          self.controller.update, self.req, \u0027ab\u0027, body\u003dbody)"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    def test_agents_update_with_string_id(self):"},{"line_number":306,"context_line":"        body \u003d {\u0027para\u0027: {\u0027version\u0027: \u00277.0\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_c7e32f32","line":303,"in_reply_to":"fa1b9901_3deb50b2","updated":"2015-08-19 14:01:03.000000000","message":"Done","commit_id":"cebf5183a143833b976068567c27ceae400f5127"}]}
