Skip to content

Instantly share code, notes, and snippets.

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 portante/88292c6b75b52d6a8584 to your computer and use it in GitHub Desktop.
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.
#!/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