

def _setup_for_connection(self, sql_connection, engine_kwargs, maker_kwargs):
    if (sql_connection is None):
        raise exception.CantStartEngineError('No sql_connection parameter is established')
    engine = engines.create_engine(sql_connection=sql_connection, **engine_kwargs)
    sessionmaker = orm.get_maker(engine=engine, **maker_kwargs)
    return (engine, sessionmaker)

dataset/ETHPy150Open openstack/oslo.db/oslo_db/sqlalchemy/enginefacade.py _TransactionFactory._setup_for_connection/original