)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"006ea63ce5e269a903fecade15df31715e4770dc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"0ceaea9e_f9aaa894","updated":"2023-03-11 02:12:54.000000000","message":"no activity for long time, and as this repo is almost inactive I will propose it to retire soon but if you would like to maintain it, ping us on #openstack-qa IRC OFTC channel","commit_id":"e88d55248ad9aaa9876c906e533e0d456eb54520"}],"patrole_tempest_plugin/tests/api/network/rbac_base.py":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"9289a63c0bab7ba6ee8872780fd585cef4836296","unresolved":false,"context_lines":[{"line_number":63,"context_line":"            roles\u003droles,"},{"line_number":64,"context_line":"            force_new\u003dforce_new"},{"line_number":65,"context_line":"        )"},{"line_number":66,"context_line":"        # user_id and tenant_id are lost when calling the clients.Manager"},{"line_number":67,"context_line":"        user_id \u003d manager.credentials.user_id"},{"line_number":68,"context_line":"        tenant_id \u003d manager.credentials.tenant_id"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        # Import neutron-tempest-plugin clients"},{"line_number":71,"context_line":"        if cls.is_neutron_tempest_plugin_available():"},{"line_number":72,"context_line":"            from neutron_tempest_plugin.api import clients"},{"line_number":73,"context_line":"            neutron_tempest_manager \u003d clients.Manager(manager.credentials)"},{"line_number":74,"context_line":"            cls.ntp_client \u003d neutron_tempest_manager.network_client"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        # Add the user_id and tenant_id back to the the manager.credentials as"},{"line_number":77,"context_line":"        # this is lost when calling the clients.Manager. This is only seen when"},{"line_number":78,"context_line":"        # Tempest is configured to \u0027use_dynamic_credentials \u003d false\u0027. Both"},{"line_number":79,"context_line":"        # user_id and tenant_id are needed in rbac_utils"},{"line_number":80,"context_line":"        manager.credentials.user_id \u003d user_id"},{"line_number":81,"context_line":"        manager.credentials.tenant_id \u003d tenant_id"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        return manager"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_73b560ec","line":81,"range":{"start_line":66,"start_character":0,"end_line":81,"end_character":49},"updated":"2019-08-21 16:20:08.000000000","message":"I\u0027d consider doing it this way:\n\n    with self.resore_manager_credentials:\n        # Import neutron-tempest-plugin clients\n        if cls.is_neutron_tempest_plugin_available():\n            from neutron_tempest_plugin.api import clients\n            neutron_tempest_manager \u003d clients.Manager(manager.credentials)\n            cls.ntp_client \u003d neutron_tempest_manager.network_client\n\nWhere self.resore_manager_credentials implements the contextmanager pattern:\n\n@contextmanager\ndef restore_manager_credentials():\n    manager_creds \u003d copy.deepcopy(manager.credentials)\n    try:\n        yield\n    finally:\n        manager.credentials \u003d manager_creds\n\nThat way you also cover every single attribute, not just tenant_id and user_id.\n\nAlso I\u0027m curious why the creds are lost in the first place when you call clients.Manager.\n\nFinally consider only doing this if dynamic credentials \u003d False is set (and you can add that condition inside the contextmanager function itself).","commit_id":"5cd43821446fb4f4d72d88e67925db4556f90d24"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"c0c7adc60c27e881dc3c75ff83df92d9e40d654c","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            # Import neutron-tempest-plugin clients"},{"line_number":75,"context_line":"            if cls.is_neutron_tempest_plugin_available():"},{"line_number":76,"context_line":"                from neutron_tempest_plugin.api import clients"},{"line_number":77,"context_line":"                neutron_tempest_manager \u003d clients.Manager(manager.credentials)"},{"line_number":78,"context_line":"                cls.ntp_client \u003d neutron_tempest_manager.network_client"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        return manager"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_da288a86","line":77,"range":{"start_line":77,"start_character":58,"end_line":77,"end_character":77},"updated":"2019-08-27 14:46:26.000000000","message":"I\u0027m not sure at which point tempest.lib modifies this object (tempest.lib seems to be the root cause, not neutron-tempest-plugin) but I think the better workaround here is much simpler:\n\n            # Import neutron-tempest-plugin clients\n            if cls.is_neutron_tempest_plugin_available():\n                from neutron_tempest_plugin.api import clients\n                neutron_tempest_manager \u003d clients.Manager(copy.deepcopy(manager.credentials))\n\nThe manager object won\u0027t be modified if you simply pass in a new manager.credentials object, thereby avoiding the need to restore anything and is a pretty trivial change.","commit_id":"2b21d5203aec7ab35c90bbdd8aedd995e7a83d7e"},{"author":{"_account_id":17896,"name":"Rick Bartra","email":"rickbartra@microsoft.com","username":"rb560u"},"change_message_id":"efa2bd47ed4ad1b60d31ee1f1abfc5d3a7484bf5","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            # Import neutron-tempest-plugin clients"},{"line_number":75,"context_line":"            if cls.is_neutron_tempest_plugin_available():"},{"line_number":76,"context_line":"                from neutron_tempest_plugin.api import clients"},{"line_number":77,"context_line":"                neutron_tempest_manager \u003d clients.Manager(manager.credentials)"},{"line_number":78,"context_line":"                cls.ntp_client \u003d neutron_tempest_manager.network_client"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        return manager"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_c5bd06b2","line":77,"range":{"start_line":77,"start_character":58,"end_line":77,"end_character":77},"in_reply_to":"7faddb67_da288a86","updated":"2019-08-27 17:57:13.000000000","message":"thanks for the review. I agree this is much cleaner and intuitive approach. I will push a new PS.","commit_id":"2b21d5203aec7ab35c90bbdd8aedd995e7a83d7e"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"a0567c49663ff85b18683e56a0716abc0cea85ca","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        if cls.is_neutron_tempest_plugin_available():"},{"line_number":71,"context_line":"            from neutron_tempest_plugin.api import clients"},{"line_number":72,"context_line":"            neutron_tempest_manager \u003d \\"},{"line_number":73,"context_line":"                clients.Manager(copy.deepcopy(manager.credentials))"},{"line_number":74,"context_line":"            cls.ntp_client \u003d neutron_tempest_manager.network_client"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        return manager"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_96a73850","line":73,"range":{"start_line":73,"start_character":16,"end_line":73,"end_character":31},"updated":"2019-09-20 20:00:15.000000000","message":"I do not think clients.Manager modifies the credential. is something buggy in Tempest side. \n\nCan you please log the bug and add failure details so what we can debug the real root cause. Doing this workaround will hide the real issue and we will forget to debug that.","commit_id":"e88d55248ad9aaa9876c906e533e0d456eb54520"},{"author":{"_account_id":17896,"name":"Rick Bartra","email":"rickbartra@microsoft.com","username":"rb560u"},"change_message_id":"c6e2ce33157c20c531629fd8a0a77d286fa3c765","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        if cls.is_neutron_tempest_plugin_available():"},{"line_number":71,"context_line":"            from neutron_tempest_plugin.api import clients"},{"line_number":72,"context_line":"            neutron_tempest_manager \u003d \\"},{"line_number":73,"context_line":"                clients.Manager(copy.deepcopy(manager.credentials))"},{"line_number":74,"context_line":"            cls.ntp_client \u003d neutron_tempest_manager.network_client"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        return manager"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_80aac016","line":73,"range":{"start_line":73,"start_character":16,"end_line":73,"end_character":31},"in_reply_to":"3fa7e38b_22e5250b","updated":"2019-10-03 21:41:45.000000000","message":"Looks like the \"credentials.user_id\" and \"credentials.tenant_id\" is being dropped when self.clear_auth() is being called here: https://github.com/openstack/tempest/blob/master/tempest/lib/auth.py#L251\n\nAny suggestions on how this can be fixed in Tempest?","commit_id":"e88d55248ad9aaa9876c906e533e0d456eb54520"},{"author":{"_account_id":17896,"name":"Rick Bartra","email":"rickbartra@microsoft.com","username":"rb560u"},"change_message_id":"e48e743c1d16989bee94245b0388fe18f0771287","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        if cls.is_neutron_tempest_plugin_available():"},{"line_number":71,"context_line":"            from neutron_tempest_plugin.api import clients"},{"line_number":72,"context_line":"            neutron_tempest_manager \u003d \\"},{"line_number":73,"context_line":"                clients.Manager(copy.deepcopy(manager.credentials))"},{"line_number":74,"context_line":"            cls.ntp_client \u003d neutron_tempest_manager.network_client"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        return manager"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_22e5250b","line":73,"range":{"start_line":73,"start_character":16,"end_line":73,"end_character":31},"in_reply_to":"3fa7e38b_96a73850","updated":"2019-10-02 20:52:00.000000000","message":"Thanks for the review and I agree that the real root cause should be investigated. I dug into the Tempest code and can\u0027t figure out where \u0027user_id\u0027 and \u0027tenant_id\u0027 is being set to None. I created this bug https://bugs.launchpad.net/tempest/+bug/1846410 and could use some help finding the root cause in Tempest.","commit_id":"e88d55248ad9aaa9876c906e533e0d456eb54520"},{"author":{"_account_id":17887,"name":"Doug Schveninger","email":"ds6901@att.com","username":"Doug.Schveninger"},"change_message_id":"635cf0771525d256c21f74a720ecd658b05f2dfd","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        if cls.is_neutron_tempest_plugin_available():"},{"line_number":71,"context_line":"            from neutron_tempest_plugin.api import clients"},{"line_number":72,"context_line":"            neutron_tempest_manager \u003d \\"},{"line_number":73,"context_line":"                clients.Manager(copy.deepcopy(manager.credentials))"},{"line_number":74,"context_line":"            cls.ntp_client \u003d neutron_tempest_manager.network_client"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        return manager"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_8a3ca1ea","line":73,"range":{"start_line":73,"start_character":16,"end_line":73,"end_character":31},"in_reply_to":"3fa7e38b_96a73850","updated":"2020-02-11 13:12:11.000000000","message":"the bug should be in the neutron tempest plugin.  The question is should we protect tempest from this and correct this or just correct this in someone else plugin?","commit_id":"e88d55248ad9aaa9876c906e533e0d456eb54520"}]}
