)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"35ae4dddbec5bfd2fbb0f302b8f1225ba182c8e6","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix HTTP response code and improve error message on NetworkNotFound"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Launching an instance with an invalid network currently returns 404 which"},{"line_number":10,"context_line":"and reponse: The resource could not be found. This patch changes the return"},{"line_number":11,"context_line":"code to be http 400 to match other cases where a resource is not found i.e:"},{"line_number":12,"context_line":"launching an instance with a security-group that does not exist. This patch"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F%2Fymk%3D","line":9,"updated":"2013-10-29 01:01:42.000000000","message":"Well, I haven\u0027t had chance to check the codes yet, with a invalid network but NetworkNotFound will be throw out in neutron client?","commit_id":"ed06926e594a65eea44d01a60779a2d0513d51f0"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"89420a99030fc7d2727675ccadb614c3c6fd29fb","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix HTTP response code and improve error message on NetworkNotFound"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Launching an instance with an invalid network currently returns 404 which"},{"line_number":10,"context_line":"and reponse: The resource could not be found. This patch changes the return"},{"line_number":11,"context_line":"code to be http 400 to match other cases where a resource is not found i.e:"},{"line_number":12,"context_line":"launching an instance with a security-group that does not exist. This patch"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F%2Fylg%3D","line":9,"in_reply_to":"AAAATn%2F%2Fymk%3D","updated":"2013-10-29 01:06:42.000000000","message":"nope, it actually does a get_networks on the neutron side and the requested net-id isn\u0027t returned from network. See validate_networks() in /nova/nova/network/neutron/api.py","commit_id":"ed06926e594a65eea44d01a60779a2d0513d51f0"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"35ae4dddbec5bfd2fbb0f302b8f1225ba182c8e6","unresolved":false,"context_lines":[{"line_number":10,"context_line":"and reponse: The resource could not be found. This patch changes the return"},{"line_number":11,"context_line":"code to be http 400 to match other cases where a resource is not found i.e:"},{"line_number":12,"context_line":"launching an instance with a security-group that does not exist. This patch"},{"line_number":13,"context_line":"also improves the error message to expose what actually does not exist."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Fixes bug: 1245696"},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F%2Fym4%3D","line":13,"updated":"2013-10-29 01:01:42.000000000","message":"error message improves you mean the error.format_message() right?","commit_id":"ed06926e594a65eea44d01a60779a2d0513d51f0"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"89420a99030fc7d2727675ccadb614c3c6fd29fb","unresolved":false,"context_lines":[{"line_number":10,"context_line":"and reponse: The resource could not be found. This patch changes the return"},{"line_number":11,"context_line":"code to be http 400 to match other cases where a resource is not found i.e:"},{"line_number":12,"context_line":"launching an instance with a security-group that does not exist. This patch"},{"line_number":13,"context_line":"also improves the error message to expose what actually does not exist."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Fixes bug: 1245696"},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F%2Fyl4%3D","line":13,"in_reply_to":"AAAATn%2F%2Fym4%3D","updated":"2013-10-29 01:06:42.000000000","message":"No, now it says: Network \u003cuuid\u003e not found ; instead of \"Resource not found\".","commit_id":"ed06926e594a65eea44d01a60779a2d0513d51f0"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"35ae4dddbec5bfd2fbb0f302b8f1225ba182c8e6","unresolved":false,"context_lines":[{"line_number":12,"context_line":"launching an instance with a security-group that does not exist. This patch"},{"line_number":13,"context_line":"also improves the error message to expose what actually does not exist."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Fixes bug: 1245696"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I66eb0c0ab926e0a8d1e2c9cfe1f7fd579ea3da21"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F%2Fym8%3D","line":15,"updated":"2013-10-29 01:01:42.000000000","message":"Closes-Bug: #","commit_id":"ed06926e594a65eea44d01a60779a2d0513d51f0"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"89420a99030fc7d2727675ccadb614c3c6fd29fb","unresolved":false,"context_lines":[{"line_number":12,"context_line":"launching an instance with a security-group that does not exist. This patch"},{"line_number":13,"context_line":"also improves the error message to expose what actually does not exist."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Fixes bug: 1245696"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I66eb0c0ab926e0a8d1e2c9cfe1f7fd579ea3da21"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F%2FymA%3D","line":15,"in_reply_to":"AAAATn%2F%2Fym8%3D","updated":"2013-10-29 01:06:42.000000000","message":"Fixes bug: still works fine.","commit_id":"ed06926e594a65eea44d01a60779a2d0513d51f0"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"50945c9c084cb2bb5f6b55e37865ef4b112b77a6","unresolved":false,"context_lines":[{"line_number":12,"context_line":"launching an instance with a security-group that does not exist. This patch"},{"line_number":13,"context_line":"also improves the error message to expose what actually does not exist."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Fixes bug: 1245696"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I66eb0c0ab926e0a8d1e2c9cfe1f7fd579ea3da21"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F%2FydY%3D","line":15,"in_reply_to":"AAAATn%2F%2FymA%3D","updated":"2013-10-29 02:30:16.000000000","message":"but we start to use new syntax, although it is not a big deal","commit_id":"ed06926e594a65eea44d01a60779a2d0513d51f0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8d6c28d770b7905a04a052f83234cddcbd71d946","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Aaron Rosen \u003carosen@nicira.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-11-25 07:33:24 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix HTTP response code and improve error message"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Launching an instance with an invalid network previously returned a"},{"line_number":10,"context_line":"response \"The resource could not be found\". This patch improves the error"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAATn%2F%2Be%2Bw%3D","line":7,"updated":"2013-11-25 16:05:35.000000000","message":"I might suggest adding \" for network APIs\" here to give the title a bit more context.","commit_id":"ba7b4952bab0d54915ce58af84ddacfd06882e44"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"01f98c083b9c9be18db47a4a997829545023cc37","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Aaron Rosen \u003carosen@nicira.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-11-25 07:33:24 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix HTTP response code and improve error message"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Launching an instance with an invalid network previously returned a"},{"line_number":10,"context_line":"response \"The resource could not be found\". This patch improves the error"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAATn%2F%2BeoY%3D","line":7,"in_reply_to":"AAAATn%2F%2Be%2Bw%3D","updated":"2013-11-25 16:52:05.000000000","message":"Done","commit_id":"ba7b4952bab0d54915ce58af84ddacfd06882e44"},{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"529abe57718da937df0f0536049c47e75ba84b9d","unresolved":false,"context_lines":[{"line_number":16,"context_line":"v3-api: PortNotFound, SecurityGroupNotFound, and NetworkNotFound"},{"line_number":17,"context_line":"        now returns a 400 instead of a 404."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Fixes bug: 1245696"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I66eb0c0ab926e0a8d1e2c9cfe1f7fd579ea3da21"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAATn%2F%2BJdM%3D","line":19,"updated":"2013-12-01 22:10:46.000000000","message":"nit - Closes-Bug: 1245696 instead","commit_id":"058e28438b43c521ede6692c88a3ac77d1c0dfbc"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"689e5924cc8addbd37fc1c4ad6f47ecb2049a2d1","unresolved":false,"context_lines":[{"line_number":16,"context_line":"v3-api: PortNotFound, SecurityGroupNotFound, and NetworkNotFound"},{"line_number":17,"context_line":"        now returns a 400 instead of a 404."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Fixes bug: 1245696"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I66eb0c0ab926e0a8d1e2c9cfe1f7fd579ea3da21"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAATn%2F%2BJVA%3D","line":19,"in_reply_to":"AAAATn%2F%2BJdM%3D","updated":"2013-12-01 23:25:57.000000000","message":"Done","commit_id":"058e28438b43c521ede6692c88a3ac77d1c0dfbc"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"770edc5c10c15e85d2313fd823914185c6476cb9","unresolved":false,"context_lines":[{"line_number":20,"context_line":"        now returns a 400 instead of a 404."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-bug: #1245696"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: I66eb0c0ab926e0a8d1e2c9cfe1f7fd579ea3da21"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAATn%2F%2BJCk%3D","line":23,"updated":"2013-12-02 02:48:25.000000000","message":"Could you add DocImpact flat? That can notice us to update v3 api document like this: https://wiki.openstack.org/wiki/NovaAPIv2tov3","commit_id":"7e608e5d2e62166472343c3f640170c452bce748"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"e3c8c2bb7a4e363b83735702e8465858b2d5fbd3","unresolved":false,"context_lines":[{"line_number":20,"context_line":"        now returns a 400 instead of a 404."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-bug: #1245696"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: I66eb0c0ab926e0a8d1e2c9cfe1f7fd579ea3da21"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAATn%2F%2BI3w%3D","line":23,"in_reply_to":"AAAATn%2F%2BJCk%3D","updated":"2013-12-02 04:38:50.000000000","message":"Done","commit_id":"7e608e5d2e62166472343c3f640170c452bce748"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fe134e0584b06178e0320c180b3175038ecc03ed","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"v2-api: NetworkNotFound now returns 400 instead of 404 and improved error"},{"line_number":16,"context_line":"        message which network was not found instead of"},{"line_number":17,"context_line":"        \u0027The resource could not be found\u0027."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"v3-api: PortNotFound, SecurityGroupNotFound, and NetworkNotFound"},{"line_number":20,"context_line":"        now returns a 400 instead of a 404."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAATn%2F%2BDNE%3D","line":17,"updated":"2013-12-03 02:44:46.000000000","message":"Where does this happen?  I\u0027m assuming just because we\u0027re not explicitly handling NetworkNotFound it gets translated based on it\u0027s code to an HTTPNotFound which has \u0027The resource could not be found\u0027 as the explanation.  Guessing that happens here:\n\nhttps://github.com/openstack/nova/blob/master/nova/api/openstack/wsgi.py#L1234","commit_id":"603fa3237c0eecc2c61ccf22be47b3b06a048cd2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"da80250f154ba776b16b0b9dc7545d6e9b99c589","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"v2-api: NetworkNotFound now returns 400 instead of 404 and improved error"},{"line_number":16,"context_line":"        message which network was not found instead of"},{"line_number":17,"context_line":"        \u0027The resource could not be found\u0027."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"v3-api: PortNotFound, SecurityGroupNotFound, and NetworkNotFound"},{"line_number":20,"context_line":"        now returns a 400 instead of a 404."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAATn%2F%2BDLg%3D","line":17,"in_reply_to":"AAAATn%2F%2BDNE%3D","updated":"2013-12-03 02:57:49.000000000","message":"I asked cyeoh in IRC and he confirmed it, so got my answer.","commit_id":"603fa3237c0eecc2c61ccf22be47b3b06a048cd2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"da80250f154ba776b16b0b9dc7545d6e9b99c589","unresolved":false,"context_lines":[{"line_number":16,"context_line":"        message which network was not found instead of"},{"line_number":17,"context_line":"        \u0027The resource could not be found\u0027."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"v3-api: PortNotFound, SecurityGroupNotFound, and NetworkNotFound"},{"line_number":20,"context_line":"        now returns a 400 instead of a 404."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-bug: #1245696"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAATn%2F%2BDLQ%3D","line":19,"updated":"2013-12-03 02:57:49.000000000","message":"SecurityGroupNotFound was already returning a 400 in the v3 API, this patch doesn\u0027t change that.  However, while we\u0027re talking about InstanceUserDataMalformed not having test coverage in the v3 API, I don\u0027t see anything testing the SecurityGroupNotFound case in the v3 API tests.  In the v2 tests, it looks like test_create_instance_with_security_group_enabled covers that.","commit_id":"603fa3237c0eecc2c61ccf22be47b3b06a048cd2"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"636376dc8af7bdce7bed2fc4010e4e6d33845ea4","unresolved":false,"context_lines":[{"line_number":16,"context_line":"        message which network was not found instead of"},{"line_number":17,"context_line":"        \u0027The resource could not be found\u0027."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"v3-api: PortNotFound, SecurityGroupNotFound, and NetworkNotFound"},{"line_number":20,"context_line":"        now returns a 400 instead of a 404."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-bug: #1245696"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAATn%2F9%2BDc%3D","line":19,"in_reply_to":"AAAATn%2F%2BDLQ%3D","updated":"2013-12-03 22:03:43.000000000","message":"Whoops, I\u0027ll fix the commit message. It looks like the v3 tests have the same test function \u0027test_create_instance_with_security_group_enabled\u0027 that you pointed out which has a test for SecurityGroupNotFound?","commit_id":"603fa3237c0eecc2c61ccf22be47b3b06a048cd2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"01fdd10b4d3332dfeb63988141f75849c88336c7","unresolved":false,"context_lines":[{"line_number":16,"context_line":"        message which network was not found instead of"},{"line_number":17,"context_line":"        \u0027The resource could not be found\u0027."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"v3-api: PortNotFound, SecurityGroupNotFound, and NetworkNotFound"},{"line_number":20,"context_line":"        now returns a 400 instead of a 404."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-bug: #1245696"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAATn%2F9%2BAg%3D","line":19,"in_reply_to":"AAAATn%2F9%2BDc%3D","updated":"2013-12-03 22:09:23.000000000","message":"I don\u0027t see test_create_instance_with_security_group_enabled here: https://github.com/openstack/nova/blob/master/nova/tests/api/openstack/compute/plugins/v3/test_servers.py","commit_id":"603fa3237c0eecc2c61ccf22be47b3b06a048cd2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"16900c51f5e1f79bb330d7532ce7d5c19dfd613c","unresolved":false,"context_lines":[{"line_number":16,"context_line":"        message which network was not found instead of"},{"line_number":17,"context_line":"        \u0027The resource could not be found\u0027."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"v3-api: PortNotFound, and NetworkNotFound"},{"line_number":20,"context_line":"        now returns a 400 instead of a 404."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-bug: #1245696"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"AAAATn%2F9%2BBQ%3D","line":19,"updated":"2013-12-03 22:10:21.000000000","message":"nit: don\u0027t need the comma and could probably wrap the line a bit better.","commit_id":"20f623ae71fe2c1cce20ad36f67471d1870bf526"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fccbf6bb1dfac79c9bfcc227f3f4046c1b8db61c","unresolved":false,"context_lines":[{"line_number":16,"context_line":"        message which network was not found instead of"},{"line_number":17,"context_line":"        \u0027The resource could not be found\u0027."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"v3-api: PortNotFound, and NetworkNotFound"},{"line_number":20,"context_line":"        now returns a 400 instead of a 404."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-bug: #1245696"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"AAAATn%2F99%2FA%3D","line":19,"in_reply_to":"AAAATn%2F9%2BBQ%3D","updated":"2013-12-03 22:12:35.000000000","message":"Done","commit_id":"20f623ae71fe2c1cce20ad36f67471d1870bf526"}],"nova/api/openstack/compute/plugins/v3/servers.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"78f0216532a0d3f725db021b6c2787b5bd9c0dde","unresolved":false,"context_lines":[{"line_number":835,"context_line":"                exception.SecurityGroupNotFound,"},{"line_number":836,"context_line":"                exception.InstanceUserDataMalformed) as error:"},{"line_number":837,"context_line":"            raise exc.HTTPBadRequest(explanation\u003derror.format_message())"},{"line_number":838,"context_line":"        except exception.PortNotFound as error:"},{"line_number":839,"context_line":"            raise exc.HTTPNotFound(explanation\u003derror.format_message())"},{"line_number":840,"context_line":"        except exception.PortInUse as error:"},{"line_number":841,"context_line":"            raise exc.HTTPConflict(explanation\u003derror.format_message())"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FwdA%3D","line":838,"updated":"2013-10-29 14:17:25.000000000","message":"There\u0027s a difference between what\u0027s being returned on a network resource not found between the v2 and the v3 api. For the v2 api both port and security group not found raises a 400, instead here port not found returns 404. Maybe the intention in the v3 api was to normalize these not found errors to returning 404? To be honest I can see both sides of the arguments: a) returning 400 or b) returning 404. Whichever way we go I am okay with, so long as we keep it consistent across on the NotFound errors.","commit_id":"ed06926e594a65eea44d01a60779a2d0513d51f0"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"21316f1589185d20afb0c4d33f842936591c7678","unresolved":false,"context_lines":[{"line_number":803,"context_line":"                exception.InvalidMetadata,"},{"line_number":804,"context_line":"                exception.InvalidRequest,"},{"line_number":805,"context_line":"                exception.MultiplePortsNotApplicable,"},{"line_number":806,"context_line":"                exception.NetworkNotFound,"},{"line_number":807,"context_line":"                exception.SecurityGroupNotFound,"},{"line_number":808,"context_line":"                exception.InstanceUserDataMalformed) as error:"},{"line_number":809,"context_line":"            raise exc.HTTPBadRequest(explanation\u003derror.format_message())"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2B8s0%3D","line":806,"updated":"2013-11-18 08:40:52.000000000","message":"I should return 404 for v3 api. I think this is chance for making it consistent and correct in v3. We should fix for SecurityGroupNotFound also.\n\nFor example, this patch try to fix same thing: change: I27dfba636635eb8ac257785b833b240bc439f9ff","commit_id":"99f561dba2a02964e333903fc0aa366ab2177e65"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"4115f638e5c0e8230e77d167aa9330c57f86c15f","unresolved":false,"context_lines":[{"line_number":803,"context_line":"                exception.InvalidMetadata,"},{"line_number":804,"context_line":"                exception.InvalidRequest,"},{"line_number":805,"context_line":"                exception.MultiplePortsNotApplicable,"},{"line_number":806,"context_line":"                exception.NetworkNotFound,"},{"line_number":807,"context_line":"                exception.SecurityGroupNotFound,"},{"line_number":808,"context_line":"                exception.InstanceUserDataMalformed) as error:"},{"line_number":809,"context_line":"            raise exc.HTTPBadRequest(explanation\u003derror.format_message())"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BfUw%3D","line":806,"in_reply_to":"AAAATn%2F%2B8s0%3D","updated":"2013-11-25 15:16:49.000000000","message":"Whoops sorry this fell of my radar. I\u0027ll Change this to return 404 like v3 does.","commit_id":"99f561dba2a02964e333903fc0aa366ab2177e65"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8d6c28d770b7905a04a052f83234cddcbd71d946","unresolved":false,"context_lines":[{"line_number":832,"context_line":"        except (exception.ImageNotActive,"},{"line_number":833,"context_line":"                exception.FlavorDiskTooSmall,"},{"line_number":834,"context_line":"                exception.FlavorMemoryTooSmall,"},{"line_number":835,"context_line":"                exception.FlavorNotFound,"},{"line_number":836,"context_line":"                exception.InvalidMetadata,"},{"line_number":837,"context_line":"                exception.InvalidRequest,"},{"line_number":838,"context_line":"                exception.MultiplePortsNotApplicable,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2Be%2Fk%3D","line":835,"updated":"2013-11-25 16:05:35.000000000","message":"Hmm, not for this patch but I wonder why this isn\u0027t returning a 404 either, seems like we\u0027d want to follow the same logic as we\u0027re doing for networks.","commit_id":"ba7b4952bab0d54915ce58af84ddacfd06882e44"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"5bd9a144d5f8c793b269a3d51d14a8f76ba2a90e","unresolved":false,"context_lines":[{"line_number":832,"context_line":"        except (exception.ImageNotActive,"},{"line_number":833,"context_line":"                exception.FlavorDiskTooSmall,"},{"line_number":834,"context_line":"                exception.FlavorMemoryTooSmall,"},{"line_number":835,"context_line":"                exception.FlavorNotFound,"},{"line_number":836,"context_line":"                exception.InvalidMetadata,"},{"line_number":837,"context_line":"                exception.InvalidRequest,"},{"line_number":838,"context_line":"                exception.MultiplePortsNotApplicable,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2Bdr4%3D","line":835,"in_reply_to":"AAAATn%2F%2Bd%2Bs%3D","updated":"2013-11-25 19:41:58.000000000","message":"Personally, I think a 400 is a better error than a 404. We\u0027ll see what Yeoh thinks as he made the change in the v3 api to make this condition a 404 instead of a 400.","commit_id":"ba7b4952bab0d54915ce58af84ddacfd06882e44"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"01f98c083b9c9be18db47a4a997829545023cc37","unresolved":false,"context_lines":[{"line_number":832,"context_line":"        except (exception.ImageNotActive,"},{"line_number":833,"context_line":"                exception.FlavorDiskTooSmall,"},{"line_number":834,"context_line":"                exception.FlavorMemoryTooSmall,"},{"line_number":835,"context_line":"                exception.FlavorNotFound,"},{"line_number":836,"context_line":"                exception.InvalidMetadata,"},{"line_number":837,"context_line":"                exception.InvalidRequest,"},{"line_number":838,"context_line":"                exception.MultiplePortsNotApplicable,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2Bepc%3D","line":835,"in_reply_to":"AAAATn%2F%2Be%2Fk%3D","updated":"2013-11-25 16:52:05.000000000","message":"yea I was wondering the same thing. I\u0027ll look into it in a different patch set.","commit_id":"ba7b4952bab0d54915ce58af84ddacfd06882e44"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b5195fbb96a11c9b373394cc7fa83387d716e959","unresolved":false,"context_lines":[{"line_number":832,"context_line":"        except (exception.ImageNotActive,"},{"line_number":833,"context_line":"                exception.FlavorDiskTooSmall,"},{"line_number":834,"context_line":"                exception.FlavorMemoryTooSmall,"},{"line_number":835,"context_line":"                exception.FlavorNotFound,"},{"line_number":836,"context_line":"                exception.InvalidMetadata,"},{"line_number":837,"context_line":"                exception.InvalidRequest,"},{"line_number":838,"context_line":"                exception.MultiplePortsNotApplicable,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2Bd%2Bs%3D","line":835,"in_reply_to":"AAAATn%2F%2Bepc%3D","updated":"2013-11-25 18:46:43.000000000","message":"I looked the code a bit more, it\u0027s not just FlavorNotFound, there are a lot of not found (KeypairNotFound for example) exceptions that are translated to a 400 by the API.  When I step back and think about it, that\u0027s because we\u0027re booting an instance and a 404 coming back from that seems kind of weird since it\u0027s not really a GET operation.\n\nIn fact, look at line 816, it\u0027s already handling FlavorNotFound and returning a 400, but with just a more detailed error message. Same for line 819 and KeypairNotFound, so it seems to be a theme that failures for the boot operation are translated to 400, which makes me wonder if we should change this.  However, with PortInUse translated to a Conflict, there is precedent for responding with something besides 400.\n\nThe API docs also list 404 as a valid response for this operation:\n\nError Response Codes — computeFault (400, 500, …), UnprocessableEntity (422), serviceUnavailable (503), badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), itemNotFound (404), badMediaType (415), serverCapacityUnavailable (503)","commit_id":"ba7b4952bab0d54915ce58af84ddacfd06882e44"}],"nova/api/openstack/compute/servers.py":[{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"529abe57718da937df0f0536049c47e75ba84b9d","unresolved":false,"context_lines":[{"line_number":971,"context_line":"                exception.InvalidMetadata,"},{"line_number":972,"context_line":"                exception.InvalidRequest,"},{"line_number":973,"context_line":"                exception.MultiplePortsNotApplicable,"},{"line_number":974,"context_line":"                exception.NetworkNotFound,"},{"line_number":975,"context_line":"                exception.PortNotFound,"},{"line_number":976,"context_line":"                exception.SecurityGroupNotFound,"},{"line_number":977,"context_line":"                exception.InvalidBDM) as error:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BJdQ%3D","line":974,"updated":"2013-12-01 22:10:46.000000000","message":"Does this section also need to catch InstanceUserDataMalformed?\n\nAlso I think both v2/v3 are not currently catching InstanceUserDataTooLarge which can also be raised.","commit_id":"058e28438b43c521ede6692c88a3ac77d1c0dfbc"},{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"a82127bac81022013a3da6325bbef79226e3dbdc","unresolved":false,"context_lines":[{"line_number":971,"context_line":"                exception.InvalidMetadata,"},{"line_number":972,"context_line":"                exception.InvalidRequest,"},{"line_number":973,"context_line":"                exception.MultiplePortsNotApplicable,"},{"line_number":974,"context_line":"                exception.NetworkNotFound,"},{"line_number":975,"context_line":"                exception.PortNotFound,"},{"line_number":976,"context_line":"                exception.SecurityGroupNotFound,"},{"line_number":977,"context_line":"                exception.InvalidBDM) as error:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BI7Y%3D","line":974,"in_reply_to":"AAAATn%2F%2BJRU%3D","updated":"2013-12-02 04:16:26.000000000","message":"Ah I see. Yes in another patch would be fine.","commit_id":"058e28438b43c521ede6692c88a3ac77d1c0dfbc"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"ca6a0ab6579ebcf5c631aa337af96a65c1ca6718","unresolved":false,"context_lines":[{"line_number":971,"context_line":"                exception.InvalidMetadata,"},{"line_number":972,"context_line":"                exception.InvalidRequest,"},{"line_number":973,"context_line":"                exception.MultiplePortsNotApplicable,"},{"line_number":974,"context_line":"                exception.NetworkNotFound,"},{"line_number":975,"context_line":"                exception.PortNotFound,"},{"line_number":976,"context_line":"                exception.SecurityGroupNotFound,"},{"line_number":977,"context_line":"                exception.InvalidBDM) as error:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BJRU%3D","line":974,"in_reply_to":"AAAATn%2F%2BJU8%3D","updated":"2013-12-02 00:16:29.000000000","message":"@Chris, btw i\u0027m looking into this. I\u0027ll address this in another patch.","commit_id":"058e28438b43c521ede6692c88a3ac77d1c0dfbc"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"689e5924cc8addbd37fc1c4ad6f47ecb2049a2d1","unresolved":false,"context_lines":[{"line_number":971,"context_line":"                exception.InvalidMetadata,"},{"line_number":972,"context_line":"                exception.InvalidRequest,"},{"line_number":973,"context_line":"                exception.MultiplePortsNotApplicable,"},{"line_number":974,"context_line":"                exception.NetworkNotFound,"},{"line_number":975,"context_line":"                exception.PortNotFound,"},{"line_number":976,"context_line":"                exception.SecurityGroupNotFound,"},{"line_number":977,"context_line":"                exception.InvalidBDM) as error:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BJU8%3D","line":974,"in_reply_to":"AAAATn%2F%2BJdQ%3D","updated":"2013-12-01 23:25:57.000000000","message":"If so it seems like that is out of scope for this change set. I didn\u0027t add exception.InstanceUserDataMalformed  to the v2 code I only moved it up so that all the network exceptions would be grouped together.\n\nI do think we need to add InstanceUserDataMalformed here though as it\u0027s raised in compute/api.py.","commit_id":"058e28438b43c521ede6692c88a3ac77d1c0dfbc"}],"nova/tests/api/openstack/compute/plugins/v3/test_servers.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8d6c28d770b7905a04a052f83234cddcbd71d946","unresolved":false,"context_lines":[{"line_number":2313,"context_line":"                          self._test_create_extra, params)"},{"line_number":2314,"context_line":""},{"line_number":2315,"context_line":"    def test_create_instance_with_neturonv2_invalid_network(self):"},{"line_number":2316,"context_line":"        self.flags(network_api_class\u003d\u0027nova.network.neutronv2.api.API\u0027)"},{"line_number":2317,"context_line":"        network \u003d \u0027aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\u0027"},{"line_number":2318,"context_line":"        requested_networks \u003d [{\u0027uuid\u0027: network}]"},{"line_number":2319,"context_line":"        params \u003d {\u0027networks\u0027: requested_networks}"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2Be%2BI%3D","line":2316,"updated":"2013-11-25 16:05:35.000000000","message":"Looks like this isn\u0027t necessary, see the other test cases in this class. Neutron is the network API for v3 by default.","commit_id":"ba7b4952bab0d54915ce58af84ddacfd06882e44"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"01f98c083b9c9be18db47a4a997829545023cc37","unresolved":false,"context_lines":[{"line_number":2313,"context_line":"                          self._test_create_extra, params)"},{"line_number":2314,"context_line":""},{"line_number":2315,"context_line":"    def test_create_instance_with_neturonv2_invalid_network(self):"},{"line_number":2316,"context_line":"        self.flags(network_api_class\u003d\u0027nova.network.neutronv2.api.API\u0027)"},{"line_number":2317,"context_line":"        network \u003d \u0027aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\u0027"},{"line_number":2318,"context_line":"        requested_networks \u003d [{\u0027uuid\u0027: network}]"},{"line_number":2319,"context_line":"        params \u003d {\u0027networks\u0027: requested_networks}"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2BepI%3D","line":2316,"in_reply_to":"AAAATn%2F%2Be%2BI%3D","updated":"2013-11-25 16:52:05.000000000","message":"Done","commit_id":"ba7b4952bab0d54915ce58af84ddacfd06882e44"}],"nova/tests/api/openstack/compute/test_servers.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"78f0216532a0d3f725db021b6c2787b5bd9c0dde","unresolved":false,"context_lines":[{"line_number":2838,"context_line":"        self.assertRaises(webob.exc.HTTPConflict,"},{"line_number":2839,"context_line":"                                          self._test_create_extra, params)"},{"line_number":2840,"context_line":""},{"line_number":2841,"context_line":"    def test_create_instance_with_neturonv2_invalid_network(self):"},{"line_number":2842,"context_line":"        self.flags(network_api_class\u003d\u0027nova.network.neutronv2.api.API\u0027)"},{"line_number":2843,"context_line":"        network \u003d \u0027aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\u0027"},{"line_number":2844,"context_line":"        requested_networks \u003d [{\u0027uuid\u0027: network}]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FwbU%3D","line":2841,"updated":"2013-10-29 14:17:25.000000000","message":"you\u0027d need one for the v3 api as well I think.","commit_id":"ed06926e594a65eea44d01a60779a2d0513d51f0"}]}
