)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":38562,"name":"Richard Cruise","email":"rcruise@redhat.com","username":"rcruise"},"change_message_id":"82365953f61c0eb8f4eb11c4753f75f2dea3dcd4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"31cb2dab_016f2bde","updated":"2026-04-16 09:24:15.000000000","message":"LGTM, reviewed with assistance from Claude Sonnet 4.6","commit_id":"c7c942ab2810b40e1747422f178c328b3d055da1"}],"octavia/tests/unit/common/test_clients.py":[{"author":{"_account_id":38360,"name":"Zachary Mark Raines","display_name":"Zachary Raines","email":"zachary.raines@canonical.com","username":"raineszm","status":"Sustaining Engineer @ Canonical"},"change_message_id":"f16926abdb65ec32c2509fb6206c05c09f4b66cb","unresolved":true,"context_lines":[{"line_number":28,"context_line":"    def setUp(self):"},{"line_number":29,"context_line":"        clients.NeutronAuth.neutron_client \u003d None"},{"line_number":30,"context_line":"        super().setUp()"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @mock.patch(\u0027openstack.connection.Connection\u0027)"},{"line_number":33,"context_line":"    @mock.patch(\u0027octavia.common.keystone.KeystoneSession\u0027)"},{"line_number":34,"context_line":"    def test_get_neutron_client(self, mock_ks, mock_conn):"},{"line_number":35,"context_line":"        mock_session \u003d mock.MagicMock()"},{"line_number":36,"context_line":"        mock_ks.return_value.get_session.return_value \u003d mock_session"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        bc1 \u003d clients.NeutronAuth.get_neutron_client()"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        mock_ks.assert_called_once_with(\u0027neutron\u0027)"},{"line_number":41,"context_line":"        mock_conn.assert_called_once_with("},{"line_number":42,"context_line":"            session\u003dmock_session, oslo_conf\u003dCONF)"},{"line_number":43,"context_line":"        self.assertIs(clients.NeutronAuth.neutron_client, bc1)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        # Getting the client again should return the cached object"},{"line_number":46,"context_line":"        bc2 \u003d clients.NeutronAuth.get_neutron_client()"},{"line_number":47,"context_line":"        self.assertIs(bc1, bc2)"},{"line_number":48,"context_line":"        # Connection should not have been called again"},{"line_number":49,"context_line":"        mock_conn.assert_called_once()"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"class TestNovaAuth(base.TestCase):"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"24ce9d91_a3ef7525","line":50,"range":{"start_line":31,"start_character":1,"end_line":50,"end_character":1},"updated":"2026-07-08 14:22:36.000000000","message":"Is this test directly related to the change, or just because the auth was not being covered before?","commit_id":"16c38b034de0824463522f96cce3272b627c70af"},{"author":{"_account_id":290,"name":"Antony Messerli","email":"antony@mes.ser.li","username":"antonym"},"change_message_id":"cb7d71394f1544ae69346e8a53999b6bfbf32d96","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    def setUp(self):"},{"line_number":29,"context_line":"        clients.NeutronAuth.neutron_client \u003d None"},{"line_number":30,"context_line":"        super().setUp()"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @mock.patch(\u0027openstack.connection.Connection\u0027)"},{"line_number":33,"context_line":"    @mock.patch(\u0027octavia.common.keystone.KeystoneSession\u0027)"},{"line_number":34,"context_line":"    def test_get_neutron_client(self, mock_ks, mock_conn):"},{"line_number":35,"context_line":"        mock_session \u003d mock.MagicMock()"},{"line_number":36,"context_line":"        mock_ks.return_value.get_session.return_value \u003d mock_session"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        bc1 \u003d clients.NeutronAuth.get_neutron_client()"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        mock_ks.assert_called_once_with(\u0027neutron\u0027)"},{"line_number":41,"context_line":"        mock_conn.assert_called_once_with("},{"line_number":42,"context_line":"            session\u003dmock_session, oslo_conf\u003dCONF)"},{"line_number":43,"context_line":"        self.assertIs(clients.NeutronAuth.neutron_client, bc1)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        # Getting the client again should return the cached object"},{"line_number":46,"context_line":"        bc2 \u003d clients.NeutronAuth.get_neutron_client()"},{"line_number":47,"context_line":"        self.assertIs(bc1, bc2)"},{"line_number":48,"context_line":"        # Connection should not have been called again"},{"line_number":49,"context_line":"        mock_conn.assert_called_once()"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"class TestNovaAuth(base.TestCase):"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fe757ced_5ee15806","line":50,"range":{"start_line":31,"start_character":1,"end_line":50,"end_character":1},"in_reply_to":"24ce9d91_a3ef7525","updated":"2026-07-08 15:40:54.000000000","message":"It\u0027s directly related to the change — just doubling as coverage that was missing.\n\nget_neutron_client() didn\u0027t have any unit tests before, so nothing was asserting how Connection() got called. This test pins down the fixed behavior (passing session\u003dsess, oslo_conf\u003dCONF instead of the old hand-built kwargs), which is really the heart of this patch. If someone accidentally reverted to the old approach that silently ignored valid_interfaces/endpoint_override, this test would catch it. The caching asserts are just a nice bonus while we\u0027re here.\n\nOne fair caveat: since Connection is mocked, the test verifies the call contract rather than proving openstacksdk actually honors endpoint_override/valid_interfaces end-to-end. That felt like the right scope for a unit test, but happy to expand it if you\u0027d prefer something more thorough. Thanks for the review!","commit_id":"16c38b034de0824463522f96cce3272b627c70af"}]}
