'Return the LDEV number of an unused LDEV in the LDEV range.'

def _find_unused_ldev_by_range(self):

    success_code = HORCM_EXIT_CODE.union(_INVALID_RANGE)
    (start, end) = self.storage_info['ldev_range'][:2]
    while (start <= end):
        if (((end - start) + 1) > _GETSTORAGEARRAY_ONCE):
            cnt = _GETSTORAGEARRAY_ONCE
        else:
            cnt = ((end - start) + 1)
        ldev_info = self.get_ldev_info(['undefined_ldev'], '-ldev_id', start, '-cnt', cnt, '-key', 'front_end', success_code=success_code)
        ldev = ldev_info.get('undefined_ldev')
        if (ldev is not None):
            return ldev
        start += _GETSTORAGEARRAY_ONCE
    return None
