0868afe5cf
This patch optimises ODL's healthcheck test to avoid using hard-coded values Change-Id: I0bc0d1e9161b978a5b3bd7a7b4b9cea19d7b8476
9 lines
377 B
Bash
9 lines
377 B
Bash
#!/bin/bash
|
|
|
|
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
|
|
|
|
file=/opt/opendaylight/etc/jetty.xml
|
|
bind_host=$(grep -r '<Set name="host">' $file | awk -F'>' FNR==1'{print $2}')
|
|
bind_port=$(grep -r '<Property name="jetty.port" default=' $file | awk FNR==2'{print $3}' | cut -d'"' -f2)
|
|
|
|
healthcheck_curl http://$bind_host:$bind_port/index.html |