)]}'
{"nova/api/openstack/compute/contrib/fixed_ips.py":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"90e503545c347552e65f495cb6c6f6c32f639d40","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        authorize(context)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        if not utils.is_valid_ipv4(id) and not utils.is_valid_ipv6(id):"},{"line_number":34,"context_line":"            raise webob.exc.HTTPUnprocessableEntity("},{"line_number":35,"context_line":"                explanation\u003d\"Specified IP %s is not a valid IP address\" % id)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F0ac%3D","line":34,"updated":"2013-05-22 11:13:29.000000000","message":"422 is actually a webdav code, and we shouldn\u0027t use it. This is why Tempest is barfing on this.","commit_id":"90806623bbcb19036b7014b257244784e495804c"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"4b7f94cde1c6dc98e5ba7f3708be64693fa174b4","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        authorize(context)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        if not utils.is_valid_ipv4(id) and not utils.is_valid_ipv6(id):"},{"line_number":34,"context_line":"            raise webob.exc.HTTPBadRequest("},{"line_number":35,"context_line":"                explanation\u003d\"Specified IP %s is not a valid IP address\" % id)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2FhSg%3D","line":34,"updated":"2013-05-31 11:49:03.000000000","message":"this is a change in our behavior, leave the check if you want, but leave it as HTTPNotFound. We can change this in v3.","commit_id":"b9a76b22de63a069879ea3a701b7d48c74379dc8"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"4b7f94cde1c6dc98e5ba7f3708be64693fa174b4","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        authorize(context)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        if not utils.is_valid_ipv4(id) and not utils.is_valid_ipv6(id):"},{"line_number":64,"context_line":"            msg \u003d _(\"Specified IP %s is not a valid IP address\") % id"},{"line_number":65,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        if \u0027reserve\u0027 in body:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2FhSc%3D","line":64,"updated":"2013-05-31 11:49:03.000000000","message":"this is a change in our behavior, leave the check if you want, but leave it as HTTPNotFound. We can change this in v3.","commit_id":"b9a76b22de63a069879ea3a701b7d48c74379dc8"}],"nova/api/openstack/compute/contrib/floating_ips.py":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"cc42b9441eb7793b38d1af8774fa2fdb909b8ef3","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        \"\"\"Return data about the given floating ip.\"\"\""},{"line_number":123,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":124,"context_line":"        authorize(context)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        try:"},{"line_number":127,"context_line":"            floating_ip \u003d self.network_api.get_floating_ip(context, id)"},{"line_number":128,"context_line":"        except (exception.NotFound, exception.InvalidID):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2Ft%2Fs%3D","line":125,"updated":"2013-05-24 15:38:13.000000000","message":"How about adding the validation like fixed_ips.py which is similar to fixed_ips.py here?\nIf doing this, we do not need to change api.py. I feel it is simple.","commit_id":"526df305043a12f64565925f55d7dcb67b24bf49"},{"author":{"_account_id":5174,"name":"Mauro Sergio Martins Rodrigues","email":"maurosr@linux.vnet.ibm.com","username":"maurosr"},"change_message_id":"363706fbfdbeb4ac0397b910d7e65ffe58eed993","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        \"\"\"Return data about the given floating ip.\"\"\""},{"line_number":123,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":124,"context_line":"        authorize(context)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        try:"},{"line_number":127,"context_line":"            floating_ip \u003d self.network_api.get_floating_ip(context, id)"},{"line_number":128,"context_line":"        except (exception.NotFound, exception.InvalidID):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2Ftx4%3D","line":125,"in_reply_to":"AAAAPH%2F%2Ft%2Fs%3D","updated":"2013-05-24 16:48:33.000000000","message":"unfortunately this get floating ip by its id not by the address, so it\u0027s not possible to know without trying the id against the db.","commit_id":"526df305043a12f64565925f55d7dcb67b24bf49"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"ce7a67460fed337166911efabb290fd4e6d8a774","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        \"\"\"Return data about the given floating ip.\"\"\""},{"line_number":123,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":124,"context_line":"        authorize(context)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        try:"},{"line_number":127,"context_line":"            floating_ip \u003d self.network_api.get_floating_ip(context, id)"},{"line_number":128,"context_line":"        except (exception.NotFound, exception.InvalidID):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2Fq%2FU%3D","line":125,"in_reply_to":"AAAAPH%2F%2Ftx4%3D","updated":"2013-05-28 02:05:40.000000000","message":"Thanks for your explanation. I misunderstand and I see now.","commit_id":"526df305043a12f64565925f55d7dcb67b24bf49"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"90e503545c347552e65f495cb6c6f6c32f639d40","unresolved":false,"context_lines":[{"line_number":656,"context_line":""},{"line_number":657,"context_line":"        if not result:"},{"line_number":658,"context_line":"            raise exception.FloatingIpNotFound(id\u003did)"},{"line_number":659,"context_line":"    except DataError:"},{"line_number":660,"context_line":"            raise exception.FloatingIpNotFound(id\u003did)"},{"line_number":661,"context_line":"    return result"},{"line_number":662,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F0ZI%3D","line":659,"updated":"2013-05-22 11:13:29.000000000","message":"So, while I like solving things this way, Dan objected last time around. Instead we need to raise an intermediary exception, and catch it at the next level. Search for other instances of DataError.","commit_id":"90806623bbcb19036b7014b257244784e495804c"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"35cebbdb03fcf4076dfb783d94bf1e633bf0b8f0","unresolved":false,"context_lines":[{"line_number":657,"context_line":"        if not result:"},{"line_number":658,"context_line":"            raise exception.FloatingIpNotFound(id\u003did)"},{"line_number":659,"context_line":"    except DataError:"},{"line_number":660,"context_line":"            raise exception.FloatingIpNotFound(id\u003did)"},{"line_number":661,"context_line":"    return result"},{"line_number":662,"context_line":""},{"line_number":663,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2FxKQ%3D","line":660,"updated":"2013-05-23 14:22:35.000000000","message":"Did you test this exception?","commit_id":"499f6a9ee3610f81e6d309da900330ee59c98f8f"},{"author":{"_account_id":5174,"name":"Mauro Sergio Martins Rodrigues","email":"maurosr@linux.vnet.ibm.com","username":"maurosr"},"change_message_id":"c1eeef61bdd38b19269ad0054b1f0446bbcdd34d","unresolved":false,"context_lines":[{"line_number":657,"context_line":"        if not result:"},{"line_number":658,"context_line":"            raise exception.FloatingIpNotFound(id\u003did)"},{"line_number":659,"context_line":"    except DataError:"},{"line_number":660,"context_line":"            raise exception.FloatingIpNotFound(id\u003did)"},{"line_number":661,"context_line":"    return result"},{"line_number":662,"context_line":""},{"line_number":663,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2FxHI%3D","line":660,"in_reply_to":"AAAAPH%2F%2FxKQ%3D","updated":"2013-05-23 14:43:12.000000000","message":"missed this change on the tests. thanks","commit_id":"499f6a9ee3610f81e6d309da900330ee59c98f8f"}],"nova/tests/api/openstack/compute/contrib/test_fixed_ips.py":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"677802cae137f8abae0c57c13d53aec0247e034f","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        body \u003d {\u0027unreserve\u0027: None}"},{"line_number":195,"context_line":"        req \u003d fakes.HTTPRequest.blank("},{"line_number":196,"context_line":"            \u0027/v2/fake/os-fixed-ips/inv.ali.d.ip/action\u0027)"},{"line_number":197,"context_line":"        self.assertRaises(webob.exc.HTTPUnprocessableEntity,"},{"line_number":198,"context_line":"                          self.controller.action, req, \u0027inv.ali.d.ip\u0027, body)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def test_fixed_ip_unreserve_deleted_ip(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2Fw2k%3D","line":197,"updated":"2013-05-23 16:03:08.000000000","message":"still shouldn\u0027t be a 422","commit_id":"499f6a9ee3610f81e6d309da900330ee59c98f8f"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"cc42b9441eb7793b38d1af8774fa2fdb909b8ef3","unresolved":false,"context_lines":[{"line_number":135,"context_line":"    def test_fixed_ips_get_invalid_ip_address(self):"},{"line_number":136,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/fake/os-fixed-ips/inv.ali.d.ip\u0027)"},{"line_number":137,"context_line":"        self.assertRaises(webob.exc.HTTPBadRequest, self.controller.show, req,"},{"line_number":138,"context_line":"                          \u0027inv.ali.d.ip\u0027)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def test_fixed_ips_get_deleted_ip_fail(self):"},{"line_number":141,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/fake/os-fixed-ips/10.0.0.2\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2Ft%2FY%3D","line":138,"updated":"2013-05-24 15:38:13.000000000","message":"Why don\u0027t you add the negative test of floating_ip like this?","commit_id":"526df305043a12f64565925f55d7dcb67b24bf49"},{"author":{"_account_id":5174,"name":"Mauro Sergio Martins Rodrigues","email":"maurosr@linux.vnet.ibm.com","username":"maurosr"},"change_message_id":"363706fbfdbeb4ac0397b910d7e65ffe58eed993","unresolved":false,"context_lines":[{"line_number":135,"context_line":"    def test_fixed_ips_get_invalid_ip_address(self):"},{"line_number":136,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/fake/os-fixed-ips/inv.ali.d.ip\u0027)"},{"line_number":137,"context_line":"        self.assertRaises(webob.exc.HTTPBadRequest, self.controller.show, req,"},{"line_number":138,"context_line":"                          \u0027inv.ali.d.ip\u0027)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def test_fixed_ips_get_deleted_ip_fail(self):"},{"line_number":141,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/fake/os-fixed-ips/10.0.0.2\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2FtyU%3D","line":138,"in_reply_to":"AAAAPH%2F%2Ft%2FY%3D","updated":"2013-05-24 16:48:33.000000000","message":"floating ips already have a negative tests like this.\nif you see, here we have 2 situations: \n 1 - Bad ip: Returns BadRequest\n 2 - Good ip, but non existent on db: NotFound\n\nIn floating  ips sadly the things need to be different: Both bad ip and non existent ips return NotFound.\nI don\u0027t like this, but that is needed cause I need to \u0027normalize\u0027 mysql and postgresql bahave. \nExample (talking about foating ips):\nAgainst pgsql db if we try to get the ip with id: 1234567891011 it will raise a DataError, which I should treat on api somehow.\nAgainst mysql though this will just return NotFound.\nSo  in the api I had to treat them equally to not depend to know which db I\u0027m running (which would be awful)","commit_id":"526df305043a12f64565925f55d7dcb67b24bf49"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"ce7a67460fed337166911efabb290fd4e6d8a774","unresolved":false,"context_lines":[{"line_number":135,"context_line":"    def test_fixed_ips_get_invalid_ip_address(self):"},{"line_number":136,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/fake/os-fixed-ips/inv.ali.d.ip\u0027)"},{"line_number":137,"context_line":"        self.assertRaises(webob.exc.HTTPBadRequest, self.controller.show, req,"},{"line_number":138,"context_line":"                          \u0027inv.ali.d.ip\u0027)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def test_fixed_ips_get_deleted_ip_fail(self):"},{"line_number":141,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/fake/os-fixed-ips/10.0.0.2\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2Fq9I%3D","line":138,"in_reply_to":"AAAAPH%2F%2FtyU%3D","updated":"2013-05-28 02:05:40.000000000","message":"I see that exception.InvalidID should not be separated from exception.NotFound at except of self.network_api.get_floating_ip() call. That makes sense.","commit_id":"526df305043a12f64565925f55d7dcb67b24bf49"}]}
