)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"c40dc48cbdea21fd3db17d169d2c56d2f70b6804","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"63f7ca0b_3c22276a","updated":"2022-11-10 13:12:55.000000000","message":"LGTM","commit_id":"3c872c9b92eb45dca4e7f4f9ffa97d6bed52363c"}],"plugins/modules/compute_flavor_access.py":[{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"c40dc48cbdea21fd3db17d169d2c56d2f70b6804","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        supports_check_mode\u003dTrue,"},{"line_number":149,"context_line":"    )"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def _project_and_project_domain(self):"},{"line_number":152,"context_line":"        project_name_or_id \u003d self.params[\u0027project\u0027]"},{"line_number":153,"context_line":"        project_domain_name_or_id \u003d self.params[\u0027project_domain\u0027]"},{"line_number":154,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"154bb868_acad9d31","line":151,"updated":"2022-11-10 13:12:55.000000000","message":"Random thought: I feel like we have this code enough times that it might be time to think about abstracting it away.","commit_id":"3c872c9b92eb45dca4e7f4f9ffa97d6bed52363c"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"2cc0f275a9e09e7a6977c1081d92f0d27da93a28","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        supports_check_mode\u003dTrue,"},{"line_number":149,"context_line":"    )"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def _project_and_project_domain(self):"},{"line_number":152,"context_line":"        project_name_or_id \u003d self.params[\u0027project\u0027]"},{"line_number":153,"context_line":"        project_domain_name_or_id \u003d self.params[\u0027project_domain\u0027]"},{"line_number":154,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"653ce458_1fe29ae5","line":151,"in_reply_to":"154bb868_acad9d31","updated":"2022-11-10 18:37:51.000000000","message":"Agree, added a TODO to the code.","commit_id":"3c872c9b92eb45dca4e7f4f9ffa97d6bed52363c"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"c40dc48cbdea21fd3db17d169d2c56d2f70b6804","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        project_id, domain_id \u003d self._project_and_project_domain()"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        flavor_access \u003d self.conn.compute.get_flavor_access(flavor.id)"},{"line_number":183,"context_line":"        project_ids \u003d [(access.get(\u0027project_id\u0027) or access.get(\u0027tenant_id\u0027))"},{"line_number":184,"context_line":"                       for access in flavor_access]"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        if (project_id in project_ids and state \u003d\u003d \u0027present\u0027) \\"}],"source_content_type":"text/x-python","patch_set":10,"id":"8d02863f_f8693c50","line":183,"updated":"2022-11-10 13:12:55.000000000","message":"This is needed because flavor access isn\u0027t a resource, it\u0027s sent directly from the api and the result _can_ be in tenant_id.","commit_id":"3c872c9b92eb45dca4e7f4f9ffa97d6bed52363c"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"2cc0f275a9e09e7a6977c1081d92f0d27da93a28","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        project_id, domain_id \u003d self._project_and_project_domain()"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        flavor_access \u003d self.conn.compute.get_flavor_access(flavor.id)"},{"line_number":183,"context_line":"        project_ids \u003d [(access.get(\u0027project_id\u0027) or access.get(\u0027tenant_id\u0027))"},{"line_number":184,"context_line":"                       for access in flavor_access]"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        if (project_id in project_ids and state \u003d\u003d \u0027present\u0027) \\"}],"source_content_type":"text/x-python","patch_set":10,"id":"ee2e140f_6f4c8a43","line":183,"in_reply_to":"8d02863f_f8693c50","updated":"2022-11-10 18:37:51.000000000","message":"Thank you, fixed the code.\n\nIt is tenant_id for compute_flavor access [1] and project_id for volume_type access [2].\n\n[1] https://docs.openstack.org/api-ref/compute/#list-flavor-access-information-for-given-flavor\n[2] https://docs.openstack.org/api-ref/block-storage/v3/#volume-type-access-types-action-types-os-volume-type-access","commit_id":"3c872c9b92eb45dca4e7f4f9ffa97d6bed52363c"}]}
