Previous topic

The nova.db.sqlalchemy.models Module

Next topic

The nova.exception Module

This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Nova 2011.2 docs or all OpenStack docs too.

The nova.db.sqlalchemy.session Module

Session Handling for SQLAlchemy backend.

class MySQLPingListener

Bases: object

Ensures that MySQL connections checked out of the pool are alive.

Borrowed from: http://groups.google.com/group/sqlalchemy/msg/a4ce563d802c929f

checkout(dbapi_con, con_record, con_proxy)
class SynchronousSwitchListener

Bases: sqlalchemy.interfaces.PoolListener

Switch sqlite connections to non-synchronous mode

connect(dbapi_con, con_record)
get_engine()

Return a SQLAlchemy engine.

get_maker(engine, autocommit=True, expire_on_commit=False)

Return a SQLAlchemy sessionmaker using the given engine.

get_session(autocommit=True, expire_on_commit=False)

Return a SQLAlchemy session.

is_db_connection_error(args)

Return True if error in connecting to db.