)]}'
{"openstack/connection.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"6c13cfcd6fa728e3a62f9acc3cffb5383eeec478","unresolved":true,"context_lines":[{"line_number":646,"context_line":""},{"line_number":647,"context_line":"        for key, value in kwargs.items():"},{"line_number":648,"context_line":"            params[\u0027auth\u0027][key] \u003d value"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"        # get_one() merges the base cloud config back in, and"},{"line_number":651,"context_line":"        # _fix_backwards_auth() prefers top-level values (where OS_*"},{"line_number":652,"context_line":"        # environment variables live) over the auth dict. Pass the overridden"},{"line_number":653,"context_line":"        # project and domain settings as top-level values too so they win, and"},{"line_number":654,"context_line":"        # clear the other half of each id/name pair with an empty string so an"},{"line_number":655,"context_line":"        # inherited id or name cannot change the scope."},{"line_number":656,"context_line":"        for name_key, id_key in ("},{"line_number":657,"context_line":"            (\u0027project_name\u0027, \u0027project_id\u0027),"},{"line_number":658,"context_line":"            (\u0027project_domain_name\u0027, \u0027project_domain_id\u0027),"},{"line_number":659,"context_line":"            (\u0027user_domain_name\u0027, \u0027user_domain_id\u0027),"},{"line_number":660,"context_line":"        ):"},{"line_number":661,"context_line":"            if name_key in kwargs or id_key in kwargs:"},{"line_number":662,"context_line":"                params[name_key] \u003d kwargs.get(name_key) or \u0027\u0027"},{"line_number":663,"context_line":"                params[id_key] \u003d kwargs.get(id_key) or \u0027\u0027"},{"line_number":664,"context_line":""},{"line_number":665,"context_line":"        cloud_region \u003d config.get_one(**params)"},{"line_number":666,"context_line":"        # Attach the discovery cache from the old session so we won\u0027t"}],"source_content_type":"text/x-python","patch_set":1,"id":"8ae8bf4b_caa427cb","line":663,"range":{"start_line":649,"start_character":1,"end_line":663,"end_character":57},"updated":"2026-10-12 13:37:28.000000000","message":"There are a few other options in [`_fix_backwards_auth`](https://github.com/openstack/openstacksdk/blob/08d58014e9235fadbb89dc58f322621ee0da3615/openstack/config/loader.py#L976-L988). I see:\n\n- `domain_id` `domain_name`\n- `token`\n- `passcode`\n\nDo we want to handle these also?","commit_id":"188ec8646fe233d02c1a3d9e9a9d3e6475730db0"},{"author":{"_account_id":39512,"name":"Parsa Gheiratian","display_name":"Parsa Gheiratian","email":"p.gheiratian1382@yahoo.com","username":"vexsx","status":"DevOps engineer."},"change_message_id":"d52f5d11a85c3cdd565d63178477b7c68293fa27","unresolved":false,"context_lines":[{"line_number":660,"context_line":"        ):"},{"line_number":661,"context_line":"            if name_key in kwargs or id_key in kwargs:"},{"line_number":662,"context_line":"                params[name_key] \u003d kwargs.get(name_key) or \u0027\u0027"},{"line_number":663,"context_line":"                params[id_key] \u003d kwargs.get(id_key) or \u0027\u0027"},{"line_number":664,"context_line":""},{"line_number":665,"context_line":"        cloud_region \u003d config.get_one(**params)"},{"line_number":666,"context_line":"        # Attach the discovery cache from the old session so we won\u0027t"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ea939c9_9ac117c2","line":663,"in_reply_to":"8ae8bf4b_caa427cb","updated":"2026-10-13 06:24:43.000000000","message":"Good catch, thank you! They had the same problem: OS_DOMAIN_ID and OS_TOKEN won over the values passed to connect_as(). PS2 handles domain_id/domain_name like the other id/name pairs, passes token and passcode through as well, and adds tests for the domain and token cases.","commit_id":"188ec8646fe233d02c1a3d9e9a9d3e6475730db0"}],"openstack/tests/unit/test_connection.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"6c13cfcd6fa728e3a62f9acc3cffb5383eeec478","unresolved":true,"context_lines":[{"line_number":285,"context_line":"        sot \u003d connection.from_config(\"insecure-cloud-alternative-format\")"},{"line_number":286,"context_line":"        self.assertFalse(sot.session.verify)"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"class TestConnectAsEnvironment(base.TestCase):"},{"line_number":290,"context_line":"    \"\"\"connect_as() must not fall back to the project in OS_* variables.\"\"\""},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"    def setUp(self):"},{"line_number":293,"context_line":"        super().setUp()"}],"source_content_type":"text/x-python","patch_set":1,"id":"0310c87d_5da39213","line":290,"range":{"start_line":288,"start_character":1,"end_line":290,"end_character":75},"updated":"2026-10-12 13:37:28.000000000","message":"We tend to use classes to test methods/functions and specialise via the test methods.\n\n```suggestion\n\nclass TestConnectAs(base.TestCase):\n```","commit_id":"188ec8646fe233d02c1a3d9e9a9d3e6475730db0"},{"author":{"_account_id":39512,"name":"Parsa Gheiratian","display_name":"Parsa Gheiratian","email":"p.gheiratian1382@yahoo.com","username":"vexsx","status":"DevOps engineer."},"change_message_id":"d52f5d11a85c3cdd565d63178477b7c68293fa27","unresolved":false,"context_lines":[{"line_number":287,"context_line":""},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"class TestConnectAsEnvironment(base.TestCase):"},{"line_number":290,"context_line":"    \"\"\"connect_as() must not fall back to the project in OS_* variables.\"\"\""},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"    def setUp(self):"},{"line_number":293,"context_line":"        super().setUp()"}],"source_content_type":"text/x-python","patch_set":1,"id":"7c2afd91_92fe0c68","line":290,"in_reply_to":"0310c87d_5da39213","updated":"2026-10-13 06:24:43.000000000","message":"Done, thanks.","commit_id":"188ec8646fe233d02c1a3d9e9a9d3e6475730db0"}]}
