Red Hat Bugzilla – Bug 1252085
[RFE] Validation of username in ovirt-shell
Last modified: 2015-08-17 11:20:22 EDT
Description of problem:
Usually users first meet webadmin/userportal and then ovirt shell. Thus they can be used to think of username as of string like 'admin' (this form is show in upper right corner of webadmin and used to logging in to webadmin) rather than 'admin@internal'
I would be nice if ovirt shell can validate user name 'admin' and suggest that maybe '@domain' suffix was not entered.
Alternatively all references to "username" can be replaced by "username@domain".
Current state 'username' in context of web UIs is 'admin' and 'username' in context of ovirt-shell is 'admin@internal' may seem a bit misleading.
There might be multiple domains, and the ovirt-shell isn't aware of that.
The only thing I'd consider doing is that in case the login fails, and the username indeed doesn't have "@" in it, to add to the failed login message also the note that you might have forgotten that (added by the ovirt-shell)
However, not sure localization is supported in the ovirt-shell.
I'll give the stage to Juan to share his thoughts.
The structure of the user names is completely outside the control of the CLI, thus the CLI can't make any assumption or validation of them.
The CLI doesn't support localization, and it doesn't support explicit messages when authentication fails either, it just displays the error message returned by the server, for example:
# ovirt-shell -I -l https://.../ovirt-engine/api -u wronguser
======= ERROR ======
 - Unauthorized
The only thing that the CLI can do is include some documentation, and we already do so:
[oVirt shell (disconnected)]# help connect
* url - ...
* [user] - The user to connect as. (user@domain).