Source ansible.sh for entry scripts using cleanup 12/23312/1
authorVratko Polak <vrpolak@cisco.com>
Thu, 7 Nov 2019 13:13:45 +0000 (14:13 +0100)
committerVratko Polak <vrpolak@cisco.com>
Thu, 7 Nov 2019 13:13:45 +0000 (14:13 +0100)
Change-Id: Iee02577ee0c054feb61edee807182c6808f235b0
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
resources/libraries/bash/entry/per_patch_perf.sh
resources/libraries/bash/function/common.sh

index ad0ae90..8c9d7d2 100644 (file)
@@ -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
index f5e1111..e4783dd 100644 (file)
@@ -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.