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.

BLACKLIST_FILE = '/home/jenkins-ci/opnfv/slave_root/workspace/functest-docs-upload-master/functest/opnfv_tests/openstack/rally/blacklist.yaml'
CONCURRENCY = 4
ITERATIONS_AMOUNT = 10
RALLY_AARCH64_PATCH_PATH = '/home/jenkins-ci/opnfv/slave_root/workspace/functest-docs-upload-master/functest/ci/rally_aarch64_patch.conf'
RALLY_CONF_PATH = '/etc/rally/rally.conf'
RALLY_DIR = '/home/jenkins-ci/opnfv/slave_root/workspace/functest-docs-upload-master/functest/opnfv_tests/openstack/rally'
RALLY_SCENARIO_DIR = '/home/jenkins-ci/opnfv/slave_root/workspace/functest-docs-upload-master/functest/opnfv_tests/openstack/rally/scenario'
SUPPORT_DIR = '/home/jenkins-ci/opnfv/slave_root/workspace/functest-docs-upload-master/functest/opnfv_tests/openstack/rally/scenario/support'
TASK_DIR = u'/home/opnfv/functest/data/rally/task'
TEMPLATE_DIR = '/home/jenkins-ci/opnfv/slave_root/workspace/functest-docs-upload-master/functest/opnfv_tests/openstack/rally/scenario/templates'
TEMP_DIR = u'/home/opnfv/functest/data/rally/task/var'
TENANTS_AMOUNT = 3
TESTS = ['authenticate', 'glance', 'cinder', 'gnocchi', 'heat', 'keystone', 'neutron', 'nova', 'quotas']
USERS_AMOUNT = 2
VOLUME_SERVICE_TYPE = 'volumev3'
VOLUME_VERSION = 3
apply_blacklist(case_file_name, result_file_name)

Apply blacklist.

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 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(cmd_raw)

Get task id from command rally result.

Parameters:cmd_raw
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.

prepare_run(**kwargs)

Prepare resources needed by test scenarios.

prepare_task(test_name)

Prepare resources for test run.

run(**kwargs)

Run testcase.

run_task(test_name)

Run a task.

run_tests(**kwargs)

Execute tests.

shared_network = True
static task_succeed(json_raw)

Parse JSON from rally JSON results.

Parameters:json_raw
Returns:Bool
static update_keystone_default_role(rally_conf='/etc/rally/rally.conf')

Set keystone_default_role in rally.conf

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'
class functest.opnfv_tests.openstack.rally.rally.RallyFull(**kwargs)

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

Rally full testcase implementation.

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

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

Rally OpenStack CI testcase implementation.

TESTS = ['neutron']
apply_blacklist(case_file_name, result_file_name)

Apply blacklist.

build_task_args(test_name)

Build arguments for the Rally task.

clean()

Cleanup of OpenStack resources. Should be called on completion.

prepare_run(**kwargs)

Create resources needed by test scenarios.

prepare_task(test_name)

Prepare resources for test run.

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

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

Rally sanity testcase implementation.