'Select pool form nominated pools.'

def _return_poolnumber(self, nominated_pools):

    selected_pool = (-1)
    min_ldn = 0
    for pool in nominated_pools:
        nld = len(pool['ld_list'])
        if ((nld < self._numofld_per_pool) and ((selected_pool == (-1)) or (min_ldn > nld))):
            selected_pool = pool['pool_num']
            min_ldn = nld
    if (selected_pool < 0):
        msg = _('No    available    pools    found.')
        raise exception.VolumeBackendAPIException(data=msg)
    return selected_pool
