Chapter 4. Configuring the OpenStack Integration Test Suite 4.1. Creating a Workspace Source the credentials for the target deployment: If the target is in the undercloud, source the credentials for the undercloud: If the target is in the overcloud, source the credentials for the overcloud: Initialize tempest : This command creates a tempest workspace named mytempest . Run the following command to view a list of existing workspaces: Generate the etc/tempest.conf file: Replace UUID with the UUID of the external network. discover-tempest-config was formerly called config_tempest.py and takes the same parameters. It is provided by python-tempestconf which is installed as a dependency of openstack-tempest . Note To generate the etc/tempest.conf file for the undercloud, ensure that the region name in the tempest-deployer-input.conf file is the same as the name in the undercloud deployment. If these names do not match, update the region name in the tempest-deployer-input.conf file to match the region name of your undercloud. To inspect the region name of your undercloud, run the following commands: To inspect the region name of your overcloud, run the following commands: 4.2. Configuring Tempest Manually The discover-tempest-config command generates the tempest.conf file automatically. However, you must ensure that the tempest.conf file corresponds to the configuration of your environment. 4.2.1. Configuring Tempest Extension Lists Manually The default tempest.conf file contains lists of extensions for each component. Inspect the api_extensions attribute for each component in the tempest.conf file and verify that the lists of extensions correspond to your deployment. If the extensions that are available in your deployment do not correspond to the list of extensions in the api_extensions attribute of the tempest.conf file, the component fails tempest tests. To prevent this failure, you must identify the extensions that are available in your deployment and include them in the api_extensions parameter. To get a list of Network, Compute, Volume, or Identity extensions in your deployment, run the following command: 4.2.2. Configuring heat_plugin Manually Configure the heat plugin manually according to your deployment configuration. The following example contains the minimum tempest.conf configuration for heat_plugin : Use the openstack network list command to identify networks for the fixed_network_name , network_for_ssh , and floating_network_name parmameters. Note You must set heat to True in the [service_available] section of the tempest.conf file, and the user in the username attribute of the [heat_plugin] section must have the role member . For example, run the following command to add the member role to the demo user: 4.3. Verifying Your Tempest Configuration Verify your current tempest configuration: output is the output file where Tempest writes your updated configuration. This is different from your original configuration file. 4.4. Changing the Logging Configuration The default location for log files is the logs directory within your tempest workspace. To change this directory, in tempest.conf , under the [DEFAULT] section, set log_dir to the desired directory: If you have your own logging configuration file, in tempest.conf , under the [DEFAULT] section, set log_config_append to your file: If you set the log_config_append attribute, Tempest ignores all other logging configuration in tempest.conf , including the log_dir attribute. 4.5. Configuring Microversion Tests The OpenStack Integration Test Suite provides stable interfaces to test the API microversions. This section contains information about implementing microversion tests using these interfaces. First, you must configure options in the tempest.conf configuration file to specify the target microversions. Configure these options to ensure that the supported microversions correspond to the microversions used in the OpenStack cloud. You can specify a range of target microversions to run multiple microversion tests in a single Integration Test Suite operation. For example, to limit the range of microversions for the compute service, in the [compute] section of your configuration file, assign values to the min_microversion and max_microversion parameters:

Commands:
source stackrc
source overcloudrc
tempest init mytempest cd mytempest
tempest workspace list
discover-tempest-config --deployer-input ~/tempest-deployer-input.conf --debug --create --network-id <UUID>
source stackrc openstack region list
source overcloudrc openstack region list
openstack extension list [--network] [--compute] [--volume] [--identity]
[service_available] heat = True [heat_plugin] username = demo password = *** project_name = demo admin_username = admin admin_password = **** admin_project_name = admin auth_url = http://10.0.0.110:5000//v3 auth_version = 3 user_domain_id = default project_domain_id = default user_domain_name = Default project_domain_name = Default region = regionOne fixed_network_name = demo_project_network network_for_ssh = public floating_network_name = nova instance_type = m1.nano minimal_instance_type = m1.micro image_ref = 7faed41e-a56c-4971-bf48-24e4e23e69a5 minimal_image_ref = 7faed41e-a56c-4971-bf48-24e4e23e69a5
openstack role add --user demo --project demo member
tempest verify-config -o <output>
[DEFAULT] log_dir = <directory>
[DEFAULT] log_config_append = <file>
[compute] min_microversion = 2.14 max_microversion = latest