diff --git a/ironic/common/keystone.py b/ironic/common/keystone.py index 5a4359e985..a01cb4defe 100644 --- a/ironic/common/keystone.py +++ b/ironic/common/keystone.py @@ -128,7 +128,7 @@ def get_service_url(session, service_type='baremetal', """ return session.get_endpoint(service_type=service_type, interface=endpoint_type, - region=CONF.keystone.region_name) + region_name=CONF.keystone.region_name) @ks_exceptions diff --git a/ironic/tests/unit/common/test_keystone.py b/ironic/tests/unit/common/test_keystone.py index 9705e654da..5f38c9f26c 100644 --- a/ironic/tests/unit/common/test_keystone.py +++ b/ironic/tests/unit/common/test_keystone.py @@ -57,7 +57,7 @@ class KeystoneTestCase(base.TestCase): mock_sess.get_endpoint.return_value = fake_url res = keystone.get_service_url(mock_sess) mock_sess.get_endpoint.assert_called_with( - interface='internal', region='fake_region', + interface='internal', region_name='fake_region', service_type='baremetal') self.assertEqual(fake_url, res) diff --git a/releasenotes/notes/fix-keystone-parameters-cdb93576d7e7885b.yaml b/releasenotes/notes/fix-keystone-parameters-cdb93576d7e7885b.yaml new file mode 100644 index 0000000000..c6625db0d9 --- /dev/null +++ b/releasenotes/notes/fix-keystone-parameters-cdb93576d7e7885b.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - Fixes multi-region issue when region specified in config file + was ignored when getting keystone service url.