def attach_model(subscription, rgname, vmssvm_model, diskname, lun):
    '''Attach a data disk to a VMSS VM model'''
    disk_id = '/subscriptions/' + subscription + '/resourceGroups/' + rgname + \
        '/providers/Microsoft.Compute/disks/' + diskname
    disk_model = {'lun': lun, 'createOption': 'Attach', 'caching': 'None',
                  'managedDisk': {'storageAccountType': 'Standard_LRS', 'id': disk_id}}
    vmssvm_model['properties']['storageProfile']['dataDisks'].append(
        disk_model)
    return vmssvm_model
def attach_model ( subscription , rgname , vmssvm_model , diskname , lun ) : disk_id = '/subscriptions/' + subscription + '/resourceGroups/' + rgname + '/providers/Microsoft.Compute/disks/' + diskname disk_model = { 'lun' : lun , 'createOption' : 'Attach' , 'caching' : 'None' , 'managedDisk' : { 'storageAccountType' : 'Standard_LRS' , 'id' : disk_id } } vmssvm_model [ 'properties' ] [ 'storageProfile' ] [ 'dataDisks' ] . append ( disk_model ) return vmssvm_model
Attach a data disk to a VMSS VM model