Add designate-manage path to tempest via a devstack script
So far, designate-manage was available to use in
designate-tempest-plugin tests, but its path was not well known.
This patch adds a devstack script that would set a tempest.conf setting
for the designate-manage path.
Change-Id: I26203522aaee9bb498bea9a1561eee65f6588244
diff --git a/devstack/README.rst b/devstack/README.rst
new file mode 100644
index 0000000..ee58314
--- /dev/null
+++ b/devstack/README.rst
@@ -0,0 +1,17 @@
+====================
+Enabling in Devstack
+====================
+
+1. Download DevStack::
+
+ git clone https://opendev.org/openstack/devstack.git
+ cd devstack
+
+2. Add this repo as an external repository::
+
+ > cat local.conf
+ [[local|localrc]]
+ enable_plugin designate-tempest-plugin https://opendev.org/openstack/designate-tempest-plugin
+
+3. run ``stack.sh``
+
diff --git a/devstack/plugin.sh b/devstack/plugin.sh
new file mode 100644
index 0000000..288117e
--- /dev/null
+++ b/devstack/plugin.sh
@@ -0,0 +1,38 @@
+#!/usr/bin/env bash
+
+saveenv=$-
+set -e
+
+# install_designate_tempest_plugin
+function install_designate_tempest_plugin {
+ setup_dev_lib "designate-tempest-plugin"
+}
+
+function _configure_tempest {
+ if [ -n "$DESIGNATE_BIN_DIR" ]; then
+ iniset $TEMPEST_CONFIG dns_feature_enabled designate_manage_path ${DESIGNATE_BIN_DIR}/designate-manage
+ fi
+}
+
+if [[ "$1" == "stack" ]]; then
+ case "$2" in
+ install)
+ # Install dev library if the user explicitly requests it
+ # (INSTALL_TEMPEST=True)
+ if [[ "$(trueorfalse False INSTALL_TEMPEST)" == "True" ]]; then
+ echo_summary "Installing designate-tempest-plugin"
+ install_designate_tempest_plugin
+ fi
+ ;;
+ test-config)
+ echo_summary "Configuring tempest designate-manage"
+ _configure_tempest
+ ;;
+ esac
+fi
+
+if [[ $saveenv =~ e ]]; then
+ set -e
+else
+ set +e
+fi
diff --git a/devstack/settings b/devstack/settings
new file mode 100644
index 0000000..1a44c84
--- /dev/null
+++ b/devstack/settings
@@ -0,0 +1,3 @@
+GITREPO["designate-tempest-plugin"]=${DESIGNATE_TEMPEST_REPO:-${GIT_BASE}/openstack/designate-tempest-plugin.git}
+GITDIR["designate-tempest-plugin"]=$DEST/designate-tempest-plugin
+GITBRANCH["designate-tempest-plugin"]=${DESIGNATE_TEMPEST_REF:-master}