'Returns config spec for adding a virtual disk.'

def _create_virtual_disk_config_spec(self, size_kb, disk_type, controller_key, profile_id, vmdk_ds_file_path):

    cf = self._session.vim.client.factory
    disk_device = cf.create('ns0:VirtualDisk')
    disk_device.capacityInKB = max(units.Ki, int(size_kb))
    if (controller_key < 0):
        disk_device.key = (controller_key - 1)
    else:
        disk_device.key = (-101)
    disk_device.unitNumber = 0
    disk_device.controllerKey = controller_key
    disk_device.backing = self._create_disk_backing(disk_type, vmdk_ds_file_path)
    disk_spec = cf.create('ns0:VirtualDeviceConfigSpec')
    disk_spec.operation = 'add'
    if (vmdk_ds_file_path is None):
        disk_spec.fileOperation = 'create'
    disk_spec.device = disk_device
    if profile_id:
        disk_profile = cf.create('ns0:VirtualMachineDefinedProfileSpec')
        disk_profile.profileId = profile_id
        disk_spec.profile = [disk_profile]
    return disk_spec
