Tempest Test-Account Generator Utility

Utility for creating accounts.yaml file for concurrent test runs. Creates one primary user, one alt user, one swift admin, one stack owner and one admin (optionally) for each concurrent thread. The utility creates user for each tenant. The accounts.yaml file will be valid and contain credentials for created users, so each user will be in separate tenant and have the username, tenant_name, password and roles.

Usage: tempest account-generator [-h] [OPTIONS] accounts_file.yaml

Positional Arguments

accounts_file.yaml (Required) Provide an output accounts yaml file. Utility creates a .yaml file in the directory where the command is ran. The appropriate name for the file is accounts.yaml and it should be placed in tempest/etc directory.

Authentication

Account generator creates users and tenants so it needs the admin credentials of your cloud to operate properly. The corresponding info can be given either through CLI options or environment variables.

You’re probably familiar with these, but just to remind:

Param

CLI

Environment Variable

Username

--os-username

OS_USERNAME

Password

--os-password

OS_PASSWORD

Project

--os-project-name

OS_PROJECT_NAME

Domain

--os-domain-name

OS_DOMAIN_NAME

Optional Arguments

  • -h, --help (Optional) Shows help message with the description of utility and its arguments, and exits.

  • -c, --config-file /etc/tempest.conf (Optional) Path to tempest config file. If not specified, it searches for tempest.conf in these locations:

    • ./etc/

    • /etc/tempest

    • ~/.tempest/

    • ~/

    • /etc/

  • --os-username <auth-user-name> (Optional) Name used for authentication with the OpenStack Identity service. Defaults to env[OS_USERNAME]. Note: User should have permissions to create new user accounts and tenants.

  • --os-password <auth-password> (Optional) Password used for authentication with the OpenStack Identity service. Defaults to env[OS_PASSWORD].

  • --os-project-name <auth-project-name> (Optional) Project to request authorization on. Defaults to env[OS_PROJECT_NAME].

  • --os-domain-name <auth-domain-name> (Optional) Domain the user and project belong to. Defaults to env[OS_DOMAIN_NAME].

  • --tag TAG (Optional) Resources tag. Each created resource (user, project) will have the prefix with the given TAG in its name. Using tag is recommended for the further using, cleaning resources.

  • -r, --concurrency CONCURRENCY (Optional) Concurrency count (default: 2). The number of accounts generated will be same as CONCURRENCY. The higher the number, the more tests will run in parallel. If you want to run tests sequentially then use 1 as value for concurrency (beware that tests that need more credentials will fail).

  • --with-admin (Optional) Creates admin for each concurrent group (default: False).

  • -i, --identity-version VERSION (Optional) Provisions accounts using the specified version of the identity API. (default: ‘3’).

To see help on specific argument, please do: tempest account-generator [OPTIONS] <accounts_file.yaml> -h.