diff --git a/TESTING.rst b/TESTING.rst index fb25f646fd5..4568eaaac93 100644 --- a/TESTING.rst +++ b/TESTING.rst @@ -358,6 +358,19 @@ http://docs.openstack.org/developer/tempest/field_guide/scenario.html Scenario tests, like API tests, are split between the Tempest and Neutron repositories according to the Neutron API the test is targeting. +Rally Tests +~~~~~~~~~~~ + +Rally tests (rally-jobs/plugins) use the `rally `_ +infrastructure to exercise a neutron deployment. Guidelines for writing a +good rally test can be found in the `rally plugin documentation `_. +There are also some examples in tree; the process for adding rally plugins to +neutron requires three steps: 1) write a plugin and place it under rally-jobs/plugins/. +This is your rally scenario; 2) (optional) add a setup file under rally-jobs/extra/. +This is any devstack configuration required to make sure your environment can +successfully process your scenario requests; 3) edit neutron-neutron.yaml. This +is your scenario 'contract' or SLA. + Development Process ------------------- diff --git a/devstack/lib/rally b/devstack/lib/rally new file mode 100644 index 00000000000..4442bd0f5cf --- /dev/null +++ b/devstack/lib/rally @@ -0,0 +1,13 @@ +#!/bin/bash + +RALLY_EXTRA_DIR="$DEST/neutron/rally-jobs/extra" + +# If rally has been configured, .setup files can be sourced to control the +# neutron configuration required to run the scenario plugins. +if [[ "$DEVSTACK_PLUGINS" =~ "rally" ]]; +then + for file in $(ls $RALLY_EXTRA_DIR/*.setup); + do + source $file + done +fi diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 7791c624149..91da61b36f0 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -7,6 +7,7 @@ source $LIBDIR/l2_agent_sriovnicswitch source $LIBDIR/ml2 source $LIBDIR/qos source $LIBDIR/ovs +source $LIBDIR/rally source $LIBDIR/trunk Q_BUILD_OVS_FROM_GIT=$(trueorfalse False Q_BUILD_OVS_FROM_GIT) diff --git a/rally-jobs/extra/trunk_scenario.setup b/rally-jobs/extra/trunk_scenario.setup new file mode 100644 index 00000000000..a2af3601ab2 --- /dev/null +++ b/rally-jobs/extra/trunk_scenario.setup @@ -0,0 +1 @@ +enable_service q-trunk