From bf3d3075cac610b901c951ae135fcdbcc6ffecb8 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Mon, 18 Feb 2019 14:01:07 -0600 Subject: More refinement, Agent.sh Issue-ID: AAF-667 Change-Id: I3898f3378fffb0ed89ad84cb80942d1ded51b3d4 Signed-off-by: Instrumental --- auth/docker/agent.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'auth/docker') diff --git a/auth/docker/agent.sh b/auth/docker/agent.sh index c330b1ce..d319de4d 100644 --- a/auth/docker/agent.sh +++ b/auth/docker/agent.sh @@ -48,15 +48,21 @@ for V in VERSION DOCKER_REPOSITORY HOSTNAME AAF_FQDN AAF_FQDN_IP DEPLOY_FQI APP_ # Need AAF_FQDN's IP, because not might not be available in mini-container PROMPT="AAF FQDN IP" LOOKUP=$(host "${AAF_FQDN}" | grep "has address") - if [ -z ${LOOKUP} ]; then - DEF= - else + if [ -n "${LOOKUP}" ]; then DEF=$(echo ${LOOKUP} | tail -1 | cut -f 4 -d ' ') fi ;; - APP_FQI) PROMPT="App's FQI";; - APP_FQDN) PROMPT="App's Root FQDN";; - VOLUME) PROMPT="APP's AAF Configuration Volume";; + APP_FQDN) PROMPT="App's Root FQDN";; + APP_FQI) PROMPT="App's FQI" + if [[ "${APP_FQDN}" != *"."* ]]; then + DEF="${APP_FQDN}@${APP_FQDN}.onap.org" + fi + ;; + VOLUME) PROMPT="APP's AAF Configuration Volume" + if [[ "${APP_FQDN}" != *"."* ]]; then + DEF="${APP_FQDN}_config" + fi + ;; DRIVER) PROMPT=$V;DEF=local;; VERSION) PROMPT="CADI Version";DEF=$CADI_VERSION;; LATITUDE|LONGITUDE) PROMPT="$V of Node";; -- cgit 1.2.3-korg