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.

This change should allow us to remove the tempest plugin installation
code from manila's devstack plugin and enable it in job definitions
the same way we enable plugins for manila itself and for the manila-ui
plugin.

Change-Id: If0e5daab19ec83e2da5709693d18fcee72b42766
This commit is contained in:
Tom Barron 2019-03-29 11:53:56 -04:00
parent 53927a9459
commit 29ef852e89
3 changed files with 40 additions and 0 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 manila-tempest-plugin https://git.openstack.org/openstack/manila-tempest-plugin
3. run ``stack.sh``

16
devstack/plugin.sh Normal file
View File

@ -0,0 +1,16 @@
# Directory where this plugin.sh file is
MANILA_TEMPEST_PLUGIN_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# install_manila_tempest_plugin
function install_manila_tempest_plugin {
setup_dev_lib "manila-tempest-plugin"
}
if [[ "$1" == "stack" ]]; then
case "$2" in
install)
echo_summary "Installing manila-tempest-plugin"
install_manila_tempest_plugin
;;
esac
fi

3
devstack/settings Normal file
View File

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