From 0c985c8627da3db8c9766724e07295c726ac63df Mon Sep 17 00:00:00 2001 From: Mathieu Rohon Date: Thu, 25 Feb 2016 10:00:36 +0000 Subject: [PATCH] Disable nova calls from tempest when heat is enabled This patch ensures that lib/tempest doesn't call nova when heat is enabled and nova is disabled. Change-Id: I2debbae1bb82ecace1058e99ab172272393fb5ea Closes-bug: #1549708 --- lib/tempest | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/tempest b/lib/tempest index caf8f117d1..4cd94cd584 100644 --- a/lib/tempest +++ b/lib/tempest @@ -412,12 +412,15 @@ function configure_tempest { if [[ ! -z "$HEAT_CFN_IMAGE_URL" ]]; then iniset $TEMPEST_CONFIG orchestration image_ref $(basename "${HEAT_CFN_IMAGE_URL%.*}") fi - # build a specialized heat flavor - available_flavors=$(nova flavor-list) - if [[ ! ( $available_flavors =~ 'm1.heat' ) ]]; then - nova flavor-create m1.heat 451 512 0 1 + # Nova might not be enabled, especially when we want to test tempest scenario/API that only create Neutron resources + if is_service_enabled nova; then + # build a specialized heat flavor + available_flavors=$(nova flavor-list) + if [[ ! ( $available_flavors =~ 'm1.heat' ) ]]; then + nova flavor-create m1.heat 451 512 0 1 + fi + iniset $TEMPEST_CONFIG orchestration instance_type "m1.heat" fi - iniset $TEMPEST_CONFIG orchestration instance_type "m1.heat" iniset $TEMPEST_CONFIG orchestration build_timeout 900 iniset $TEMPEST_CONFIG orchestration stack_owner_role "_member_" fi