Closed
Description
On the 18th of October Azure introduced the new APIs for attaching and detaching data disks for VMs and VMSS.
I would like to have wrappers on those APIs available in Azure python SDK, to me able to attach/detach data volumes without calling update VM operation.
Currently I do this:
data_disk_update = (virtual_machine.storage_profile.data_disks or []) + [ # type: ignore
{
"lun": len(virtual_machine.storage_profile.data_disks), # type: ignore # can be 0-15
# 'name': volume['name'],
"create_option": DiskCreateOption.attach,
"managed_disk": {"id": volume_id},
}
]
virtual_machine_update = {"storage_profile": {"data_disks": data_disk_update}}
async_disk_attach = await compute_client.virtual_machines.begin_update(rg_name, vm_name, )
await async_disk_attach.result()
What I want to be able to do:
async_disk_attach = await compute_client.virtual_machines.attach_volume(rg_name, vm_name, volumes)
Metadata
Metadata
Assignees
Labels
This issue is related to a management-plane library.Issues that are reported by GitHub users external to the Azure organization.This issue requires a new behavior in the product in order be resolved.Workflow: This issue needs attention from Azure service team or SDK teamThe issue doesn't require a change to the product in order to be resolved. Most issues start as that