From 4237f590b7b93117e59f9f777bc70d212969f61a Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Wed, 29 Jan 2014 16:22:11 -0600 Subject: [PATCH] Generate Tempest service list rather than hard-code it The list of services that Tempest used to set its 'service_available' config values was hard-coded. To be plugin-friendly have each service (project) add its name to the TEMPEST_SERVICES variable and use that for setting the 'service_avilable' values. Change-Id: I208efd7fd0798b18ac2e6353ee70b773e84a2683 --- lib/ceilometer | 5 ++++- lib/cinder | 3 +++ lib/glance | 3 +++ lib/heat | 4 ++++ lib/horizon | 3 +++ lib/ironic | 3 +++ lib/marconi | 4 ++++ lib/neutron | 4 ++++ lib/nova | 3 +++ lib/savanna | 4 ++++ lib/swift | 3 +++ lib/tempest | 2 +- lib/trove | 4 ++++ stackrc | 6 ++++++ 14 files changed, 49 insertions(+), 2 deletions(-) diff --git a/lib/ceilometer b/lib/ceilometer index 6f3896f2d4..30bf3aed50 100644 --- a/lib/ceilometer +++ b/lib/ceilometer @@ -52,7 +52,10 @@ CEILOMETER_BACKEND=${CEILOMETER_BACKEND:-mysql} CEILOMETER_SERVICE_PROTOCOL=http CEILOMETER_SERVICE_HOST=$SERVICE_HOST CEILOMETER_SERVICE_PORT=${CEILOMETER_SERVICE_PORT:-8777} -# + +# Tell Tempest this project is present +TEMPEST_SERVICES+=,ceilometer + # Functions # --------- diff --git a/lib/cinder b/lib/cinder index d76a41d4b8..9f70b2a0c9 100644 --- a/lib/cinder +++ b/lib/cinder @@ -79,6 +79,9 @@ VOLUME_BACKING_DEVICE2=${VOLUME_BACKING_DEVICE2:-} VOLUME_NAME_PREFIX=${VOLUME_NAME_PREFIX:-volume-} +# Tell Tempest this project is present +TEMPEST_SERVICES+=,cinder + # Functions # --------- diff --git a/lib/glance b/lib/glance index 55d5fb37ec..2d41ea4653 100644 --- a/lib/glance +++ b/lib/glance @@ -52,6 +52,9 @@ fi # Glance connection info. Note the port must be specified. GLANCE_HOSTPORT=${GLANCE_HOSTPORT:-$SERVICE_HOST:9292} +# Tell Tempest this project is present +TEMPEST_SERVICES+=,glance + # Functions # --------- diff --git a/lib/heat b/lib/heat index b9b8aa66ca..467619f3c6 100644 --- a/lib/heat +++ b/lib/heat @@ -38,6 +38,10 @@ HEAT_CONF=$HEAT_CONF_DIR/heat.conf HEAT_ENV_DIR=$HEAT_CONF_DIR/environment.d HEAT_TEMPLATES_DIR=$HEAT_CONF_DIR/templates +# Tell Tempest this project is present +TEMPEST_SERVICES+=,heat + + # Functions # --------- diff --git a/lib/horizon b/lib/horizon index 5bff712743..c64d8502ba 100644 --- a/lib/horizon +++ b/lib/horizon @@ -31,6 +31,9 @@ HORIZON_DIR=$DEST/horizon # The example file in Horizon repo is used by default. HORIZON_SETTINGS=${HORIZON_SETTINGS:-$HORIZON_DIR/openstack_dashboard/local/local_settings.py.example} +# Tell Tempest this project is present +TEMPEST_SERVICES+=,horizon + # Functions # --------- diff --git a/lib/ironic b/lib/ironic index afbc3e09e4..b8838f59fb 100644 --- a/lib/ironic +++ b/lib/ironic @@ -42,6 +42,9 @@ IRONIC_BIN_DIR=$(get_python_exec_prefix) IRONIC_SERVICE_PROTOCOL=http IRONIC_HOSTPORT=${IRONIC_HOSTPORT:-$SERVICE_HOST:6385} +# Tell Tempest this project is present +TEMPEST_SERVICES+=,ironic + # Functions # --------- diff --git a/lib/marconi b/lib/marconi index 6b9ffdc0b3..1eaebbdf16 100644 --- a/lib/marconi +++ b/lib/marconi @@ -51,6 +51,10 @@ MARCONI_BRANCH=${MARCONI_BRANCH:-master} MARCONICLIENT_REPO=${MARCONICLIENT_REPO:-${GIT_BASE}/openstack/python-marconiclient.git} MARCONICLIENT_BRANCH=${MARCONICLIENT_BRANCH:-master} +# Tell Tempest this project is present +TEMPEST_SERVICES+=,marconi + + # Functions # --------- diff --git a/lib/neutron b/lib/neutron index 960f11b154..68dfd4a6a3 100644 --- a/lib/neutron +++ b/lib/neutron @@ -237,6 +237,10 @@ else Q_USE_SECGROUP=False fi +# Tell Tempest this project is present +TEMPEST_SERVICES+=,neutron + + # Functions # --------- diff --git a/lib/nova b/lib/nova index dbaa3f53d9..9db19ed532 100644 --- a/lib/nova +++ b/lib/nova @@ -122,6 +122,9 @@ MULTI_HOST=`trueorfalse False $MULTI_HOST` TEST_FLOATING_POOL=${TEST_FLOATING_POOL:-test} TEST_FLOATING_RANGE=${TEST_FLOATING_RANGE:-192.168.253.0/29} +# Tell Tempest this project is present +TEMPEST_SERVICES+=,nova + # Functions # --------- diff --git a/lib/savanna b/lib/savanna index c7d59f79c4..176f290c35 100644 --- a/lib/savanna +++ b/lib/savanna @@ -40,6 +40,10 @@ else SAVANNA_BIN_DIR=$(get_python_exec_prefix) fi +# Tell Tempest this project is present +TEMPEST_SERVICES+=,savanna + + # Functions # --------- diff --git a/lib/swift b/lib/swift index 37b630c3fa..afdf995d2e 100644 --- a/lib/swift +++ b/lib/swift @@ -111,6 +111,9 @@ OBJECT_PORT_BASE=${OBJECT_PORT_BASE:-6013} CONTAINER_PORT_BASE=${CONTAINER_PORT_BASE:-6011} ACCOUNT_PORT_BASE=${ACCOUNT_PORT_BASE:-6012} +# Tell Tempest this project is present +TEMPEST_SERVICES+=,swift + # Functions # --------- diff --git a/lib/tempest b/lib/tempest index ef9dfe218b..ee996657c2 100644 --- a/lib/tempest +++ b/lib/tempest @@ -329,7 +329,7 @@ function configure_tempest() { iniset $TEMPEST_CONF network-feature-enabled api_extensions "${NETWORK_API_EXTENSIONS:-all}" # service_available - for service in nova cinder glance neutron swift heat horizon ceilometer ironic savanna trove marconi; do + for service in ${TEMPEST_SERVICES//,/ }; do if is_service_enabled $service ; then iniset $TEMPEST_CONF service_available $service "True" else diff --git a/lib/trove b/lib/trove index 9c91024211..1fd011a530 100644 --- a/lib/trove +++ b/lib/trove @@ -38,6 +38,10 @@ else TROVE_BIN_DIR=$(get_python_exec_prefix) fi +# Tell Tempest this project is present +TEMPEST_SERVICES+=,trove + + # Functions # --------- diff --git a/stackrc b/stackrc index 8a0280ecfa..197b4cfc46 100644 --- a/stackrc +++ b/stackrc @@ -37,6 +37,12 @@ fi # enable_service tempest ENABLED_SERVICES=g-api,g-reg,key,n-api,n-crt,n-obj,n-cpu,n-net,n-cond,cinder,c-sch,c-api,c-vol,n-sch,n-novnc,n-xvnc,n-cauth,horizon,rabbit,tempest,mysql +# Tell Tempest which services are available. The default is set here as +# Tempest falls late in the configuration sequence. This differs from +# ``ENABLED_SERVICES`` in that the project names are used here rather than +# the service names, i.e.: TEMPEST_SERVICES="key,glance,nova" +TEMPEST_SERVICES="" + # Set the default Nova APIs to enable NOVA_ENABLED_APIS=ec2,osapi_compute,metadata