Add twin delete all and twin relationship delete all#331
Merged
Conversation
Twin delete all
Contributor
Author
digimaun
reviewed
Apr 20, 2021
digimaun
reviewed
Apr 20, 2021
digimaun
reviewed
Apr 20, 2021
digimaun
reviewed
Apr 20, 2021
|
|
||
| helps["dt twin relationship delete-all"] = """ | ||
| type: command | ||
| short-summary: Deletes all digital twin relationships on a Digital Twins instance, including incomming relationships. |
digimaun
reviewed
Apr 20, 2021
digimaun
reviewed
Apr 20, 2021
digimaun
reviewed
Apr 20, 2021
digimaun
reviewed
Apr 20, 2021
digimaun
reviewed
Apr 20, 2021
digimaun
reviewed
Apr 21, 2021
| twin_provider = TwinProvider(cmd=cmd, name=name_or_hostname, rg=resource_group_name) | ||
| if twin_id: | ||
| return twin_provider.delete_all_relationship(twin_id=twin_id) | ||
| else: |
Member
There was a problem hiding this comment.
nit - this else could be eliminated
digimaun
approved these changes
Apr 21, 2021
digimaun
reviewed
Apr 21, 2021
| assert len(twin_query_result["result"]) == 0 | ||
| assert twin_query_result["cost"] | ||
|
|
||
| def test_dt_twin_delete(self): |
Member
There was a problem hiding this comment.
nit - I think we should label these tests as bulk delete
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Thank you for contributing to the IoT extension!
This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines
pytest <project root> -vv