Fix keystone authentication
Changes project_domain_id and user_domain_id to *_name in manila.conf Add defensive mechanism to fallback to `_id` if `_name` is not set Closes-Bug: #1911424 Change-Id: I6240b7b7e4590a21f034b9c70247e87ec18d867d
This commit is contained in:
parent
85fc22d2e6
commit
4d80c34b81
|
@ -93,9 +93,9 @@ def authentication_data(manila_plugin):
|
|||
{
|
||||
'username': <value>
|
||||
'password': <value>
|
||||
'project_domain_id': <value>
|
||||
'project_domain_name': <value>
|
||||
'project_name': <value>
|
||||
'user_domain_id': <value>
|
||||
'user_domain_name': <value>
|
||||
'auth_uri': <value>
|
||||
'auth_url': <value>
|
||||
'auth_type': <value> # 'password', typically
|
||||
|
|
|
@ -22,37 +22,13 @@ service_instance_user = {{ options.driver_service_instance_user }}
|
|||
# Only needed for the generic drivers as of Mitaka
|
||||
|
||||
[nova]
|
||||
username = {{ manila_plugin.authentication_data.username }}
|
||||
password = {{ manila_plugin.authentication_data.password }}
|
||||
project_domain_id = {{ manila_plugin.authentication_data.project_domain_id }}
|
||||
project_name = {{ manila_plugin.authentication_data.project_name }}
|
||||
user_domain_id = {{ manila_plugin.authentication_data.user_domain_id }}
|
||||
auth_uri = {{ manila_plugin.authentication_data.auth_uri }}
|
||||
auth_url = {{ manila_plugin.authentication_data.auth_url }}
|
||||
auth_type = {{ manila_plugin.authentication_data.auth_type }}
|
||||
|
||||
{% include "parts/authentication_data" %}
|
||||
|
||||
[neutron]
|
||||
username = {{ manila_plugin.authentication_data.username }}
|
||||
password = {{ manila_plugin.authentication_data.password }}
|
||||
project_domain_id = {{ manila_plugin.authentication_data.project_domain_id }}
|
||||
project_name = {{ manila_plugin.authentication_data.project_name }}
|
||||
user_domain_id = {{ manila_plugin.authentication_data.user_domain_id }}
|
||||
auth_uri = {{ manila_plugin.authentication_data.auth_uri }}
|
||||
auth_url = {{ manila_plugin.authentication_data.auth_url }}
|
||||
auth_type = {{ manila_plugin.authentication_data.auth_type }}
|
||||
|
||||
{% include "parts/authentication_data" %}
|
||||
|
||||
[cinder]
|
||||
username = {{ manila_plugin.authentication_data.username }}
|
||||
password = {{ manila_plugin.authentication_data.password }}
|
||||
project_domain_id = {{ manila_plugin.authentication_data.project_domain_id }}
|
||||
project_name = {{ manila_plugin.authentication_data.project_name }}
|
||||
user_domain_id = {{ manila_plugin.authentication_data.user_domain_id }}
|
||||
auth_uri = {{ manila_plugin.authentication_data.auth_uri }}
|
||||
auth_url = {{ manila_plugin.authentication_data.auth_url }}
|
||||
auth_type = {{ manila_plugin.authentication_data.auth_type }}
|
||||
|
||||
{% include "parts/authentication_data" %}
|
||||
|
||||
[{{ options.share_backend_name}}]
|
||||
# Set usage of Generic driver which uses cinder as backend.
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
username = {{ manila_plugin.authentication_data.username }}
|
||||
password = {{ manila_plugin.authentication_data.password }}
|
||||
{{ # Defense mechanism introduced in the charm release 21.10 because of a
|
||||
relation data key renaming, and would be safe to remove 2 releases later.
|
||||
#}}
|
||||
project_domain_name = {{ manila_plugin.authentication_data.project_domain_name or manila_plugin.authentication_data.project_domain_id }}
|
||||
user_domain_name = {{ manila_plugin.authentication_data.user_domain_name or manila_plugin.authentication_data.user_domain_id }}
|
||||
project_name = {{ manila_plugin.authentication_data.project_name }}
|
||||
auth_uri = {{ manila_plugin.authentication_data.auth_uri }}
|
||||
auth_url = {{ manila_plugin.authentication_data.auth_url }}
|
||||
auth_type = {{ manila_plugin.authentication_data.auth_type }}
|
|
@ -181,9 +181,9 @@ class TestManilaGenericCharm(Helper):
|
|||
auth_data = {
|
||||
'username': 'user',
|
||||
'password': 'pass',
|
||||
'project_domain_id': 'pd1',
|
||||
'project_domain_name': 'pd1',
|
||||
'project_name': 'p1',
|
||||
'user_domain_id': 'ud1',
|
||||
'user_domain_name': 'ud1',
|
||||
'auth_uri': 'uri1',
|
||||
'auth_url': 'url1',
|
||||
'auth_type': 'type1',
|
||||
|
|
Loading…
Reference in New Issue