)]}'
{"nova/api/openstack/compute/plugins/v3/reset_server_state.py":[{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"c732f3b4078cfda7559e18d45f71e72b024dcf21","unresolved":false,"context_lines":[{"line_number":30,"context_line":"authorize \u003d extensions.extension_authorizer(\u0027compute\u0027, \"v3:\" + ALIAS)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"# States usable in resetState action"},{"line_number":33,"context_line":"state_map \u003d dict(active\u003dvm_states.ACTIVE, error\u003dvm_states.ERROR)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class ResetServerStateController(wsgi.Controller):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B%2FU4%3D","line":33,"updated":"2014-01-20 01:24:21.000000000","message":"I wonder if its worth leaving a comment here saying if this is changed the schema file needs to be updated as well?","commit_id":"6059e58f18a7278b5f02bf1f30b1ddffe7680048"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"136a8a8744de1ae380e6243c8bdba2d6bad9835a","unresolved":false,"context_lines":[{"line_number":30,"context_line":"authorize \u003d extensions.extension_authorizer(\u0027compute\u0027, \"v3:\" + ALIAS)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"# States usable in resetState action"},{"line_number":33,"context_line":"state_map \u003d dict(active\u003dvm_states.ACTIVE, error\u003dvm_states.ERROR)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class ResetServerStateController(wsgi.Controller):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B%2BQo%3D","line":33,"in_reply_to":"AAAAUH%2F%2B%2FU4%3D","updated":"2014-01-20 08:31:32.000000000","message":"That would be good for the maintenance, thanks.\nI am going to apply both comments to the next patch.","commit_id":"6059e58f18a7278b5f02bf1f30b1ddffe7680048"}],"nova/api/openstack/compute/schemas/v3/reset_server_state.py":[{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"c732f3b4078cfda7559e18d45f71e72b024dcf21","unresolved":false,"context_lines":[{"line_number":23,"context_line":"            \u0027properties\u0027: {"},{"line_number":24,"context_line":"                \u0027state\u0027: {"},{"line_number":25,"context_line":"                    \u0027type\u0027: \u0027string\u0027,"},{"line_number":26,"context_line":"                    \u0027enum\u0027: [vm_states.ACTIVE, vm_states.ERROR],"},{"line_number":27,"context_line":"                },"},{"line_number":28,"context_line":"            },"},{"line_number":29,"context_line":"            \u0027required\u0027: [\u0027state\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B%2FU8%3D","line":26,"updated":"2014-01-20 01:24:21.000000000","message":"That doesn\u0027t look right to me - shouldn\u0027t it be \u0027active\u0027 and \u0027error\u0027 for the state_map lookup?","commit_id":"6059e58f18a7278b5f02bf1f30b1ddffe7680048"}],"nova/tests/api/openstack/compute/plugins/v3/test_admin_actions.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"85f5afd33404ff259739c698e0e9785bdbe4d4f4","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        self.context \u003d self.request.environ[\u0027nova.context\u0027]"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def test_no_state(self):"},{"line_number":199,"context_line":"        self.assertRaises(exception.ValidationError,"},{"line_number":200,"context_line":"                          self.admin_api._reset_state,"},{"line_number":201,"context_line":"                          self.request, self.uuid,"},{"line_number":202,"context_line":"                          body\u003d{\"reset_state\": None})"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_e6c8b258","line":199,"updated":"2014-07-17 00:01:57.000000000","message":"I missed this on a previous patch, since most tests there are catching HTTP* exceptions, but does this get translated to a proper HTTP exception at some point?","commit_id":"884a5dfe3f735794a0b48d4a08804482847a590f"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"751e65f91383f6be1ef14994f953a0e8ecd31130","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        self.context \u003d self.request.environ[\u0027nova.context\u0027]"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def test_no_state(self):"},{"line_number":199,"context_line":"        self.assertRaises(exception.ValidationError,"},{"line_number":200,"context_line":"                          self.admin_api._reset_state,"},{"line_number":201,"context_line":"                          self.request, self.uuid,"},{"line_number":202,"context_line":"                          body\u003d{\"reset_state\": None})"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_41ea7a0f","line":199,"in_reply_to":"baada198_2032405e","updated":"2014-07-22 05:14:03.000000000","message":"Thanks for approving this, Andrew :-)\n\nCurrent WSGI framework catches a ValidationError exception at [1] and translate it to HTTP500 response at [2]. Ideally, I hope all this kind of unit tests will be moved to use WSGI framework because it makes more easy to implement v2.1 API tests. Current unit tests which call API methods directly are a little difficult to share between v2 and v2.1 because exceptions are different like this.\n\n[1]: https://github.com/openstack/nova/blob/master/nova/api/openstack/wsgi.py#L971\n\n[2]: https://github.com/openstack/nova/blob/master/nova/api/openstack/wsgi.py#L672","commit_id":"884a5dfe3f735794a0b48d4a08804482847a590f"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"ede852b85b7695bab3f89d7fb92ebdbace1f61e1","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        self.context \u003d self.request.environ[\u0027nova.context\u0027]"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def test_no_state(self):"},{"line_number":199,"context_line":"        self.assertRaises(exception.ValidationError,"},{"line_number":200,"context_line":"                          self.admin_api._reset_state,"},{"line_number":201,"context_line":"                          self.request, self.uuid,"},{"line_number":202,"context_line":"                          body\u003d{\"reset_state\": None})"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_2032405e","line":199,"in_reply_to":"baada198_690475c6","updated":"2014-07-18 16:04:18.000000000","message":"Thanks for the explanation.  I agree that changing that is out of scope, I just wanted to make sure that by adding schema validation we weren\u0027t changing the return code to a 500.  If the wsgi framework is handling that then I have no concerns.","commit_id":"884a5dfe3f735794a0b48d4a08804482847a590f"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"8cd9432d1c57095fb43727a7adc23e2a0022fedf","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        self.context \u003d self.request.environ[\u0027nova.context\u0027]"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def test_no_state(self):"},{"line_number":199,"context_line":"        self.assertRaises(exception.ValidationError,"},{"line_number":200,"context_line":"                          self.admin_api._reset_state,"},{"line_number":201,"context_line":"                          self.request, self.uuid,"},{"line_number":202,"context_line":"                          body\u003d{\"reset_state\": None})"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_690475c6","line":199,"in_reply_to":"baada198_e6c8b258","updated":"2014-07-17 00:30:27.000000000","message":"@Andrew\n\nThat is a nice point.\nThere is a implementation difference between unit tests.\nSome unit tests use WSGI framework and the return values are HTTP* because the WSGI framework translates exception.ValidationError to HTTPBadRequest.\nHowever the other unit tests(like this test) call API methods directly and the validation exceptions are exception.ValidationError.\n\nThe following is out of scope from this patch.\nI feel the best way is to make these tests implementations consistent, but it is difficult to do it because there is a lot of this kind of test.","commit_id":"884a5dfe3f735794a0b48d4a08804482847a590f"}]}
