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

[Compute] Adopt track2 SDK, azure-mgmt-compute==18.0.0 #15750

Merged
merged 46 commits into from
Dec 8, 2020

Conversation

qwordy
Copy link
Member

@qwordy qwordy commented Nov 2, 2020

Description

Track1 to track2 code change pattern:

  1. create_or_update -> begin_create_or_update, and other long running operations like delete, grant_access, power_off
  2. CloudError -> azure.core.exceptions.ResourceNotFoundError
  3. enum -> str, should not use obj.value any more
  4. VirtualMachineExtension, virtual_machine_extension_type -> type_properties_type
  5. hyperVgeneration -> hyperVGeneration
  6. disk_mbps_read_only -> disk_m_bps_read_only, disk_mbps_read_write -> disk_m_bps_read_write
  7. vmss extension, type1 -> type_properties_type
  8. vmss begin_deallocate, instance_ids -> vm_instance_i_ds
  9. vmss begin_update_instances, new type VirtualMachineScaleSetVMInstanceRequiredIDs
  10. VirtualMachineIdentityUserAssignedIdentitiesValue -> UserAssignedIdentitiesValue
  11. virtual_machine_extension_type -> type_properties_type
  12. subscription=client.config.subscription_id -> get_subscription_id(cmd.cli_ctx), from azure.cli.core.commands.client_factory import get_subscription_id
  13. DiskAccess, begin_create_or_update, move location and tags to nested structure DiskAccess, disk_access = DiskAccess(location=location, tags=tags)
  14. diskMbpsReadWrite -> diskMBpsReadWrite
  15. begin_power_off, multiapi
  16. Modify patch_models.py to include missing packages
  17. Fix mock object field name change, hard to find this mistake
  18. Missing x-ms-authorization-auxiliary

I fixed:

√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_image_builder_commands.py::ImageTemplateTest::test_image_build_shared_image - AttributeError: 'GalleriesOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_image_builder_commands.py::ImageTemplateTest::test_image_builder_basic_sig - AttributeError: 'GalleriesOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMGeneralizeScenarioTest::test_vm_capture_zone_resilient_image - ValueError: The operation 'azure.mgmt.compute.v2020_06_01.operations#VirtualMachinesOperations.deallo...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMManagedDiskScenarioTest::test_vm_disk_upload - AttributeError: 'DisksOperations' object has no attribute 'create_or_update', begin_create_or_update
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMManagedDiskScenarioTest::test_vm_managed_disk - AttributeError: 'DisksOperations' object has no attribute 'create_or_update', disk update setter_name='begin_create_or_update', begin_grant_access, GrantAccessData, snapshots.begin_create_or_update, snapshot update setter_name='begin_create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMCreateWithSpecializedUnmanagedDiskTest::test_vm_create_with_specialized_unmanaged_disk - ValueError: The operation 'azure.mgmt.compute.v2020_06_01.operations#Virtua...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMGeneralizeScenarioTest::test_vm_generalize - ValueError: The operation 'azure.mgmt.compute.v2020_06_01.operations#VirtualMachinesOperations.power_off' is invalid.
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_actions.py::TestActions::test_process_gallery_image_version_namespace - ModuleNotFoundError: No module named 'azure.mgmt.compute.v2020_09_30'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMManagedDiskScenarioTest::test_vm_snapshot_incremental - AttributeError: 'DisksOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMExtensionScenarioTest::test_vm_extension_with_id - AttributeError: 'VirtualMachineExtensionsOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_image_builder_commands.py::ImageTemplateTest::test_image_build_managed_image - SystemExit: 2
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMCreateWithSpecializedUnmanagedDiskTest::test_vm_create_with_unmanaged_data_disks - AttributeError: 'VirtualMachinesOperations' object has no attribute 'create_or_up...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMWindowsLicenseTest::test_vm_windows_license_type - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\\command_modul...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMCreateAndStateModificationsScenarioTest::test_vm_create_state_modifications - AttributeError: 'str' object has no attribute 'value'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMMonitorTestUpdateLinux::test_vm_update_with_workspace_linux - AttributeError: 'str' object has no attribute 'value'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMCustomImageTest::test_vm_custom_image - AttributeError: 'VirtualMachinesOperations' object has no attribute 'run_command'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMAttachDisksOnCreate::test_vm_create_by_attach_os_and_data_disks - SystemExit: 2
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMAttachDisksOnCreate::test_vm_create_by_attach_unmanaged_os_and_data_disks - AttributeError: 'VirtualMachinesOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMCustomImageTest::test_vm_custom_image_name_conflict - ValueError: The operation 'azure.mgmt.compute.v2020_06_01.operations#VirtualMachinesOperations.power_off' is i...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMBootDiagnostics::test_vm_boot_diagnostics - AttributeError: 'VirtualMachinesOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMCreateFromUnmanagedDiskTest::test_vm_create_from_unmanaged_disk - ValueError: The operation 'azure.mgmt.compute.v2020_06_01.operations#VirtualMachinesOperations.pow...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMMultiNicScenarioTest::test_vm_create_multi_nics - ValueError: The operation 'azure.mgmt.compute.v2020_06_01.operations#VirtualMachinesOperations.deallocate' is inva...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMDiskAttachDetachTest::test_vm_disk_attach_detach - AttributeError: 'VirtualMachinesOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMDiskAttachDetachTest::test_vm_disk_create_with_standard_zrs_sku - AttributeError: 'DisksOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMNoWaitScenarioTest::test_vm_create_no_wait - azure.core.exceptions.ResourceNotFoundError: (ResourceNotFound) The Resource 'Microsoft.Compute/virtualMachines/vmnowai...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMSSExtensionInstallTest::test_vmss_extension - AttributeError: 'VirtualMachineScaleSetsOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMDiskAttachDetachTest::test_vm_disk_storage_sku - AttributeError: 'VirtualMachinesOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMManagedDiskScenarioTest::test_vm_disk_max_shares_etc - AttributeError: 'DisksOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMSSCreateAndModify::test_vmss_scale_in_policy - AttributeError: 'VirtualMachineScaleSetsOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMDiskAttachDetachTest::test_vm_ultra_ssd_disk_update - AttributeError: 'DisksOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMDiskAttachDetachTest::test_vm_ultra_ssd_storage_sku - AttributeError: 'DisksOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMSSExtensionInstallTest::test_vmss_extension_instance_name - AttributeError: 'VirtualMachineScaleSetsOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMSSCreateBalancerOptionsTest::test_vmss_create_none_options - AttributeError: 'VirtualMachineScaleSetsOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMMonitorTestDefault::test_vm_metric_tail - ValueError: The operation 'azure.mgmt.compute.v2020_06_01.operations#VirtualMachinesOperations.start' is invalid.
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::DiagnosticsExtensionInstallTest::test_diagnostics_extension_install - AttributeError: 'VirtualMachineScaleSetsOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMSSUpdateTests::test_vmss_update - AttributeError: 'VirtualMachineScaleSetsOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMSSUpdateTests::test_vmss_update_image - AttributeError: 'VirtualMachinesOperations' object has no attribute 'run_command'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMDiskAttachDetachTest::test_vm_vmss_update_ultra_ssd_enabled - ValueError: The operation 'azure.mgmt.compute.v2020_06_01.operations#VirtualMachinesOperations.dealloc...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMSSCreateOptions::test_vmss_create_options - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\\command_modules\\vm\...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMDiskAttachDetachTest::test_vmss_ultra_ssd_storage_sku - AttributeError: 'VirtualMachineScaleSetsOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMSSCreateOptions::test_vmss_update_instance_disks - AttributeError: 'DisksOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMUnmanagedDataDiskTest::test_vm_data_unmanaged_disk - AttributeError: 'VirtualMachinesOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMZoneScenarioTest::test_vm_disk_create_zones - AttributeError: 'DisksOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::MSIScenarioTest::test_vmss_msi - AttributeError: 'VirtualMachineScaleSetsOperations' object has no attribute 'update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::MSIScenarioTest::test_vm_explicit_msi - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\\command_modules\\vm\\tests...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::MSIScenarioTest::test_vm_msi - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\\command_modules\\vm\\tests\\latest\...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMSSCreateAndModify::test_vmss_create_and_modify - AttributeError: 'VirtualMachineScaleSetsOperations' object has no attribute 'update_instances'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMRunCommandScenarioTest::test_vm_run_command_with_parameters - AttributeError: 'VirtualMachinesOperations' object has no attribute 'run_command'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMSSRunCommandScenarioTest::test_vmss_run_command_with_parameters - AttributeError: 'VirtualMachineScaleSetVMsOperations' object has no attribute 'run_command'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMSSVMsScenarioTest::test_vmss_vms - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\\command_modules\\vm\\tests\\l...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMDiskEncryptionTest::test_vm_disk_encryption_e2e - AttributeError: 'str' object has no attribute 'value'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMGalleryImage::test_gallery_e2e - AttributeError: 'GalleriesOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMGalleryImage::test_gallery_specialized - AttributeError: 'GalleriesOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMOsDiskSwap::test_vm_os_disk_swap - AttributeError: 'DisksOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMSecretTest::test_vm_secret_e2e_test - AttributeError: 'str' object has no attribute 'value'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMGenericUpdate::test_vm_generic_update - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\\command_modules\\vm\\tes...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMSSTerminateNotificationScenarioTest::test_vmss_terminate_notification - AttributeError: 'VirtualMachineScaleSetsOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMGalleryImage::test_specialized_image - AttributeError: 'GalleriesOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::MSIScenarioTest::test_vm_msi_no_scope - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\\command_modules\\vm\\tests...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::DedicatedHostScenarioTest::test_dedicated_host_e2e - AttributeError: 'DedicatedHostsOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMPriorityEvictionBillingTest::test_vm_priority_eviction_billing - ValueError: The operation 'azure.mgmt.compute.v2020_06_01.operations#VirtualMachinesOperations.deal...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::DiskEncryptionSetTest::test_disk_encryption_set - AttributeError: 'DiskEncryptionSetsOperations' object has no attribute 'config'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::MSIScenarioTest::test_vmss_explicit_msi - TypeError: 'NoneType' object is not callable
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::DiskAccessTest::test_disk_access - AttributeError: 'DiskAccessesOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::ProximityPlacementGroupScenarioTest::test_ppg_update - AttributeError: 'VirtualMachineScaleSetsOperations' object has no attribute 'deallocate'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::DiskEncryptionSetTest::test_disk_encryption_set_snapshot - AttributeError: 'DiskEncryptionSetsOperations' object has no attribute 'config'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::DiskEncryptionSetTest::test_disk_encryption_set_disk_update - AttributeError: 'DiskEncryptionSetsOperations' object has no attribute 'config'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMSSCreateDiskOptionTest::test_vmss_create_disk_iops_mbps - AttributeError: 'VirtualMachineScaleSetsOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMDiskEncryptionTest::test_vmss_disk_encryption_e2e - AttributeError: 'VirtualMachineScaleSetsOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMSSAutomaticRepairsScenarioTest::test_vmss_update_automatic_repairs_with_health_extension - AttributeError: 'VirtualMachineScaleSetsOperations' object has no attribu...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::DiskEncryptionSetTest::test_disk_encryption_set_update - AttributeError: 'DiskEncryptionSetsOperations' object has no attribute 'config'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMExtensionScenarioTest::test_vm_extension - AttributeError: 'VirtualMachineExtensionsOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMSSAutomaticRepairsScenarioTest::test_vmss_update_automatic_repairs_with_health_probe - AttributeError: 'VirtualMachineScaleSetsOperations' object has no attribute '...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMExtensionScenarioTest::test_vm_extension_instance_name - AttributeError: 'VirtualMachineExtensionsOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMSSSetOrchestrationServiceStateScenarioTest::test_vmss_set_orchestration_service_state - AttributeError: 'VirtualMachineScaleSetsOperations' object has no attribute ...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMDiskLogicalSectorSize::test_vm_disk_logical_sector_size - AttributeError: 'DisksOperations' object has no attribute 'create_or_update'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMAutoUpdateScenarioTest::test_vm_auto_update - ValueError: The operation 'azure.mgmt.compute.v2020_06_01.operations#VirtualMachinesOperations.assess_patches' is inva...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_defaults.py::TestVMImageDefaults::test_vm_validator_retrieve_image_info_cross_subscription - AssertionError: <MagicMock name='mock.images.get().storag[41 chars]352'> != 'someOS'
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_custom_vm_commands.py::TestVmCustom::test_disable_encryption_error_cases_handling - AssertionError: CLIError not raised

√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_image_builder_commands.py::ImageTemplateTest::test_image_template_outputs - azure.cli.testsdk.exceptions.JMESPathCheckAssertionError: Query 'properties.distribute[0].location' doesn'...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMCreateWithSpecializedUnmanagedDiskTest::test_vm_create_with_unmanaged_data_disks - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azur...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMBootDiagnostics::test_vm_boot_diagnostics - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\\command_modules\\vm\...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMCustomImageTest::test_vm_custom_image - knack.util.CLIError: No disk with the name 'vm-managed-disk_disk2_4b4a98ec29c24f4baa872930a8b95788' was found
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMAttachDisksOnCreate::test_vm_create_by_attach_unmanaged_os_and_data_disks - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMCreateAndStateModificationsScenarioTest::test_vm_create_state_modifications - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMMultiNicScenarioTest::test_vm_create_multi_nics - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\\command_module...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMDiskAttachDetachTest::test_vm_disk_attach_detach - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\\command_modul...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMUnmanagedDataDiskTest::test_vm_data_unmanaged_disk - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\\command_mod...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMDiskAttachDetachTest::test_vm_disk_storage_sku - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\\command_modules...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMDiskAttachDetachTest::test_vm_ultra_ssd_storage_sku - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\\command_mo...
√ FAILED src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py::VMSecretTest::test_vm_secret_e2e_test - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\\command_modules\\vm\\tests...

2019-03-01
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2019_03_01\test_vm_commands.py::VMCustomImageTest::test_vm_custom_image - SystemExit: 2
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2019_03_01\test_vm_commands.py::VMGeneralizeScenarioTest::test_vm_capture_zone_resilient_image - SystemExit: 2
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2019_03_01\test_vm_commands.py::VMManagedDiskScenarioTest::test_vm_managed_disk - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\\comma...
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2019_03_01\test_vm_commands.py::VMExtensionScenarioTest::test_vm_extension_instance_name - azure.cli.testsdk.exceptions.JMESPathCheckAssertionError: Query 'virtualMachineExtensionType' do...
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2019_03_01\test_vm_commands.py::VMCreateWithSpecializedUnmanagedDiskTest::test_vm_create_with_unmanaged_data_disks - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli...
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2019_03_01\test_vm_commands.py::VMGeneralizeScenarioTest::test_vm_generalize - SystemExit: 2
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2019_03_01\test_vm_commands.py::VMMultiNicScenarioTest::test_vm_create_multi_nics - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\\com...
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2019_03_01\test_vm_commands.py::VMCustomImageTest::test_vm_custom_image_name_conflict - SystemExit: 2
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2019_03_01\test_vm_commands.py::VMVMSSWindowsLicenseTest::test_vm_vmss_windows_license_type - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure...
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2019_03_01\test_vm_commands.py::VMAttachDisksOnCreate::test_vm_create_by_attach_unmanaged_os_and_data_disks - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\...
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2019_03_01\test_vm_commands.py::VMImageWithPlanTest::test_vm_create_with_market_place_image - SystemExit: 2
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2019_03_01\test_vm_commands.py::VMDiskAttachDetachTest::test_vm_disk_attach_detach - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\\co...
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2019_03_01\test_vm_commands.py::VMBootDiagnostics::test_vm_boot_diagnostics - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\\command_m...
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2019_03_01\test_vm_commands.py::VMCreateAndStateModificationsScenarioTest::test_vm_create_state_modifications - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src...
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2019_03_01\test_vm_commands.py::VMUnmanagedDataDiskTest::test_vm_data_unmanaged_disk - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\\...
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2019_03_01\test_vm_commands.py::VMNoWaitScenarioTest::test_vm_create_no_wait - azure.core.exceptions.ResourceNotFoundError: (ResourceNotFound) The Resource 'Microsoft.Compute/virtualMachi...
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2019_03_01\test_vm_commands.py::VMSSCreateAndModify::test_vmss_create_and_modify - TypeError: request() got an unexpected keyword argument 'skip_shutdown'
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2019_03_01\test_vm_commands.py::VMSSVMsScenarioTest::test_vmss_vms - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\\command_modules\\v...
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2019_03_01\test_vm_commands.py::VMRunCommandScenarioTest::test_vm_disk_encryption_e2e - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\...
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2019_03_01\test_vm_commands.py::VMOsDiskSwap::test_vm_os_disk_swap - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\\command_modules\\v...
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2019_03_01\test_vm_commands.py::VMGenericUpdate::test_vm_generic_update - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\\command_modul...
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2019_03_01\test_vm_commands.py::VMSecretTest::test_vm_secret_e2e_test - AssertionError: Can't overwrite existing cassette ('c:\\yfy\\azure-cli\\src\\azure-cli\\azure\\cli\\command_modules...

2018-03-01
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2018_03_01\test_vm_commands.py::VMImageWithPlanTest::test_vm_create_with_market_place_image - SystemExit: 2
FAILED src\azure-cli\azure\cli\command_modules\vm\tests\hybrid_2018_03_01\test_vm_actions.py::TestActions::test_generate_specfied_ssh_key_files - PermissionError: [WinError 32] The process cannot access the file because i...

ERROR: test_network_watcher_packet_capture (command_modules.network.tests.latest.test_network_commands.NetworkWatcherScenarioTest)
ERROR: test_network_watcher_vm (command_modules.network.tests.latest.test_network_commands.NetworkWatcherScenarioTest)
FAIL: test_backup_container (command_modules.backup.tests.latest.test_backup_commands.BackupTests)
FAIL: test_backup_disk_exclusion (command_modules.backup.tests.latest.test_backup_commands.BackupTests)
FAIL: test_backup_item (command_modules.backup.tests.latest.test_backup_commands.BackupTests)
FAIL: test_backup_job (command_modules.backup.tests.latest.test_backup_commands.BackupTests)
FAIL: test_backup_policy (command_modules.backup.tests.latest.test_backup_commands.BackupTests)
FAIL: test_backup_protection (command_modules.backup.tests.latest.test_backup_commands.BackupTests)
FAIL: test_backup_restore (command_modules.backup.tests.latest.test_backup_commands.BackupTests)
FAIL: test_backup_rp (command_modules.backup.tests.latest.test_backup_commands.BackupTests)
FAIL: test_backup_scenario (command_modules.backup.tests.latest.test_backup_commands.BackupTests)

FAILED src\azure-cli\azure\cli\command_modules\network\tests\latest\test_private_endpoint_commands.py::NetworkPrivateLinkRDBMSScenarioTest::test_mysql_private_link_scenario - AssertionError: Expected 1 module to load starting with 'azext_': got []
FAILED src\azure-cli\azure\cli\command_modules\network\tests\latest\test_nw_connection_monitor.py::NWConnectionMonitorScenarioTest::test_nw_connection_monitor_v1 - SystemExit: 2
FAILED src\azure-cli\azure\cli\command_modules\network\tests\latest\test_private_endpoint_commands.py::NetworkPrivateLinkEventGridScenarioTest::test_private_endpoint_connection_event_grid_topic - knack.util.CLIError: The extension eventgrid is not in...
FAILED src\azure-cli\azure\cli\command_modules\network\tests\latest\test_private_endpoint_commands.py::NetworkPrivateLinkEventGridScenarioTest::test_private_endpoint_connection_event_grid_domain - knack.util.CLIError: The extension eventgrid is not i...

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.

@yungezz yungezz added Compute az vm/vmss/image/disk/snapshot Track2 labels Nov 5, 2020
@Azure Azure deleted a comment from yonzhan Nov 5, 2020
@Azure Azure deleted a comment from yonzhan Nov 12, 2020
@@ -44,7 +44,7 @@ def _find_existing_ade(vm, use_instance_view=False, ade_ext_info=None):
else:
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)
Copy link
Member

Choose a reason for hiding this comment

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

The new name looks weird to me.

Copy link
Member Author

Choose a reason for hiding this comment

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

Track2's new naming rule.

Copy link
Member

@yungezz yungezz left a comment

Choose a reason for hiding this comment

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

hi @qwordy , could you share live test results to make sure no regression? thanks

@qwordy
Copy link
Member Author

qwordy commented Dec 1, 2020

https://clitestresultstac.blob.core.windows.net/20201125-145649-719547/index.html.
Pass: 191, Fail: 10, Pass rate: 95.02%
Not optimistic

@yungezz
Copy link
Member

yungezz commented Dec 1, 2020

https://clitestresultstac.blob.core.windows.net/20201125-145649-719547/index.html.
Pass: 191, Fail: 10, Pass rate: 95.02%
Not optimistic

What're test failure cause?

@qwordy
Copy link
Member Author

qwordy commented Dec 1, 2020

Cross tenant image, disk encryption and hyperVGeneration deserve attention. Others are known common issues like service timeout, service returns a case error string.

@qwordy qwordy added this to the S180 milestone Dec 4, 2020
@qwordy qwordy merged commit d07ee66 into Azure:dev Dec 8, 2020
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')
Copy link
Member

Choose a reason for hiding this comment

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

Hardcoding scopes to the ARM resource ID of AzureCloud will cause failure in other clouds like AzureChinaCloud, which is actually

active_directory_resource_id='https://management.core.chinacloudapi.cn/',

Copy link
Member Author

@qwordy qwordy Dec 21, 2020

Choose a reason for hiding this comment

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

Thanks. You are right

Comment on lines +3329 to +3335
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}
Copy link
Member

Choose a reason for hiding this comment

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

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compute az vm/vmss/image/disk/snapshot Track2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants