Skip to content

Commit 9f69b43

Browse files
committed
Improve the hint message
Currently, we can get scoped token (domain scoped, project scoped) as well as unscoped token. When we use OSC to get a domain scoped token without explicitly set domain information, the hint message show us we need to set a scoped domain or project, but it miss that the parameters to be set in order to get project or domain scoped token is not the same. Thus, the hint message could be improved to make it more clear to end user. Change-Id: I94768c619b30be18737fec189ae6d81e81ba090d
1 parent aac0d58 commit 9f69b43

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎openstackclient/api/auth.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,10 @@ def check_valid_auth_options(options, auth_plugin_name):
152152
options.auth.get('project_name', None) and not
153153
options.auth.get('tenant_id', None) and not
154154
options.auth.get('tenant_name', None)):
155-
msg += _('Set a scope, such as a project or domain, with '
156-
'--os-project-name, OS_PROJECT_NAME or auth.project_name')
155+
msg += _('Set a scope, such as a project or domain, set a '
156+
'project scope with --os-project-name, OS_PROJECT_NAME '
157+
'or auth.project_name, set a domain scope with '
158+
'--os-domain-name, OS_DOMAIN_NAME or auth.domain_name')
157159
elif auth_plugin_name.endswith('token'):
158160
if not options.auth.get('token', None):
159161
msg += _('Set a token with --os-token, OS_TOKEN or auth.token\n')

0 commit comments

Comments
 (0)