Set PROJECT_DOMAIN_NAME in generated v3 openrc
Change-Id: I97435d2137b5bd74cd9f8ebfb927e4e28a0dc00a Closes-bug: 1715525
This commit is contained in:
parent
b624d2f0aa
commit
2d2a562194
@ -19,6 +19,8 @@ export OS_PROJECT_ID={{ tenant_id }}
|
|||||||
export OS_PROJECT_NAME="{{ tenant_name|shellfilter }}"
|
export OS_PROJECT_NAME="{{ tenant_name|shellfilter }}"
|
||||||
export OS_USER_DOMAIN_NAME="{{ user_domain_name|shellfilter }}"
|
export OS_USER_DOMAIN_NAME="{{ user_domain_name|shellfilter }}"
|
||||||
if [ -z "$OS_USER_DOMAIN_NAME" ]; then unset OS_USER_DOMAIN_NAME; fi
|
if [ -z "$OS_USER_DOMAIN_NAME" ]; then unset OS_USER_DOMAIN_NAME; fi
|
||||||
|
export OS_PROJECT_DOMAIN_ID="{{ project_domain_id|shellfilter }}"
|
||||||
|
if [ -z "$OS_PROJECT_DOMAIN_ID" ]; then unset OS_PROJECT_DOMAIN_ID; fi
|
||||||
|
|
||||||
# unset v2.0 items in case set
|
# unset v2.0 items in case set
|
||||||
unset OS_TENANT_ID
|
unset OS_TENANT_ID
|
||||||
|
@ -136,6 +136,11 @@ def download_rc_file(request):
|
|||||||
|
|
||||||
# make v3 specific changes
|
# make v3 specific changes
|
||||||
context['user_domain_name'] = request.user.user_domain_name
|
context['user_domain_name'] = request.user.user_domain_name
|
||||||
|
try:
|
||||||
|
project_domain_id = request.user.token.project['domain_id']
|
||||||
|
except KeyError:
|
||||||
|
project_domain_id = ''
|
||||||
|
context['project_domain_id'] = project_domain_id
|
||||||
# sanity fix for removing v2.0 from the url if present
|
# sanity fix for removing v2.0 from the url if present
|
||||||
context['auth_url'], _ = utils.fix_auth_url_version_prefix(
|
context['auth_url'], _ = utils.fix_auth_url_version_prefix(
|
||||||
context['auth_url'])
|
context['auth_url'])
|
||||||
|
Loading…
Reference in New Issue
Block a user