From 94b4b752b43dd32c0af5b812c9c097b867aaf4d7 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Thu, 20 Nov 2014 12:33:35 +0100 Subject: controller: fix remote-run handling * controller/bin/dtf-return-machine.in: Do not return machines which were faked (by DTF_GET_MACHINE_FAKE_IP). * controller/bin/dtf-run-remote.in: Do not lowercase all option arguments. --- controller/bin/dtf-return-machine.in | 3 +++ controller/bin/dtf-run-remote.in | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'controller') diff --git a/controller/bin/dtf-return-machine.in b/controller/bin/dtf-return-machine.in index 799a1f4..59bc63f 100644 --- a/controller/bin/dtf-return-machine.in +++ b/controller/bin/dtf-return-machine.in @@ -34,6 +34,9 @@ IP="$1" test -z "$IP" && die "no IP passed" +# don't remove faked hosts +test -n "$DTF_GET_MACHINE_FAKE_IP" && exit 0 + NOVACMD="@libexecdir@/dtf-nova" $NOVACMD list --fields 'networks' | \ diff --git a/controller/bin/dtf-run-remote.in b/controller/bin/dtf-run-remote.in index 14f81a4..f617cdb 100644 --- a/controller/bin/dtf-run-remote.in +++ b/controller/bin/dtf-run-remote.in @@ -27,7 +27,15 @@ while true; do case "$1" in --taskdir|--setup-playbook|--distro|--openstack-instance|--workdir) opt=$(sed -e 's/^--//' -e 's/[^[a-zA-Z0-9]/_/g'<<<"$1") - eval "opt_$opt=\"${2,,}\"" + case "$1" in + --distro) + # normalize + eval "opt_$opt=\"${2,,}\"" + ;; + *) + eval "opt_$opt=\"${2}\"" + ;; + esac shift 2 ;; -- cgit