From b1483c82d5560afed066dea873ffa4587a4d7fd7 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Sat, 20 Aug 2016 19:14:02 +0100 Subject: [PATCH] Automatically detect whether to test ceilometer/aodh This patch implements an automated determination of whether the Telemetry systems should be tested by tempest based on whether there are hosts in the applicable host groups. This reduces the number of variables a deployer needs to set in order to have a functional environment. Change-Id: I74cf323237bcbb2ee91233ffc72044aa74eac59e --- playbooks/inventory/group_vars/utility_all.yml | 5 +++++ .../roles/bootstrap-host/templates/user_variables.aio.yml.j2 | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/playbooks/inventory/group_vars/utility_all.yml b/playbooks/inventory/group_vars/utility_all.yml index 9716eae532..b3cd8e01df 100644 --- a/playbooks/inventory/group_vars/utility_all.yml +++ b/playbooks/inventory/group_vars/utility_all.yml @@ -24,6 +24,11 @@ galera_client_drop_config_file: true # If cinder has a backup service enabled, make sure that Tempest tests it tempest_volume_backup_enabled: "{{ cinder_service_backup_program_enabled | bool }}" +# If there are Telemetry hosts in the environment, make sure that Tempest +# tests them +tempest_service_available_ceilometer: "{{ groups['ceilometer_all'] is defined and groups['ceilometer_all'] | length > 0 }}" +tempest_service_available_aodh: "{{ groups['aodh_all'] is defined and groups['aodh_all'] | length > 0 }}" + # Ensure that the package state matches the global setting utility_package_state: "{{ package_state }}" diff --git a/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 index 18d892d480..d426292dbe 100644 --- a/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 @@ -17,8 +17,6 @@ debug: True ## Tempest settings -tempest_service_available_ceilometer: True -tempest_service_available_aodh: True tempest_public_subnet_cidr: 172.29.248.0/22 tempest_public_subnet_allocation_pools: "172.29.249.110-172.29.249.200"