|
...
|
...
|
@@ -37,6 +37,7 @@ HEAT_CONF_DIR=/etc/heat
|
|
37
|
37
|
HEAT_CONF=$HEAT_CONF_DIR/heat.conf
|
|
38
|
38
|
HEAT_ENV_DIR=$HEAT_CONF_DIR/environment.d
|
|
39
|
39
|
HEAT_TEMPLATES_DIR=$HEAT_CONF_DIR/templates
|
|
|
40
|
+HEAT_STACK_DOMAIN=`trueorfalse True $HEAT_STACK_DOMAIN`
|
|
40
|
41
|
|
|
41
|
42
|
# Tell Tempest this project is present
|
|
42
|
43
|
TEMPEST_SERVICES+=,heat
|
|
...
|
...
|
@@ -260,24 +261,26 @@ function create_heat_accounts {
|
|
260
|
260
|
openstack role add $HEAT_OWNER_ROLE --project demo --user admin
|
|
261
|
261
|
openstack role add $HEAT_OWNER_ROLE --project admin --user admin
|
|
262
|
262
|
|
|
263
|
|
- # Note we have to pass token/endpoint here because the current endpoint and
|
|
264
|
|
- # version negotiation in OSC means just --os-identity-api-version=3 won't work
|
|
265
|
|
- KS_ENDPOINT_V3="$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v3"
|
|
266
|
|
- D_ID=$(openstack --os-token $OS_TOKEN --os-url=$KS_ENDPOINT_V3 \
|
|
267
|
|
- --os-identity-api-version=3 domain create heat \
|
|
268
|
|
- --description "Owns users and projects created by heat" \
|
|
269
|
|
- | grep ' id ' | get_field 2)
|
|
270
|
|
- iniset $HEAT_CONF DEFAULT stack_user_domain ${D_ID}
|
|
271
|
|
-
|
|
272
|
|
- openstack --os-token $OS_TOKEN --os-url=$KS_ENDPOINT_V3 \
|
|
273
|
|
- --os-identity-api-version=3 user create --password $SERVICE_PASSWORD \
|
|
274
|
|
- --domain $D_ID heat_domain_admin \
|
|
275
|
|
- --description "Manages users and projects created by heat"
|
|
276
|
|
- openstack --os-token $OS_TOKEN --os-url=$KS_ENDPOINT_V3 \
|
|
277
|
|
- --os-identity-api-version=3 role add \
|
|
278
|
|
- --user heat_domain_admin --domain ${D_ID} admin
|
|
279
|
|
- iniset $HEAT_CONF DEFAULT stack_domain_admin heat_domain_admin
|
|
280
|
|
- iniset $HEAT_CONF DEFAULT stack_domain_admin_password $SERVICE_PASSWORD
|
|
|
263
|
+ if [[ "$HEAT_STACK_DOMAIN" == "True" ]]; then
|
|
|
264
|
+ # Note we have to pass token/endpoint here because the current endpoint and
|
|
|
265
|
+ # version negotiation in OSC means just --os-identity-api-version=3 won't work
|
|
|
266
|
+ KS_ENDPOINT_V3="$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v3"
|
|
|
267
|
+ D_ID=$(openstack --os-token $OS_TOKEN --os-url=$KS_ENDPOINT_V3 \
|
|
|
268
|
+ --os-identity-api-version=3 domain create heat \
|
|
|
269
|
+ --description "Owns users and projects created by heat" \
|
|
|
270
|
+ | grep ' id ' | get_field 2)
|
|
|
271
|
+ iniset $HEAT_CONF DEFAULT stack_user_domain ${D_ID}
|
|
|
272
|
+
|
|
|
273
|
+ openstack --os-token $OS_TOKEN --os-url=$KS_ENDPOINT_V3 \
|
|
|
274
|
+ --os-identity-api-version=3 user create --password $SERVICE_PASSWORD \
|
|
|
275
|
+ --domain $D_ID heat_domain_admin \
|
|
|
276
|
+ --description "Manages users and projects created by heat"
|
|
|
277
|
+ openstack --os-token $OS_TOKEN --os-url=$KS_ENDPOINT_V3 \
|
|
|
278
|
+ --os-identity-api-version=3 role add \
|
|
|
279
|
+ --user heat_domain_admin --domain ${D_ID} admin
|
|
|
280
|
+ iniset $HEAT_CONF DEFAULT stack_domain_admin heat_domain_admin
|
|
|
281
|
+ iniset $HEAT_CONF DEFAULT stack_domain_admin_password $SERVICE_PASSWORD
|
|
|
282
|
+ fi
|
|
281
|
283
|
}
|
|
282
|
284
|
|
|
283
|
285
|
# Restore xtrace
|