functest.opnfv_tests.openstack.rally.rally module

Rally testcases implementation.

class functest.opnfv_tests.openstack.rally.rally.RallyBase(**kwargs)

Bases: functest.core.singlevm.VmReady2

Base class form Rally testcases implementation.

apply_blacklist(case_file_name, result_file_name)

Apply blacklist.

blacklist_file = '/home/docs/checkouts/readthedocs.org/user_builds/functest-api/envs/stable-kali/lib/python3.7/site-packages/functest/opnfv_tests/openstack/rally/blacklist.yaml'
build_task_args(test_name)

Build arguments for the Rally task.

clean()

Cleanup of OpenStack resources. Should be called on completion.

static clean_rally_conf(rally_conf='/etc/rally/rally.conf')

Clean Rally config

static clean_rally_logs(rally_conf='/etc/rally/rally.conf')

Clean Rally config

concurrency = 4
static create_rally_deployment(environ=None)

Create new rally deployment

excl_func()

Exclude functionalities.

static excl_scenario()

Exclude scenario.

static export_task(file_name, export_type='html')

Export all task results (e.g. html or xunit report)

Raises:
subprocess.CalledProcessError: if Rally doesn’t return 0
Returns:
None
static file_is_empty(file_name)

Determine is a file is empty.

static get_task_id(tag)

Get task id from command rally result.

Parameters:tag
Returns:task_id as string
static get_verifier_deployment_id()

Returns deployment id for active Rally deployment

static in_iterable_re(needle, haystack)

Check if given needle is in the iterable haystack, using regex.

Parameters:
  • needle – string to be matched
  • haystack – iterable of strings (optionally regex patterns)
Returns:

True if needle is eqial to any of the elements in haystack, or if a nonempty regex pattern in haystack is found in needle.

is_successful()

The overall result of the test.

iterations_amount = 10
prepare_run(**kwargs)

Prepare resources needed by test scenarios.

prepare_task(test_name)

Prepare resources for test run.

rally_aar4_patch_path = '/home/docs/checkouts/readthedocs.org/user_builds/functest-api/envs/stable-kali/lib/python3.7/site-packages/functest/ci/rally_aarch64_patch.conf'
rally_conf_path = '/etc/rally/rally.conf'
rally_dir = '/home/docs/checkouts/readthedocs.org/user_builds/functest-api/envs/stable-kali/lib/python3.7/site-packages/functest/opnfv_tests/openstack/rally'
rally_scenario_dir = '/home/docs/checkouts/readthedocs.org/user_builds/functest-api/envs/stable-kali/lib/python3.7/site-packages/functest/opnfv_tests/openstack/rally/scenario'
run(**kwargs)

Run testcase.

run_task(test_name)

Run a task.

run_tests(**kwargs)

Execute tests.

shared_network = True
stests = ['authenticate', 'glance', 'cinder', 'gnocchi', 'heat', 'keystone', 'neutron', 'nova', 'quotas', 'swift', 'barbican']
support_dir = '/home/docs/checkouts/readthedocs.org/user_builds/functest-api/envs/stable-kali/lib/python3.7/site-packages/functest/opnfv_tests/openstack/rally/scenario/support'
task_dir = '/home/opnfv/functest/data/rally/task'
static task_succeed(json_raw)

Parse JSON from rally JSON results.

Parameters:json_raw
Returns:Bool
task_timeout = 3600
temp_dir = '/home/opnfv/functest/data/rally/task/var'
template_dir = '/home/docs/checkouts/readthedocs.org/user_builds/functest-api/envs/stable-kali/lib/python3.7/site-packages/functest/opnfv_tests/openstack/rally/scenario/templates'
tenants_amount = 3
static update_keystone_default_role(rally_conf='/etc/rally/rally.conf')

Set keystone_default_role in rally.conf

static update_rally_logs(res_dir, rally_conf='/etc/rally/rally.conf')

Print rally logs in res dir

users_amount = 2
static verify_report(file_name, uuid, export_type='html')

Generate the verifier report (e.g. html or xunit report)

Raises:
subprocess.CalledProcessError: if Rally doesn’t return 0
Returns:
None
visibility = 'public'
volume_service_type = 'volumev3'
volume_version = 3
class functest.opnfv_tests.openstack.rally.rally.RallyFull(**kwargs)

Bases: functest.opnfv_tests.openstack.rally.rally.RallyBase

Rally full testcase implementation.

task_timeout = 7200
class functest.opnfv_tests.openstack.rally.rally.RallyJobs(**kwargs)

Bases: functest.opnfv_tests.openstack.rally.rally.RallyBase

Rally OpenStack CI testcase implementation.

apply_blacklist(case_file_name, result_file_name)

Apply blacklist.

build_task_args(test_name)

Build arguments for the Rally task.

prepare_run(**kwargs)

Create resources needed by test scenarios.

prepare_task(test_name)

Prepare resources for test run.

stests = ['neutron']
task_timeout = 7200
class functest.opnfv_tests.openstack.rally.rally.RallySanity(**kwargs)

Bases: functest.opnfv_tests.openstack.rally.rally.RallyBase

Rally sanity testcase implementation.