python-tempestconf/doc/source/admin/admin_usage.rst
Martin Kopec fe8b112648 Final doc check
As all of documenation parts were merged, this patch makes
sure, that all of them uses the same style for marking
commands, arguments, notes, ...
Also a few typos were fixed.

Change-Id: I0239e5241aa854f515fc2d72e7947dc51b3ecb56
Story: 2002703
Task: 22965
2018-08-08 13:10:19 +00:00

2.4 KiB

Usage

Before reading this page, it's recommended to go through User Guide first as the content on this site is more advanced and uses knowledge gained from the User Guide.

This page shows examples of usage of python-tempestconf where admin credentials are required. That means, only users with admin credentials will run discover-tempest-config with arguments described on this page successfully.

Why admin credentials? It's because python-tempestconf can create resources necessary for tempest execution in order to make user's life easier.

The following resources are created only when --create argument is used:

  • flavors, to see what flavors are created, see User Guide, Flavors section
  • users, to see what users are created, see User Guide, Users section

Examples

In the following example, python-tempestconf will create all necessary resources (Flavors and Users) if they don't exist already:

$ discover-tempest-config \
    --os-cloud devstack-admin \
    --create

python-tempestconf can also create a minimal accounts file when --create-accounts-file is used. It can be useful when a user doesn't have any accounts.yaml and wants to create it. It can be done with one call:

$ discover-tempest-config \
    --os-cloud devstack-admin \
    --create \
    --create-accounts-file ~/accounts.yaml

The call above will behave the same as if --test-accounts argument was used, see here. The generated accounts file will look similarly to this one:

$ cat ~/accounts.yaml
# A minimal accounts.yaml file
# Will likely not work with swift, since additional
# roles are required. For more documentation see:
# https://git.openstack.org/cgit/openstack/tempest/tree/etc/accounts.yaml.sample

- password: password
  project_name: admin
  username: admin

Note

More about accounts file can be found in our documentation about Usage with tempest accounts file