feat(ref): reloadDatabase command support#209
feat(ref): reloadDatabase command support#209Lakshmi97-velampati wants to merge 5 commits intomainfrom
Conversation
Adds the command to reloadDatabase reference app's cli. But right now this is marked as advanced so not possible to run from cli. Refs: BARTON-110 Signed-off-by: mvelam850 <munilakshmi_velampati@comcast.com>
There was a problem hiding this comment.
Pull request overview
Adds support for a new reloadDatabase operation by exposing it through the C client API and wiring it into the reference app’s Core CLI category (as an advanced command).
Changes:
- Add
b_core_client_reload_database()to the C client implementation and public header. - Add
reloadDatabaseadvanced command to the reference CLI Core category, invoking the new client API.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| reference/src/coreCategory.c | Adds reloadDatabase advanced CLI command and handler function |
| api/c/src/barton-core-client.c | Implements new C client API wrapper calling deviceServiceReloadDatabase() |
| api/c/public/barton-core-client.h | Declares and documents b_core_client_reload_database() in the public API |
|
@copilot apply changes based on the comments in this thread |
- Add blank lines before if/return in reloadDatabaseFunc - Fix comment style: add space after // for reload database comment - Add test_b_core_client_reload_database with NULL guard and success/failure cases - Add __wrap_deviceServiceReloadDatabase wrap function and declaration - Register new test in main() and add wrap to CMakeLists.txt" Agent-Logs-Url: https://github.com/rdkcentral/BartonCore/sessions/3637ed33-d8fd-4b2a-a879-f4d10bcc92e0 Co-authored-by: Lakshmi97-velampati <190572788+Lakshmi97-velampati@users.noreply.github.com>
Applied all three code review changes in commit 8e7b835:
|
tleacmcsa
left a comment
There was a problem hiding this comment.
"advanced" commands do not make sense in Barton's reference app, which was started from the official xhDeviceUtil source.
Please remove the concept of advanced commands from the reference app codebase.
@tleacmcsa if it is not required can we discard this PR. And do you want to remove the existing command removeDevices which was marked as advanced as part of this ticket? |
I think Thomas means specifically the "advanced" flag and API in the reference app can be discarded (it and other pieces of the reference app originally came from a different utility called devuceUtil). reloadDatabase is still desired. Same with removeDevice, which should not be marked advanced but we still want to keep it. |
Signed-off-by: mvelam850 <munilakshmi_velampati@comcast.com>
Done |
|
@copilot apply changes based on the comments in this thread |
…goryPrint - Remove '(advanced)' from '// remove devices (advanced)' comment - Remove '(advanced)' from '// reload database (advanced)' comment - Add blank line before 'for' loop in categoryPrint per blank-line style rules Agent-Logs-Url: https://github.com/rdkcentral/BartonCore/sessions/6678de97-7ef5-4a18-a062-3175709c451b Co-authored-by: Lakshmi97-velampati <190572788+Lakshmi97-velampati@users.noreply.github.com>
Applied all review feedback in commit 9719ea5:
The removal of the |
Done |
Adds the command to reloadDatabase reference app's cli. Also removes the concept of advance commands from barton's reference app. Now it will show all the commands.
Refs: BARTON-110