Skip to content

Commit

Permalink
Format fix for tools/switch.sh (#92)
Browse files Browse the repository at this point in the history
* Format fix for tools/switch.sh

Signed-off-by: Anthony Floeder <[email protected]>

* Add count of the number of attach/detach cycles run

Signed-off-by: Anthony Floeder <[email protected]>

---------

Signed-off-by: Anthony Floeder <[email protected]>
  • Loading branch information
ajfloeder authored Sep 6, 2023
1 parent 747bec9 commit 38b2731
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions scripts/hpecray-17.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@

endpoint_id = args.endpoint

createCount = 0
deleteCount = 0

print(f'Beginning Storage Group Create/Delete Loop: Pool: {pool_id} Endpoint: {endpoint_id}')
while True:
# Storage Group - Create
Expand All @@ -66,7 +69,8 @@
sys.exit(0)

group_id = response.json()['Id']
print(f'Created: Id: {group_id}')
createCount+=1
print(f'Created: Id: {group_id} count: {createCount}')

print(f'Pause 5 seconds for Storage Group to come ready')
time.sleep(5.0)
Expand All @@ -77,7 +81,8 @@
if not response.ok:
print(f'Storage Group Delete: Error: {response.status_code}')
sys.exit(0)
print(f'Deleted: Id: {group_id}')
deleteCount+=1
print(f'Deleted: Id: {group_id} count: {deleteCount}')

print(f'Pause 5 seconds for Storage Group to delete')
time.sleep(5.0)
2 changes: 1 addition & 1 deletion tools/switch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ displayDriveSlotStatus() {
esac
fi

printf "PDFID: %6.6s\tSLOT: %2.2d %15.15s %s %s %11.11s %s\n" "${PDFID//}" "${SLOT//}" "$MF" "$SN" "$FW" "$Device" "${physicalPortString//}"
printf "PDFID: %6.6s\tSLOT: %2.2d %15.15s %s %s %15.15s %s\n" "${PDFID//}" "${SLOT//}" "$MF" "$SN" "$FW" "$Device" "${physicalPortString//}"
done
printf "\n"
}
Expand Down

0 comments on commit 38b2731

Please sign in to comment.