Add domain info to relation data

When using Keystone v3, the relation data set by
add_credentials_to_keystone now includes a 'domain'.

Change-Id: I2a4ff4d7c20d4f274479dfe0615dd00940e64d8b
Closes-Bug: 1719751
This commit is contained in:
Xav Paice 2017-09-27 12:28:33 +13:00
parent e07d2b1eb7
commit cc54352d7a
2 changed files with 3 additions and 0 deletions

View File

@ -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())

View File

@ -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(