diff options
author | vsaienko <vsaienko@mirantis.com> | 2016-03-15 18:07:43 +0200 |
---|---|---|
committer | Jim Rollenhagen <jim@jimrollenhagen.com> | 2016-05-10 12:17:52 -0400 |
commit | 427c0b5f46a3d2387194904923e9452566aa850d (patch) | |
tree | 7814afc9871283150bc815020f1af18405a8ddc5 | |
parent | 5c2d0ea7955f1c604bf4df46c05d98179646f9ed (diff) | |
download | ironic-427c0b5f46a3d2387194904923e9452566aa850d.tar.gz |
Update tempest compute flavor_ref/flavor_ref_alt
After Ironic is moved to devstack plugin the tempest is always
executed before ironic devstack plugin. Unfortunatly there is no quick
way to change order.
This change introduce new function ironic_configure_tempest that is
called from Ironic's devstack plugin. It updated flavor_ref and
flavor_ref_alt compute tempest options.
Change-Id: I85a77dd2193bac0ea4bd4fc1985c82d9f598b06b
(cherry picked from commit ba15202d99b2c26ba3eaf319f1e3d20edb697483)
-rw-r--r-- | devstack/lib/ironic | 8 | ||||
-rw-r--r-- | devstack/plugin.sh | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/devstack/lib/ironic b/devstack/lib/ironic index eb4fb1414..894893f18 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -1008,6 +1008,14 @@ function cleanup_baremetal_basic_ops { sudo rmmod nf_nat_tftp || true } +function ironic_configure_tempest { + local bm_flavor_id + bm_flavor_id=$(openstack flavor show baremetal -f value -c id) + die_if_not_set $LINENO bm_flavor_id "Failed to get id of baremetal flavor" + iniset $TEMPEST_CONFIG compute flavor_ref $bm_flavor_id + iniset $TEMPEST_CONFIG compute flavor_ref_alt $bm_flavor_id +} + # Restore xtrace + pipefail $_XTRACE_IRONIC $_PIPEFAIL_IRONIC diff --git a/devstack/plugin.sh b/devstack/plugin.sh index de584e6d9..06f83c8a4 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -26,6 +26,9 @@ if is_service_enabled ir-api ir-cond; then echo_summary "Starting Ironic" start_ironic prepare_baremetal_basic_ops + if is_service_enabled tempest; then + ironic_configure_tempest + fi fi if [[ "$1" == "unstack" ]]; then |