Azure-sdk-for-go: Support disk attach/detach to VMSS instances

Created on 5 Jan 2018  路  12Comments  路  Source: Azure/azure-sdk-for-go

VM Scale Sets attach-detach disk has been in preview for while. When will it be included in Go SDK?

Compute resolved specs

Most helpful comment

All 12 comments

Hi @feiskyer - I believe we don't have a method in the SDK which handles the algorithm described in the doc you referenced. You'd have to implement that yourself at the moment by getting the VM, updating its properties, then putting it back. Something like this:

vmssVMs := compute.NewVirtualMachineScaleSetVMsClient(...)
vm, _ := vmssVMs.Get(ctx, groupName, vmssName, vmID)
vm.VirtualMachineScaleSetVMProperties.StorageProfile.DataDisks[0].CreateOption = compute.DiskCreateOptionTypesAttach
// ... more modification of properties

// not currently available in SDK
// vmssVMs.Put(...)

Unfortunately, we don't yet have a method which corresponds to the PUT operation described in that doc, which is because it's not yet described in the API spec.

@gbowerman can you help us update the spec? Thanks!

@joshgav @joshgav Thanks. Do you know when will PUT be supported?

@joshgav does this mean that it's not in the compute swagger spec?

@brendandburns yes AFAI can tell. I believe it would be represented by an additional put operation in this section: https://github.com/Azure/azure-rest-api-specs/blob/9c8629c40c9a103b1a67e5d3dc99306b7fe036ea/specification/compute/resource-manager/Microsoft.Compute/stable/2017-12-01/compute.json#L3085 per the list of fields in the spec.

@joshgav Yep, a PR (https://github.com/Azure/azure-rest-api-specs/pull/2180) is under reviewing for it.

thanks @feiskyer! we'll make sure that's in our next point release (cc @Azure/go-admins)

@joshgav May I ask when will be the next release out?

@joshgav any chance an ETA for the next release could be provided? We are waiting the VMSS support in k8s and the dead line is approaching.

From what I can get here, @feiskyer seems to have all he needs to complete the missing piece, an official azure-sdk-fo-go release is what's left to get the ball rolling again.

Thanks!

CC: @brendandburns

@jhendrixMSFT is looking into this, we hope to get it in the next point release.

@jhendrixMSFT awesome thanks

Was this page helpful?
0 / 5 - 0 ratings