Send context.global_id on neutron calls

In I866b8c6593c76c089da6bed55cf863ac556c9a8e nova sends global_id
on neutron calls, but in I41724a612a5f3eabd504f3eaa9d2f9d141ca3f69
it changed to global_request_id which may be None.

A simple unit test wrinkle is added to avoid future regressions.

Closes-Bug:#1809943

Change-Id: Iaa47304755db66a834dde38dcd55cc259c1008a3
(cherry picked from commit a31157c527)
(cherry picked from commit 6e1120ae30)
This commit is contained in:
ZhangShuaiyi 2018-12-22 16:33:26 +08:00 committed by Matt Riedemann
parent ccecb980a8
commit dcd7a30c95
2 changed files with 4 additions and 1 deletions

View File

@ -163,7 +163,7 @@ def get_client(context, admin=False):
client_args = dict(session=_SESSION,
auth=auth_plugin,
global_request_id=context.global_request_id)
global_request_id=context.global_id)
if CONF.neutron.url:
# TODO(efried): Remove in Rocky

View File

@ -135,6 +135,9 @@ class TestNeutronClient(test.NoDBTestCase):
self.assertEqual(['internal', 'public'], cl.httpclient.interface)
self.assertIsNone(cl.httpclient.region_name)
self.assertIsNone(cl.httpclient.endpoint_override)
self.assertIsNotNone(cl.httpclient.global_request_id)
self.assertEqual(my_context.global_id,
cl.httpclient.global_request_id)
def test_ksa_adapter_loading(self):
"""Test ksa loading path with specified values."""