diff options
| author | Dave Chen <wei.d.chen@intel.com> | 2015-06-14 21:15:58 +0800 |
|---|---|---|
| committer | Dave Chen <dave.jungler@gmail.com> | 2015-06-14 13:31:02 +0000 |
| commit | 9f69b43f5aa7b001b3f2681209564d1152309bb2 (patch) | |
| tree | ccb0ef610f22363e3fb2493a33517bc09d1a50e6 /openstackclient/api | |
| parent | aac0d588bd83b51cd2f4b36b22741497fb39d79f (diff) | |
| download | python-openstackclient-9f69b43f5aa7b001b3f2681209564d1152309bb2.tar.gz | |
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
Diffstat (limited to 'openstackclient/api')
| -rw-r--r-- | openstackclient/api/auth.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/openstackclient/api/auth.py b/openstackclient/api/auth.py index 1d50f92c..820b4ecf 100644 --- a/openstackclient/api/auth.py +++ b/openstackclient/api/auth.py @@ -152,8 +152,10 @@ def check_valid_auth_options(options, auth_plugin_name): options.auth.get('project_name', None) and not options.auth.get('tenant_id', None) and not options.auth.get('tenant_name', None)): - msg += _('Set a scope, such as a project or domain, with ' - '--os-project-name, OS_PROJECT_NAME or auth.project_name') + msg += _('Set a scope, such as a project or domain, set a ' + 'project scope with --os-project-name, OS_PROJECT_NAME ' + 'or auth.project_name, set a domain scope with ' + '--os-domain-name, OS_DOMAIN_NAME or auth.domain_name') elif auth_plugin_name.endswith('token'): if not options.auth.get('token', None): msg += _('Set a token with --os-token, OS_TOKEN or auth.token\n') |
