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

Return discovered devices that fails to get ip/mac address if ip/mac filters are not used #640

Merged

Conversation

johnsonshih
Copy link
Contributor

@johnsonshih johnsonshih commented Aug 1, 2023

…address filters are not used

What this PR does / why we need it:
ref #250
ref #635

Currently, Onvif DH will not return discovered devices if it fails to get devices' ip/mac address. This is not necessary if ip/mac address filter is not used. This PR change Onvif DH so when ip/mac address filter is not used, Onvif DH returns discovered devices no matter it gets ip/mac address from that device (other filters still applied).

When returning discovered devices, Onvif DH does best efforts to retrieve ip/mac address and set to environment variables. If ip/mac address filter is not used, it is possible that ip/mac address environments won't be set (if Onvif DH cannot retrieve ip/mac address from devices).

Special notes for your reviewer:

If applicable:

  • this PR has an associated PR with documentation in akri-docs
  • this PR contains unit tests
  • added code adheres to standard Rust formatting (cargo fmt)
  • code builds properly (cargo build)
  • code is free of common mistakes (cargo clippy)
  • all Akri tests succeed (cargo test)
  • inline documentation builds (cargo doc)
  • all commits pass the DCO bot check by being signed off -- see the failing DCO check for instructions on how to retroactively sign commits

…address filters are not used

Signed-off-by: Johnson Shih <jshih@microsoft.com>
Copy link
Contributor

@diconico07 diconico07 left a comment

Choose a reason for hiding this comment

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

Except the refactor I mentioned and the need for some unit test, this is good.

discovery-handlers/onvif/src/discovery_handler.rs Outdated Show resolved Hide resolved
Signed-off-by: Johnson Shih <jshih@microsoft.com>
Signed-off-by: Johnson Shih <jshih@microsoft.com>
@johnsonshih johnsonshih requested a review from diconico07 August 7, 2023 22:25
@johnsonshih
Copy link
Contributor Author

/version patch

@github-actions github-actions bot added the version/patch Patch version change is needed label Aug 8, 2023
github-actions bot and others added 3 commits August 8, 2023 00:28
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Johnson Shih <jshih@microsoft.com>
Signed-off-by: Johnson Shih <jshih@microsoft.com>
@johnsonshih johnsonshih merged commit 5fbc942 into project-akri:main Aug 10, 2023
@johnsonshih johnsonshih deleted the user/jshih/onvif-optional-ip-mac branch August 10, 2023 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version/patch Patch version change is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants