-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
{Storage} az storage file delete/resize/url/generate-sas/show/update/exists
: Track2 SDK migration
#22692
Conversation
Storage |
az storage file
: Track2 migrationaz storage file delete/resize/url/generate-sas/show/update/exists
: Track2 SDK migration
src/azure-cli/azure/cli/command_modules/storage/operations/file.py
Outdated
Show resolved
Hide resolved
def file_updates(client, **kwargs): | ||
return client.set_http_headers(**kwargs) |
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.
If no custom logic, just directly use storage_command
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.
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) |
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.
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) |
Related command
Description
Migrate to track2 sdk
az storage file delete/resize/url/generate-sas/show/update/exists
Testing Guide
az storage file delete -p {filepath} -s {sharename}
az storage file resize -p {filepath} -s {sharename} --size 128
az 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 rw
az 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.