Created
August 15, 2014 20:57
-
-
Save portante/88292c6b75b52d6a8584 to your computer and use it in GitHub Desktop.
A simple script to setup the "account" (project) and username required by the python-swiftclient functional tests using the defaults in its sample.conf file.
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
#!/bin/bash | |
# usage: <prog> <identity endpoint> [os-token] | |
# e.g. <prog> http://hostname:5000/v3 ADMIN | |
# hostname could be standalone keystone service or devstack keystone service | |
# sets up a project p1 and user u1 with admin role in domain d1 | |
set -x | |
export OS_URL=$1 | |
shift | |
OS_TOKEN=$1 | |
if [ -z $1 ]; then | |
OS_TOKEN="azertytoken" | |
fi | |
echo $OS_TOKEN | |
export OS_TOKEN | |
export OS_IDENTITY_API_VERSION=3 | |
openstack project create --domain default test | |
openstack user create --domain default tester --password testing | |
openstack role create admin | |
openstack role add --user tester --project test admin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment