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: Upgrade core-contracts lib to use redesigned device profile #816

Merged
merged 2 commits into from
Mar 15, 2021
Merged

feat: Upgrade core-contracts lib to use redesigned device profile #816

merged 2 commits into from
Mar 15, 2021

Conversation

weichou1229
Copy link
Member

Close #815

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

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/master/.github/CONTRIBUTING.md

What is the current behavior?

Issue Number: #815

What is the new behavior?

Upgrade core-contracts lib to apply the v2 device profile changes:

  • Upgrade core-contracts lib to use the redesigned device profile
  • Update swagger file

Does this PR introduce a breaking change?

  • Yes
  • No

New Imports

  • Yes
  • No

Specific Instructions

Other information

@codecov-io
Copy link

Codecov Report

Merging #816 (afe37b6) into master (3a78cb9) will decrease coverage by 0.19%.
The diff coverage is 40.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #816      +/-   ##
==========================================
- Coverage   31.56%   31.36%   -0.20%     
==========================================
  Files          33       33              
  Lines        2265     2257       -8     
==========================================
- Hits          715      708       -7     
+ Misses       1497     1496       -1     
  Partials       53       53              
Impacted Files Coverage Δ
internal/transformer/transform.go 0.00% <0.00%> (ø)
internal/transformer/transformparam.go 0.00% <ø> (ø)
internal/transformer/transformresult.go 67.31% <ø> (ø)
internal/v2/cache/profiles.go 91.93% <50.00%> (+0.26%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a78cb9...afe37b6. Read the comment docs.

lenny-goodell
lenny-goodell previously approved these changes Mar 12, 2021
Copy link
Member

@lenny-goodell lenny-goodell left a comment

Choose a reason for hiding this comment

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

LGTM

- { deviceResource: "SwitchButton" }
set:
- { deviceResource: "SwitchButton", parameter: "false" }
readWrite: "W"
Copy link
Member

Choose a reason for hiding this comment

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

The original sample is RW

Copy link
Member Author

Choose a reason for hiding this comment

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

Modified.

@@ -81,7 +81,7 @@ RetryWaitPeriod = "1s"
[[DeviceList.AutoEvents]]
Frequency = '10s'
OnChange = false
SourceName = 'Switch'
SourceName = 'SwitchButton'
Copy link
Member

Choose a reason for hiding this comment

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

You don't need to make this change if it is RW

Copy link
Member Author

Choose a reason for hiding this comment

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

Modified.

type: integer
description: "A Unix timestamp indicating when the object was last modified"
description:
apiVersion:
Copy link
Member

Choose a reason for hiding this comment

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

apiVersion will only be in request, response, and event

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed the apiVersion from the device profile schema.

@cloudxxx8
Copy link
Member

@weichou1229 please help resolve the conflict

Upgrade core-contracts lib to apply the v2 device profile changes:
- Upgrade core-contracts lib to use the redesigned device profile
- Update swagger file

Close #815

Signed-off-by: weichou <weichou1229@gmail.com>
Close #815

Signed-off-by: weichou <weichou1229@gmail.com>
@weichou1229
Copy link
Member Author

Rebased and resolved the conflict.

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 a5ad5ab into edgexfoundry:master Mar 15, 2021
@weichou1229 weichou1229 deleted the issue-815 branch March 15, 2021 10:57
AlexCuse pushed a commit to Technotects/device-sdk-go that referenced this pull request Mar 30, 2021
…gexfoundry#816)

* feat: Upgrade core-contracts lib to use redesigned device profile

Upgrade core-contracts lib to apply the v2 device profile changes:
- Upgrade core-contracts lib to use the redesigned device profile
- Update swagger file

Close edgexfoundry#815

Signed-off-by: weichou <weichou1229@gmail.com>
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.

Upgrade core-contracts lib to use redesigned device profile
4 participants