+function installed () {
+
+ # Check if the given utility is installed. Fail if not installed.
+ #
+ # Duplicate of common.sh function, as this file is also used standalone.
+ #
+ # Arguments:
+ # - ${1} - Utility to check.
+ # Returns:
+ # - 0 - If command is installed.
+ # - 1 - If command is not installed.
+
+ set -exuo pipefail
+
+ command -v "${1}"
+}
+
+
+function remove_topo () {
+
+ # Remove the argument from list of available topologies.
+ #
+ # Just a de-duplicated block of code
+ #
+ # Argument:
+ # - ${1} - The topology item to remove. Required.
+ # Variable read and re-written:
+ # - TOPOLOGIES - Array of paths to topologies, with failed cleanups removed.
+
+ set -exuo pipefail
+
+ warn "Testbed ${topo} seems unsuitable, removing from the list."
+
+ # Build new topology array.
+ # TOPOLOGIES=("${TOPOLOGIES[@]/$topo}")
+ # does not really work, see:
+ # https://stackoverflow.com/questions/16860877/remove-an-element-from-a-bash-array
+
+ new_topologies=()
+ for item in "${TOPOLOGIES[@]}"; do
+ if [[ "${item}" != "${1}" ]]; then
+ new_topologies+=("${item}")
+ fi
+ done
+ TOPOLOGIES=("${new_topologies[@]}")
+}
+
+