+function wait_keystone_host(){
+ attempt=0
+ timeout=2
+ echo "Wait until Keystone hostname can be resolved "
+ while ! nslookup $KEYSTONE_HOST; do
+ #wait 120 sec
+ if [ $attempt -ge $max_attempts ]; then
+ echo
+ echo "Can not resolve ${KEYSTONE_HOST} during $max_attempts sec"
+ return 1
+ fi
+ attempt=$[$attempt+1]
+ echo -n "."
+ sleep 1
+ done
+ return 0
+}
+