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
diff --git a/lib/swift b/lib/swift
index 3a8e80d..ee0238d 100644
--- a/lib/swift
+++ b/lib/swift
@@ -813,11 +813,13 @@
}
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