mirror of
https://github.com/xcat2/confluent.git
synced 2026-08-27 17:16:42 +00:00
d77e71967a
Reading the alert destinations of a bmc that has none reported "Unknown code 0x80 encountered", which is the fallback text for a completion code the library has no name for. 0x80 on this parameter is not a failure, it is the platform saying it does not have alert destinations, and the redfish side of the same resource has said so in words for a while. The lan parameter fetch already knew how to tell those apart, so build the alert reads on it rather than on a raw command that raises on any non-zero code, and raise UnsupportedFunctionality with something to read. Both the count and an individual destination are covered, so a platform that offers one and not the other says the same thing instead of failing differently. Splitting the completion code handling out of the parameter fetch is what makes that reuse possible; the interpretation of the payload, and every answer it gives, is unchanged. The oem hook for the destination count was passing its byte through ord(), which raises TypeError on the bytearray it is given. No handler in tree implements the hook, so it had never been called; hand it the integer.