)]}'
{"nova/tests/unit/policies/base.py":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"2fe5649b034c1989d26e4c1fd4ff82312e28285d","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class BasePolicyTest(test.TestCase):"},{"line_number":27,"context_line":"    # NOTE(gmann): Set this flag to True if you would like to tests the"},{"line_number":28,"context_line":"    # new behaviour of policy without deprecated rules."},{"line_number":29,"context_line":"    # This means you can simulate the phase when policies completely"},{"line_number":30,"context_line":"    # switch to new behaviour by removing the support of old rules."}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_7bbfa7a9","line":27,"range":{"start_line":27,"start_character":62,"end_line":27,"end_character":67},"updated":"2020-03-06 06:20:55.000000000","message":"nit:s/tests/test","commit_id":"608e063c6334ceddb0cc206c33784a1e0b106ac1"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"2fe5649b034c1989d26e4c1fd4ff82312e28285d","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    # new behaviour of policy without deprecated rules."},{"line_number":29,"context_line":"    # This means you can simulate the phase when policies completely"},{"line_number":30,"context_line":"    # switch to new behaviour by removing the support of old rules."},{"line_number":31,"context_line":"    without_deprecated_rules \u003d False"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    # Add rules here other than base rules which need to override"},{"line_number":34,"context_line":"    # to remove the deprecated rules."}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_bbce7f57","line":31,"range":{"start_line":31,"start_character":4,"end_line":31,"end_character":28},"updated":"2020-03-06 06:20:55.000000000","message":"Good change.","commit_id":"608e063c6334ceddb0cc206c33784a1e0b106ac1"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8cc9dabd1ff81cf8185460f3cef6f4ce5ce76ea6","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                    \"role:reader and system_scope:all\","},{"line_number":110,"context_line":"            })"},{"line_number":111,"context_line":"            self.policy.set_rules(self.rules_without_deprecation,"},{"line_number":112,"context_line":"                                  overwrite\u003dFalse)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def common_policy_check(self, authorized_contexts,"},{"line_number":115,"context_line":"                            unauthorized_contexts, rule_name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_417f5edf","line":112,"range":{"start_line":112,"start_character":34,"end_line":112,"end_character":49},"updated":"2020-03-06 09:56:11.000000000","message":"You know, I bet that is the magic I was missing (facepalm).","commit_id":"608e063c6334ceddb0cc206c33784a1e0b106ac1"}],"nova/tests/unit/policies/test_admin_password.py":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"148fade22bc3b612b9e90e51b3eda15ee7827ac8","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        # To simulate the new world, remove deprecations by overriding rules"},{"line_number":132,"context_line":"        # TODO(johngarbutt): we should import these rules from base policy"},{"line_number":133,"context_line":"        self.policy.set_rules("},{"line_number":134,"context_line":"            {self.rule_name: \"rule:system_admin_or_owner\","},{"line_number":135,"context_line":"             \"system_admin_or_owner\":"},{"line_number":136,"context_line":"                \"rule:system_admin_api or rule:project_member_api\","},{"line_number":137,"context_line":"             \"system_admin_api\":"}],"source_content_type":"text/x-python","patch_set":2,"id":"1fa4df85_3e6e072f","line":134,"range":{"start_line":134,"start_character":0,"end_line":134,"end_character":58},"updated":"2020-03-05 17:07:20.000000000","message":"this is already covered in default role patch for this policy at least. but it is good to have here for the policies which add the deprecation for achieving granularity.","commit_id":"950b93340b7a845ac88073bbcd8014db39a50afa"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"38f966d39e635ad65ee0d8ba9631765d3d132d36","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        # To simulate the new world, remove deprecations by overriding rules"},{"line_number":132,"context_line":"        # TODO(johngarbutt): we should import these rules from base policy"},{"line_number":133,"context_line":"        self.policy.set_rules("},{"line_number":134,"context_line":"            {self.rule_name: \"rule:system_admin_or_owner\","},{"line_number":135,"context_line":"             \"system_admin_or_owner\":"},{"line_number":136,"context_line":"                \"rule:system_admin_api or rule:project_member_api\","},{"line_number":137,"context_line":"             \"system_admin_api\":"}],"source_content_type":"text/x-python","patch_set":2,"id":"1fa4df85_3e7847c2","line":134,"range":{"start_line":134,"start_character":0,"end_line":134,"end_character":58},"in_reply_to":"1fa4df85_3e6e072f","updated":"2020-03-05 17:11:09.000000000","message":"I can\u0027t rememember why I needed this, I think it is because set_rules seems to not both to load the defaults, but I may have just got confused.","commit_id":"950b93340b7a845ac88073bbcd8014db39a50afa"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"8a874f19ac9b1002dad135eb3270fc1852449359","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        # To simulate the new world, remove deprecations by overriding rules"},{"line_number":132,"context_line":"        # TODO(johngarbutt): we should import these rules from base policy"},{"line_number":133,"context_line":"        self.policy.set_rules("},{"line_number":134,"context_line":"            {self.rule_name: \"rule:system_admin_or_owner\","},{"line_number":135,"context_line":"             \"system_admin_or_owner\":"},{"line_number":136,"context_line":"                \"rule:system_admin_api or rule:project_member_api\","},{"line_number":137,"context_line":"             \"system_admin_api\":"}],"source_content_type":"text/x-python","patch_set":2,"id":"1fa4df85_c134b395","line":134,"range":{"start_line":134,"start_character":0,"end_line":134,"end_character":58},"in_reply_to":"1fa4df85_3e7847c2","updated":"2020-03-05 23:51:30.000000000","message":"yeah, defaults are not added if overwrite is True. I disabled that so that we only need to override the rules having deprecated rules and leave all other rules registered as it is. which is how operator can do.","commit_id":"950b93340b7a845ac88073bbcd8014db39a50afa"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"148fade22bc3b612b9e90e51b3eda15ee7827ac8","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        # TODO(johngarbutt): we should import these rules from base policy"},{"line_number":133,"context_line":"        self.policy.set_rules("},{"line_number":134,"context_line":"            {self.rule_name: \"rule:system_admin_or_owner\","},{"line_number":135,"context_line":"             \"system_admin_or_owner\":"},{"line_number":136,"context_line":"                \"rule:system_admin_api or rule:project_member_api\","},{"line_number":137,"context_line":"             \"system_admin_api\":"},{"line_number":138,"context_line":"                 \"role:admin and system_scope:all\","},{"line_number":139,"context_line":"             \"project_member_api\":"},{"line_number":140,"context_line":"                \"role:member and project_id:%(project_id)s\""},{"line_number":141,"context_line":"            })"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        # Check that system or projct admin or owner is able to change"}],"source_content_type":"text/x-python","patch_set":2,"id":"1fa4df85_1ef8eb46","line":140,"range":{"start_line":135,"start_character":0,"end_line":140,"end_character":59},"updated":"2020-03-05 17:07:20.000000000","message":"can we move these to base class ? these are needed by all admin_or_owner cases. we can set these in base class via flag.","commit_id":"950b93340b7a845ac88073bbcd8014db39a50afa"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"38f966d39e635ad65ee0d8ba9631765d3d132d36","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        # TODO(johngarbutt): we should import these rules from base policy"},{"line_number":133,"context_line":"        self.policy.set_rules("},{"line_number":134,"context_line":"            {self.rule_name: \"rule:system_admin_or_owner\","},{"line_number":135,"context_line":"             \"system_admin_or_owner\":"},{"line_number":136,"context_line":"                \"rule:system_admin_api or rule:project_member_api\","},{"line_number":137,"context_line":"             \"system_admin_api\":"},{"line_number":138,"context_line":"                 \"role:admin and system_scope:all\","},{"line_number":139,"context_line":"             \"project_member_api\":"},{"line_number":140,"context_line":"                \"role:member and project_id:%(project_id)s\""},{"line_number":141,"context_line":"            })"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        # Check that system or projct admin or owner is able to change"}],"source_content_type":"text/x-python","patch_set":2,"id":"1fa4df85_9e6ffbfa","line":140,"range":{"start_line":135,"start_character":0,"end_line":140,"end_character":59},"in_reply_to":"1fa4df85_1ef8eb46","updated":"2020-03-05 17:11:09.000000000","message":"Yeah, sounds like a good idea.","commit_id":"950b93340b7a845ac88073bbcd8014db39a50afa"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"8a874f19ac9b1002dad135eb3270fc1852449359","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        # TODO(johngarbutt): we should import these rules from base policy"},{"line_number":133,"context_line":"        self.policy.set_rules("},{"line_number":134,"context_line":"            {self.rule_name: \"rule:system_admin_or_owner\","},{"line_number":135,"context_line":"             \"system_admin_or_owner\":"},{"line_number":136,"context_line":"                \"rule:system_admin_api or rule:project_member_api\","},{"line_number":137,"context_line":"             \"system_admin_api\":"},{"line_number":138,"context_line":"                 \"role:admin and system_scope:all\","},{"line_number":139,"context_line":"             \"project_member_api\":"},{"line_number":140,"context_line":"                \"role:member and project_id:%(project_id)s\""},{"line_number":141,"context_line":"            })"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        # Check that system or projct admin or owner is able to change"}],"source_content_type":"text/x-python","patch_set":2,"id":"1fa4df85_6125bf5b","line":140,"range":{"start_line":135,"start_character":0,"end_line":140,"end_character":59},"in_reply_to":"1fa4df85_9e6ffbfa","updated":"2020-03-05 23:51:30.000000000","message":"done","commit_id":"950b93340b7a845ac88073bbcd8014db39a50afa"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"cea0e8ae45101c406415b2e17e0832241bf1d165","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        self.admin_authorized_contexts \u003d ["},{"line_number":124,"context_line":"            self.system_admin_context,"},{"line_number":125,"context_line":"            self.project_admin_context, self.project_member_context]"},{"line_number":126,"context_line":"        # Check that non-system and non-admin/owner is not able to change the"},{"line_number":127,"context_line":"        self.admin_unauthorized_contexts \u003d ["},{"line_number":128,"context_line":"            self.legacy_admin_context, self.project_reader_context,"},{"line_number":129,"context_line":"            self.project_foo_context,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_5b750bf9","line":126,"range":{"start_line":126,"start_character":74,"end_line":126,"end_character":77},"updated":"2020-03-06 06:56:13.000000000","message":"the passaword.","commit_id":"608e063c6334ceddb0cc206c33784a1e0b106ac1"}]}
