'Disconnect the volume or snapshot from the host.'

def _detach_device(self, ctxt, attach_info, device, properties, is_snapshot=False, force=False, ignore_errors=False):

    connector = attach_info['connector']
    connector.disconnect_volume(attach_info['conn']['data'], attach_info['device'], force=force, ignore_errors=ignore_errors)
    rpcapi = self.volume_rpcapi
    if (not is_snapshot):
        rpcapi.terminate_connection(ctxt, device, properties, force=force)
        rpcapi.remove_export(ctxt, device)
    else:
        rpcapi.terminate_connection_snapshot(ctxt, device, properties, force=force)
        rpcapi.remove_export_snapshot(ctxt, device)
