'Driver entry point to unattach a volume from an instance.'

@utils.trace
@fczm_utils.remove_fc_zone
def terminate_connection(self, volume, connector, **kwargs):

    common = self._login()
    try:
        hostname = common._safe_hostname(connector['host'])
        common.terminate_connection(volume, hostname, wwn=connector['wwpns'])
        info = {'driver_volume_type': 'fibre_channel', 'data': {}}
        try:
            common.client.getHostVLUNs(hostname)
        except hpeexceptions.HTTPNotFound:
            LOG.info('Need    to    remove    FC    Zone,    building    initiator    target    map')
            (target_wwns, init_targ_map, _numPaths) = self._build_initiator_target_map(common, connector)
            info['data'] = {'target_wwn': target_wwns, 'initiator_target_map': init_targ_map}
        return info
    finally:
        self._logout(common)
