Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added '--timeout' option to rf_update.py to manually specify a timeout for the file transfer #170

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/rf_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A tool to perform an update with a Redfish service.
usage: rf_update.py [-h] --user USER --password PASSWORD --rhost RHOST --image
IMAGE [--target TARGET]
[--applytime {Immediate,OnReset,AtMaintenanceWindowStart,InMaintenanceWindowOnReset,OnStartUpdateRequest}]
[--debug]
[--timeout TIMEOUT] [--debug]

A tool to perform an update with a Redfish service

Expand All @@ -31,6 +31,9 @@ optional arguments:
The target resource to apply the image
--applytime {Immediate,OnReset,AtMaintenanceWindowStart,InMaintenanceWindowOnReset,OnStartUpdateRequest}, -at {Immediate,OnReset,AtMaintenanceWindowStart,InMaintenanceWindowOnReset,OnStartUpdateRequest}
The apply time for the update
--timeout TIMEOUT, -timeout TIMEOUT
The timeout, in seconds, to transfer the image; by
default this is 2 seconds per MB
--debug Creates debug file showing HTTP traces and exceptions
```

Expand Down
3 changes: 2 additions & 1 deletion scripts/rf_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def print_error_payload(response):
help="The apply time for the update",
choices=redfish_utilities.operation_apply_times,
)
argget.add_argument("--timeout", "-timeout", type=int, help="The timeout, in seconds, to transfer the image; by default this is 2 seconds per MB")
argget.add_argument("--debug", action="store_true", help="Creates debug file showing HTTP traces and exceptions")
args = argget.parse_args()

Expand Down Expand Up @@ -135,7 +136,7 @@ def print_error_payload(response):
"Pushing the image to the service directly; depending on the size of the image, this can take a few minutes..."
)
response = redfish_utilities.multipart_push_update(
redfish_obj, args.image, targets=targets, apply_time=args.applytime
redfish_obj, args.image, targets=targets, timeout=args.timeout, apply_time=args.applytime
)
else:
# Host a local web server and perform a SimpleUpdate for the local image
Expand Down