)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"cb9a2d27f945746880db0a4bac0caa4397aabf0e","unresolved":false,"context_lines":[{"line_number":9,"context_line":"db.backup_destroy requires admin context to mark backup record as"},{"line_number":10,"context_line":"deleted. Commit Icff37261b367463b71a1268be16f9c97f595bf0c removed admin"},{"line_number":11,"context_line":"context passed to backup_destroy method."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I75b9e1fff48569a8aa320f2f02914fc7b6665d79"},{"line_number":14,"context_line":"Closes-Bug: #1467167"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa32b979_2f432a6e","line":12,"updated":"2015-06-20 22:35:47.000000000","message":"The previous paragraph describes the problem but does not\nsay what this commit does to to solve the problem.  Please\nadd a sentence that explains exactly what this commit\ndoes.","commit_id":"206b845165eca133bec33e430b09ec38c020eff6"},{"author":{"_account_id":1773,"name":"oliver-leahy-l","email":"oliver.leahy@hpe.com","username":"oliver-leahy-l"},"change_message_id":"f7443ecd0ce4be744a188e790a67edfea7342f9f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Ivan Kolodyazhny \u003ce0ne@e0ne.info\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-06-21 11:48:03 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Use evaluated context for backup destroy"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"db.backup_destroy requires admin context to mark backup record as"},{"line_number":10,"context_line":"deleted. Commit Icff37261b367463b71a1268be16f9c97f595bf0c removed admin"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"fa32b979_476a071c","line":7,"updated":"2015-06-22 08:40:04.000000000","message":"Should that be \u0027elevated context\u0027 ?","commit_id":"fb56de9cac0037f397a333b929270f68908c0428"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"ae2a8696fe3f001a4b7cff64dd065bf99f3f660e","unresolved":false,"context_lines":[{"line_number":10,"context_line":"deleted. Commit Icff37261b367463b71a1268be16f9c97f595bf0c removed admin"},{"line_number":11,"context_line":"context passed to backup_destroy method."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch uses elevated context to destroy backup"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I75b9e1fff48569a8aa320f2f02914fc7b6665d79"},{"line_number":16,"context_line":"Closes-Bug: #1467167"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"fa32b979_d2e82219","line":13,"updated":"2015-06-21 10:22:00.000000000","message":"Thanks.\n\nAdd a period if and only if you have to do another changeset.","commit_id":"fb56de9cac0037f397a333b929270f68908c0428"}],"cinder/backup/manager.py":[{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"207f4cb1117b3325e7122a4abba80c74a0c4510e","unresolved":false,"context_lines":[{"line_number":460,"context_line":""},{"line_number":461,"context_line":"        # Commit the reservations"},{"line_number":462,"context_line":"        if reservations:"},{"line_number":463,"context_line":"            QUOTAS.commit(context, reservations,"},{"line_number":464,"context_line":"                          project_id\u003dbackup.project_id)"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"        LOG.info(_LI(\u0027Delete backup finished, backup %s deleted.\u0027), backup.id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa32b979_519ab06f","line":463,"updated":"2015-06-22 15:53:48.000000000","message":"Is context.elevated() needed for QUOTAS.commit?","commit_id":"e11798019b96fdb38e13a3c2a49e2b8079296c24"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"430c00b7b05980fc84fab11ee7609414a4707b7b","unresolved":false,"context_lines":[{"line_number":460,"context_line":""},{"line_number":461,"context_line":"        # Commit the reservations"},{"line_number":462,"context_line":"        if reservations:"},{"line_number":463,"context_line":"            QUOTAS.commit(context, reservations,"},{"line_number":464,"context_line":"                          project_id\u003dbackup.project_id)"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"        LOG.info(_LI(\u0027Delete backup finished, backup %s deleted.\u0027), backup.id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa32b979_fc84fb5d","line":463,"in_reply_to":"fa32b979_519ab06f","updated":"2015-06-22 16:02:40.000000000","message":"No, it is not needed. You can see that backups work good with rally scenarios: https://review.openstack.org/193829","commit_id":"e11798019b96fdb38e13a3c2a49e2b8079296c24"}],"cinder/objects/backup.py":[{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"207f4cb1117b3325e7122a4abba80c74a0c4510e","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    @base.remotable"},{"line_number":107,"context_line":"    def destroy(self):"},{"line_number":108,"context_line":"        with self.obj_as_admin():"},{"line_number":109,"context_line":"            db.backup_destroy(self._context, self.id)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"fa32b979_9177d83a","line":108,"updated":"2015-06-22 15:53:48.000000000","message":"Forgot we had this method :) But this looks like the correct one to use.","commit_id":"e11798019b96fdb38e13a3c2a49e2b8079296c24"}],"cinder/tests/unit/objects/test_backup.py":[{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"ddf75ae82f1fad47a7e9d503e368375e16377f30","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    def test_destroy(self, backup_destroy):"},{"line_number":72,"context_line":"        backup \u003d objects.Backup(context\u003dself.context, id\u003d1)"},{"line_number":73,"context_line":"        backup.destroy()"},{"line_number":74,"context_line":"        self.assertTrue(backup_destroy.called)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"class TestBackupList(test_objects.BaseObjectsTestCase):"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa32b979_a3966092","line":74,"updated":"2015-06-22 11:03:09.000000000","message":"I think it\u0027s better to assert for the arguments.\n\nPlease update your test so that it will fail without your fix.","commit_id":"f07c796ac26451cb453824482d19a2c2be99490d"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"cf00e9857cf43dac370bc70fb716a973ef4622ee","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    def test_destroy(self, backup_destroy):"},{"line_number":72,"context_line":"        backup \u003d objects.Backup(context\u003dself.context, id\u003d1)"},{"line_number":73,"context_line":"        backup.destroy()"},{"line_number":74,"context_line":"        self.assertTrue(backup_destroy.called)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"class TestBackupList(test_objects.BaseObjectsTestCase):"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa32b979_f79e5f06","line":74,"in_reply_to":"fa32b979_215d6579","updated":"2015-06-22 13:36:09.000000000","message":"Done","commit_id":"f07c796ac26451cb453824482d19a2c2be99490d"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"4ea07f187dc41b3c062c56b3e38688c71cb0133a","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    def test_destroy(self, backup_destroy):"},{"line_number":72,"context_line":"        backup \u003d objects.Backup(context\u003dself.context, id\u003d1)"},{"line_number":73,"context_line":"        backup.destroy()"},{"line_number":74,"context_line":"        self.assertTrue(backup_destroy.called)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"class TestBackupList(test_objects.BaseObjectsTestCase):"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa32b979_215d6579","line":74,"in_reply_to":"fa32b979_8971fd46","updated":"2015-06-22 12:51:46.000000000","message":"How about an additional assert:\n\n    self.assertTrue(backup_destroy.call_args[0].is_admin)\n\n?","commit_id":"f07c796ac26451cb453824482d19a2c2be99490d"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"c0bbf66b4bce3b7997202b303e7fb220b03c7537","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    def test_destroy(self, backup_destroy):"},{"line_number":72,"context_line":"        backup \u003d objects.Backup(context\u003dself.context, id\u003d1)"},{"line_number":73,"context_line":"        backup.destroy()"},{"line_number":74,"context_line":"        self.assertTrue(backup_destroy.called)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"class TestBackupList(test_objects.BaseObjectsTestCase):"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa32b979_8971fd46","line":74,"in_reply_to":"fa32b979_a3966092","updated":"2015-06-22 11:49:22.000000000","message":"Vipin, thanks for the comment.\n\nI\u0027ll try to fix it in a next patch. Imo, it should be done in a separate test to test only \u0027destroy\u0027 method otherwise this test will be more complex and it will tests only mocks not functionality which is broken(!) now.","commit_id":"f07c796ac26451cb453824482d19a2c2be99490d"}]}
