aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2019-11-07 14:13:45 +0100
committerVratko Polak <vrpolak@cisco.com>2019-11-07 14:13:45 +0100
commit0227e20f014f8ad2103000c1d91a37b6afba0fda (patch)
tree4a757897b79b15242291fae1cee28ff0d4fd1c4c /resources/libraries
parentd01411c3c4af6c724a3800c621804ea979818d6d (diff)
Source ansible.sh for entry scripts using cleanup
Change-Id: Iee02577ee0c054feb61edee807182c6808f235b0 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries')
-rw-r--r--resources/libraries/bash/entry/per_patch_perf.sh2
-rw-r--r--resources/libraries/bash/function/common.sh2
2 files changed, 4 insertions, 0 deletions
diff --git a/resources/libraries/bash/entry/per_patch_perf.sh b/resources/libraries/bash/entry/per_patch_perf.sh
index ad0ae90085..8c9d7d2ca3 100644
--- a/resources/libraries/bash/entry/per_patch_perf.sh
+++ b/resources/libraries/bash/entry/per_patch_perf.sh
@@ -39,6 +39,8 @@ source "${BASH_FUNCTION_DIR}/common.sh" || {
exit 1
}
source "${BASH_FUNCTION_DIR}/per_patch.sh" || die "Source failed."
+# Cleanup needs ansible.
+source "${BASH_FUNCTION_DIR}/ansible.sh" || die "Source failed."
common_dirs || die
check_prerequisites || die
set_perpatch_vpp_dir || die
diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh
index f5e1111a17..e4783dd1ec 100644
--- a/resources/libraries/bash/function/common.sh
+++ b/resources/libraries/bash/function/common.sh
@@ -576,6 +576,7 @@ function reserve_and_cleanup_testbed () {
# - WORKING_TOPOLOGY - Path to topology yaml file of the reserved testbed.
# Functions called:
# - die - Print to stderr and exit.
+ # - ansible_hosts - Perform an action using ansible, see ansible.sh
# Traps registered:
# - EXIT - Calls cancel_all for ${WORKING_TOPOLOGY}.
@@ -1031,6 +1032,7 @@ function untrap_and_unreserve_testbed () {
# - EXIT - Failure to untrap is reported, but ignored otherwise.
# Functions called:
# - die - Print to stderr and exit.
+ # - ansible_hosts - Perform an action using ansible, see ansible.sh
set -xo pipefail
set +eu # We do not want to exit early in a "teardown" function.