Add get_diagnostics method to retrieve diagnostics data from the API#216
Add get_diagnostics method to retrieve diagnostics data from the API#216lboue wants to merge 4 commits intohome-assistant-libs:mainfrom
Conversation
|
Please fix the lint error 👍 |
|
@lboue do you plan to make use of this feature in Home Assistant core? Is this feature supported by the hassio OTBR add-on? |
Yes, the goal is to make diag data accessible to the back office to facilitate diagnosis. How can I compile a dev version of the obtr addon that includes this modification in order to test it? A little help on this subject would be appreciated. |
@agners can answer that, but he's unavailable for a couple of weeks. I suggest to set this PR to draft until it's been tested with an OTBR addon which supports diagnostics. |
|
OK |
Description:
This pull request adds a new
get_diagnostics()method to theOTBRclass that retrieves the diagnostics collection from the Open Thread Border Router REST API.The goal is to make diag data accessible to the back office to facilitate diagnosis.
Changes
get_diagnostics()method that:/api/diagnosticsendpoint via a GET requestNoneif no diagnostics data is availableOTBRErrorfor non-200 responsesImplementation Details
OTBRclass (e.g.,get_coprocessor_version())Nonefor HTTP 204 (NO_CONTENT) responses, consistent with other methodsAPI Reference
Based on the OpenAPI specification: https://github.com/openthread/ot-br-posix/blob/main/src/rest/openapi.yaml