summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-07-20 15:55:56 -0400
committerTim Rozet <trozet@redhat.com>2016-07-20 15:55:56 -0400
commit7687bc27268fee5ac35f13a0a560a9f3f6136adb (patch)
treedfe25fab420b4c5fe76bf5ea15b0d53637ad2308 /lib
parentfc05928f79e121e08d157abae4a1c280c2be1934 (diff)
Adds utility to connect to ODL karaf console
JIRA: APEX-185 Change-Id: I1e281f5905cc1db05d0f654503d91acda853c183 Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/utility-functions.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/utility-functions.sh b/lib/utility-functions.sh
index f73a2d85..bc9a9592 100644
--- a/lib/utility-functions.sh
+++ b/lib/utility-functions.sh
@@ -61,6 +61,22 @@ controller<number> or compute<number>"
fi
}
+##connects to opendaylight karaf console
+##params: None
+function opendaylight_connect {
+ local opendaylight_ip
+ opendaylight_ip=$(undercloud_connect "stack" "cat overcloudrc | grep SDN_CONTROLLER_IP | grep -Eo [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+")
+
+ if [ "$opendaylight_ip" == "" ]; then
+ echo -e "Unable to find IP for OpenDaylight in overcloudrc"
+ return 1
+ else
+ echo -e "Connecting to ODL Karaf console. Default password is 'karaf'"
+ fi
+
+ ssh -p 8101 ${SSH_OPTIONS[@]} karaf@${opendaylight_ip}
+}
+
##outputs heat stack deployment failures
##params: none
function debug_stack {