Skip to content

Instantly share code, notes, and snippets.

@chmouel
Created March 8, 2013 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chmouel/5120245 to your computer and use it in GitHub Desktop.
Save chmouel/5120245 to your computer and use it in GitHub Desktop.
#!/bin/bash
ADMIN_ID=$(keystone user-list|sed -n '/ admin / { s/^..//;s/ .*//; p}')
RESELLER_ID=$(keystone role-list|sed -n '/ ResellerAdmin / { s/^..//;s/ .*//; p}')
TENANT_ID=$(keystone tenant-list|sed -n '/ admin / { s/^..//;s/ .*//; p}')
keystone user-role-add --user-id ${ADMIN_ID} --role-id ${RESELLER_ID} --tenant-id ${TENANT_ID}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment