Skip to content
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

Merged
merged 19 commits into from
Jun 13, 2022

Conversation

calvinhzy
Copy link
Member

@calvinhzy calvinhzy commented Jun 1, 2022

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.

@calvinhzy calvinhzy self-assigned this Jun 1, 2022
@ghost ghost added the Auto-Assign Auto assign by bot label Jun 1, 2022
@ghost ghost requested a review from yonzhan June 1, 2022 05:38
@ghost ghost assigned evelyn-ys Jun 1, 2022
@ghost ghost added this to the Jun 2022 (2022-07-05) milestone Jun 1, 2022
@ghost ghost added the Storage az storage label Jun 1, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented Jun 1, 2022

Storage

@calvinhzy calvinhzy changed the title [Storage] az storage file: Track2 migration {Storage} az storage file delete/resize/url/generate-sas/show/update/exists: Track2 SDK migration Jun 9, 2022
Comment on lines +446 to +447
def file_updates(client, **kwargs):
return client.set_http_headers(**kwargs)
Copy link
Member

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

Copy link
Member Author

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@calvinhzy calvinhzy merged commit 94a9004 into Azure:dev Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Storage az storage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants