'Disallow connection from connector.'

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

    (ret, output) = self.dpl.unassign_vdev(self._conver_uuid2hex(volume['id']), connector['initiator'])
    if (ret == errno.EAGAIN):
        (ret, event_uuid) = self._get_event_uuid(output)
        if (ret == 0):
            status = self._wait_event(self.dpl.get_vdev_status, volume['id'], event_uuid)
            if (status['state'] == 'error'):
                ret = errno.EFAULT
                msg = (_('Flexvisor    failed    to    unassign    volume    %(id)s:    %(status)s.') % {'id': volume['id'], 'status': status})
                raise exception.VolumeBackendAPIException(data=msg)
        else:
            msg = (_('Flexvisor    failed    to    unassign    volume    (get    event)    %(id)s.') % {'id': volume['id']})
            raise exception.VolumeBackendAPIException(data=msg)
    elif (ret == errno.ENODATA):
        LOG.info('Flexvisor    already    unassigned    volume    %(id)s.', {'id': volume['id']})
    elif (ret != 0):
        msg = (_('Flexvisor    failed    to    unassign    volume:%(id)s:%(status)s.') % {'id': volume['id'], 'status': ret})
        raise exception.VolumeBackendAPIException(data=msg)
