Riccardo Pittau 97605e7724 Add read_timeout and connect_timeout parameters for faster BMC failure
When a BMC is unreachable, sushy would wait up to 60 seconds per
connection attempt before timing out. This can cause significant
delays in scenarios where nodes are being deleted with invalid BMC
addresses.

This change adds two new parameters to the Sushy class:

- read_timeout: HTTP read timeout in seconds (default: 60, unchanged
  from previous behavior)
- connect_timeout: TCP connection timeout in seconds (default: None)

When connect_timeout is specified, sushy uses separate timeouts for
establishing the TCP connection versus waiting for response data.
This allows faster failure when a BMC is unreachable (e.g., 10s)
while still allowing longer read timeouts for slow BMCs (e.g., 60s).

The change is fully backwards compatible - existing code works
unchanged, and the new parameters are opt-in.

Assisted-By: Claude Sonnet 4.5
Change-Id: Ib9fa5ea0decf20768dc92abd8e7512187e80e353
Signed-off-by: Riccardo Pittau <elfosardo@gmail.com>
2025-12-23 09:55:36 +01:00
2024-11-11 11:13:13 -06:00
2018-09-25 07:13:40 +00:00
2018-07-19 10:46:08 +07:00
2019-04-19 19:48:38 +00:00
2017-02-13 22:04:23 +00:00
2020-05-14 13:36:50 +02:00
2018-02-06 00:58:41 +08:00
2017-02-13 22:04:23 +00:00
2025-10-13 12:01:04 +02:00
2021-01-06 18:09:30 +01:00
2024-11-11 11:13:13 -06:00

Overview

Sushy is a Python library to communicate with Redfish based systems.

The goal of the library is to be extremely simple, small, have as few dependencies as possible and be very conservative when dealing with BMCs by issuing just enough requests to it (BMCs are very flaky).

Therefore, the scope of the library has been limited to what is supported by the OpenStack Ironic project. As the project grows and more features from Redfish are needed we can expand Sushy to fulfill those requirements.

Description
Sushy is a small Python library to communicate with Redfish based systems
Readme 10 MiB
Languages
Python 100%