From 9c797537dbccaa2377a6c2e6d1b3f3bd1616a5b7 Mon Sep 17 00:00:00 2001 From: Armando Migliaccio Date: Wed, 2 Nov 2016 12:52:40 -0700 Subject: [PATCH] Add rally hook to neutron devstack plugin This allows us to configure neutron when running the rally job in the gate. This effort stems from patch [1]. Blame Kevin for not wanting to squash the two together. [1] I12aaf6121b677e9696131601b3539a7091e2858c Change-Id: I006957784ac7900021bcfee57cbc83b5a6c533c4 (cherry picked from commit f5e30abcc55b8405fac2727d5facfbb7be79ffb9) --- TESTING.rst | 13 +++++++++++++ devstack/lib/rally | 13 +++++++++++++ devstack/plugin.sh | 1 + rally-jobs/extra/trunk_scenario.setup | 1 + 4 files changed, 28 insertions(+) create mode 100644 devstack/lib/rally create mode 100644 rally-jobs/extra/trunk_scenario.setup 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