Add the sp_rand_init and sp_rand_cleanup tools.

These will be used on the worker node to set up a random volume name
prefix for the StorPool volumes and snapshots created during
the OpenStack CI run, and detach and remove them all later.

Change-Id: Ic558e2183db8068545f7454f956dc8bc740959c6
diff --git a/tools/sp-rand/tox.ini b/tools/sp-rand/tox.ini
new file mode 100644
index 0000000..81307c5
--- /dev/null
+++ b/tools/sp-rand/tox.ini
@@ -0,0 +1,74 @@
+[tox]
+envlist =
+  black
+  pep8
+  pep8h
+  mypy
+  pylint
+  unit-tests
+  functional-test
+isolated_build = True
+
+
+[defs]
+pyfiles =
+  src/sp_rand
+  unit_tests
+
+[testenv:black]
+skip_install = True
+deps =
+  black >= 21b0, < 22b0
+commands =
+  black --check {[defs]pyfiles}
+
+[testenv:black-reformat]
+skip_install = True
+deps =
+  black >= 21b0, < 22b0
+commands =
+  black {[defs]pyfiles}
+
+[testenv:pep8]
+skip_install = True
+deps =
+  flake8
+commands =
+  flake8 {[defs]pyfiles}
+
+[testenv:pep8h]
+skip_install = True
+deps =
+  flake8
+  hacking >= 4
+commands =
+  flake8 {[defs]pyfiles}
+
+[testenv:mypy]
+skip_install = True
+deps =
+  confget >= 4
+  mypy
+  pytest >= 6
+commands =
+  mypy {[defs]pyfiles}
+
+[testenv:pylint]
+skip_install = True
+deps =
+  confget >= 4
+  pylint
+  pytest >= 6
+  storpool >= 6
+commands =
+  pylint {[defs]pyfiles}
+
+[testenv:unit-tests]
+deps =
+  pytest >= 6
+commands =
+  pytest unit_tests
+
+[testenv:functional-test]
+commands =
+  {toxinidir}/test_functional.sh