Add OSPROFILER_CONNECTION_STRING option to Devstack plugin

It is optional configuration option. If this is set together with
OSPROFILER_HMAC_KEYS rally html report will use osprofiler api to
generate html report for each trace and embed it as iframe to our
native html repor.

Change-Id: I74323f1cd079850290afa62ad18e27643ec03873
This commit is contained in:
Slawek Kaplonski 2018-11-06 11:35:15 +01:00 committed by Andrey Kurilin
parent 138e58b4c2
commit 833bd3d704
1 changed files with 10 additions and 0 deletions

View File

@ -35,6 +35,7 @@ RALLY_ADD_DEPLOYMENT=$(trueorfalse True $RALLY_ADD_DEPLOYMENT)
# Integration with OSprofiler
OSPROFILER_HMAC_KEYS=${OSPROFILER_HMAC_KEYS:-""}
OSPROFILER_CONNECTION_STRING=${OSPROFILER_CONNECTION_STRING:-""}
# Functions
# ---------
@ -46,6 +47,10 @@ OSPROFILER_HMAC_KEYS=${OSPROFILER_HMAC_KEYS:-""}
# ``KEYSTONE_SERVICE_HOST``, ``KEYSTONE_SERVICE_PORT``,
# ``IDENTITY_API_VERSION`` - must be defined
# ``OSPROFILER_HMAC_KEYS`` - optional, for integration with osprofiler
# ``OSPROFILER_CONNECTION_STRING`` - optional, if this is set together with
# OSPROFILER_HMAC_KEYS rally html report will use osprofiler api to
# generate html report for each trace and embed it as iframe to our
# native html repor
#
# _create_deployment_config filename
function _create_deployment_config() {
@ -86,6 +91,11 @@ if [[ ! -z "$OSPROFILER_HMAC_KEYS" ]]; then
"profiler_hmac_key": $OSPROFILER_HMAC_KEYS,
EOF
fi
if [[ ! -z "$OSPROFILER_CONNECTION_STRING" ]]; then
cat >>$1 <<EOF
"profiler_conn_str": "$OSPROFILER_CONNECTION_STRING",
EOF
fi
# And finish file
cat >>$1 <<EOF