def manage_existing_snapshot(self, ctxt, snapshot, ref=None):
    LOG.debug('manage_existing_snapshot: managing %s.', ref)
    try:
        flow_engine = manage_existing_snapshot.get_flow(ctxt, self.db, self.driver, self.host, snapshot.id, ref)
    except Exception:
        msg = _LE('Failed to create manage_existing flow: %(object_type)s %(object_id)s.')
        LOG.exception(msg, {'object_type': 'snapshot', 'object_id': snapshot.id})
        raise exception.CinderException(_('Failed to create manage existing flow.'))
    with flow_utils.DynamicLogListener(flow_engine, logger=LOG):
        flow_engine.run()
    return snapshot.id
def manage_existing_snapshot(self, ctxt, snapshot, ref=None):
    LOG.debug('manage_existing_snapshot: managing %s.', ref)
    try:
        flow_engine = manage_existing_snapshot.get_flow(ctxt, self.db, self.driver, self.host, snapshot.id, ref)
    except Exception:
        msg = _LE('Failed to create manage_existing flow: %(object_type)s %(object_id)s.')
        LOG.exception(msg, {'object_type': 'snapshot', 'object_id': snapshot.id})
        raise exception.CinderException(_('Failed to create manage existing flow.'))
    with flow_utils.DynamicLogListener(flow_engine, logger=LOG):
        flow_engine.run()
    return snapshot.id