)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3ba838bb94e169b96f3b10f363a4cb4537a8d361","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"a1fad10a_92d8e94e","updated":"2024-04-10 17:15:08.000000000","message":"recheck\n\nJob: functional\nError: ```neutron.privileged.agent.linux.ip_lib.NetworkInterfaceNotFound: Network interface qg-a17f5824-3e not found in namespace snat-8269d033-8ba5-43b3-ab80-8d043970ab37.```\nCause: NetworkInterfaceNotFound issue","commit_id":"17631c7741b85c572c38b3588b26b232cf25cc38"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"6f68ac54b66cb2408695d8a3ba6396adc1e7b9d6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"2666ab8b_663601db","updated":"2024-06-25 10:11:50.000000000","message":"2 small questions, but I like the idea","commit_id":"b85503643c92b26e8206b5b39bafba80bbb6722e"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"bff8c2365c5d85cdd8561049352d91b9fcbc021b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"698f10dc_bb636495","updated":"2024-06-26 07:17:48.000000000","message":"I will let Lajos approve it as he had some comments to that patch too","commit_id":"b85503643c92b26e8206b5b39bafba80bbb6722e"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"9658709bf063b13095e2da5a82773a6ab06fed8f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"09f4e975_1a69c1db","updated":"2024-06-26 07:58:58.000000000","message":"thanks","commit_id":"b85503643c92b26e8206b5b39bafba80bbb6722e"}],"neutron_lib/db/model_query.py":[{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"6f68ac54b66cb2408695d8a3ba6396adc1e7b9d6","unresolved":true,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"DEFAULT_RBAC_ACTIONS \u003d {constants.ACCESS_SHARED,"},{"line_number":32,"context_line":"                        constants.ACCESS_READONLY,"},{"line_number":33,"context_line":"                        }"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"# Classes implementing extensions will register hooks into this dictionary"}],"source_content_type":"text/x-python","patch_set":5,"id":"26839e24_cfa996d7","line":33,"updated":"2024-06-25 10:11:50.000000000","message":"nit: strange that no complaint from pep8","commit_id":"b85503643c92b26e8206b5b39bafba80bbb6722e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e5a58ecdf6843ab22586c0bf7bde0b53d39fce3d","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"DEFAULT_RBAC_ACTIONS \u003d {constants.ACCESS_SHARED,"},{"line_number":32,"context_line":"                        constants.ACCESS_READONLY,"},{"line_number":33,"context_line":"                        }"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"# Classes implementing extensions will register hooks into this dictionary"}],"source_content_type":"text/x-python","patch_set":5,"id":"b8e8599c_5e9b7a81","line":33,"in_reply_to":"26839e24_cfa996d7","updated":"2024-06-25 15:01:15.000000000","message":"actually no, this is how it should be indented, one char after the opening one","commit_id":"b85503643c92b26e8206b5b39bafba80bbb6722e"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"6f68ac54b66cb2408695d8a3ba6396adc1e7b9d6","unresolved":true,"context_lines":[{"line_number":95,"context_line":"    if callable(result_filters):"},{"line_number":96,"context_line":"        result_filters \u003d helpers.make_weak_ref(result_filters)"},{"line_number":97,"context_line":"    if rbac_actions is not None:"},{"line_number":98,"context_line":"        if isinstance(rbac_actions, (set, list, tuple)):"},{"line_number":99,"context_line":"            rbac_actions \u003d set(rbac_actions)"},{"line_number":100,"context_line":"        else:"},{"line_number":101,"context_line":"            rbac_actions \u003d {rbac_actions}"}],"source_content_type":"text/x-python","patch_set":5,"id":"6b4b1dc9_55bf2e88","line":98,"range":{"start_line":98,"start_character":42,"end_line":98,"end_character":53},"updated":"2024-06-25 10:11:50.000000000","message":"what if only set or single string is allowed, wouldn\u0027t that make things easier?","commit_id":"b85503643c92b26e8206b5b39bafba80bbb6722e"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"9658709bf063b13095e2da5a82773a6ab06fed8f","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    if callable(result_filters):"},{"line_number":96,"context_line":"        result_filters \u003d helpers.make_weak_ref(result_filters)"},{"line_number":97,"context_line":"    if rbac_actions is not None:"},{"line_number":98,"context_line":"        if isinstance(rbac_actions, (set, list, tuple)):"},{"line_number":99,"context_line":"            rbac_actions \u003d set(rbac_actions)"},{"line_number":100,"context_line":"        else:"},{"line_number":101,"context_line":"            rbac_actions \u003d {rbac_actions}"}],"source_content_type":"text/x-python","patch_set":5,"id":"4a6da1ed_4193fb30","line":98,"range":{"start_line":98,"start_character":42,"end_line":98,"end_character":53},"in_reply_to":"18447528_ee9ece2f","updated":"2024-06-26 07:58:58.000000000","message":"ack","commit_id":"b85503643c92b26e8206b5b39bafba80bbb6722e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e5a58ecdf6843ab22586c0bf7bde0b53d39fce3d","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    if callable(result_filters):"},{"line_number":96,"context_line":"        result_filters \u003d helpers.make_weak_ref(result_filters)"},{"line_number":97,"context_line":"    if rbac_actions is not None:"},{"line_number":98,"context_line":"        if isinstance(rbac_actions, (set, list, tuple)):"},{"line_number":99,"context_line":"            rbac_actions \u003d set(rbac_actions)"},{"line_number":100,"context_line":"        else:"},{"line_number":101,"context_line":"            rbac_actions \u003d {rbac_actions}"}],"source_content_type":"text/x-python","patch_set":5,"id":"18447528_ee9ece2f","line":98,"range":{"start_line":98,"start_character":42,"end_line":98,"end_character":53},"in_reply_to":"6b4b1dc9_55bf2e88","updated":"2024-06-25 15:01:15.000000000","message":"We have multiple RBAC actions [1] and we can pass one or many, and we can pass a single one as a string or a one element tuple/list/set.\n\n[1]\nACCESS_SHARED \u003d \u0027access_as_shared\u0027\nACCESS_READONLY \u003d \u0027access_as_readonly\u0027\nACCESS_EXTERNAL \u003d \u0027access_as_external\u0027","commit_id":"b85503643c92b26e8206b5b39bafba80bbb6722e"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0282aa6a014916eb51b9656624ec2f63a8a827ff","unresolved":true,"context_lines":[{"line_number":128,"context_line":"        hook_rbac_actions \u003d hook.get(\u0027rbac_actions\u0027)"},{"line_number":129,"context_line":"        if hook_rbac_actions is not None:"},{"line_number":130,"context_line":"            if rbac_actions is None:"},{"line_number":131,"context_line":"                rbac_actions \u003d set()"},{"line_number":132,"context_line":"            rbac_actions.update(hook_rbac_actions)"},{"line_number":133,"context_line":"    return rbac_actions if rbac_actions is not None else DEFAULT_RBAC_ACTIONS"},{"line_number":134,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"714b1379_a13288a0","line":131,"updated":"2024-06-26 06:57:08.000000000","message":"do you need this \"it\"? Can\u0027t you do something like:\n\n    rbac_actions \u003d set()\n    for hook in get_hooks(model):\n        ....\n    return  rbac_actions if len(rbac_actions) \u003e 0 else DEFAULT_RBAC_ACTIONS\n   \n?","commit_id":"b85503643c92b26e8206b5b39bafba80bbb6722e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"2f452bfe436576a2cd37ceb753e4920ac45692a8","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        hook_rbac_actions \u003d hook.get(\u0027rbac_actions\u0027)"},{"line_number":129,"context_line":"        if hook_rbac_actions is not None:"},{"line_number":130,"context_line":"            if rbac_actions is None:"},{"line_number":131,"context_line":"                rbac_actions \u003d set()"},{"line_number":132,"context_line":"            rbac_actions.update(hook_rbac_actions)"},{"line_number":133,"context_line":"    return rbac_actions if rbac_actions is not None else DEFAULT_RBAC_ACTIONS"},{"line_number":134,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"83b12207_2a9ccc5c","line":131,"in_reply_to":"714b1379_a13288a0","updated":"2024-06-26 07:04:57.000000000","message":"This is related to Lajos\u0027 question. We explicitly need two things:\n* If no \"hook_rbac_actions\" is passed, the \"rbac_actions\" will be None and we\u0027ll use the DEFAULT_RBAC_ACTIONS value.\n* If there is at least one \"hook_rbac_actions\", then we override the default value and use rbac_actions. But if by any circumstance the \"rbac_actions\" passed by the hooks are empty, then we\u0027ll pass no RBAC action. This is not possible (or not considered) by your code.\n\nExamples covered with my code:\nE.g.1:\n* hook_rabc_actions: {rbac_actions: access_as_shared} --\u003e return access_as_shared\n\nE.g.2:\n* hook_rabc_actions: None --\u003e return DEFAULT_RBAC_ACTIONS\n\nE.g.3:\n* hook_rabc_actions: {rbac_actions: None} --\u003e return None","commit_id":"b85503643c92b26e8206b5b39bafba80bbb6722e"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"bff8c2365c5d85cdd8561049352d91b9fcbc021b","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        hook_rbac_actions \u003d hook.get(\u0027rbac_actions\u0027)"},{"line_number":129,"context_line":"        if hook_rbac_actions is not None:"},{"line_number":130,"context_line":"            if rbac_actions is None:"},{"line_number":131,"context_line":"                rbac_actions \u003d set()"},{"line_number":132,"context_line":"            rbac_actions.update(hook_rbac_actions)"},{"line_number":133,"context_line":"    return rbac_actions if rbac_actions is not None else DEFAULT_RBAC_ACTIONS"},{"line_number":134,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1c9c3491_20a6c723","line":131,"in_reply_to":"83b12207_2a9ccc5c","updated":"2024-06-26 07:17:48.000000000","message":"ok, thx for explanation","commit_id":"b85503643c92b26e8206b5b39bafba80bbb6722e"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"6f68ac54b66cb2408695d8a3ba6396adc1e7b9d6","unresolved":true,"context_lines":[{"line_number":130,"context_line":"            if rbac_actions is None:"},{"line_number":131,"context_line":"                rbac_actions \u003d set()"},{"line_number":132,"context_line":"            rbac_actions.update(hook_rbac_actions)"},{"line_number":133,"context_line":"    return rbac_actions if rbac_actions is not None else DEFAULT_RBAC_ACTIONS"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"def query_with_hooks(context, model, field\u003dNone, lazy_fields\u003dNone):"}],"source_content_type":"text/x-python","patch_set":5,"id":"b0bf4c78_fa67c08b","line":133,"range":{"start_line":133,"start_character":27,"end_line":133,"end_character":51},"updated":"2024-06-25 10:11:50.000000000","message":"this will allow empty set for rbac_actions, is that a valid value, not DEFAULT_RBAC_ACTIONS is the good choice for that case?","commit_id":"b85503643c92b26e8206b5b39bafba80bbb6722e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e5a58ecdf6843ab22586c0bf7bde0b53d39fce3d","unresolved":false,"context_lines":[{"line_number":130,"context_line":"            if rbac_actions is None:"},{"line_number":131,"context_line":"                rbac_actions \u003d set()"},{"line_number":132,"context_line":"            rbac_actions.update(hook_rbac_actions)"},{"line_number":133,"context_line":"    return rbac_actions if rbac_actions is not None else DEFAULT_RBAC_ACTIONS"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"def query_with_hooks(context, model, field\u003dNone, lazy_fields\u003dNone):"}],"source_content_type":"text/x-python","patch_set":5,"id":"d47627bb_a09f5681","line":133,"range":{"start_line":133,"start_character":27,"end_line":133,"end_character":51},"in_reply_to":"b0bf4c78_fa67c08b","updated":"2024-06-25 15:01:15.000000000","message":"Right, this could be a possibility. That will depend on the code proposed. By default, if no rbac_actions are passed, DEFAULT_RBAC_ACTIONS will be used. But if we override the default value (None), then we can pass anything.","commit_id":"b85503643c92b26e8206b5b39bafba80bbb6722e"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"9658709bf063b13095e2da5a82773a6ab06fed8f","unresolved":false,"context_lines":[{"line_number":130,"context_line":"            if rbac_actions is None:"},{"line_number":131,"context_line":"                rbac_actions \u003d set()"},{"line_number":132,"context_line":"            rbac_actions.update(hook_rbac_actions)"},{"line_number":133,"context_line":"    return rbac_actions if rbac_actions is not None else DEFAULT_RBAC_ACTIONS"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"def query_with_hooks(context, model, field\u003dNone, lazy_fields\u003dNone):"}],"source_content_type":"text/x-python","patch_set":5,"id":"71196b71_6a0f8734","line":133,"range":{"start_line":133,"start_character":27,"end_line":133,"end_character":51},"in_reply_to":"d47627bb_a09f5681","updated":"2024-06-26 07:58:58.000000000","message":"ack","commit_id":"b85503643c92b26e8206b5b39bafba80bbb6722e"}]}
