fix: read a Supermicro X10 with only the OOB license over Redfish (0.3.1)

First run against real hardware over Redfish: an X10DRL-i (BMC 3.91) with
SFT-OOB-LIC. Its Redfish tree is recorded under
tests/fixtures/supermicro-x10drl-i-3.91/redfish, scrubbed.

- A resource refused for want of a further license (403 OemLicenseNotPassed)
  no longer fails the getter. Storage then falls back to SimpleStorage. The
  firmware list falls back to the BMC and BIOS versions when UpdateService
  is withheld.
- get_device_warnings reports bmc_license_partial with the licenses and the
  withheld parts (drives, firmware inventory).
- A placeholder system model ("Super Server") is replaced by the board
  (PartNumber, else the chassis model).
This commit is contained in:
Christian Manivong committed 2026-10-17 09:32:09 +02:00
1 parent 6c60f7ac60
commit adf152ee12
78 files changed
+3237 -24

No files matched your search

+18
View File
@@ -73,6 +73,20 @@ class RedfishAuthError(RedfishError):
"""Login failed, or the account may not read the resource (HTTP 401/403)."""
class RedfishFeatureLicenseError(RedfishAuthError):
"""One resource is refused until a vendor license is activated, the rest answers.
A Supermicro X10 with only the OOB license reads ``Systems`` and ``Managers`` but
refuses ``Systems/1/Storage`` and ``UpdateService`` for want of DCMS.
"""
def __init__(self, message: str, *, licenses: str = "", status: int | None = None,
path: str | None = None):
super().__init__(message, status=status, path=path)
#: The licenses the service names, e.g. "DCMS"; empty when it names none.
self.licenses = licenses
class RedfishHTTPError(RedfishError):
"""The service answered with an HTTP error status."""
@@ -336,6 +350,10 @@ class RedfishTransport:
return data
detail = _error_message(data)
message = f"{method} {path}: HTTP {status}" + (f": {detail}" if detail else "")
if status == 403 and any(i.endswith(LICENSE_REFUSED) for i in _message_ids(data)):
raise RedfishFeatureLicenseError(
message, licenses=" ".join(" ".join(_message_args(data)).split()),
status=status, path=path)
if status in (401, 403):
raise RedfishAuthError(message, status=status, path=path)
if status == 404: