)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"956cb74849748076a8f51562989e0566a0d81cff","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Abhishek Kekane \u003cakekane@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2021-07-19 08:46:59 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add base poloicy check module"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This adds new v2/policy module which includes abstract kind of base"},{"line_number":10,"context_line":"class which can be subclassed as per need to enforce policies for"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"516f11dc_c3dde748","line":7,"range":{"start_line":7,"start_character":9,"end_line":7,"end_character":16},"updated":"2021-07-20 16:35:59.000000000","message":"policy","commit_id":"205880dc7698f4c0020f6b9d99c14c2728315326"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"00ff2909f6902062e189df5b963b41a28caba6ea","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Abhishek Kekane \u003cakekane@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2021-07-19 08:46:59 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add base poloicy check module"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This adds new v2/policy module which includes abstract kind of base"},{"line_number":10,"context_line":"class which can be subclassed as per need to enforce policies for"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bbbf6e7d_c2e76cf5","line":7,"range":{"start_line":7,"start_character":9,"end_line":7,"end_character":16},"in_reply_to":"516f11dc_c3dde748","updated":"2021-07-21 07:01:11.000000000","message":"Done","commit_id":"205880dc7698f4c0020f6b9d99c14c2728315326"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"956cb74849748076a8f51562989e0566a0d81cff","unresolved":true,"context_lines":[{"line_number":11,"context_line":"different glance resources."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"ToDo:"},{"line_number":14,"context_line":"* Provide test coverage"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Related blueprint policy-refactor"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"17db60eb_dc8c824a","line":14,"updated":"2021-07-20 16:35:59.000000000","message":"I added some new stuff in my update patch, which should come over to this. I\u0027ll rebase my stuff on this once that is done and this lands.","commit_id":"205880dc7698f4c0020f6b9d99c14c2728315326"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"00ff2909f6902062e189df5b963b41a28caba6ea","unresolved":true,"context_lines":[{"line_number":11,"context_line":"different glance resources."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"ToDo:"},{"line_number":14,"context_line":"* Provide test coverage"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Related blueprint policy-refactor"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"11b0b60d_51800c99","line":14,"in_reply_to":"17db60eb_dc8c824a","updated":"2021-07-21 07:01:11.000000000","message":"Thank you, helped a lot :D","commit_id":"205880dc7698f4c0020f6b9d99c14c2728315326"}],"glance/api/v2/policy.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4f119c2473c45f6e1311c317cb73b11da502ce52","unresolved":true,"context_lines":[{"line_number":27,"context_line":"        self._target \u003d target or {}"},{"line_number":28,"context_line":"        self.enforcer \u003d enforcer or policy.Enforcer()"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def _enforce(self, rule_name, extra\u003d\"\"):"},{"line_number":31,"context_line":"        self.enforcer.enforce(self._context, rule_name, self._target)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def check(self, name, *args):"}],"source_content_type":"text/x-python","patch_set":7,"id":"87505f82_115ef6e7","line":30,"range":{"start_line":30,"start_character":34,"end_line":30,"end_character":42},"updated":"2021-07-22 16:54:57.000000000","message":"I think you can remove this now. I don\u0027t even remember what I was using this for, but I think it\u0027s all gone. At least drop it until it needs to be added again.","commit_id":"c333c027fa8234ed17db2eb25181b7904755c30c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a3646f136dd9e1668a9d34f46648b49d7707ea7b","unresolved":true,"context_lines":[{"line_number":28,"context_line":"        self.enforcer \u003d enforcer or policy.Enforcer()"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def _enforce(self, rule_name, extra\u003d\"\"):"},{"line_number":31,"context_line":"        self.enforcer.enforce(self._context, rule_name, self._target)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def check(self, name, *args):"},{"line_number":34,"context_line":"        \"\"\"Perform a soft check of a named policy."}],"source_content_type":"text/x-python","patch_set":7,"id":"6d7bc408_d1f953cc","line":31,"updated":"2021-07-22 16:38:17.000000000","message":"Why did you remove the translation to HTTPForbidden from my base version? Otherwise we just have to catch and translate that everywhere in the API. Since we\u0027re only calling this from API code it makes it cleaner to just always raise the HTTP error from here.\n\nhttps://review.opendev.org/c/openstack/glance/+/789915/18/glance/api/v2/policy.py","commit_id":"c333c027fa8234ed17db2eb25181b7904755c30c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4f119c2473c45f6e1311c317cb73b11da502ce52","unresolved":true,"context_lines":[{"line_number":28,"context_line":"        self.enforcer \u003d enforcer or policy.Enforcer()"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def _enforce(self, rule_name, extra\u003d\"\"):"},{"line_number":31,"context_line":"        self.enforcer.enforce(self._context, rule_name, self._target)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def check(self, name, *args):"},{"line_number":34,"context_line":"        \"\"\"Perform a soft check of a named policy."}],"source_content_type":"text/x-python","patch_set":7,"id":"49b9b1e1_aedbedcb","line":31,"in_reply_to":"6367430f_355d6df3","updated":"2021-07-22 16:54:57.000000000","message":"It is in the image ones as well, but it\u0027s just duplicate handling everywhere that could be removed. Doing it once in this policy check also means we can just always call these enforce methods, potentially as the first thing in each handler method.\n\nSeems DRYer to me to do it in one place instead of everywhere, but I guess it\u0027s not a big deal.","commit_id":"c333c027fa8234ed17db2eb25181b7904755c30c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"86090187a2e8aad8a133cb39ef87795d7029efad","unresolved":true,"context_lines":[{"line_number":28,"context_line":"        self.enforcer \u003d enforcer or policy.Enforcer()"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def _enforce(self, rule_name, extra\u003d\"\"):"},{"line_number":31,"context_line":"        self.enforcer.enforce(self._context, rule_name, self._target)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def check(self, name, *args):"},{"line_number":34,"context_line":"        \"\"\"Perform a soft check of a named policy."}],"source_content_type":"text/x-python","patch_set":7,"id":"6367430f_355d6df3","line":31,"in_reply_to":"6d7bc408_d1f953cc","updated":"2021-07-22 16:45:35.000000000","message":"We already catching and translating exception.Forbidden in API layer so I removed it from here.\nAt least it is caught in all metadef API controllers.","commit_id":"c333c027fa8234ed17db2eb25181b7904755c30c"}],"glance/tests/unit/v2/test_v2_policy.py":[{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"41c77ac76e6e9a31b52c1f892c2bb6ddf9d810d9","unresolved":true,"context_lines":[{"line_number":43,"context_line":"        # Any other exception comes straight through"},{"line_number":44,"context_line":"        self.enforcer.enforce.side_effect \u003d exception.ImageNotFound"},{"line_number":45,"context_line":"        self.assertRaises(exception.ImageNotFound,"},{"line_number":46,"context_line":"                          self.policy._enforce, \u0027fake_rule\u0027)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def test_check(self):"},{"line_number":49,"context_line":"        # Check passes"}],"source_content_type":"text/x-python","patch_set":6,"id":"96ecff2e_f1964d53","line":46,"range":{"start_line":46,"start_character":0,"end_line":46,"end_character":60},"updated":"2021-07-22 15:18:56.000000000","message":"I don\u0027t see the difference between the test at line #38 and the one at line #43.\n\nHow is Forbidden translated in the first test? What is different with the second one?","commit_id":"acda526fe94932ae99fb2ef015e942c825a64e7c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"709e7ab09bb60136435da6be456e12f6c43ec35b","unresolved":true,"context_lines":[{"line_number":43,"context_line":"        # Any other exception comes straight through"},{"line_number":44,"context_line":"        self.enforcer.enforce.side_effect \u003d exception.ImageNotFound"},{"line_number":45,"context_line":"        self.assertRaises(exception.ImageNotFound,"},{"line_number":46,"context_line":"                          self.policy._enforce, \u0027fake_rule\u0027)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def test_check(self):"},{"line_number":49,"context_line":"        # Check passes"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a132b92_c1839b68","line":46,"range":{"start_line":46,"start_character":0,"end_line":46,"end_character":60},"in_reply_to":"96ecff2e_f1964d53","updated":"2021-07-22 15:29:21.000000000","message":"No difference, nice catch, I have made change in previous patch set\nearlier the enforce method of APIPolicyBase use to catch exception.Forbidden and translates it to webob.exc.HTTPForbidden\n\nI need to make this change.","commit_id":"acda526fe94932ae99fb2ef015e942c825a64e7c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a3646f136dd9e1668a9d34f46648b49d7707ea7b","unresolved":true,"context_lines":[{"line_number":43,"context_line":"        # Any other exception comes straight through"},{"line_number":44,"context_line":"        self.enforcer.enforce.side_effect \u003d exception.ImageNotFound"},{"line_number":45,"context_line":"        self.assertRaises(exception.ImageNotFound,"},{"line_number":46,"context_line":"                          self.policy._enforce, \u0027fake_rule\u0027)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def test_check(self):"},{"line_number":49,"context_line":"        # Check passes"}],"source_content_type":"text/x-python","patch_set":6,"id":"8264cf16_68953095","line":46,"range":{"start_line":46,"start_character":0,"end_line":46,"end_character":60},"in_reply_to":"9a132b92_c1839b68","updated":"2021-07-22 16:38:17.000000000","message":"I didn\u0027t catch that the HTTP translation had been removed from what this patch was based on in my set. But, if that goes back in, this check *is* different, and ensures that we raise unexpected errors back to our caller. ImageNotFound is just used as \"unexpected\" in this case.","commit_id":"acda526fe94932ae99fb2ef015e942c825a64e7c"}]}
