Commit 7830bee8 authored by David Johnson's avatar David Johnson

Generate *-openrc.sh files for tenant-* and service-* projects/users.

parent f5a72aca
Pipeline #1239 skipped
......@@ -153,6 +153,15 @@ while [ $i -lt 4 ]; do
__openstack role add --project tenant-$i --user tenant-$i-user user
fi
echo "export OS_PROJECT_DOMAIN_ID=default" > $OURDIR/tenant-$i-user-openrc.sh
echo "export OS_USER_DOMAIN_ID=default" >> $OURDIR/tenant-$i-user-openrc.sh
echo "export OS_PROJECT_NAME=tenant-$i" >> $OURDIR/tenant-$i-user-openrc.sh
echo "export OS_TENANT_NAME=tenant-$i" >> $OURDIR/tenant-$i-user-openrc.sh
echo "export OS_USERNAME=tenant-$i-user" >> $OURDIR/tenant-$i-user-openrc.sh
echo "export OS_PASSWORD=${APSWD}" >> $OURDIR/tenant-$i-user-openrc.sh
echo "export OS_AUTH_URL=http://ctl:35357/v3" >> $OURDIR/tenant-$i-user-openrc.sh
echo "export OS_IDENTITY_API_VERSION=3" >> $OURDIR/tenant-$i-user-openrc.sh
# Create the service tenant/user
__openstack project list | grep " service-$i "
if [ ! $? -eq 0 ]; then
......@@ -167,6 +176,15 @@ while [ $i -lt 4 ]; do
__openstack role add --project service-$i --user service-$i-user user
fi
echo "export OS_PROJECT_DOMAIN_ID=default" > $OURDIR/service-$i-user-openrc.sh
echo "export OS_USER_DOMAIN_ID=default" >> $OURDIR/service-$i-user-openrc.sh
echo "export OS_PROJECT_NAME=service-$i" >> $OURDIR/service-$i-user-openrc.sh
echo "export OS_TENANT_NAME=service-$i" >> $OURDIR/service-$i-user-openrc.sh
echo "export OS_USERNAME=service-$i-user" >> $OURDIR/service-$i-user-openrc.sh
echo "export OS_PASSWORD=${APSWD}" >> $OURDIR/service-$i-user-openrc.sh
echo "export OS_AUTH_URL=http://ctl:35357/v3" >> $OURDIR/service-$i-user-openrc.sh
echo "export OS_IDENTITY_API_VERSION=3" >> $OURDIR/service-$i-user-openrc.sh
i=`expr $i + 1`
done
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment