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

retrieve uuid from endpoint address, use it with service url as device id #630

Merged

Conversation

johnsonshih
Copy link
Contributor

@johnsonshih johnsonshih commented Jul 14, 2023

What this PR does / why we need it:
refs #250
This PR retrieve the Onvif device uuid and use it with service url to form the device id reported to Agent.

According to ONVIF core spec sec 7.3.1. The combination of an wsadis:Address
and wsadis:ReferenceProperties provide a stable and globally-unique identifier.

We can use "wsadis:Address + wsadis:ReferenceProperties.Address" as the identifier of Onvif devices. The DH needs to expose the uuid to brokers so brokers have the same information to uniquely identify a device.

7.3.1 Endpoint reference
A device or an endpoint that takes the client role should use a URN:UUID [RFC4122] as the address property
of its endpoint reference.
The device or an endpoint that takes the client role shall use a stable, globally unique identifier that is constant
across network interfaces as part of its endpoint reference property. The combination of an wsadis:Address
and wsadis:ReferenceProperties provide a stable and globally-unique identifier.

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

@johnsonshih johnsonshih changed the title User/jshih/onvif device UUID retrieve uuid from endpoint address, use it with service url as device id Jul 14, 2023
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.

Will need a note in the release notes about the fact it changes the id of ONVIF devices I think.

@johnsonshih
Copy link
Contributor Author

Will need a note in the release notes about the fact it changes the id of ONVIF devices I think.

sure, there will be follow up change for onvif DH w.r.t. the device id, I'll update the doc in one shot

@johnsonshih johnsonshih merged commit db62ed8 into project-akri:main Jul 19, 2023
@johnsonshih johnsonshih deleted the user/jshih/onvif-device-uuid branch July 19, 2023 17:45
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.

3 participants