def terminate_connection(self, context, volume_id, connector, force=False):
    'Cleanup connection from host represented by connector.\n\n        The format of connector is the same as for initialize_connection.\n        '
    utils.require_driver_initialized(self.driver)
    volume_ref = self.db.volume_get(context, volume_id)
    try:
        self.driver.terminate_connection(volume_ref, connector, force=force)
    except Exception as err:
        err_msg = (_('Terminate volume connection failed: %(err)s') % {'err': six.text_type(err)})
        LOG.error(err_msg, resource=volume_ref)
        raise exception.VolumeBackendAPIException(data=err_msg)
    LOG.info(_LI('Terminate volume connection completed successfully.'), resource=volume_ref)
Cleanup connection from host represented by connector.

The format of connector is the same as for initialize_connection.
def terminate_connection(self, context, volume_id, connector, force=False):
    'Cleanup connection from host represented by connector.\n\n        The format of connector is the same as for initialize_connection.\n        '
    utils.require_driver_initialized(self.driver)
    volume_ref = self.db.volume_get(context, volume_id)
    try:
        self.driver.terminate_connection(volume_ref, connector, force=force)
    except Exception as err:
        err_msg = (_('Terminate volume connection failed: %(err)s') % {'err': six.text_type(err)})
        LOG.error(err_msg, resource=volume_ref)
        raise exception.VolumeBackendAPIException(data=err_msg)
    LOG.info(_LI('Terminate volume connection completed successfully.'), resource=volume_ref)