Change I24546f02067ea23d088d383b85e3a78d7b43f165 aimed to use
keystone v3 as default in devstack. The change was later reverted in
Ia792b23119c00089542ba08879dca1c29dc80945 because it broke some
projects.
This patch contains a small portion of the first change to set the
environment variables $OS_USER_DOMAIN_ID and $OS_PROJECT_DOMAIN_ID in
openrc, so that users don't have to set them manually when using
keystone v3.
Change-Id: Ie4c316d60590d55830d417f13817298dac70864f
Partially-Implements: bp keystonev3
Closes-Bug: 1387814
... | ... |
@@ -90,6 +90,13 @@ export OS_IDENTITY_API_VERSION=${IDENTITY_API_VERSION:-2.0} |
90 | 90 |
# |
91 | 91 |
export OS_AUTH_URL=$KEYSTONE_AUTH_PROTOCOL://$KEYSTONE_AUTH_HOST:5000/v${OS_IDENTITY_API_VERSION} |
92 | 92 |
|
93 |
+# Currently, in order to use openstackclient with Identity API v3, |
|
94 |
+# we need to set the domain which the user and project belong to. |
|
95 |
+if [ "$OS_IDENTITY_API_VERSION" = "3" ]; then |
|
96 |
+ export OS_USER_DOMAIN_ID=${OS_USER_DOMAIN_ID:-"default"} |
|
97 |
+ export OS_PROJECT_DOMAIN_ID=${OS_PROJECT_DOMAIN_ID:-"default"} |
|
98 |
+fi |
|
99 |
+ |
|
93 | 100 |
# Set OS_CACERT to a default CA certificate chain if it exists. |
94 | 101 |
if [[ ! -v OS_CACERT ]] ; then |
95 | 102 |
DEFAULT_OS_CACERT=$INT_CA_DIR/ca-chain.pem |