summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Raiskup <praiskup@redhat.com>2014-10-23 16:21:13 +0200
committerPavel Raiskup <praiskup@redhat.com>2014-10-23 16:25:31 +0200
commita2f777c19494999c5bec3ee50b63a627155d5d9b (patch)
tree28fe8e8125fdaea3c896696833fce2b1891584ac
parent83edd3a996c506b6a1988d0c68214e9a849397d8 (diff)
downloadpostgresql-setup-tests-a2f777c19494999c5bec3ee50b63a627155d5d9b.tar.gz
postgresql-setup-tests-a2f777c19494999c5bec3ee50b63a627155d5d9b.tar.xz
postgresql-setup-tests-a2f777c19494999c5bec3ee50b63a627155d5d9b.zip
controller/dtf-run-remote: fix problems with default OS ID
Rename the config vairable from DTF_OPENSTACK_ID to DTF_OPENSTACK_DEFAULT_ID to better match the name with its purpose. * controller/bin/dtf-run-remote.in: Use DTF_OPENSTACK_DEFAULT_ID instead of DTF_OPENSTACK_ID. * controller/config/config.sh.template: Moved. * controller/etc/dtf.conf.d/config.sh.template: Document renamed variable on new place.
-rw-r--r--controller/bin/dtf-run-remote.in5
-rw-r--r--controller/etc/dtf.conf.d/config.sh.template (renamed from controller/config/config.sh.template)10
2 files changed, 8 insertions, 7 deletions
diff --git a/controller/bin/dtf-run-remote.in b/controller/bin/dtf-run-remote.in
index 276ad40..d801d28 100644
--- a/controller/bin/dtf-run-remote.in
+++ b/controller/bin/dtf-run-remote.in
@@ -8,7 +8,7 @@ run_playbook=${run_playbook-@ansibleplaybooksdir@/fedora.yml}
opt_workdir=
opt_distro=fedora
-opt_openstack_instance="$DTF_OPENSTACK_ID"
+opt_openstack_instance="$DTF_OPENSTACK_DEFAULT_ID"
opt_distro_ver=20
opt_extra_rpms=
opt_taskdir=
@@ -62,10 +62,11 @@ while true; do
esac
done
+test -z "$opt_openstack_instance" && die "option --openstack-instance=ID not used"
test -z "$opt_taskdir" && die "you must specify --taskdir"
credsfile="$HOME/.dtf/private/os/$opt_openstack_instance.yml"
-test ! -f "$credsfile" && die "file '$credsfile' not found"
+test ! -f "$credsfile" && die "creds file '$credsfile' not found"
config_os_file="$HOME/.dtf/os/$opt_openstack_instance.sh"
test ! -r "$config_os_file" && die "file '$config_os_file' not found"
diff --git a/controller/config/config.sh.template b/controller/etc/dtf.conf.d/config.sh.template
index 94cbe22..11aa40b 100644
--- a/controller/config/config.sh.template
+++ b/controller/etc/dtf.conf.d/config.sh.template
@@ -1,10 +1,10 @@
# OpenStack ID
# ------------
#
-# By default, based on DTF_OPENSTACK_ID content the corresponding OpenStack
-# configuration is used. You may have multiple OpenStack instances configured -
-# this option selects one. Based on the OpenStack ID (say 'EXAMPLE'), those
-# configuration-like files are used:
+# By default, based on DTF_OPENSTACK_DEFAULT_ID content the corresponding
+# OpenStack configuration is used. You may have multiple OpenStack instances
+# configured - this option selects one. Based on the OpenStack ID (say
+# 'EXAMPLE'), those configuration-like files are used:
#
# * private/os/'EXAMPLE'.yml
# File having OpenStack credentials in ansible variable file (YAML file
@@ -17,7 +17,7 @@
# The template file config/os/EXAMPLE.sh may be used when configuring your
# testing environment.
-export DTF_OPENSTACK_ID=dropbear
+export DTF_OPENSTACK_DEFAULT_ID=dropbear
# Result Database
# ---------------