deb-python-senlinclient/tools/senlinrc
zzxwill c67fe18766 Correct some typos
During my review of the project, I corrected these typos
to make it more clear. If we will generate docs based on
the code, this will help.

Change-Id: Iee3d9210431e0489c4872637fe04409fe0addc0e
2016-04-12 01:22:58 +00:00

42 lines
1.0 KiB
Bash

#!/usr/bin/env bash
# IMPORTANT: Cleanse existing environment variable first
unset OS_USERNAME
unset OS_PASSWORD
unset OS_REGION_NAME
unset OS_PROJECT_NAME
unset OS_DOMAIN_NAME
unset OS_PROJECT_DOMAIN_NAME
unset OS_USER_DOMAIN_NAME
unset OS_TENANT_NAME
unset OS_AUTH_URL
VERSION=${OS_IDENTITY_API_VERSION:-3}
if [[ -n "$1" ]]; then
OS_USERNAME=$1
fi
if [[ -n "$2" ]]; then
OS_PROJECT_NAME=$2
fi
OS_PROJECT_NAME=${OS_PROJECT_NAME:-demo}
export OS_USERNAME=${OS_USERNAME:-demo}
export OS_PASSWORD=openstack
export OS_REGION_NAME=RegionOne
HOST_IP=${HOST_IP:-127.0.0.1}
SERVICE_HOST=${SERVICE_HOST:-$HOST_IP}
SERVICE_PROTOCOL=${SERVICE_PROTOCOL:-http}
PROTOCOL=${PROTOCOL:-$SERVICE_PROTOCOL}
HOST=${HOST:-$SERVICE_HOST}
export OS_AUTH_URL=$PROTOCOL://$HOST:5000/v${VERSION}
if [[ $VERSION == 3 ]]; then
export OS_PROJECT_NAME=${OS_PROJECT_NAME}
export OS_PROJECT_DOMAIN_NAME=${OS_PROJECT_DOMAIN_NAME:-Default}
export OS_USER_DOMAIN_NAME=${OS_USER_DOMAIN_NAME:-Default}
else
export OS_TENANT_NAME=${OS_PROJECT_NAME}
fi