Este conteúdo não está disponível no idioma selecionado.

Chapter 4. Configuring the OpenStack Integration Test Suite


4.1. Creating a Workspace

  1. Source the credentials for the target deployment:

    • If the target is in the undercloud, source the credentials for the undercloud:

      # source stackrc
      Copy to Clipboard Toggle word wrap
    • If the target is in the overcloud, source the credentials for the overcloud:

      # source overcloudrc
      Copy to Clipboard Toggle word wrap
  2. Initialize tempest:

    # tempest init mytempest
    # cd mytempest
    Copy to Clipboard Toggle word wrap

    This command creates a tempest workspace named mytempest.

    Run the following command to view a list of existing workspaces:

    # tempest workspace list
    Copy to Clipboard Toggle word wrap
  3. Generate the etc/tempest.conf file:

    # discover-tempest-config --deployer-input ~/tempest-deployer-input.conf \
    --debug --create --network-id <UUID>
    Copy to Clipboard Toggle word wrap

    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:

$ source stackrc
$ openstack region list
Copy to Clipboard Toggle word wrap

To inspect the region name of your overcloud, run the following commands:

$ source overcloudrc
$ openstack region list
Copy to Clipboard Toggle word wrap

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:

$ openstack extension list [--network] [--compute] [--volume] [--identity]
Copy to Clipboard Toggle word wrap

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:

[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
Copy to Clipboard Toggle word wrap

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:

$ openstack role add --user demo --project demo member
Copy to Clipboard Toggle word wrap

4.3. Verifying Your Tempest Configuration

Verify your current tempest configuration:

# tempest verify-config -o <output>
Copy to Clipboard Toggle word wrap

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:

[DEFAULT]
log_dir = <directory>
Copy to Clipboard Toggle word wrap

If you have your own logging configuration file, in tempest.conf, under the [DEFAULT] section, set log_config_append to your file:

[DEFAULT]
log_config_append = <file>
Copy to Clipboard Toggle word wrap

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:

[compute]
min_microversion = 2.14
max_microversion = latest
Copy to Clipboard Toggle word wrap
Voltar ao topo
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2025 Red Hat