'Cleanup after an FC connection has been terminated.
When we clean up a terminated connection between a given connector
and volume, we:
1. Translate the given connector to a host name
2. Remove the volume-to-host mapping if it exists
3. Delete the host if it has no more mappings (hosts are created
automatically by this driver when mappings are created)'

def _do_terminate_connection(self, volume, connector, **kwargs):

    LOG.debug('enter:    terminate_connection:    volume    %(vol)s    with    connector    %(conn)s', {'vol': volume['id'], 'conn': connector})
    vol_name = self._get_target_vol(volume)
    info = {}
    if ('host' in connector):
        connector = connector.copy()
        connector.pop('initiator', None)
        info = {'driver_volume_type': 'fibre_channel', 'data': {}}
        host_name = self._helpers.get_host_from_connector(connector, volume_name=vol_name)
        if (host_name is None):
            msg = _('terminate_connection:    Failed    to    get    host    name    from    connector.')
            LOG.error(msg)
            raise exception.VolumeDriverException(message=msg)
    else:
        host_name = None
    host_name = self._helpers.unmap_vol_from_host(vol_name, host_name)
    if host_name:
        resp = self._helpers.check_host_mapped_vols(host_name)
        if (not len(resp)):
            LOG.info('Need    to    remove    FC    Zone,    building    initiator    target    map.')
            if (('wwpns' in connector) and host_name):
                target_wwpns = []
                for node in self._state['storage_nodes'].values():
                    target_wwpns.extend(node['WWPN'])
                init_targ_map = self._make_initiator_target_map(connector['wwpns'], target_wwpns)
                info['data'] = {'initiator_target_map': init_targ_map}
            self._helpers.delete_host(host_name)
    LOG.debug('leave:    terminate_connection:    volume    %(vol)s    with    connector    %(conn)s', {'vol': volume['id'], 'conn': connector})
    return info
