6 # -o pipefail: Fail on errors in scripts this calls, give stacktrace
9 echo "Waiting for ODL REST API to come up..."
12 # Will fail if 8181 isn't open, check for that first
13 RESP=$( curl --user admin:admin --silent --head --output /dev/null --write-out '%{http_code}' http://localhost:8181/restconf/modules )
14 echo "Curl of ODL REST API HTTP response code: $RESP"
15 if [[ $RESP = *200* ]]; then
16 echo "ODL REST API returned 200"
18 elif [ $COUNT -gt 120 ]; then
19 echo "Timeout waiting for HTTP 200 from REST API"