- 包名称:azure.mgmt.compute
- 包版本:v2020_06_01
- 操作系统:ubuntu 18.04
- Python版本:Python 3.7
描述错误
而不是创建磁盘它会引发Message: Required parameter 'hyperVGeneration' is missing (null).
错误。
重现行为的重现 步骤:
- 运行以下代码
compute_client = get_client_from_cli_profile(ComputeManagementClient)
async_creation = compute_client.images.create_or_update(
'7AQVDL2J',
'test',
{
'location': 'westeurope',
'storage_profile': {
'os_disk': {
'os_type': 'Linux',
'os_state': "Generalized",
'blob_uri': 'https://bg09.blob.core.windows.net/vm-images/non-existent.vhd',
'caching': "ReadWrite",
}
}
}
)
应创建的预期行为磁盘
错误
Traceback (most recent call last):
File "<stdin>", line 11, in <module>
File "/usr/local/lib/python3.7/dist-packages/azure/mgmt/compute/v2020_06_01/operations/_images_operations.py", line 125, in create_or_update
**operation_config
File "/usr/local/lib/python3.7/dist-packages/azure/mgmt/compute/v2020_06_01/operations/_images_operations.py", line 81, in _create_or_update_initial
raise exp
msrestazure.azure_exceptions.CloudError: Azure Error: InvalidParameter
Message: Required parameter 'hyperVGeneration' is missing (null).
Target: hyperVGeneration
链接到 git 问题:https ://github.com/Azure/azure-sdk-for-python/issues/12762
如果有人找到解决方法,请分享....