Browse code

Handle failure of openstack endpoint

Change 4f7bf6963a1e9ae03bc0ae9189874cba561ad62f introduced finding the
endpoint via "openstack endpoint show" only. Previously that output
was piped through grep, etc. so it handled fell back to a blank
output when the endpoints were not available.

Ignore failures of this command so the blank output is matched

Change-Id: Iae2f09784ffa38efd2f858513bf284c84c32edac

Ian Wienand authored on 2014/06/24 14:06:02
Showing 1 changed files
... ...
@@ -126,12 +126,12 @@ fi
126 126
 
127 127
 export -n SERVICE_TOKEN SERVICE_ENDPOINT OS_SERVICE_TOKEN OS_SERVICE_ENDPOINT
128 128
 
129
-EC2_URL=$(openstack endpoint show -f value -c publicurl ec2)
129
+EC2_URL=$(openstack endpoint show -f value -c publicurl ec2 || true)
130 130
 if [[ -z $EC2_URL ]]; then
131 131
     EC2_URL=http://localhost:8773/services/Cloud
132 132
 fi
133 133
 
134
-S3_URL=$(openstack endpoint show -f value -c publicurl s3)
134
+S3_URL=$(openstack endpoint show -f value -c publicurl s3 || true)
135 135
 if [[ -z $S3_URL ]]; then
136 136
     S3_URL=http://localhost:3333
137 137
 fi