-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathopenrcv3_domain
29 lines (27 loc) · 983 Bytes
/
openrcv3_domain
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
_OS_PARAMS=$(env | awk 'BEGIN {FS="="} /^OS_/ {print $1;}' | paste -sd ' ')
for param in $_OS_PARAMS; do
unset $param
done
unset _OS_PARAMS
_keystone_vip=$(juju config $_juju_model_arg keystone vip)
if [ -n "$_keystone_vip" ]; then
_keystone_ip=$(echo $_keystone_vip | awk '{print $1}')
else
_keystone_ip=$(juju run $_juju_model_arg --unit keystone/leader -- 'network-get --bind-address public')
fi
_password=$(juju run $_juju_model_arg --unit keystone/leader 'leader-get admin_passwd')
if [ ! -z "$_root_ca" -a -s "$_root_ca" ]; then
export OS_AUTH_PROTOCOL=https
export OS_CACERT=${_root_ca}
fi
export OS_AUTH_URL=${OS_AUTH_PROTOCOL:-http}://${_keystone_ip}:5000/v3
export OS_USERNAME=admin
export OS_PASSWORD=${_password}
export OS_REGION_NAME=RegionOne
export OS_DOMAIN_NAME=admin_domain
export OS_USER_DOMAIN_NAME=admin_domain
export OS_IDENTITY_API_VERSION=3
# Swift needs this:
export OS_AUTH_VERSION=3
# Gnocchi needs this:
export OS_AUTH_TYPE=password