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: update profile cache to reflect new profile model #862

Merged
merged 2 commits into from
Apr 6, 2021

Conversation

chr1shung
Copy link

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?

profile cache design and implementation is not aligned with latest profile model: edgexfoundry/go-mod-core-contracts#540

Issue Number: fix #854

What is the new behavior?

update profile cache. Also status code 405 can now be correctly returned by device command while trying to read(write) a write-only(read-only) device command.

Does this PR introduce a breaking change?

  • Yes
  • No

DeviceService.ResourceOperation method has been updated to DeviceService.DeviceCommand

New Imports

  • Yes
  • No

Specific Instructions

Other information

internal/cache/profiles.go Outdated Show resolved Hide resolved
internal/application/command.go Outdated Show resolved Hide resolved
internal/application/command.go Outdated Show resolved Hide resolved
cloudxxx8
cloudxxx8 previously approved these changes Apr 6, 2021
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

Chris Hung added 2 commits April 6, 2021 16:43
device profile model has been updated in edgexfoundry/go-mod-core-contracts#540
update the profile cache for consistent and better usage.

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

@cloudxxx8 cloudxxx8 merged commit 7565948 into edgexfoundry:master Apr 6, 2021
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.

Return status 404 when sending a request with get method for a write only command
3 participants