Created
November 13, 2015 16:25
-
-
Save sferich888/0ccd884552baaae74278 to your computer and use it in GitHub Desktop.
Keystonerc for multple users. It allows multiple users to have the same keystonerc and prompt them for there password just like you would if you used the UI.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unset OS_SERVICE_TOKEN | |
if [[ -z $1 ]]; then | |
echo -n "Please enter your OpenStack Username: " | |
read OS_USERNAME_INPUT | |
export OS_USERNAME=$OS_USERNAME_INPUT | |
else | |
export OS_USERNAME=$1 | |
fi | |
if [[ -z $2 ]]; then | |
echo -n "Please enter your OpenStack Tenant: " | |
read OS_TENANT_INPUT | |
export OS_TENANT_NAME=$OS_TENANT_INPUT | |
else | |
export OS_TENANT_NAME=$2 | |
fi | |
echo -n "Please enter your OpenStack Password: " | |
read -s OS_PASSWORD_INPUT | |
export OS_PASSWORD=$OS_PASSWORD_INPUT | |
echo | |
export OS_REGION_NAME=RegionOne | |
export OS_AUTH_URL=http://10.10.73.4:5000/v2.0 | |
export PS1='[\u@\h \W(keystone_$OS_USERNAME|$OS_TENANT_NAME)]\$ ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment