From b602b6772d364c40399f751b45206d6a2fe7ccb7 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Tue, 4 Nov 2014 14:03:51 +0100 Subject: 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. --- controller/libexec/dtf-nova.in | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 controller/libexec/dtf-nova.in (limited to 'controller/libexec/dtf-nova.in') 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' -- cgit