File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,6 +115,10 @@ OBJECT_PORT_BASE=${OBJECT_PORT_BASE:-6013}
115115CONTAINER_PORT_BASE=${CONTAINER_PORT_BASE:-6011}
116116ACCOUNT_PORT_BASE=${ACCOUNT_PORT_BASE:-6012}
117117
118+ # Enable tempurl feature
119+ SWIFT_ENABLE_TEMPURLS=${SWIFT_ENABLE_TEMPURLS:-False}
120+ SWIFT_TEMPURL_KEY=${SWIFT_TEMPURL_KEY}
121+
118122# Tell Tempest this project is present
119123TEMPEST_SERVICES+=,swift
120124
@@ -679,6 +683,10 @@ function start_swift {
679683 screen_it s-${type} "cd $SWIFT_DIR && $SWIFT_DIR/bin/swift-${type}-server ${SWIFT_CONF_DIR}/${type}-server/1.conf -v"
680684 done
681685 fi
686+
687+ if [[ "$SWIFT_ENABLE_TEMPURLS" == "True" ]]; then
688+ swift_configure_tempurls
689+ fi
682690}
683691
684692# stop_swift() - Stop running processes (non-screen)
@@ -701,6 +709,13 @@ function stop_swift {
701709 pkill -f swift-
702710}
703711
712+ function swift_configure_tempurls {
713+ OS_USERNAME=swift \
714+ OS_TENANT_NAME=$SERVICE_TENANT_NAME \
715+ OS_PASSWORD=$SERVICE_PASSWORD \
716+ swift post -m "Temp-URL-Key: $SWIFT_TEMPURL_KEY"
717+ }
718+
704719# Restore xtrace
705720$XTRACE
706721
Original file line number Diff line number Diff line change @@ -474,6 +474,10 @@ if is_service_enabled s-proxy; then
474474 # ``SWIFT_HASH`` is a random unique string for a swift cluster that
475475 # can never change.
476476 read_password SWIFT_HASH " ENTER A RANDOM SWIFT HASH."
477+
478+ if [[ -z " $SWIFT_TEMPURL_KEY " ]] && [[ " $SWIFT_ENABLE_TEMPURLS " == " True" ]]; then
479+ read_password SWIFT_TEMPURL_KEY " ENTER A KEY FOR SWIFT TEMPURLS."
480+ fi
477481fi
478482
479483
You can’t perform that action at this time.
0 commit comments