)]}'
{"cinder/tests/unit/test_volume_transfer.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"993497f34759a5b6149168d852769062fd5fb45c","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        self.assertRaises(exception.InvalidAuthKey,"},{"line_number":85,"context_line":"                          tx_api.accept,"},{"line_number":86,"context_line":"                          self.ctxt, transfer[\u0027id\u0027], \u0027wrong\u0027)"},{"line_number":87,"context_line":"        svc.stop()"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    @mock.patch(\u0027cinder.volume.utils.notify_about_volume_usage\u0027)"},{"line_number":90,"context_line":"    def test_transfer_accept_invalid_volume(self, mock_notify):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_0b409aa4","line":87,"updated":"2015-11-25 10:41:05.000000000","message":"nit: This is better if added after line 72 as `self.addCleanup(svc.stop)` so it will always be called even if the test fails.  (Same as for the other tests)","commit_id":"e8c88efee0bdee6521a8d3c5c78f3fcf1268a1ae"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"2a4cc74feda28cd80d55b7430ca474180ccc50a3","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        self.assertRaises(exception.InvalidAuthKey,"},{"line_number":85,"context_line":"                          tx_api.accept,"},{"line_number":86,"context_line":"                          self.ctxt, transfer[\u0027id\u0027], \u0027wrong\u0027)"},{"line_number":87,"context_line":"        svc.stop()"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    @mock.patch(\u0027cinder.volume.utils.notify_about_volume_usage\u0027)"},{"line_number":90,"context_line":"    def test_transfer_accept_invalid_volume(self, mock_notify):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_c9734714","line":87,"in_reply_to":"9a8ffd7b_0b409aa4","updated":"2015-11-26 04:58:30.000000000","message":"Done","commit_id":"e8c88efee0bdee6521a8d3c5c78f3fcf1268a1ae"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"993497f34759a5b6149168d852769062fd5fb45c","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        svc.stop()"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    @mock.patch(\u0027cinder.volume.utils.notify_about_volume_usage\u0027)"},{"line_number":90,"context_line":"    def test_transfer_accept_invalid_volume(self, mock_notify):"},{"line_number":91,"context_line":"        svc \u003d self.start_service(\u0027volume\u0027, host\u003d\u0027test_host\u0027)"},{"line_number":92,"context_line":"        tx_api \u003d transfer_api.API()"},{"line_number":93,"context_line":"        volume \u003d utils.create_volume(self.ctxt, updated_at\u003dself.updated_at)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_4bd1c2cc","line":90,"updated":"2015-11-25 10:41:05.000000000","message":"Thanks for splitting the test!!","commit_id":"e8c88efee0bdee6521a8d3c5c78f3fcf1268a1ae"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"993497f34759a5b6149168d852769062fd5fb45c","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                           volumes\u003d-1)]"},{"line_number":155,"context_line":"        mock_quota_reserve.assert_has_calls(calls)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        reserve_opt \u003d {\u0027volumes\u0027: 1, \u0027gigabytes\u0027: 1}"},{"line_number":158,"context_line":"        release_opt \u003d {\u0027volumes\u0027: -1, \u0027gigabytes\u0027: -1}"},{"line_number":159,"context_line":"        calls \u003d [mock.call(self.ctxt, reserve_opt, \u002712345\u0027),"},{"line_number":160,"context_line":"                 mock.call(self.ctxt, release_opt, \u002712345\u0027)]"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_c709262e","line":157,"updated":"2015-11-25 10:41:05.000000000","message":"nit: If we move L157-L161 before L152 we can use **reserve_opt and **release_opt in L152-L153.","commit_id":"e8c88efee0bdee6521a8d3c5c78f3fcf1268a1ae"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"2a4cc74feda28cd80d55b7430ca474180ccc50a3","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                           volumes\u003d-1)]"},{"line_number":155,"context_line":"        mock_quota_reserve.assert_has_calls(calls)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        reserve_opt \u003d {\u0027volumes\u0027: 1, \u0027gigabytes\u0027: 1}"},{"line_number":158,"context_line":"        release_opt \u003d {\u0027volumes\u0027: -1, \u0027gigabytes\u0027: -1}"},{"line_number":159,"context_line":"        calls \u003d [mock.call(self.ctxt, reserve_opt, \u002712345\u0027),"},{"line_number":160,"context_line":"                 mock.call(self.ctxt, release_opt, \u002712345\u0027)]"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_e955eb4f","line":157,"in_reply_to":"9a8ffd7b_c709262e","updated":"2015-11-26 04:58:30.000000000","message":"Ah, good catch. thanks.","commit_id":"e8c88efee0bdee6521a8d3c5c78f3fcf1268a1ae"}],"cinder/transfer/api.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"993497f34759a5b6149168d852769062fd5fb45c","unresolved":false,"context_lines":[{"line_number":165,"context_line":"                                               \"transfer.accept.start\")"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        try:"},{"line_number":168,"context_line":"            reserve_opts \u003d {\u0027volumes\u0027: 1, \u0027gigabytes\u0027: vol_ref[\u0027size\u0027]}"},{"line_number":169,"context_line":"            QUOTAS.add_volume_type_opts(context,"},{"line_number":170,"context_line":"                                        reserve_opts,"},{"line_number":171,"context_line":"                                        vol_ref.get(\u0027volume_type_id\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_0ba41aa4","line":168,"updated":"2015-11-25 10:41:05.000000000","message":"-1: vol_ref is an ORM object, we should not use it as a dict when it\u0027s not necessary.","commit_id":"e8c88efee0bdee6521a8d3c5c78f3fcf1268a1ae"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"276dc76b5581aa9b1bc2c3d4f951cd0274794575","unresolved":false,"context_lines":[{"line_number":165,"context_line":"                                               \"transfer.accept.start\")"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        try:"},{"line_number":168,"context_line":"            reserve_opts \u003d {\u0027volumes\u0027: 1, \u0027gigabytes\u0027: vol_ref[\u0027size\u0027]}"},{"line_number":169,"context_line":"            QUOTAS.add_volume_type_opts(context,"},{"line_number":170,"context_line":"                                        reserve_opts,"},{"line_number":171,"context_line":"                                        vol_ref.get(\u0027volume_type_id\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_90735280","line":168,"in_reply_to":"9a8ffd7b_0ba41aa4","updated":"2015-11-25 11:47:21.000000000","message":"Interesting approach, why were we always using dictionary notation? It will make transition to use versioned objects easier…","commit_id":"e8c88efee0bdee6521a8d3c5c78f3fcf1268a1ae"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"2a4cc74feda28cd80d55b7430ca474180ccc50a3","unresolved":false,"context_lines":[{"line_number":165,"context_line":"                                               \"transfer.accept.start\")"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        try:"},{"line_number":168,"context_line":"            reserve_opts \u003d {\u0027volumes\u0027: 1, \u0027gigabytes\u0027: vol_ref[\u0027size\u0027]}"},{"line_number":169,"context_line":"            QUOTAS.add_volume_type_opts(context,"},{"line_number":170,"context_line":"                                        reserve_opts,"},{"line_number":171,"context_line":"                                        vol_ref.get(\u0027volume_type_id\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_cc828294","line":168,"in_reply_to":"9a8ffd7b_0ba41aa4","updated":"2015-11-26 04:58:30.000000000","message":"Should we always use \u0027.\u0027 for the object?","commit_id":"e8c88efee0bdee6521a8d3c5c78f3fcf1268a1ae"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"565be3a2b6aea2df52df8df93b5316887c9e3496","unresolved":false,"context_lines":[{"line_number":165,"context_line":"                                               \"transfer.accept.start\")"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        try:"},{"line_number":168,"context_line":"            reserve_opts \u003d {\u0027volumes\u0027: 1, \u0027gigabytes\u0027: vol_ref[\u0027size\u0027]}"},{"line_number":169,"context_line":"            QUOTAS.add_volume_type_opts(context,"},{"line_number":170,"context_line":"                                        reserve_opts,"},{"line_number":171,"context_line":"                                        vol_ref.get(\u0027volume_type_id\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_4d90ba43","line":168,"in_reply_to":"9a8ffd7b_cc828294","updated":"2015-11-26 08:57:47.000000000","message":"In my opinion we should, that way we can easily know when we have an ORM/VO object and when a dictionary and it\u0027s easier to read.  That way we will also avoid doing things like vol_ref.get for the object.","commit_id":"e8c88efee0bdee6521a8d3c5c78f3fcf1268a1ae"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"993497f34759a5b6149168d852769062fd5fb45c","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            reserve_opts \u003d {\u0027volumes\u0027: 1, \u0027gigabytes\u0027: vol_ref[\u0027size\u0027]}"},{"line_number":169,"context_line":"            QUOTAS.add_volume_type_opts(context,"},{"line_number":170,"context_line":"                                        reserve_opts,"},{"line_number":171,"context_line":"                                        vol_ref.get(\u0027volume_type_id\u0027))"},{"line_number":172,"context_line":"            reservations \u003d QUOTAS.reserve(context, **reserve_opts)"},{"line_number":173,"context_line":"        except exception.OverQuota as e:"},{"line_number":174,"context_line":"            overs \u003d e.kwargs[\u0027overs\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_6bb5a6cb","line":171,"updated":"2015-11-25 10:41:05.000000000","message":"-1: vol_ref will always have volume_type_id and we should access it as vol_ref.volume_type_id","commit_id":"e8c88efee0bdee6521a8d3c5c78f3fcf1268a1ae"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"2a4cc74feda28cd80d55b7430ca474180ccc50a3","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            reserve_opts \u003d {\u0027volumes\u0027: 1, \u0027gigabytes\u0027: vol_ref[\u0027size\u0027]}"},{"line_number":169,"context_line":"            QUOTAS.add_volume_type_opts(context,"},{"line_number":170,"context_line":"                                        reserve_opts,"},{"line_number":171,"context_line":"                                        vol_ref.get(\u0027volume_type_id\u0027))"},{"line_number":172,"context_line":"            reservations \u003d QUOTAS.reserve(context, **reserve_opts)"},{"line_number":173,"context_line":"        except exception.OverQuota as e:"},{"line_number":174,"context_line":"            overs \u003d e.kwargs[\u0027overs\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_8c4b1a87","line":171,"in_reply_to":"9a8ffd7b_6bb5a6cb","updated":"2015-11-26 04:58:30.000000000","message":"Done","commit_id":"e8c88efee0bdee6521a8d3c5c78f3fcf1268a1ae"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"993497f34759a5b6149168d852769062fd5fb45c","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                raise exception.VolumeLimitExceeded(allowed\u003dquotas[\u0027volumes\u0027])"},{"line_number":200,"context_line":"        try:"},{"line_number":201,"context_line":"            donor_id \u003d vol_ref[\u0027project_id\u0027]"},{"line_number":202,"context_line":"            reserve_opts \u003d {\u0027volumes\u0027: -1, \u0027gigabytes\u0027: -vol_ref[\u0027size\u0027]}"},{"line_number":203,"context_line":"            QUOTAS.add_volume_type_opts(context,"},{"line_number":204,"context_line":"                                        reserve_opts,"},{"line_number":205,"context_line":"                                        vol_ref.get(\u0027volume_type_id\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_8bdd6a16","line":202,"updated":"2015-11-25 10:41:05.000000000","message":"-1: Same here: -vol_ref.size","commit_id":"e8c88efee0bdee6521a8d3c5c78f3fcf1268a1ae"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"2a4cc74feda28cd80d55b7430ca474180ccc50a3","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                raise exception.VolumeLimitExceeded(allowed\u003dquotas[\u0027volumes\u0027])"},{"line_number":200,"context_line":"        try:"},{"line_number":201,"context_line":"            donor_id \u003d vol_ref[\u0027project_id\u0027]"},{"line_number":202,"context_line":"            reserve_opts \u003d {\u0027volumes\u0027: -1, \u0027gigabytes\u0027: -vol_ref[\u0027size\u0027]}"},{"line_number":203,"context_line":"            QUOTAS.add_volume_type_opts(context,"},{"line_number":204,"context_line":"                                        reserve_opts,"},{"line_number":205,"context_line":"                                        vol_ref.get(\u0027volume_type_id\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_ac4e1e94","line":202,"in_reply_to":"9a8ffd7b_8bdd6a16","updated":"2015-11-26 04:58:30.000000000","message":"Done","commit_id":"e8c88efee0bdee6521a8d3c5c78f3fcf1268a1ae"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"993497f34759a5b6149168d852769062fd5fb45c","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            reserve_opts \u003d {\u0027volumes\u0027: -1, \u0027gigabytes\u0027: -vol_ref[\u0027size\u0027]}"},{"line_number":203,"context_line":"            QUOTAS.add_volume_type_opts(context,"},{"line_number":204,"context_line":"                                        reserve_opts,"},{"line_number":205,"context_line":"                                        vol_ref.get(\u0027volume_type_id\u0027))"},{"line_number":206,"context_line":"            donor_reservations \u003d QUOTAS.reserve(context.elevated(),"},{"line_number":207,"context_line":"                                                project_id\u003ddonor_id,"},{"line_number":208,"context_line":"                                                **reserve_opts)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_cbdb721a","line":205,"updated":"2015-11-25 10:41:05.000000000","message":"-1: same here","commit_id":"e8c88efee0bdee6521a8d3c5c78f3fcf1268a1ae"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"2a4cc74feda28cd80d55b7430ca474180ccc50a3","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            reserve_opts \u003d {\u0027volumes\u0027: -1, \u0027gigabytes\u0027: -vol_ref[\u0027size\u0027]}"},{"line_number":203,"context_line":"            QUOTAS.add_volume_type_opts(context,"},{"line_number":204,"context_line":"                                        reserve_opts,"},{"line_number":205,"context_line":"                                        vol_ref.get(\u0027volume_type_id\u0027))"},{"line_number":206,"context_line":"            donor_reservations \u003d QUOTAS.reserve(context.elevated(),"},{"line_number":207,"context_line":"                                                project_id\u003ddonor_id,"},{"line_number":208,"context_line":"                                                **reserve_opts)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_4c45326e","line":205,"in_reply_to":"9a8ffd7b_cbdb721a","updated":"2015-11-26 04:58:30.000000000","message":"Done","commit_id":"e8c88efee0bdee6521a8d3c5c78f3fcf1268a1ae"}]}
