Conversation
Collaborator
|
Storage |
az storage file: Track2 migrationaz storage file delete/resize/url/generate-sas/show/update/exists: Track2 SDK migration
evelyn-ys
reviewed
Jun 9, 2022
evelyn-ys
reviewed
Jun 9, 2022
evelyn-ys
reviewed
Jun 9, 2022
evelyn-ys
reviewed
Jun 9, 2022
evelyn-ys
reviewed
Jun 9, 2022
evelyn-ys
reviewed
Jun 9, 2022
src/azure-cli/azure/cli/command_modules/storage/operations/file.py
Outdated
Show resolved
Hide resolved
evelyn-ys
reviewed
Jun 9, 2022
Comment on lines
+446
to
+447
| def file_updates(client, **kwargs): | ||
| return client.set_http_headers(**kwargs) |
Member
There was a problem hiding this comment.
If no custom logic, just directly use storage_command
Member
Author
There was a problem hiding this comment.
This is to fix the default parameter not allowed for update commands lint rule.
| g.storage_command('show', 'get_file_properties', transform=transform_file_show_result, | ||
| table_transformer=transform_file_output, | ||
| exception_handler=show_exception_handler) | ||
| g.storage_custom_command('update', 'file_updates', resource_type=ResourceType.DATA_STORAGE_FILESHARE) |
Member
There was a problem hiding this comment.
Suggested change
| g.storage_custom_command('update', 'file_updates', resource_type=ResourceType.DATA_STORAGE_FILESHARE) | |
| g.storage_command('update', 'set_http_headers', resource_type=ResourceType.DATA_STORAGE_FILESHARE) |
evelyn-ys
reviewed
Jun 9, 2022
src/azure-cli/azure/cli/command_modules/storage/operations/file.py
Outdated
Show resolved
Hide resolved
evelyn-ys
approved these changes
Jun 13, 2022
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.
Related command
Description
Migrate to track2 sdk
az storage file delete/resize/url/generate-sas/show/update/existsTesting Guide
az storage file delete -p {filepath} -s {sharename}az storage file resize -p {filepath} -s {sharename} --size 128az storage file url -p {filepath} -s {sharename}az storage file generate-sas -p {filepath} -s {sharename} --start 2022-01-01 --expiry 2022-12-31 --permission rwaz storage file show -p {filepath} -s {sharename}az storage file exists -p {filepath} -s {sharename}History Notes
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.