Created
June 23, 2014 20:27
-
-
Save uksysadmin/44a31ba70af075d52065 to your computer and use it in GitHub Desktop.
Awful bash-fu keystone user/tenant list
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
function ksuserlist() { | |
if [ -z "$1" ] | |
then | |
P="\ " | |
else | |
P=$1 | |
fi | |
keystone user-list | awk '/(True|False)/ { print $4 }' | while read U; do user=$(echo $U); keystone user-get $U | echo $user $(awk '/tenantId/ { print $4 }') | egrep "$P"; done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment