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

@cinder_utils.trace
def terminate_connection(self, volume, connector, **kwargs):

    iqn = connector['initiator']
    LOG.info('Deleting    assignment    volume(%(vol)s)    with    initiator(%(initiator)s)', {'vol': volume['name'], 'initiator': iqn})
    for cli_host in self.rdxApi.list_hosts():
        if (cli_host['iscsi_name'] == iqn):
            try:
                self.rdxApi.unassign(self._cinder_id_to_rdx(volume['id']), host_name=cli_host['name'])
            except exception.RdxAPICommandException as e:
                error_msg = six.text_type(e)
                if ('No    such    assignment' not in error_msg):
                    raise
                else:
                    LOG.debug("Assignment    doesn't    exist")
            return
    LOG.warning('Did    not    find    matching    reduxio    host    for    initiator    %s', iqn)
