summaryrefslogtreecommitdiffstats
path: root/mcp/scripts/globals.sh
diff options
context:
space:
mode:
authorMichael Polenchuk <mpolenchuk@mirantis.com>2018-02-07 07:51:47 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-02-07 07:51:47 +0000
commit624e0e31debf1b4f7fa7727826e6e385c6192583 (patch)
treee0d9c3aa051c7bf3744dd9752c0dd6afb2225b65 /mcp/scripts/globals.sh
parent22bbdf21851c3fdeb10579fc6b0e77a93e90e813 (diff)
parentb6689c3e319b66b64bc0fe49366dfdeb4152e664 (diff)
Merge changes from topic 'fix-public-bridge'
* changes: [virtual] Add missing ODL dhcp_int [virsh net] public: rm addr cfg for pure baremetal
Diffstat (limited to 'mcp/scripts/globals.sh')
-rw-r--r--mcp/scripts/globals.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/mcp/scripts/globals.sh b/mcp/scripts/globals.sh
index 8966a0a94..54f015cf6 100644
--- a/mcp/scripts/globals.sh
+++ b/mcp/scripts/globals.sh
@@ -25,22 +25,27 @@ export SSH_SALT="${SALT_MASTER_USER}@${SALT_MASTER}"
##############################################################################
# BEGIN of colored notification wrappers
#
+
+# same as `notify_i` + trailing '\n';
function notify() {
local msg=${1}; shift
notify_i "${msg}\n" "$@"
}
+# Inline (no newline added) colored output notification wrapper
function notify_i() {
tput setaf "${2:-1}" || true
echo -en "${1:-"[WARN] Unsupported opt arg: $3\\n"}"
tput sgr0
}
+# same as `notify` + extra '\n' before and after;
function notify_n() {
local msg=${1}; shift
notify_i "\n${msg}\n\n" "$@"
}
+# same as `notify` + stderr output + exit;
function notify_e() {
local msg=${1}; shift
notify_i "\n${msg}\n\n" "$@" 1>&2