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/designate_tempest_plugin/config.py b/designate_tempest_plugin/config.py
index 9b86945..4f880e2 100644
--- a/designate_tempest_plugin/config.py
+++ b/designate_tempest_plugin/config.py
@@ -87,6 +87,9 @@
                 default=False,
                 help="Is https://bugs.launchpad.net/designate/+bug/1932026 "
                      "fixed"),
+    cfg.StrOpt('designate_manage_path',
+               default=None,
+               help="The designate-manage command path"),
     # Note: Also see the enforce_scope section (from tempest) for Designate API
     #       scope checking setting.
     cfg.BoolOpt('enforce_new_defaults',
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}