Merge pull request #369 from TheHADILP/auth-error

Print error message on wrong API credentials
This commit is contained in:
Marco Ochse 2019-05-14 16:09:20 +02:00 committed by GitHub
commit 72cdf68a60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -109,7 +109,9 @@ if [ $? -eq 0 ]; then
else else
if grep 'Flavor' otc_tools.log > /dev/null; then if grep '401 Unauthorized' otc_tools.log > /dev/null; then
echo "### API username or password is incorrect"
elif grep 'Flavor' otc_tools.log > /dev/null; then
echo "### Specified ECS Flavor not found" echo "### Specified ECS Flavor not found"
elif grep 'No image found by name' otc_tools.log > /dev/null; then elif grep 'No image found by name' otc_tools.log > /dev/null; then
echo "### Specified Image not found" echo "### Specified Image not found"