Created
July 20, 2016 22:28
-
-
Save chianingwang/5ffdbc0cb49b80de73238681a3ac77a1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
keystone tenant-list|grep -v -- "-----"|egrep -v "id.*\|.*name"|awk '{ print $2 }'|while read TENANT; do | |
echo $TENANT | |
keystone user-list --tenant $TENANT|grep -v -- "-----"|egrep -v "id.*\|.*name"|awk '{ print $2 }'|while read USER;do | |
echo " @ $USER" | |
keystone user-role-list --user $USER --tenant_id $TENANT|grep -v -- "-----"|egrep -v "id.*\|.*name"|awk '{ print $2 }'|while read ROLE; do | |
echo " > $ROLE" | |
done | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment