Convert files to Unix format
[functest.git] / functest / ci / check_os.sh
old mode 100644 (file)
new mode 100755 (executable)
index 38fe32f..e247102
@@ -24,7 +24,7 @@ fi
 
 
 echo "Checking OpenStack endpoints:"
-publicURL=$OS_AUTH_URL
+publicURL=$(openstack catalog show  identity |awk '/public/ {print $4}')
 publicIP=$(echo $publicURL|sed 's/^.*http\:\/\///'|sed 's/.[^:]*$//')
 publicPort=$(echo $publicURL|sed 's/^.*://'|sed 's/\/.*$//')
 echo ">>Verifying connectivity to the public endpoint $publicIP:$publicPort..."
@@ -37,7 +37,12 @@ if [ $RETVAL -ne 0 ]; then
 fi
 echo "  ...OK"
 
-adminURL=$(openstack catalog show  identity |grep adminURL|awk '{print $4}')
+adminURL=$(openstack catalog show  identity |awk '/admin/ {print $4}')
+if [ -z ${adminURL} ]; then
+    echo "ERROR: Cannot determine the admin URL."
+    openstack catalog show identity
+    exit 1
+fi
 adminIP=$(echo $adminURL|sed 's/^.*http\:\/\///'|sed 's/.[^:]*$//')
 adminPort=$(echo $adminURL|sed 's/^.*://'|sed 's/.[^\/]*$//')
 echo ">>Verifying connectivity to the admin endpoint $adminIP:$adminPort..."