-
Notifications
You must be signed in to change notification settings - Fork 236
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
[rest] Add REST JSON:API for commissioner and diagnostics #2514
base: main
Are you sure you want to change the base?
Conversation
- api/node - api/devices - api/actions . addThreadDeviceTask . getNetworkDiagnosticsTask . resetNetworkDiagCounterTask . getEnergyScanTask - api/diagnostics . networkDiagnostic . energyScanReport The commit also provides integration tests, see tests/restjsonapi. For more details see Readme in src/rest/extensions.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2514 +/- ##
===========================================
- Coverage 55.77% 39.33% -16.44%
===========================================
Files 87 92 +5
Lines 6890 10275 +3385
Branches 0 745 +745
===========================================
+ Hits 3843 4042 +199
- Misses 3047 6032 +2985
- Partials 0 201 +201 ☔ View full report in Codecov by Sentry. |
Happy to discuss thoughts and improvements. Note: we will add a commit fixing the broken topology browser in otbr-web service asap. |
It looks #2515 is also adding the REST commissioner API. |
@martinzi Thanks for this contribution! But this PR is about 12K lines of change that it's too hard to review. Could you help split this PR by creating a separate smaller PR for each feature? For example, one PR for commissioner API and another PR for network diagnostic. |
Agree, it became quite large. See a first part split into PR2517. More to follow ... |
In this PR, we propose an extended
REST
API functionality providing capabilities for commissioning and on-mesh diagnostics to generic off-mesh http clients. The implementation is guided by the JSON:API specification and provides following partsapi/node
- pointing to api/devices/thisdeviceapi/devices
- a collection of discovered devicesapi/actions
- indirect processing of tasks, in particular for those that may need more timeaddThreadDeviceTask
- starts the on-mesh commissioner and adds the joiner candidate into the joiner tablegetNetworkDiagnosticTask
- sends diagnostic requests and diagnostic queries to the destinationresetNetworkDiagCounterTask
- resets the network diagnostic mle and/or mac countergetEnergyScanTask
- starts the commissioner and sends energy scan requests to the destinationapi/diagnostics
The PR provides integration tests for local validation, see tests/restjsonapi.
The Readme provides more details and descriptions in src/rest/extensions/README.md.