Skip to content
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] support Thread state change #1866

Merged
merged 6 commits into from
May 17, 2023

Conversation

agners
Copy link
Contributor

@agners agners commented May 11, 2023

Allow to enable and disable the Thread protocol operation.

@agners agners force-pushed the rest-add-state-change-support branch from 86e0e6c to 1017f65 Compare May 12, 2023 06:29
@jwhui jwhui requested a review from wgtdkp May 12, 2023 14:21
src/rest/openapi.yaml Show resolved Hide resolved
src/rest/resource.cpp Show resolved Hide resolved
Allow to enable and disable the Thread protocol operation.
The device role name is useful for other APIs as well, e.g. the REST
API. Move the helper into a new common compile unit.
@agners agners force-pushed the rest-add-state-change-support branch from 1017f65 to c0dbd53 Compare May 15, 2023 12:18
Returning the OpenThread state as a number is not very REST like, use a
string instead. Reuse the string returned by the D-Bus API.
@agners agners force-pushed the rest-add-state-change-support branch from c0dbd53 to f28b0ca Compare May 15, 2023 12:25
@jwhui jwhui requested a review from wgtdkp May 15, 2023 20:40
Copy link
Member

@wgtdkp wgtdkp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

src/common/api_strings.cpp Outdated Show resolved Hide resolved
src/common/api_strings.hpp Outdated Show resolved Hide resolved
src/rest/json.hpp Outdated Show resolved Hide resolved
src/rest/resource.cpp Outdated Show resolved Hide resolved
Co-authored-by: Jonathan Hui <jonhui@google.com>
@agners agners force-pushed the rest-add-state-change-support branch from 2e4e9bc to 8b13968 Compare May 16, 2023 14:36
Co-authored-by: Jonathan Hui <jonhui@google.com>
@agners agners force-pushed the rest-add-state-change-support branch from 8b13968 to c069261 Compare May 17, 2023 07:54
Reflect the new data type string returned by the state endpoint.
@agners agners force-pushed the rest-add-state-change-support branch from 6a6b88b to ecf9f8e Compare May 17, 2023 19:56
Copy link
Member

@jwhui jwhui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 👍🏼

@jwhui jwhui merged commit 9a87cea into openthread:main May 17, 2023
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants