)]}'
{"oslo_policy/policy.py":[{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"95d9e949153db0177f855ffa6cbb154d625cbc7c","unresolved":false,"context_lines":[{"line_number":659,"context_line":"        # before they roll out the next release. If the policy name is in"},{"line_number":660,"context_line":"        # self.file_rules, we know that it\u0027s being overridden."},{"line_number":661,"context_line":"        if deprecated_rule.name !\u003d default.name and ("},{"line_number":662,"context_line":"                deprecated_rule.name in self.rules):"},{"line_number":663,"context_line":""},{"line_number":664,"context_line":"            warnings.warn(deprecated_msg)"},{"line_number":665,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_72f88d4a","line":662,"updated":"2018-11-02 13:24:05.000000000","message":"Maybe here we should also check if default.name is in self.rules. that would mean that the operator tried to overwrite the new policy name too. In that case, we should just issue a warning and ignore the old policy.","commit_id":"1921082109604358b959a3f0aff388cdeb5226b5"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"c4293bf77fbade069677ff2165263d0536b3d4bb","unresolved":false,"context_lines":[{"line_number":659,"context_line":"        # before they roll out the next release. If the policy name is in"},{"line_number":660,"context_line":"        # self.file_rules, we know that it\u0027s being overridden."},{"line_number":661,"context_line":"        if deprecated_rule.name !\u003d default.name and ("},{"line_number":662,"context_line":"                deprecated_rule.name in self.rules):"},{"line_number":663,"context_line":""},{"line_number":664,"context_line":"            warnings.warn(deprecated_msg)"},{"line_number":665,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_d245e173","line":662,"in_reply_to":"3f79a3b5_72f88d4a","updated":"2018-11-02 13:26:44.000000000","message":"Oh, sorry, I didn\u0027t see that this case was handled below.","commit_id":"1921082109604358b959a3f0aff388cdeb5226b5"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"c4293bf77fbade069677ff2165263d0536b3d4bb","unresolved":false,"context_lines":[{"line_number":684,"context_line":"        # the policy manually or add infrastructure to their deployment to"},{"line_number":685,"context_line":"        # support the new policy."},{"line_number":686,"context_line":"        if (deprecated_rule.check_str !\u003d default.check_str"},{"line_number":687,"context_line":"                and default.name not in self.rules):"},{"line_number":688,"context_line":""},{"line_number":689,"context_line":"            default.check \u003d _parser.parse_rule("},{"line_number":690,"context_line":"                default.check_str + \u0027 or \u0027 +"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_b242a566","line":687,"updated":"2018-11-02 13:26:44.000000000","message":"it\u0027s handled here.","commit_id":"1921082109604358b959a3f0aff388cdeb5226b5"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"032e758ebad69ad195ecccd4b181c410333bb39a","unresolved":false,"context_lines":[{"line_number":659,"context_line":"        # before they roll out the next release. If the policy name is in"},{"line_number":660,"context_line":"        # self.rules, we know that it\u0027s being overridden."},{"line_number":661,"context_line":"        if deprecated_rule.name !\u003d default.name and ("},{"line_number":662,"context_line":"                deprecated_rule.name in self.rules):"},{"line_number":663,"context_line":""},{"line_number":664,"context_line":"            warnings.warn(deprecated_msg)"},{"line_number":665,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_fd7a1474","line":662,"range":{"start_line":662,"start_character":40,"end_line":662,"end_character":50},"updated":"2018-11-05 03:32:05.000000000","message":"how about change this to \"self.file_rules\", I think it\u0027s more readable and won\u0027t break the logic if I didn\u0027t miss something.","commit_id":"9be394c2f578f37d02be2a4437c41f63e401ea5e"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"a85fd42b3f0f1162e412c5b2cd95c26d8d628b93","unresolved":false,"context_lines":[{"line_number":659,"context_line":"        # before they roll out the next release. If the policy name is in"},{"line_number":660,"context_line":"        # self.rules, we know that it\u0027s being overridden."},{"line_number":661,"context_line":"        if deprecated_rule.name !\u003d default.name and ("},{"line_number":662,"context_line":"                deprecated_rule.name in self.rules):"},{"line_number":663,"context_line":""},{"line_number":664,"context_line":"            warnings.warn(deprecated_msg)"},{"line_number":665,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_e57d2f1d","line":662,"range":{"start_line":662,"start_character":40,"end_line":662,"end_character":50},"in_reply_to":"3f79a3b5_fd7a1474","updated":"2018-11-27 12:42:21.000000000","message":"Your suggestion works for me locally. I double checked and I think the only difference is that self.file_rules is a key-value pair between the policy name and RuleDefault objects, where self.rules is a key-value pair between policy name and check objects.\n\nDoesn\u0027t seem to affect the outcome of the tests though.","commit_id":"9be394c2f578f37d02be2a4437c41f63e401ea5e"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"fa33a4a823c371e7353ceeda457cfc1d0ff73d98","unresolved":false,"context_lines":[{"line_number":657,"context_line":"        # operators are relying on an override for foo:bar and it\u0027s getting"},{"line_number":658,"context_line":"        # renamed to foo:create_bar then they need to be able to see that"},{"line_number":659,"context_line":"        # before they roll out the next release. If the policy name is in"},{"line_number":660,"context_line":"        # self.rules, we know that it\u0027s being overridden."},{"line_number":661,"context_line":"        if deprecated_rule.name !\u003d default.name and ("},{"line_number":662,"context_line":"                deprecated_rule.name in self.file_rules):"},{"line_number":663,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_cab6f3fc","line":660,"range":{"start_line":660,"start_character":15,"end_line":660,"end_character":20},"updated":"2018-11-27 23:04:03.000000000","message":"Nit: *file_rules","commit_id":"8132ec031da0d0563639576255daabe34e3d8f02"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"993503683a550535faccdc97321d68cbf8dc466d","unresolved":false,"context_lines":[{"line_number":657,"context_line":"        # operators are relying on an override for foo:bar and it\u0027s getting"},{"line_number":658,"context_line":"        # renamed to foo:create_bar then they need to be able to see that"},{"line_number":659,"context_line":"        # before they roll out the next release. If the policy name is in"},{"line_number":660,"context_line":"        # self.rules, we know that it\u0027s being overridden."},{"line_number":661,"context_line":"        if deprecated_rule.name !\u003d default.name and ("},{"line_number":662,"context_line":"                deprecated_rule.name in self.file_rules):"},{"line_number":663,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_dbdc5574","line":660,"range":{"start_line":660,"start_character":15,"end_line":660,"end_character":20},"in_reply_to":"3f79a3b5_cab6f3fc","updated":"2018-11-29 22:44:31.000000000","message":"Done","commit_id":"8132ec031da0d0563639576255daabe34e3d8f02"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"fa33a4a823c371e7353ceeda457cfc1d0ff73d98","unresolved":false,"context_lines":[{"line_number":685,"context_line":"        # the policy manually or add infrastructure to their deployment to"},{"line_number":686,"context_line":"        # support the new policy."},{"line_number":687,"context_line":"        if (deprecated_rule.check_str !\u003d default.check_str"},{"line_number":688,"context_line":"                and default.name not in self.rules):"},{"line_number":689,"context_line":""},{"line_number":690,"context_line":"            default.check \u003d _parser.parse_rule("},{"line_number":691,"context_line":"                default.check_str + \u0027 or \u0027 +"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_ca9b5376","line":688,"range":{"start_line":688,"start_character":45,"end_line":688,"end_character":50},"updated":"2018-11-27 23:04:03.000000000","message":"file_rules for consistency?","commit_id":"8132ec031da0d0563639576255daabe34e3d8f02"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"993503683a550535faccdc97321d68cbf8dc466d","unresolved":false,"context_lines":[{"line_number":685,"context_line":"        # the policy manually or add infrastructure to their deployment to"},{"line_number":686,"context_line":"        # support the new policy."},{"line_number":687,"context_line":"        if (deprecated_rule.check_str !\u003d default.check_str"},{"line_number":688,"context_line":"                and default.name not in self.rules):"},{"line_number":689,"context_line":""},{"line_number":690,"context_line":"            default.check \u003d _parser.parse_rule("},{"line_number":691,"context_line":"                default.check_str + \u0027 or \u0027 +"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_fbd91181","line":688,"range":{"start_line":688,"start_character":45,"end_line":688,"end_character":50},"in_reply_to":"3f79a3b5_ca9b5376","updated":"2018-11-29 22:44:31.000000000","message":"Done","commit_id":"8132ec031da0d0563639576255daabe34e3d8f02"}],"oslo_policy/tests/test_policy.py":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"fa33a4a823c371e7353ceeda457cfc1d0ff73d98","unresolved":false,"context_lines":[{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":"    def test_override_both_new_and_old_policy(self):"},{"line_number":1275,"context_line":"        # Simulate an operator overriding a policy using both the the new and"},{"line_number":1276,"context_line":"        # old policy names. The following doesn\u0027t make a whole lot of sense"},{"line_number":1277,"context_line":"        # because the overrides are conflicting, but we want to make sure that"},{"line_number":1278,"context_line":"        # oslo.policy uses foo:create_bar instead of foo:bar."},{"line_number":1279,"context_line":"        rules_dict \u003d {"},{"line_number":1280,"context_line":"            \u0027foo:create_bar\u0027: \u0027role:bazz\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_0a3f0b23","line":1277,"range":{"start_line":1276,"start_character":28,"end_line":1277,"end_character":47},"updated":"2018-11-27 23:04:03.000000000","message":"I bet it happens anyway. :-)","commit_id":"8132ec031da0d0563639576255daabe34e3d8f02"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"993503683a550535faccdc97321d68cbf8dc466d","unresolved":false,"context_lines":[{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":"    def test_override_both_new_and_old_policy(self):"},{"line_number":1275,"context_line":"        # Simulate an operator overriding a policy using both the the new and"},{"line_number":1276,"context_line":"        # old policy names. The following doesn\u0027t make a whole lot of sense"},{"line_number":1277,"context_line":"        # because the overrides are conflicting, but we want to make sure that"},{"line_number":1278,"context_line":"        # oslo.policy uses foo:create_bar instead of foo:bar."},{"line_number":1279,"context_line":"        rules_dict \u003d {"},{"line_number":1280,"context_line":"            \u0027foo:create_bar\u0027: \u0027role:bazz\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_bbcdd9ba","line":1277,"range":{"start_line":1276,"start_character":28,"end_line":1277,"end_character":47},"in_reply_to":"3f79a3b5_0a3f0b23","updated":"2018-11-29 22:44:31.000000000","message":"ikr","commit_id":"8132ec031da0d0563639576255daabe34e3d8f02"}]}
