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

feat: Add optional Parent field to Device objects. #512

Conversation

eaton-coreymutter
Copy link
Contributor

BREAKING CHANGE: Parent parameter added to edgex_add_device(), edgex_update_device().

Part of edgexfoundry/edgex-go#4769 implementation but does not close it on its own.

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/device-sdk-c/blob/main/.github/Contributing.md

PR Checklist

Please check if your PR fulfills the following requirements:

  • I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break) Flagged - added "parent" parameter to two public functions
  • I am not introducing a new dependency (add notes below if you are)
  • I have added unit tests for the new feature or bug fix (if not, why?) None already in repo
  • I have fully tested (add details below) this the new feature or bug fix (if not, why?)
  • I have opened a PR for the related docs change (if not, why?) Docs (OpenAPI) to update are in edgex-go, will include with core-metadata PR

Testing Instructions

I tested using device-random in the examples, both against a core-metadata that supports the parent field (and creating a child device), and against an unmodified core-metadata (without the parent field set in the device yaml file). The devices created succesfully and persisted successfully.

New Dependency Instructions (If applicable)

BREAKING CHANGE: Parent parameter added to edgex_add_device(), edgex_update_device().

Signed-off-by: Corey Mutter <[email protected]>
FelixTing
FelixTing previously approved these changes Apr 15, 2024
Copy link
Member

@FelixTing FelixTing left a comment

Choose a reason for hiding this comment

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

LGTM

@FelixTing FelixTing dismissed their stale review April 15, 2024 02:34

needs a little tweak in code style

src/c/edgex-rest.c Outdated Show resolved Hide resolved
Co-authored-by: Felix Ting <[email protected]>
Signed-off-by: Corey Mutter <[email protected]>
Copy link
Member

@FelixTing FelixTing left a comment

Choose a reason for hiding this comment

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

LGTM

@FelixTing FelixTing merged commit 6abec0d into edgexfoundry:main Apr 17, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants