Add devstack plugin to ease integration tests

Instead of requiring users to install the plugin manually, add a
devstack plugin that can be enabled in order to perform the
installation.

Change the integration tests to use the globally installed plugin
instead of using TEMPEST_PLUGINS.

Change-Id: I7282fa60db15427c73dfef84a40093904e083db2
This commit is contained in:
Jens Harbott 2017-12-06 12:03:09 +00:00
parent 118b52fb00
commit 228d5b8fb9
6 changed files with 43 additions and 25 deletions

21
devstack/README.rst Normal file
View File

@ -0,0 +1,21 @@
====================
Enabling in Devstack
====================
**WARNING**: the stack.sh script must be run in a disposable VM that is not
being created automatically, see the README.md file in the "devstack"
repository. See contrib/vagrant to create a vagrant VM.
1. Download DevStack::
git clone https://git.openstack.org/openstack-dev/devstack.git
cd devstack
2. Add this repo as an external repository::
> cat local.conf
[[local|localrc]]
enable_plugin neutron-tempest-plugin https://git.openstack.org/openstack/neutron-tempest-plugin
3. run ``stack.sh``

13
devstack/plugin.sh Normal file
View File

@ -0,0 +1,13 @@
# install_neutron_tempest_plugin
function install_neutron_tempest_plugin {
setup_dev_lib "neutron-tempest-plugin"
}
if [[ "$1" == "stack" ]]; then
case "$2" in
install)
echo_summary "Installing neutron-tempest-plugin"
install_neutron_tempest_plugin
;;
esac
fi

3
devstack/settings Normal file
View File

@ -0,0 +1,3 @@
GITREPO["neutron-tempest-plugin"]=${NEUTRON_TEMPEST_REPO:-${GIT_BASE}/openstack/neutron-tempest-plugin.git}
GITDIR["neutron-tempest-plugin"]=$DEST/neutron-tempest-plugin
GITBRANCH["neutron-tempest-plugin"]=master

View File

@ -23,27 +23,17 @@
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
cat << 'EOF' >>"/tmp/dg-local.conf"
[[local|localrc]]
TEMPEST_PLUGINS='/opt/stack/new/neutron-tempest-plugin'
EOF
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
export PYTHONUNBUFFERED=true
export DEVSTACK_GATE_TEMPEST=1
export DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=1
export DEVSTACK_GATE_NEUTRON=1
export DEVSTACK_GATE_EXERCISES=0
export DEVSTACK_GATE_TEMPEST_REGEX="neutron_tempest_plugin.api"
export DEVSTACK_LOCAL_CONFIG="enable_plugin neutron-tempest-plugin git://git.openstack.org/openstack/neutron-tempest-plugin"
export BRANCH_OVERRIDE=default
if [ "$BRANCH_OVERRIDE" != "default" ] ; then
export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE

View File

@ -23,27 +23,17 @@
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
cat << 'EOF' >>"/tmp/dg-local.conf"
[[local|localrc]]
TEMPEST_PLUGINS='/opt/stack/new/neutron-tempest-plugin'
EOF
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
export PYTHONUNBUFFERED=true
export DEVSTACK_GATE_TEMPEST=1
export DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=1
export DEVSTACK_GATE_NEUTRON=1
export DEVSTACK_GATE_CONFIGDRIVE=0
export DEVSTACK_GATE_TEMPEST_REGEX="(neutron_tempest_plugin.scenario)"
export DEVSTACK_LOCAL_CONFIG="enable_plugin neutron-tempest-plugin git://git.openstack.org/openstack/neutron-tempest-plugin"
export TEMPEST_CONCURRENCY=2
# Test DVR works multinode
export DEVSTACK_GATE_NEUTRON_DVR=1

View File

@ -31,7 +31,6 @@
[[local|localrc]]
Q_AGENT=linuxbridge
PHYSICAL_NETWORK=default
TEMPEST_PLUGINS='/opt/stack/new/neutron-tempest-plugin'
EOF
executable: /bin/bash
@ -44,9 +43,11 @@
set -x
export PYTHONUNBUFFERED=true
export DEVSTACK_GATE_TEMPEST=1
export DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=1
export DEVSTACK_GATE_NEUTRON=1
export DEVSTACK_GATE_EXERCISES=0
export DEVSTACK_GATE_TEMPEST_REGEX="(neutron_tempest_plugin.scenario)"
export DEVSTACK_LOCAL_CONFIG="enable_plugin neutron-tempest-plugin git://git.openstack.org/openstack/neutron-tempest-plugin"
export BRANCH_OVERRIDE=default
if [ "$BRANCH_OVERRIDE" != "default" ] ; then
export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE