This patch removes the following bash8 warnings.
> /devstack/ $ ./run_tests.sh
> Running bash8...
> E003: Indent not multiple of 4: ' wget -c $image_url -O $FILES/$IMAGE_FNAME'
> - functions: L1367
> E003: Indent not multiple of 4: ' if [[ $? -ne 0 ]]; then'
> - functions: L1368
> E003: Indent not multiple of 4: ' echo "Not found: $image_url"'
> - functions: L1369
> E003: Indent not multiple of 4: ' return'
> - functions: L1370
> E003: Indent not multiple of 4: ' fi'
> - functions: L1371
> E003: Indent not multiple of 4: ' `"should use a descriptor-data pair."'
> - functions: L1423
> E003: Indent not multiple of 4: ' `" Attempt to retrieve the *-flat.vmdk: $flat_url"'
> - functions: L1438
> E003: Indent not multiple of 4: ' `" Attempt to retrieve the descriptor *.vmdk: $descriptor_url"'
> - functions: L1477
> E003: Indent not multiple of 4: ' warn $LINENO "Descriptor not found $descriptor_url"'
> - functions: L1492
> E003: Indent not multiple of 4: ' descriptor_found=false'
> - functions: L1493
> E003: Indent not multiple of 4: ' fi'
> - functions: L1501
> E003: Indent not multiple of 4: ' fi'
> - functions: L1502
> E003: Indent not multiple of 4: ' #TODO(alegendre): handle streamOptimized once supported by the VMware driver.'
> - functions: L1503
> E003: Indent not multiple of 4: ' vmdk_disktype="preallocated"'
> - functions: L1504
> 14 bash8 error(s) found
Change-Id: Icf2cddf283192a50253ccfa697c2d32eec75b4ba
Closes-Bug: #1267716
... | ... |
@@ -1364,11 +1364,11 @@ function upload_image() { |
1364 | 1364 |
if [[ $image_url != file* ]]; then |
1365 | 1365 |
# Downloads the image (uec ami+aki style), then extracts it. |
1366 | 1366 |
if [[ ! -f $FILES/$IMAGE_FNAME || "$(stat -c "%s" $FILES/$IMAGE_FNAME)" = "0" ]]; then |
1367 |
- wget -c $image_url -O $FILES/$IMAGE_FNAME |
|
1368 |
- if [[ $? -ne 0 ]]; then |
|
1369 |
- echo "Not found: $image_url" |
|
1370 |
- return |
|
1371 |
- fi |
|
1367 |
+ wget -c $image_url -O $FILES/$IMAGE_FNAME |
|
1368 |
+ if [[ $? -ne 0 ]]; then |
|
1369 |
+ echo "Not found: $image_url" |
|
1370 |
+ return |
|
1371 |
+ fi |
|
1372 | 1372 |
fi |
1373 | 1373 |
IMAGE="$FILES/${IMAGE_FNAME}" |
1374 | 1374 |
else |
... | ... |
@@ -1420,7 +1420,7 @@ function upload_image() { |
1420 | 1420 |
vmdk_create_type="${vmdk_create_type%?}" |
1421 | 1421 |
|
1422 | 1422 |
descriptor_data_pair_msg="Monolithic flat and VMFS disks "` |
1423 |
- `"should use a descriptor-data pair." |
|
1423 |
+ `"should use a descriptor-data pair." |
|
1424 | 1424 |
if [[ "$vmdk_create_type" = "monolithicSparse" ]]; then |
1425 | 1425 |
vmdk_disktype="sparse" |
1426 | 1426 |
elif [[ "$vmdk_create_type" = "monolithicFlat" || \ |
... | ... |
@@ -1435,7 +1435,7 @@ function upload_image() { |
1435 | 1435 |
path_len=`expr ${#image_url} - ${#IMAGE_FNAME}` |
1436 | 1436 |
flat_url="${image_url:0:$path_len}$flat_fname" |
1437 | 1437 |
warn $LINENO "$descriptor_data_pair_msg"` |
1438 |
- `" Attempt to retrieve the *-flat.vmdk: $flat_url" |
|
1438 |
+ `" Attempt to retrieve the *-flat.vmdk: $flat_url" |
|
1439 | 1439 |
if [[ $flat_url != file* ]]; then |
1440 | 1440 |
if [[ ! -f $FILES/$flat_fname || \ |
1441 | 1441 |
"$(stat -c "%s" $FILES/$flat_fname)" = "0" ]]; then |
... | ... |
@@ -1474,7 +1474,7 @@ function upload_image() { |
1474 | 1474 |
flat_path="${image_url:0:$path_len}" |
1475 | 1475 |
descriptor_url=$flat_path$descriptor_fname |
1476 | 1476 |
warn $LINENO "$descriptor_data_pair_msg"` |
1477 |
- `" Attempt to retrieve the descriptor *.vmdk: $descriptor_url" |
|
1477 |
+ `" Attempt to retrieve the descriptor *.vmdk: $descriptor_url" |
|
1478 | 1478 |
if [[ $flat_path != file* ]]; then |
1479 | 1479 |
if [[ ! -f $FILES/$descriptor_fname || \ |
1480 | 1480 |
"$(stat -c "%s" $FILES/$descriptor_fname)" = "0" ]]; then |
... | ... |
@@ -1489,8 +1489,8 @@ function upload_image() { |
1489 | 1489 |
descriptor_url=$(echo $descriptor_url | sed "s/^file:\/\///g") |
1490 | 1490 |
if [[ ! -f $descriptor_url || \ |
1491 | 1491 |
"$(stat -c "%s" $descriptor_url)" == "0" ]]; then |
1492 |
- warn $LINENO "Descriptor not found $descriptor_url" |
|
1493 |
- descriptor_found=false |
|
1492 |
+ warn $LINENO "Descriptor not found $descriptor_url" |
|
1493 |
+ descriptor_found=false |
|
1494 | 1494 |
fi |
1495 | 1495 |
fi |
1496 | 1496 |
if $descriptor_found; then |
... | ... |
@@ -1498,10 +1498,10 @@ function upload_image() { |
1498 | 1498 |
`"grep -a -F -m 1 'ddb.adapterType =' $descriptor_url)" |
1499 | 1499 |
vmdk_adapter_type="${vmdk_adapter_type#*\"}" |
1500 | 1500 |
vmdk_adapter_type="${vmdk_adapter_type%?}" |
1501 |
- fi |
|
1502 |
- fi |
|
1503 |
- #TODO(alegendre): handle streamOptimized once supported by the VMware driver. |
|
1504 |
- vmdk_disktype="preallocated" |
|
1501 |
+ fi |
|
1502 |
+ fi |
|
1503 |
+ #TODO(alegendre): handle streamOptimized once supported by the VMware driver. |
|
1504 |
+ vmdk_disktype="preallocated" |
|
1505 | 1505 |
else |
1506 | 1506 |
#TODO(alegendre): handle streamOptimized once supported by the VMware driver. |
1507 | 1507 |
vmdk_disktype="preallocated" |