RHEVM CLI : --password dropped from rhevm-shell ???

Latest response

Hi

Noticed that the --password option has been dropped from rhevm-shell in rhevm-3.1.0-32.

What are our options for non interactive rhevm-shell scripts now ?

 

Thanks 

 

(Support case 776651 raised)

Responses

Chaps.  Can you put some pressure on the documentation team to update the RHEV guides ?   CLI guide in particular.

Thanks

# rhevm-shell --help
Usage: rhevm-shell [options]
rhevm-shell [options] command...

This program is a command-line interface to RHEVM Virtualization.

Options:
-h, --help show this help message and exit
-d, --debug enable debugging
-l URL, --url=URL specifies the API entry point URL (http[s]://server[:port]/api)
-u USERNAME, --username=USERNAME connect as this user
-K KEY_FILE, --key-file=KEY_FILE specify client PEM key-file
-C CERT_FILE, --cert-file=CERT_FILE specify client PEM cert-file
-A CA_FILE, --ca-file=CA_FILE specify server CA cert-file
-I, --insecure allow connecting to SSL sites without certificates
-F, --filter enables user permission based filtering
-P PORT, --port=PORT specify port
-T TIMEOUT, --timeout=TIMEOUT specify timeout
-c, --connect automatically connect
-f FILE, --file=FILE read commands from FILE instead of stdin

As you can see, you can feed a script file to rhevm-shell using the -f switch

I can definitely pass this along. Thanks Rich.

 

Thank you Richard and Dan, the CLI Guide will be updated for 3.2.

Docs work tracked here: https://bugzilla.redhat.com/show_bug.cgi?id=884690

NB - If you run rhevm-shell with the -c switch, i.e.

rhevm-shell -c

then you will be prompted for URL, Username, and Password.

You *can* use your ~.rhevmshellrc file for the password for non-interactive usage.

It just isn't good to store your password there or in your command history

which is why you now get prompted.

% rhevm-shell -c --ca-file=/home/rhev/lib/rhevmhost-ca.crt -l "https://rhevmhost:8443/api" -u "admin@internal" -f /home/rhev/rhevm-shell-commands

 ==========================================
 >>> connected to RHEVM manager 3.0.0.0 <<<
 ==========================================

[RHEVM shell (connected)]# info

backend version: 3
sdk version    : 3.1.0.16
cli version    : 3.1.1.2
python version : 2.6.6.final.0

entry point    : https://rhevmhost:8443/api

[RHEVM shell (connected)]# exit
 

% more /home/rhev/.rhevmshellrc  /home/rhev/rhevm-shell-commands
::::::::::::::
/home/rhev/.rhevmshellrc
::::::::::::::
[ovirt-shell]
username =
url =
insecure = False
no_paging = False
filter = False
timeout = -1
password = PASSWORD

::::::::::::::
/home/rhev/rhevm-shell-commands
::::::::::::::
info
exit
 

 

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.