)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"9f3729eb6baf7fa210728a3349337d15c235a87c","unresolved":false,"context_lines":[{"line_number":12,"context_line":"of the policy.json file when testing."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I23136627cb095015352b8eb09c31b2b2f1ce315f"},{"line_number":15,"context_line":"Partially-Implements: blueprint policy-in-code"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ffe62b97_ff842660","line":15,"updated":"2017-03-27 18:07:09.000000000","message":"I think this is the last bits needed to implement this spec, correct? If so, we should do: \n\n  Implements: blueprint policy-in-code","commit_id":"259f574a9de2bf16b8fd5f1355643083173e3c0c"},{"author":{"_account_id":18464,"name":"Richard Avelar","email":"csravelar@gmail.com","username":"razone"},"change_message_id":"ec5cc6037c8fb06d8fba7e08e64004f99ad74e20","unresolved":false,"context_lines":[{"line_number":12,"context_line":"of the policy.json file when testing."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I23136627cb095015352b8eb09c31b2b2f1ce315f"},{"line_number":15,"context_line":"Partially-Implements: blueprint policy-in-code"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ffe62b97_1fc58a5b","line":15,"in_reply_to":"ffe62b97_ff842660","updated":"2017-03-27 18:13:30.000000000","message":"Done","commit_id":"259f574a9de2bf16b8fd5f1355643083173e3c0c"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"e8cf5a7505197d104b457719d4d2f57a3df41279","unresolved":false,"context_lines":[{"line_number":1,"context_line":"Parent:     62a0d2f2 (Policy in code (part 5))"},{"line_number":2,"context_line":"Author:     Ubuntu \u003ccsravelar@gmail.com\u003e"},{"line_number":3,"context_line":"AuthorDate: 2017-03-24 15:14:15 +0000"},{"line_number":4,"context_line":"Commit:     Ubuntu \u003ccsravelar@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-03-28 15:59:10 +0000"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ffe62b97_38901395","line":2,"updated":"2017-03-29 10:03:00.000000000","message":"Not sure how relevant this is, but you may want to set a proper realname in your git config.","commit_id":"625b440a7b3defd39694f1b2133d030fd9457606"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"e8cf5a7505197d104b457719d4d2f57a3df41279","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Remove policy file from source and refactor tests"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch removes the policy file now that policy in code as merged"},{"line_number":10,"context_line":"and we now have all the default policy from policy.json in code. In"},{"line_number":11,"context_line":"addition it refactors a couple tests to use the in code policy instead"},{"line_number":12,"context_line":"of the policy.json file when testing."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ffe62b97_78b1fb46","line":9,"updated":"2017-03-29 10:03:00.000000000","message":"Nit: ... code has merged","commit_id":"625b440a7b3defd39694f1b2133d030fd9457606"},{"author":{"_account_id":18464,"name":"Richard Avelar","email":"csravelar@gmail.com","username":"razone"},"change_message_id":"c8fede1032215d138c5b6ec61ac055e3ecefb1b3","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Remove policy file from source and refactor tests"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch removes the policy file now that policy in code as merged"},{"line_number":10,"context_line":"and we now have all the default policy from policy.json in code. In"},{"line_number":11,"context_line":"addition it refactors a couple tests to use the in code policy instead"},{"line_number":12,"context_line":"of the policy.json file when testing."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ffe62b97_15c18de5","line":9,"in_reply_to":"ffe62b97_78b1fb46","updated":"2017-03-29 13:30:54.000000000","message":"Done","commit_id":"625b440a7b3defd39694f1b2133d030fd9457606"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"e8cf5a7505197d104b457719d4d2f57a3df41279","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch removes the policy file now that policy in code as merged"},{"line_number":10,"context_line":"and we now have all the default policy from policy.json in code. In"},{"line_number":11,"context_line":"addition it refactors a couple tests to use the in code policy instead"},{"line_number":12,"context_line":"of the policy.json file when testing."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Depends-On: Ib1d9a51a78e2a84a3d7294dc8782605a681fa9e8"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ffe62b97_38e5b338","line":11,"updated":"2017-03-29 10:03:00.000000000","message":"Nit: ... a couple of tests ...","commit_id":"625b440a7b3defd39694f1b2133d030fd9457606"},{"author":{"_account_id":18464,"name":"Richard Avelar","email":"csravelar@gmail.com","username":"razone"},"change_message_id":"c8fede1032215d138c5b6ec61ac055e3ecefb1b3","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch removes the policy file now that policy in code as merged"},{"line_number":10,"context_line":"and we now have all the default policy from policy.json in code. In"},{"line_number":11,"context_line":"addition it refactors a couple tests to use the in code policy instead"},{"line_number":12,"context_line":"of the policy.json file when testing."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Depends-On: Ib1d9a51a78e2a84a3d7294dc8782605a681fa9e8"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ffe62b97_3553713b","line":11,"in_reply_to":"ffe62b97_38e5b338","updated":"2017-03-29 13:30:54.000000000","message":"Done","commit_id":"625b440a7b3defd39694f1b2133d030fd9457606"}],"keystone/tests/unit/test_policy.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d0bc394f4269310e72b4dbdbcc14d923fdb039da","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"class PolicyJsonTestCase(unit.TestCase):"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def _load_entries(self, filename):"},{"line_number":177,"context_line":"        return set(json.load(open(filename)))"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def _add_missing_default_rules(self, rules):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ffe62b97_ee74486a","side":"PARENT","line":176,"updated":"2017-03-28 15:28:28.000000000","message":"Now this is only used on line 192. Since we only use it in one place for one file, it goes from code reuse to needless indirection.","commit_id":"62a0d2f295793928527530ae6540fe7e210dcd43"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d0bc394f4269310e72b4dbdbcc14d923fdb039da","unresolved":false,"context_lines":[{"line_number":191,"context_line":"    def test_json_examples_have_matching_entries(self):"},{"line_number":192,"context_line":"        policy_keys \u003d self._load_entries(unit.dirs.etc(\u0027policy.json\u0027))"},{"line_number":193,"context_line":"        cloud_policy_keys \u003d self._load_entries("},{"line_number":194,"context_line":"            unit.dirs.etc(\u0027policy.v3cloudsample.json\u0027))"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        policy_extra_keys \u003d [\u0027admin_or_token_subject\u0027,"},{"line_number":197,"context_line":"                             \u0027service_admin_or_token_subject\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ffe62b97_eee7a811","side":"PARENT","line":194,"updated":"2017-03-28 15:28:28.000000000","message":"Based on the comment above, we can do the loading inline since nothing else in the modules uses _load_entries():\n\n  cloud_policy_keys \u003d set(\n      json.load(open(unit.dirs.etc(\u0027policy.v3cloudsample.json\u0027)))\n  )\n\nI assume we could remove this at some point too once we have a better policy file, but that\u0027ll be future work.","commit_id":"62a0d2f295793928527530ae6540fe7e210dcd43"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d0bc394f4269310e72b4dbdbcc14d923fdb039da","unresolved":false,"context_lines":[{"line_number":179,"context_line":"    def _get_default_policy_rules(self):"},{"line_number":180,"context_line":"        \"\"\"Return a dictionary of all in-code policies."},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        All policies should have a default value that is tracked in code"},{"line_number":183,"context_line":"        populates a dictionary with those policies and returns it."},{"line_number":184,"context_line":"        \"\"\""},{"line_number":185,"context_line":"        rules \u003d dict()"}],"source_content_type":"text/x-python","patch_set":5,"id":"ffe62b97_ee3c48c9","line":182,"updated":"2017-03-28 15:28:28.000000000","message":"Could remove \u0027should\u0027 here since it\u0027s not subjective anymore. We must keep default policies in code.","commit_id":"bb99436bbf8f7a7566e8d7cf670a4e8be1f08b56"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"f2d382791cdbc09a056e7d54704cdecedc8064bd","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        \"\"\"Return a dictionary of all in-code policies."},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        All policies should have a default value that is tracked in code"},{"line_number":183,"context_line":"        populates a dictionary with those policies and returns it."},{"line_number":184,"context_line":"        \"\"\""},{"line_number":185,"context_line":"        rules \u003d dict()"},{"line_number":186,"context_line":"        for rule in policies.list_rules():"}],"source_content_type":"text/x-python","patch_set":5,"id":"ffe62b97_3825da5c","line":183,"updated":"2017-03-28 14:53:04.000000000","message":"This sounds strange to me. Should it be a new sentence separate from the one above? Or is there something missing?","commit_id":"bb99436bbf8f7a7566e8d7cf670a4e8be1f08b56"},{"author":{"_account_id":18464,"name":"Richard Avelar","email":"csravelar@gmail.com","username":"razone"},"change_message_id":"0ffe2e40fbfd886794cf3f2385d5bf5c0bb11a7c","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        \"\"\"Return a dictionary of all in-code policies."},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        All policies should have a default value that is tracked in code"},{"line_number":183,"context_line":"        populates a dictionary with those policies and returns it."},{"line_number":184,"context_line":"        \"\"\""},{"line_number":185,"context_line":"        rules \u003d dict()"},{"line_number":186,"context_line":"        for rule in policies.list_rules():"}],"source_content_type":"text/x-python","patch_set":5,"id":"ffe62b97_2ea230fd","line":183,"in_reply_to":"ffe62b97_3825da5c","updated":"2017-03-28 15:22:50.000000000","message":"Ahh missing punctuation, thanks Jens!","commit_id":"bb99436bbf8f7a7566e8d7cf670a4e8be1f08b56"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d0bc394f4269310e72b4dbdbcc14d923fdb039da","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        \"\"\"Return a dictionary of all in-code policies."},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        All policies should have a default value that is tracked in code"},{"line_number":183,"context_line":"        populates a dictionary with those policies and returns it."},{"line_number":184,"context_line":"        \"\"\""},{"line_number":185,"context_line":"        rules \u003d dict()"},{"line_number":186,"context_line":"        for rule in policies.list_rules():"}],"source_content_type":"text/x-python","patch_set":5,"id":"ffe62b97_0ef52ced","line":183,"in_reply_to":"ffe62b97_3825da5c","updated":"2017-03-28 15:28:28.000000000","message":"How about: \n\n  All policies have a default value that is maintained in tree. This method\n  returns a dictionary containing all default policies.","commit_id":"bb99436bbf8f7a7566e8d7cf670a4e8be1f08b56"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"6728bf828a804cc06dc80c64ee126031584fc86a","unresolved":false,"context_lines":[{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def test_json_examples_have_matching_entries(self):"},{"line_number":192,"context_line":"        policy_keys \u003d self._load_entries(unit.dirs.etc(\u0027policy.json\u0027))"},{"line_number":193,"context_line":"        cloud_policy_keys \u003d self._load_entries("},{"line_number":194,"context_line":"            unit.dirs.etc(\u0027policy.v3cloudsample.json\u0027))"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        policy_extra_keys \u003d [\u0027admin_or_token_subject\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"ffe62b97_62de046e","side":"PARENT","line":193,"updated":"2017-03-28 17:36:43.000000000","message":"Now that this isn\u0027t used to load the default policy file, it becomes more of an indirection rather than useful code re-use. I\u0027d opt to just remove the _load_entries method in favor of doing it inline here. Which is something we can do in a follow up if needed.","commit_id":"62a0d2f295793928527530ae6540fe7e210dcd43"},{"author":{"_account_id":18464,"name":"Richard Avelar","email":"csravelar@gmail.com","username":"razone"},"change_message_id":"c8fede1032215d138c5b6ec61ac055e3ecefb1b3","unresolved":false,"context_lines":[{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def test_json_examples_have_matching_entries(self):"},{"line_number":192,"context_line":"        policy_keys \u003d self._load_entries(unit.dirs.etc(\u0027policy.json\u0027))"},{"line_number":193,"context_line":"        cloud_policy_keys \u003d self._load_entries("},{"line_number":194,"context_line":"            unit.dirs.etc(\u0027policy.v3cloudsample.json\u0027))"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        policy_extra_keys \u003d [\u0027admin_or_token_subject\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"ffe62b97_7501f937","side":"PARENT","line":193,"in_reply_to":"ffe62b97_62de046e","updated":"2017-03-29 13:30:54.000000000","message":"Done","commit_id":"62a0d2f295793928527530ae6540fe7e210dcd43"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"06541b770cb8dc7860d61a8ee3fd931101c3eea2","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    def test_json_examples_have_matching_entries(self):"},{"line_number":188,"context_line":"        policy_keys \u003d self._get_default_policy_rules()"},{"line_number":189,"context_line":"        cloud_policy_keys \u003d  set("},{"line_number":190,"context_line":"            json.load(open(unit.dirs.etc(\u0027policy.v3cloudsample.json\u0027))))"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        policy_extra_keys \u003d [\u0027admin_or_token_subject\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"ffe62b97_8fcfc127","line":189,"updated":"2017-03-29 16:18:25.000000000","message":"too many spaces here.","commit_id":"08411ccc83dd00f5a67a62b680bfdc47a9882e24"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"3dba35e4c04197bc927d9e44d98f0c679d4a86ec","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        self.assertTrue(result)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    def test_all_targets_documented(self):"},{"line_number":231,"context_line":"        # All the targets in the sample policy file must be documented in"},{"line_number":232,"context_line":"        # doc/source/policy_mapping.rst."},{"line_number":233,"context_line":"        policy_keys \u003d json.load(open((unit.dirs.etc(\u0027policy.json\u0027))))"},{"line_number":234,"context_line":"        self._add_missing_default_rules(policy_keys)"},{"line_number":235,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"ffe62b97_8689e375","side":"PARENT","line":232,"range":{"start_line":231,"start_character":0,"end_line":232,"end_character":40},"updated":"2017-03-29 18:55:57.000000000","message":"this could\u0027ve been kept","commit_id":"3432685a1e387f35e28777c9a42133f3bc145179"}]}
