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 new Properties field to ProvisionWatcher DTO and Model #803

Merged
merged 1 commit into from
Feb 21, 2023

Conversation

judehung
Copy link
Member

@judehung judehung commented Feb 17, 2023

Add an extendable field into ProvisionWatcher DTO and Model: Properties map[string]any. This is useful when certain device services requires extra information from ProvisionWatcher. For example, assume a device service would like to generate the device name in certain format during auto discovery, the user can define a property "DeviceNameTemplate" with value as the template of device name in the ProvisionWatcher, so that the device service can pick up such property to generate the device name.

fixes #772

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/go-mod-core-contracts/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)
  • 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?)
  • 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?)

Testing Instructions

New Dependency Instructions (If applicable)

Add an extendable field into ProvisionWatcher DTO and Model: Properties map[string]any
This is useful when certain device services requires extra information from ProvisionWatcher.  For example, assume a device service would like to generate the device name in certain format during auto discovery, the user can define a property "DeviceNameTemplate" with value as the template of device name in the ProvisionWatcher, so that the device service can pick up such property to generate the device name.

fixes edgexfoundry#772

Signed-off-by: Jude Hung <[email protected]>
@codecov-commenter
Copy link

Codecov Report

Merging #803 (4695302) into main (1bb5704) will decrease coverage by 0.08%.
The diff coverage is 20.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main     #803      +/-   ##
==========================================
- Coverage   64.46%   64.39%   -0.08%     
==========================================
  Files          80       80              
  Lines        3079     3084       +5     
==========================================
+ Hits         1985     1986       +1     
- Misses        905      908       +3     
- Partials      189      190       +1     
Impacted Files Coverage Δ
dtos/requests/provisionwatcher.go 71.42% <0.00%> (-2.65%) ⬇️
dtos/provisionwatcher.go 35.00% <33.33%> (-0.14%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@judehung judehung marked this pull request as ready for review February 17, 2023 15:50
Copy link
Member

@cloudxxx8 cloudxxx8 left a comment

Choose a reason for hiding this comment

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

LGTM

@cloudxxx8 cloudxxx8 merged commit 9c4cdf6 into edgexfoundry:main Feb 21, 2023
judehung added a commit to judehung/edgex-docs that referenced this pull request Feb 22, 2023
…isionWatcher dto

Per edgexfoundry/go-mod-core-contracts#803 and edgexfoundry/go-mod-core-contracts#800, new fields `properties` are added into Device dto and ProvisionWatcher dto. This PR updates edgex-docs with the description of these new fields.

Signed-off-by: Jude Hung <[email protected]>
judehung added a commit to judehung/edgex-docs that referenced this pull request Feb 22, 2023
…isionWatcher dto

Per edgexfoundry/go-mod-core-contracts#803 and edgexfoundry/go-mod-core-contracts#800, new fields `properties` are added into Device dto and ProvisionWatcher dto. This PR updates edgex-docs with the description of these new fields.

fixes edgexfoundry#969

Signed-off-by: Jude Hung <[email protected]>
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.

[EdgeX 3.0] Provision Watcher model improvement
3 participants