diff --git a/hooks/keystone_utils.py b/hooks/keystone_utils.py index e3530534..359a4d54 100644 --- a/hooks/keystone_utils.py +++ b/hooks/keystone_utils.py @@ -2068,6 +2068,8 @@ def add_credentials_to_keystone(relation_id=None, remote_unit=None): "api_version": get_api_version(), "region": config('region') } + if domain: + relation_data['domain'] = domain # Get and pass CA bundle settings relation_data.update(get_ssl_ca_settings()) diff --git a/unit_tests/test_keystone_utils.py b/unit_tests/test_keystone_utils.py index 29f9e6b9..01f4238e 100644 --- a/unit_tests/test_keystone_utils.py +++ b/unit_tests/test_keystone_utils.py @@ -1134,6 +1134,7 @@ class TestKeystoneUtils(CharmTestCase): 'credentials_project': 'services', 'credentials_project_id': 'abcdef0123456789', 'region': 'RegionOne', + 'domain': 'Non-Default', 'api_version': 3} utils.add_credentials_to_keystone(