'Given the volume dict find the host lun id for a volume.
:param volume: the volume dict
:param host: host from connector (can be None on a force-detach)
:param extra_specs: the extra specs
:returns: dict -- the data dict'

def find_host_lun_id(self, volume, host, extra_specs):

    maskedvols = {}
    is_live_migration = False
    volume_name = volume.name
    device_id = self._find_device_on_array(volume, extra_specs)
    host_name = (self.utils.get_host_short_name(host) if host else None)
    if device_id:
        array = extra_specs[utils.ARRAY]
        source_storage_group_list = self.rest.get_storage_groups_from_volume(array, device_id)
        maskingviews = self.get_masking_views_from_volume(array, device_id, host_name, source_storage_group_list)
        for maskingview in maskingviews:
            host_lun_id = self.rest.find_mv_connections_for_vol(array, maskingview, device_id)
            if (host_lun_id is not None):
                devicedict = {'hostlunid': host_lun_id, 'maskingview': maskingview, 'array': array, 'device_id': device_id}
                maskedvols = devicedict
        if (not maskedvols):
            LOG.debug('Host    lun    id    not    found    for    volume:    %(volume_name)s    with    the    device    id:    %(device_id)s.', {'volume_name': volume_name, 'device_id': device_id})
        else:
            LOG.debug('Device    info:    %(maskedvols)s.', {'maskedvols': maskedvols})
            if host:
                hoststr = ('-%(host)s-' % {'host': host_name})
                if (hoststr.lower() not in maskedvols['maskingview'].lower()):
                    LOG.debug('Volume    is    masked    but    not    to    host    %(host)s    as    is    expected.    Assuming    live    migration.', {'host': host})
                    is_live_migration = True
                else:
                    for storage_group in source_storage_group_list:
                        if ('NONFAST' in storage_group):
                            is_live_migration = True
                            break
    else:
        exception_message = (_('Cannot    retrieve    volume    %(vol)s    from    the    array.') % {'vol': volume_name})
        LOG.exception(exception_message)
        raise exception.VolumeBackendAPIException(exception_message)
    return (maskedvols, is_live_migration, source_storage_group_list)
