'Unmaps a volume from the host.
:param volume: the volume Object
:param connector: the connector Object'

def _unmap_lun(self, volume, connector):

    extra_specs = self._initial_setup(volume)
    if self.utils.is_volume_failed_over(volume):
        extra_specs = self._get_replication_extra_specs(extra_specs, self.rep_config)
    volume_name = volume.name
    LOG.info('Unmap    volume:    %(volume)s.', {'volume': volume_name})
    if (connector is not None):
        host = connector['host']
    else:
        LOG.warning('Cannot    get    host    name    from    connector    object    -    assuming    force-detach.')
        host = None
    (device_info, is_live_migration, source_storage_group_list) = self.find_host_lun_id(volume, host, extra_specs)
    if ('hostlunid' not in device_info):
        LOG.info('Volume    %s    is    not    mapped.    No    volume    to    unmap.', volume_name)
        return
    if (is_live_migration and (len(source_storage_group_list) == 1)):
        LOG.info('Volume    %s    is    mapped.    Failed    live    migration    case', volume_name)
        return
    source_nf_sg = None
    array = extra_specs[utils.ARRAY]
    if (len(source_storage_group_list) > 1):
        for storage_group in source_storage_group_list:
            if ('NONFAST' in storage_group):
                source_nf_sg = storage_group
                break
    if source_nf_sg:
        self.masking.remove_volume_from_sg(array, device_info['device_id'], volume_name, storage_group, extra_specs)
    else:
        self._remove_members(array, volume, device_info['device_id'], extra_specs, connector)
