Add tempest config for devstack

Change-Id: If8a390aedaf3c2cfcf491a39daac5a2e636ec529
This commit is contained in:
songwenping 2024-01-22 15:42:01 +08:00
parent 279a260bb2
commit 81ab269436
2 changed files with 18 additions and 4 deletions

View File

@ -272,12 +272,18 @@ function stop_cyborg {
stop_process cyborg-agent
}
function cyborg_configure_tempest {
iniset $TEMPEST_CONFIG service_available cyborg True
if [[ -n "$TEMPEST_ACCELERATOR_MIN_MICROVERSION" ]]; then
iniset $TEMPEST_CONFIG accelerator min_microversion $TEMPEST_ACCELERATOR_MIN_MICROVERSION
fi
if [[ -n "$TEMPEST_ACCELERATOR_MAX_MICROVERSION" ]]; then
iniset $TEMPEST_CONFIG accelerator max_microversion $TEMPEST_ACCELERATOR_MAX_MICROVERSION
fi
}
# Restore xtrace + pipefail
$_XTRACE_CYBORG
$_PIPEFAIL_CYBORG
# Tell emacs to use shell-script-mode
## Local variables:
## mode: shell-script
## End:

View File

@ -35,6 +35,14 @@ case $1 in
echo_summary "Starting Cyborg"
start_cyborg
;;
"test-config")
# stack/test-config - Called at the end of devstack used to configure tempest
# or any other test environments
if is_service_enabled tempest; then
echo_summary "Configuring Tempest for Cyborg needs"
cyborg_configure_tempest
fi
;;
esac
;;
"unstack")