change swift post to openstackclient cli command

with the release of osc 1.8.0, modifying object store account
properties is now available. use this mechanism and avoid setting
environment variable that are only helpful for swift CLI.

Change-Id: Ie51e3e2bb86162763f23d0a6bed36208811f89fc
This commit is contained in:
Steve Martinelli 2015-10-20 23:15:38 -04:00 committed by Ian Wienand
parent a9e92c225c
commit a91d455e23

View File

@ -813,11 +813,13 @@ function stop_swift {
}
function swift_configure_tempurls {
# note we are using swift credentials!
OS_USERNAME=swift \
OS_PROJECT_NAME=$SERVICE_TENANT_NAME \
OS_PASSWORD=$SERVICE_PASSWORD \
OS_AUTH_URL=$SERVICE_ENDPOINT \
swift post --auth-version 3 -m "Temp-URL-Key: $SWIFT_TEMPURL_KEY"
OS_PASSWORD=$SERVICE_PASSWORD \
OS_PROJECT_NAME=$SERVICE_TENANT_NAME \
OS_AUTH_URL=$SERVICE_ENDPOINT \
openstack object store account \
set --property "Temp-URL-Key=$SWIFT_TEMPURL_KEY"
}
# Restore xtrace