Merge "Add swift tempurl support to devstack"

This commit is contained in:
Jenkins 2014-08-15 04:51:28 +00:00 committed by Gerrit Code Review
commit c85e428f95
2 changed files with 19 additions and 0 deletions

View File

@ -115,6 +115,10 @@ OBJECT_PORT_BASE=${OBJECT_PORT_BASE:-6013}
CONTAINER_PORT_BASE=${CONTAINER_PORT_BASE:-6011}
ACCOUNT_PORT_BASE=${ACCOUNT_PORT_BASE:-6012}
# Enable tempurl feature
SWIFT_ENABLE_TEMPURLS=${SWIFT_ENABLE_TEMPURLS:-False}
SWIFT_TEMPURL_KEY=${SWIFT_TEMPURL_KEY}
# Tell Tempest this project is present
TEMPEST_SERVICES+=,swift
@ -679,6 +683,10 @@ function start_swift {
screen_it s-${type} "cd $SWIFT_DIR && $SWIFT_DIR/bin/swift-${type}-server ${SWIFT_CONF_DIR}/${type}-server/1.conf -v"
done
fi
if [[ "$SWIFT_ENABLE_TEMPURLS" == "True" ]]; then
swift_configure_tempurls
fi
}
# stop_swift() - Stop running processes (non-screen)
@ -701,6 +709,13 @@ function stop_swift {
pkill -f swift-
}
function swift_configure_tempurls {
OS_USERNAME=swift \
OS_TENANT_NAME=$SERVICE_TENANT_NAME \
OS_PASSWORD=$SERVICE_PASSWORD \
swift post -m "Temp-URL-Key: $SWIFT_TEMPURL_KEY"
}
# Restore xtrace
$XTRACE

View File

@ -474,6 +474,10 @@ if is_service_enabled s-proxy; then
# ``SWIFT_HASH`` is a random unique string for a swift cluster that
# can never change.
read_password SWIFT_HASH "ENTER A RANDOM SWIFT HASH."
if [[ -z "$SWIFT_TEMPURL_KEY" ]] && [[ "$SWIFT_ENABLE_TEMPURLS" == "True" ]]; then
read_password SWIFT_TEMPURL_KEY "ENTER A KEY FOR SWIFT TEMPURLS."
fi
fi