Only create swift account if swift enabled
Only call the swift account creation function if swift is enabled,
otherwise the endpoints are created in keystone even though swift
isn't running.
This causes failures when tempest queries keystone and thinks swift is
there; it starts running tests against it that fail with unhelpful
"connection refused" errors.
Change-Id: Icf08409c9443ec703e5f1da4531aa34c326f3642
diff --git a/stack.sh b/stack.sh
index f2054d9..0a5e1ee 100755
--- a/stack.sh
+++ b/stack.sh
@@ -878,10 +878,13 @@
export OS_SERVICE_ENDPOINT=$SERVICE_ENDPOINT
create_keystone_accounts
create_nova_accounts
- create_swift_accounts
create_cinder_accounts
create_neutron_accounts
+ if is_service_enabled swift || is_service_enabled s-proxy; then
+ create_swift_accounts
+ fi
+
# ``keystone_data.sh`` creates services, admin and demo users, and roles.
ADMIN_PASSWORD=$ADMIN_PASSWORD SERVICE_TENANT_NAME=$SERVICE_TENANT_NAME SERVICE_PASSWORD=$SERVICE_PASSWORD \
SERVICE_TOKEN=$SERVICE_TOKEN SERVICE_ENDPOINT=$SERVICE_ENDPOINT SERVICE_HOST=$SERVICE_HOST \