-
Notifications
You must be signed in to change notification settings - Fork 247
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
Add support for device identity operations #142
Add support for device identity operations #142
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Some nits and some food for thought, but nothing that should prevent us from merging this.
/// let iothub = ServiceClient::from_connection_string(connection_string, 3600).expect("Failed to create the ServiceClient!"); | ||
/// let device = iothub.get_device_identity("some-device"); | ||
/// ``` | ||
pub async fn get_device_identity<S>(&self, device_id: S) -> Result<Device, AzureError> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These don't really match the pattern of request builders we've been using in other crates. That might be fine, but we probably need to think more deeply about if the iothub crate should follow the same pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be happy to change it so it's similar to the other crates, no problem at all. I did notice there is a "common" http client within the core crate that was added a while ago. Is this what you mean that should be used instead? Could you link me an example of the ideal way we'd be doing requests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff!
This PR adds support for getting, creating, updating, and deleting device identities from the IoT Hub and partial implementation for the module identities. I'll add full support for the module identities in a later PR.