)]}'
{"nova/tests/unit/policies/test_quota_sets.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"887fb0c3fbb4d61d2ade8608f8627a57d33b7366","unresolved":false,"context_lines":[{"line_number":46,"context_line":"            self.other_project_member_context,"},{"line_number":47,"context_line":"            self.other_project_reader_context"},{"line_number":48,"context_line":"        ]"},{"line_number":49,"context_line":"        # Check that everyone is able to revert the quota to default."},{"line_number":50,"context_line":"        self.everyone_authorized_contexts \u003d ["},{"line_number":51,"context_line":"            self.legacy_admin_context, self.system_admin_context,"},{"line_number":52,"context_line":"            self.project_admin_context,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_0b7a1423","line":49,"updated":"2020-04-13 23:01:43.000000000","message":"What does this mean? This doesn\u0027t sound right.\n\n(later) Apparently \"revert quota to default\" means deleting per-project quotas (to return to defaults) [1] as written in our own api-ref :P\n\nThat said, that is not supposed to be allowed for everyone, it\u0027s currently base.RULE_ADMIN_API, so I think this code comment is wrong. The API that everyone is allowed to access is listing of a tenant\u0027s default quota limits [2], not the revert to defaults.\n\n[1] https://docs.openstack.org/api-ref/compute/#revert-quotas-to-defaults\n[2] https://docs.openstack.org/api-ref/compute/#list-default-quotas-for-tenant","commit_id":"3ace1b37b3262ef3ccc5941fa585545541fc5f2b"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"72fdbc94b75a62abca8a5888b0f688cf08f2dda0","unresolved":false,"context_lines":[{"line_number":46,"context_line":"            self.other_project_member_context,"},{"line_number":47,"context_line":"            self.other_project_reader_context"},{"line_number":48,"context_line":"        ]"},{"line_number":49,"context_line":"        # Check that everyone is able to revert the quota to default."},{"line_number":50,"context_line":"        self.everyone_authorized_contexts \u003d ["},{"line_number":51,"context_line":"            self.legacy_admin_context, self.system_admin_context,"},{"line_number":52,"context_line":"            self.project_admin_context,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_2e127e59","line":49,"in_reply_to":"3f4c43b2_0b7a1423","updated":"2020-04-13 23:41:27.000000000","message":"you are right. I mixed up the comment with GET default quotas here.\ndone","commit_id":"3ace1b37b3262ef3ccc5941fa585545541fc5f2b"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"887fb0c3fbb4d61d2ade8608f8627a57d33b7366","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                                 body\u003dbody)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    @mock.patch(\u0027nova.objects.Quotas.destroy_all_by_project\u0027)"},{"line_number":77,"context_line":"    def test_delete_quota_sets_policy(self, mock_delete):"},{"line_number":78,"context_line":"        rule_name \u003d policies.POLICY_ROOT % \u0027delete\u0027"},{"line_number":79,"context_line":"        self.common_policy_check(self.admin_authorized_contexts,"},{"line_number":80,"context_line":"                                 self.admin_unauthorized_contexts,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_2ba2709b","line":77,"updated":"2020-04-13 23:01:43.000000000","message":"FYI this is what the api-ref calls \"reverting to defaults\".","commit_id":"3ace1b37b3262ef3ccc5941fa585545541fc5f2b"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"72fdbc94b75a62abca8a5888b0f688cf08f2dda0","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                                 body\u003dbody)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    @mock.patch(\u0027nova.objects.Quotas.destroy_all_by_project\u0027)"},{"line_number":77,"context_line":"    def test_delete_quota_sets_policy(self, mock_delete):"},{"line_number":78,"context_line":"        rule_name \u003d policies.POLICY_ROOT % \u0027delete\u0027"},{"line_number":79,"context_line":"        self.common_policy_check(self.admin_authorized_contexts,"},{"line_number":80,"context_line":"                                 self.admin_unauthorized_contexts,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_0e0fc22e","line":77,"in_reply_to":"3f4c43b2_2ba2709b","updated":"2020-04-13 23:41:27.000000000","message":"yeah, thanks","commit_id":"3ace1b37b3262ef3ccc5941fa585545541fc5f2b"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"887fb0c3fbb4d61d2ade8608f8627a57d33b7366","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                                 self.req, self.project_id)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    @mock.patch(\u0027nova.quota.QUOTAS.get_defaults\u0027)"},{"line_number":86,"context_line":"    def test_default_quota_sets_policy(self, mock_default):"},{"line_number":87,"context_line":"        rule_name \u003d policies.POLICY_ROOT % \u0027defaults\u0027"},{"line_number":88,"context_line":"        self.common_policy_check(self.everyone_authorized_contexts,"},{"line_number":89,"context_line":"                                 self.everyone_unauthorized_contexts,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_6bc5983c","line":86,"updated":"2020-04-13 23:01:43.000000000","message":"This is the everyone allowed API that will get the default quota limits for a tenant.","commit_id":"3ace1b37b3262ef3ccc5941fa585545541fc5f2b"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"72fdbc94b75a62abca8a5888b0f688cf08f2dda0","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                                 self.req, self.project_id)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    @mock.patch(\u0027nova.quota.QUOTAS.get_defaults\u0027)"},{"line_number":86,"context_line":"    def test_default_quota_sets_policy(self, mock_default):"},{"line_number":87,"context_line":"        rule_name \u003d policies.POLICY_ROOT % \u0027defaults\u0027"},{"line_number":88,"context_line":"        self.common_policy_check(self.everyone_authorized_contexts,"},{"line_number":89,"context_line":"                                 self.everyone_unauthorized_contexts,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_6e1c866a","line":86,"in_reply_to":"3f4c43b2_6bc5983c","updated":"2020-04-13 23:41:27.000000000","message":"DOne, updated the comment accordingly.","commit_id":"3ace1b37b3262ef3ccc5941fa585545541fc5f2b"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"26b1f53f287304cf21cf12b179969314bc6829cc","unresolved":false,"context_lines":[{"line_number":100,"context_line":"                                 self.controller.detail,"},{"line_number":101,"context_line":"                                 self.req, \u0027try-other-project\u0027)"},{"line_number":102,"context_line":"        # Check if everyone (owner) is able to get their own quota"},{"line_number":103,"context_line":"        for cxtx in self.everyone_authorized_contexts:"},{"line_number":104,"context_line":"            req \u003d fakes.HTTPRequest.blank(\u0027\u0027)"},{"line_number":105,"context_line":"            req.environ[\u0027nova.context\u0027] \u003d cxtx"},{"line_number":106,"context_line":"            self.controller.detail(req, cxtx.project_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_8b50e434","line":103,"updated":"2020-04-13 23:28:07.000000000","message":"This part doesn\u0027t seem right to me ... yet tests are passing. The quota detail API is currently RULE_ADMIN_OR_OWNER [1] yet this is showing that it is allowed for everyone?\n\n[1] https://github.com/openstack/nova/blob/c97363c62f2f436198879161b5393071906bceec/nova/policies/quota_sets.py#L67","commit_id":"3ace1b37b3262ef3ccc5941fa585545541fc5f2b"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"5f9552eb130688514e177e1be29d46fd8af9f28d","unresolved":false,"context_lines":[{"line_number":100,"context_line":"                                 self.controller.detail,"},{"line_number":101,"context_line":"                                 self.req, \u0027try-other-project\u0027)"},{"line_number":102,"context_line":"        # Check if everyone (owner) is able to get their own quota"},{"line_number":103,"context_line":"        for cxtx in self.everyone_authorized_contexts:"},{"line_number":104,"context_line":"            req \u003d fakes.HTTPRequest.blank(\u0027\u0027)"},{"line_number":105,"context_line":"            req.environ[\u0027nova.context\u0027] \u003d cxtx"},{"line_number":106,"context_line":"            self.controller.detail(req, cxtx.project_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_4e6a6a80","line":103,"in_reply_to":"3f4c43b2_0e3862d1","updated":"2020-04-14 00:08:15.000000000","message":"Ah, that\u0027s the key I was missing. Thanks for explaining.","commit_id":"3ace1b37b3262ef3ccc5941fa585545541fc5f2b"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"72fdbc94b75a62abca8a5888b0f688cf08f2dda0","unresolved":false,"context_lines":[{"line_number":100,"context_line":"                                 self.controller.detail,"},{"line_number":101,"context_line":"                                 self.req, \u0027try-other-project\u0027)"},{"line_number":102,"context_line":"        # Check if everyone (owner) is able to get their own quota"},{"line_number":103,"context_line":"        for cxtx in self.everyone_authorized_contexts:"},{"line_number":104,"context_line":"            req \u003d fakes.HTTPRequest.blank(\u0027\u0027)"},{"line_number":105,"context_line":"            req.environ[\u0027nova.context\u0027] \u003d cxtx"},{"line_number":106,"context_line":"            self.controller.detail(req, cxtx.project_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_0e3862d1","line":103,"in_reply_to":"3f4c43b2_8b50e434","updated":"2020-04-13 23:41:27.000000000","message":"yeah, because API pass the same project_id as target for which the quota is requested and if that is same as a requester ( context) then it will be allowed.\n\nI mean every requester is owner of their own quota so everyone is allowed to get their own quotas.","commit_id":"3ace1b37b3262ef3ccc5941fa585545541fc5f2b"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"d67c9e9ba069c52cf3b39fee75f49d788b9d8381","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        for cxtx in self.everyone_authorized_contexts:"},{"line_number":106,"context_line":"            req \u003d fakes.HTTPRequest.blank(\u0027\u0027)"},{"line_number":107,"context_line":"            req.environ[\u0027nova.context\u0027] \u003d cxtx"},{"line_number":108,"context_line":"            self.controller.detail(req, cxtx.project_id)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    @mock.patch(\u0027nova.quota.QUOTAS.get_project_quotas\u0027)"},{"line_number":111,"context_line":"    def test_show_quota_sets_policy(self, mock_get):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4c43b2_ae2dee47","line":108,"range":{"start_line":108,"start_character":40,"end_line":108,"end_character":55},"updated":"2020-04-14 00:14:43.000000000","message":"Note to reviewers: this is what is making each request for the project\u0027s own quota","commit_id":"d0c970d6c6b4f95a0451d4cebefa09bb120c6f24"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"d67c9e9ba069c52cf3b39fee75f49d788b9d8381","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                                 self.admin_unauthorized_contexts,"},{"line_number":115,"context_line":"                                 rule_name,"},{"line_number":116,"context_line":"                                 self.controller.show,"},{"line_number":117,"context_line":"                                 self.req, \u0027try-other-project\u0027)"},{"line_number":118,"context_line":"        # Check if everyone (owner) is able to get their own quota"},{"line_number":119,"context_line":"        for cxtx in self.everyone_authorized_contexts:"},{"line_number":120,"context_line":"            req \u003d fakes.HTTPRequest.blank(\u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4c43b2_6e1be61a","line":117,"range":{"start_line":117,"start_character":43,"end_line":117,"end_character":62},"updated":"2020-04-14 00:14:43.000000000","message":"And this is what makes the other check about trying to get another project\u0027s quota","commit_id":"d0c970d6c6b4f95a0451d4cebefa09bb120c6f24"}]}
