Merge "Set default project domain name to "Default""

This commit is contained in:
Zuul 2022-09-19 15:46:46 +00:00 committed by Gerrit Code Review
commit 73ea6c3622
2 changed files with 4 additions and 1 deletions

View File

@ -487,7 +487,7 @@ def process_main(argv=sys.argv[1:]): # pylint: disable=dangerous-default-value
if args.os_project_domain_name is None:
args.os_project_domain_name \
= os.environ.get('OS_PROJECT_DOMAIN_NAME', None)
= os.environ.get('OS_PROJECT_DOMAIN_NAME', 'Default')
if args.os_username is None:
args.os_username = os.environ.get('OS_USERNAME', None)

View File

@ -144,6 +144,9 @@ class StrategyMixin(object):
"""Test that if any required env variable is missing, it fails"""
shell_args = [self.strategy, 'show', ]
for pop_env in list(self.MOCK_ENV.keys()):
# OS_PROJECT_DOMAIN_NAME was made optional
if pop_env == "OS_PROJECT_DOMAIN_NAME":
continue
# remove the pop_env variable from the environment
self._test_shell_show_incomplete_env(shell_args=shell_args,
pop_env=pop_env)