From 8dfdbd5495731ea2530a4ad051b7a04a60ace6be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 5 Sep 2012 23:30:58 +0200 Subject: [PATCH] Change variables name and remove uppercase --- ocf/quantum-server | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ocf/quantum-server b/ocf/quantum-server index 674b0b0..b62d021 100644 --- a/ocf/quantum-server +++ b/ocf/quantum-server @@ -235,6 +235,7 @@ quantum_server_status() { quantum_server_monitor() { local rc local token + local http_code quantum_server_status rc=$? @@ -247,14 +248,14 @@ quantum_server_monitor() { # Check detailed information about this specific version of the API. if [ -n "$OCF_RESKEY_os_username" ] && [ -n "$OCF_RESKEY_os_password" ] \ && [ -n "$OCF_RESKEY_os_tenant_name" ] && [ -n "$OCF_RESKEY_keystone_url" ]; then - TOKEN=`curl -s -d "{\"auth\":{\"passwordCredentials\": {\"username\": \"$OCF_RESKEY_os_username\", \ + token=`curl -s -d "{\"auth\":{\"passwordCredentials\": {\"username\": \"$OCF_RESKEY_os_username\", \ \"password\": \"$OCF_RESKEY_os_password\"}, \"tenantName\": \"$OCF_RESKEY_os_tenant_name\"}}" \ -H "Content-type: application/json" $OCF_RESKEY_keystone_url | tr ',' '\n' | grep '"id":' \ | cut -d'"' -f4 | head --lines 1` - HTTP_CODE=`curl --write-out %{http_code} --output /dev/null -sH "X-Auth-Token: $TOKEN" $OCF_RESKEY_url` + http_code=`curl --write-out %{http_code} --output /dev/null -sH "X-Auth-Token: $token" $OCF_RESKEY_url` rc=$? - if [ $rc -ne 0 ] || [ $HTTP_CODE -ne 200 ]; then - ocf_log err "Failed to connect to the OpenStack Quantum API (quantum-server): $rc and $HTTP_CODE" + if [ $rc -ne 0 ] || [ $http_code -ne 200 ]; then + ocf_log err "Failed to connect to the OpenStack Quantum API (quantum-server): $rc and $http_code" return $OCF_NOT_RUNNING fi fi @@ -280,7 +281,6 @@ quantum_server_start() { # Spin waiting for the server to come up. # Let the CRM/LRM time us out if required - sleep 1 while true; do quantum_server_monitor rc=$?