-
Notifications
You must be signed in to change notification settings - Fork 56
[RSDK-10139] Implement User-defined Metadata Methods #882
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
Conversation
@JosephBorodach @edobranov I tagged both of you guys just because I know you both worked on the other SDK's. Feel free to remove yourself. |
Going to remove myself for now so I stop getting notifications, but feel free to re-add me when it's ready for review again |
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, just a comment but you don't have to change it!
metadata (Mapping[str, Any]): The user-defined metadata to upload as a Python dictionary. | ||
""" | ||
request = UpdateOrganizationMetadataRequest(organization_id=org_id, data=dict_to_struct(metadata)) | ||
_: UpdateOrganizationMetadataResponse = await self._app_client.UpdateOrganizationMetadata(request) |
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.
You can leave out all these return type since they're unused
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.
nice, lgtm!
ticket
This PR implements the
get
andupdate
methods for user-defined metadata on all four resource types (organizations, locations, robots, and robot parts). Also included in this PR are the implementation of these endpoints in the PythonMockApp
server and the addition of unit tests for new SDK methods added. The unit tests all first attempt toget
metadata on a resource, assert that the returned dictionary is empty (as is the expected behavior here), and then proceed toupdate
actual metadata that gets retrieved and asserted again. The mock endpoints pretty much exactly mimic the behavior of these endpoints in our actual App server.