Fix flexvolume script formatting
@@ -47,15 +47,13 @@ getExistingVolume() {
local jsonParams=$1
local volumeName=$2
local OUT=$(curl -s --connect-timeout 1 http://${LONGHORN_SVC}/v1/volumes/${volumeName})
- if [ $? -ne 0 ]
- then
+ if [ $? -ne 0 ]; then
debug "fail to get existing volume info: ${OUT}"
echo -ne "${OUT}"
return
fi
# wait for volume to be detached
- for i in `seq 1 $RETRY_COUNTS`;
- do
+ for i in `seq 1 $RETRY_COUNTS`; do
OUT=$(dealExistedVolume ${jsonParams} ${volumeName})
if [ "$OUT" != "detaching" ]; then
break
@@ -175,8 +173,7 @@ waitVolumeReady() {
local VOLUME_STATE=""
until [ "${VOLUME_STATE}" == ${state} ]; do
v=$(curl -s --connect-timeout 1 http://${LONGHORN_SVC}/v1/volumes/${volumeName})
- if [[ $v = *"cannot find volume"* ]];
- then
+ if [[ $v = *"cannot find volume"* ]]; then
debug "cannot find volume ${volumeName}"
if [ "${state}" == "detached" ]; then
# to "Success"
