Skip to content

Conversation

@jsntcy
Copy link
Member

@jsntcy jsntcy commented Nov 9, 2020

Description
Here are the changes we need do for this migration:

  • The method name for LRO will start with begin_.
  • msrest.exceptions.ClientException will be replaced with azure.core.exceptions.HttpResponseError; msrestazure.azure_exceptions.CloudError will be replaced with azure.core.exceptions.HttpResponseError.
  • Remove client.config and instead pass them as the parameters for client constructor or pass them in each method call.
  • SDK method parameters are not flatten in track2; in track1, if the number of the parameters is less than 3, it will be flatten.
    • track1: client.check_name_availability(account_name) // account_name is string
    • track2: account_name = StorageAccountCheckNameAvailabilityParameters(name=name) client.check_name_availability(account_name)
  • Fix tests (re-record tests)
  • Add azure.mgmt-storage and necessary import statement in patch_models.py to pass CI check.

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.


This checklist is used to make sure that common guidelines for a pull request are followed.

@yonzhan yonzhan requested a review from jiasli November 9, 2020 12:23
@yonzhan yonzhan added this to the S178 milestone Nov 9, 2020
@yonzhan
Copy link
Collaborator

yonzhan commented Nov 9, 2020

Storage

@jsntcy jsntcy force-pushed the upgrade-track2-storage branch from 72fffe7 to 90388c3 Compare November 12, 2020 04:44
def set_legal_hold(cmd, client, container_name, account_name, tags, resource_group_name=None):
LegalHold = cmd.get_models('LegalHold', resource_type=ResourceType.MGMT_STORAGE)
legal_hold = LegalHold(tags=tags)
return client.set_legal_hold(resource_group_name, account_name, container_name, legal_hold)
Copy link
Contributor

Choose a reason for hiding this comment

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

avoid using positional arguments. please fix in next PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

will fix it in next PR.


In reply to: 521918599 [](ancestors = 521918599)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants