[Compute] Adopt track2 SDK, azure-mgmt-compute==18.0.0#15750
[Compute] Adopt track2 SDK, azure-mgmt-compute==18.0.0#15750
Conversation
| exts = vm.resources or [] | ||
| r = next((e for e in exts if (e.publisher.lower() == ade_ext_info['publisher'].lower() and | ||
| e.virtual_machine_extension_type.lower() == ade_ext_info['name'].lower())), None) | ||
| e.type_properties_type.lower() == ade_ext_info['name'].lower())), None) |
There was a problem hiding this comment.
The new name looks weird to me.
There was a problem hiding this comment.
Track2's new naming rule.
src/azure-cli/azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_custom_vm_commands.py
Outdated
Show resolved
Hide resolved
|
https://clitestresultstac.blob.core.windows.net/20201125-145649-719547/index.html. |
What're test failure cause? |
|
Cross tenant image, disk encryption and hyperVGeneration deserve attention. Others are known common issues like service timeout, service returns a case error string. |
| resource = cmd.cli_ctx.cloud.endpoints.active_directory_resource_id | ||
| cred, _, _ = profile.get_login_credentials(resource=resource, | ||
| aux_subscriptions=aux_subscriptions) | ||
| _, _, _, external_tokens = cred.get_all_tokens('https://management.azure.com/.default') |
There was a problem hiding this comment.
Hardcoding scopes to the ARM resource ID of AzureCloud will cause failure in other clouds like AzureChinaCloud, which is actually
| return client.gallery_image_versions.begin_create_or_update( | ||
| resource_group_name=resource_group_name, | ||
| gallery_name=gallery_name, | ||
| gallery_image_name=gallery_image_name, | ||
| gallery_image_version_name=gallery_image_version, | ||
| gallery_image_version=image_version, | ||
| headers={'x-ms-authorization-auxiliary': external_bearer_token} |
There was a problem hiding this comment.
This is only a temporary workaround which is against the TokenCredential.get_token pattern.
x-ms-authorization-auxiliary should eventually be supported by SDK clients as something like external_credential (Azure/azure-sdk-for-python#8313).
Description
Track1 to track2 code change pattern:
I fixed:
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.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.