Skip to main content

This is a Tempest plugin for whitebox testing. While Tempest’s scope is limited to only the REST APIs, whitebox allows tests to peak behind the curtain, similar to how a cloud admin might. Examining things on the compute host(s) and/or the controller(s) is not only allowed, it’s required for a test to be in whitebox’s scope. Whitebox tests must still be REST API-driven, however their assertions can involve things like the instance XML (if the Nova libvirt driver is in use) or the database.

Requirements

While Tempest is cloud-agnostic because all clouds expose the same OpenStack APIs (with some caveats around extensions), whitebox peaks behind the curtain, and thus is coupled to the way the cloud was deployed. Currently, devstack and TripleO (with undercloud and overcloud) are supported, with only devstack being tested in CI.

Some tests have specific hardware requirements. These should be documented as config options, and tests are expected to skip if their hardware requirements are not declared in the configuration.

Install, configure and run

  1. Tempest needs to be installed and configured.

  2. Install the plugin.

    This should be done from source.

    WORKSPACE=/some/directory
    cd $WORKSPACE
    git clone https://opendev.org/openstack/whitebox-tempest-plugin
    
    sudo pip install whitebox-tempest-plugin
  3. Configure Tempest.

    The exact configuration will depend on the deployment. There is no configuration reference yet, have a look at whitebox_tempest_plugin/config.py instead. As an example, here is a configuration for a multinode TripleO deployment.

    [whitebox]
    ctlplane_addresses = compute-0.localdomain:192.168.24.6,compute-1.localdomain:192.168.24.12
    ctlplane_ssh_username = heat-admin
    ctlplane_ssh_private_key_path = /home/stack/.ssh/id_rsa
    containers = true
    max_compute_nodes = 2 # Some tests depend on there being a single (available) compute node

    Here is an example for a two-node DevStack deployment:

    [whitebox]
    nodes_yaml = /opt/stack/whitebox-tempest-plugin/nodes.yaml
    ctlplane_ssh_username = vagrant
    ctlplane_ssh_private_key_path = /home/vagrant/.ssh/id_rsa

    with a nodes.yaml file that looks something like:

    controller:
      services:
        libvirt:
          start-command: 'systemctl start libvirtd'
          stop_command: 'systemctl stop libvirtd'
        nova-compute:
          config_path: '/etc/nova/nova-cpu.conf'
          start_command: 'systemctl start devstack@n-cpu'
          stop_command: 'systemctl stop devstack@n-cpu'
    compute1:
      services:
        libvirt:
          start-command: 'systemctl start libvirtd'
          stop_command: 'systemctl stop libvirtd'
        nova-compute:
          config_path: '/etc/nova/nova-cpu.conf'
          start_command: 'systemctl start devstack@n-cpu'
          stop_command: 'systemctl stop devstack@n-cpu'

    where controller is the hostname of the controller node and compute1 is the hostname of the second node running nova-compute.

  4. Execute the tests.

    tempest run --serial --regex whitebox_tempest_plugin.

How to add a new test

Tests should fit whitebox’s scope. If a test intereacts with REST APIs and nothing else, it is better suited for Tempest itself. New tests should be added in their respective subdirectories. For example, tests that use the compute API live in whitebox_tempest_plugin/api/compute. Test code does not need unit tests, but helpers or utilities do. Unit tests live in whitebox_tempest_plugin/tests. Whitebox does not adhere to the Tempest plugin interface <https://docs.openstack.org/tempest/latest/plugin.html>. As mentioned, whitebox tests run one at a time, so it’s safe for a test to modify the environment and/or be destructive, as long as it cleans up after itself. For example, changing Nova configuration values and/or restarting services is acceptable, as long as the original values and service state are restored.

Metadata

Release files for whitebox-tempest-plugin 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for whitebox-tempest-plugin 0.1.0
File Size Uploaded Provenance
whitebox_tempest_plugin-0.1.0.tar.gz 83.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for whitebox-tempest-plugin 0.1.0
File Interpreter ABI Platform
whitebox_tempest_plugin-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 184.5 kB

Release files / whitebox_tempest_plugin-0.1.0.tar.gz

Download URL whitebox_tempest_plugin-0.1.0.tar.gz
Size 83.3 kB
Tags Source
SHA-256 checksum
How to use checksums
26ec528eae79f35877fea57f0d55a0b9b6ef8418a9f518aac7b8fe1e9525f59c
BLAKE2b-256 checksum
How to use checksums
93fbdb10387bc2aaaf91fb69a26c2e6f440477358338d1bcea0b8ba74cdd8230
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.12

Release files / whitebox_tempest_plugin-0.1.0-py3-none-any.whl

Download URL whitebox_tempest_plugin-0.1.0-py3-none-any.whl
Size 101.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f058aad51f89af32515aa406788c1bf5735412df7349e20635644b3751296f3
BLAKE2b-256 checksum
How to use checksums
d0c971c65e0caac7638de7fa3b99ccd0e70e9215732aabdfa778a71ea86debc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.12

Security for whitebox-tempest-plugin 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page