summaryrefslogtreecommitdiffstats
path: root/controller/libexec/dtf-nova.in
diff options
context:
space:
mode:
authorPavel Raiskup <praiskup@redhat.com>2014-11-04 14:03:51 +0100
committerPavel Raiskup <praiskup@redhat.com>2014-11-04 14:03:51 +0100
commitb602b6772d364c40399f751b45206d6a2fe7ccb7 (patch)
tree4ef8feac3394411ae45aa81c95d1639372f03f10 /controller/libexec/dtf-nova.in
parent347e150a7bc60a1ed019877f2ae4cf2a3e51d22c (diff)
downloadpostgresql-setup-tests-b602b6772d364c40399f751b45206d6a2fe7ccb7.tar.gz
postgresql-setup-tests-b602b6772d364c40399f751b45206d6a2fe7ccb7.tar.xz
postgresql-setup-tests-b602b6772d364c40399f751b45206d6a2fe7ccb7.zip
controller: shutdown VM when run was successful
New script 'dtf-return-machine' returns the VM to OpenStack based on its public IP. In future, this may be abstracted to any VM provider (or VM pool or whatever), but that requires also some IP <=> VM mapping shared between dtf-get-machine and dtf-return-machine. * controller/.gitignore: Ignore new scripts. * controller/Makefile.am: Build new scripts. * controller/bin/dtf-return-machine.in: New script for VM * deletion. * controller/libexec/dtf-nova.in: New wrapper around 'nova' command, showing only data output where fields are separated by tabulator. * controller/share/dtf-controller/ansible/playbooks/fedora.yml: Finally call dtf-return-machine after successful test run.
Diffstat (limited to 'controller/libexec/dtf-nova.in')
-rw-r--r--controller/libexec/dtf-nova.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/controller/libexec/dtf-nova.in b/controller/libexec/dtf-nova.in
new file mode 100644
index 0000000..e4a7791
--- /dev/null
+++ b/controller/libexec/dtf-nova.in
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+set -o pipefail
+
+# Remove the boxing around raw nova output data
+nova "$@" | sed \
+ -e '1,3d' \
+ -e '$d' \
+ -e 's/^| //' \
+ -e 's/[[:space:]]*|$//' \
+ -e 's/[[:space:]]*|[[:space:]]*/\t/g'