Skip to content

Commit 495c2ae

Browse files
authored
CASMPET-6925: Fix shellcheck errors, add missing copyright headers (#570)
* CASMPET-6925: Add missing copyright headers * CASMPET-6925: Fix shellcheck errors (cherry picked from commit 5b1c314) * CASMPET-6925: Remove pyc files that accidentally got comitted; prevent new ones from sneaking in
1 parent 03f5749 commit 495c2ae

8 files changed

+55
-5
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+

goss-testing/scripts/ceph-service-status.sh

+23-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
#!/bin/bash
2-
# Copyright 2021 Hewlett Packard Enterprise Development LP
2+
#
3+
# MIT License
4+
#
5+
# (C) Copyright 2021-2024 Hewlett Packard Enterprise Development LP
6+
#
7+
# Permission is hereby granted, free of charge, to any person obtaining a
8+
# copy of this software and associated documentation files (the "Software"),
9+
# to deal in the Software without restriction, including without limitation
10+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
11+
# and/or sell copies of the Software, and to permit persons to whom the
12+
# Software is furnished to do so, subject to the following conditions:
13+
#
14+
# The above copyright notice and this permission notice shall be included
15+
# in all copies or substantial portions of the Software.
16+
#
17+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20+
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
21+
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23+
# OTHER DEALINGS IN THE SOFTWARE.
24+
#
325

426
# Default values
527
verbose=false

goss-testing/scripts/check_goss_k8s_pods_ips_in_nmn_pool.sh

+23
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
11
#!/bin/bash
2+
#
3+
# MIT License
4+
#
5+
# (C) Copyright 2023-2024 Hewlett Packard Enterprise Development LP
6+
#
7+
# Permission is hereby granted, free of charge, to any person obtaining a
8+
# copy of this software and associated documentation files (the "Software"),
9+
# to deal in the Software without restriction, including without limitation
10+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
11+
# and/or sell copies of the Software, and to permit persons to whom the
12+
# Software is furnished to do so, subject to the following conditions:
13+
#
14+
# The above copyright notice and this permission notice shall be included
15+
# in all copies or substantial portions of the Software.
16+
#
17+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20+
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
21+
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23+
# OTHER DEALINGS IN THE SOFTWARE.
24+
#
225

326
out=$(cray sls search networks list --name NMN --format json 2>&1)
427
if [ "$?" -eq 0 ]; then

goss-testing/scripts/k8s_kyverno_pods_running.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# MIT License
44
#
5-
# (C) Copyright 2022 Hewlett Packard Enterprise Development LP
5+
# (C) Copyright 2022, 2024 Hewlett Packard Enterprise Development LP
66
#
77
# Permission is hereby granted, free of charge, to any person obtaining a
88
# copy of this software and associated documentation files (the "Software"),
@@ -46,7 +46,7 @@ rc=$?
4646
if [[ ${rc} -ne 0 ]]
4747
then
4848
# Split into two echo commands for code readability
49-
echo -n "ERROR: Command pipeline failed (return code $?): " 1>&2
49+
echo -n "ERROR: Command pipeline failed (return code $rc): " 1>&2
5050
echo "kubectl get pods -n kyverno -o json | jq '[.items[] | select(.metadata.labels.app == \"kyverno\").status.containerStatuses[0].state.running] | length'" 1>&2
5151
echo "FAIL"
5252
exit 10
Binary file not shown.
Binary file not shown.
Binary file not shown.

goss-testing/scripts/velero_backups_check.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# MIT License
44
#
5-
# (C) Copyright 2022-2023 Hewlett Packard Enterprise Development LP
5+
# (C) Copyright 2022-2024 Hewlett Packard Enterprise Development LP
66
#
77
# Permission is hereby granted, free of charge, to any person obtaining a
88
# copy of this software and associated documentation files (the "Software"),
@@ -68,7 +68,7 @@ cleanup_velero_backups() {
6868
time_from_schedule_creation_to_backup=$(( $backup_creation_date_sec - $schedule_creation_date_sec ))
6969
if [[ ! -z $backup_creation_date_sec && ${time_from_schedule_creation_to_backup} -ge 0 && ${time_from_schedule_creation_to_backup} -lt $ten_minutes ]]
7070
then
71-
delete_count+=1
71+
(( delete_count+=1 ))
7272
echo "velero backup delete ${backup_name}"
7373
velero backup delete ${backup_name} --confirm
7474
ns=$(kubectl get backups -A -o json | jq -re ".items[] | select (.metadata.name == \"${backup_name}\") | .metadata.namespace")

0 commit comments

Comments
 (0)