From: Dan Radez Date: Wed, 12 Apr 2017 14:04:55 +0000 (-0400) Subject: update check_os.sh admin port seds to match public X-Git-Tag: opnfv-5.0.RC1~479^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F07%2F33307%2F2;p=functest.git update check_os.sh admin port seds to match public If there's not a / on the end of the admin url then port is not found public already handled this correctly. updating admin to match public JIRA: FUNCTEST-793 Change-Id: I01d654dfe247c6102a90ba7ea3921a9f15991789 Signed-off-by: Dan Radez --- diff --git a/functest/ci/check_os.sh b/functest/ci/check_os.sh index 3920b7ac6..83f9f476d 100755 --- a/functest/ci/check_os.sh +++ b/functest/ci/check_os.sh @@ -69,7 +69,7 @@ fi echo "Checking OpenStack endpoints:" publicURL=$(openstack catalog show identity |awk '/public/ {print $4}') publicIP=$(echo $publicURL|sed 's/^.*http.*\:\/\///'|sed 's/.[^:]*$//') -publicPort=$(echo $publicURL|sed 's/^.*://'|sed 's/\/.*$//') +publicPort=$(echo $publicURL|grep -Po '(?<=:)\d+') https_enabled=$(echo $publicURL | grep 'https') if [[ -n $https_enabled ]]; then echo ">>Verifying SSL connectivity to the public endpoint $publicIP:$publicPort..." @@ -93,7 +93,7 @@ if [ -z ${adminURL} ]; then exit 1 fi adminIP=$(echo $adminURL|sed 's/^.*http.*\:\/\///'|sed 's/.[^:]*$//') -adminPort=$(echo $adminURL|sed 's/^.*://'|sed 's/.[^\/]*$//') +adminPort=$(echo $adminURL|grep -Po '(?<=:)\d+') https_enabled=$(echo $adminURL | grep 'https') if [[ -n $https_enabled ]]; then echo ">>Verifying SSL connectivity to the admin endpoint $adminIP:$adminPort..."