示例#1
0
def get_db(config):
    config(sql_connection="sqlite://", verbose=False, debug=False)
    CONF.set_override("data_api", "glance.db.sqlalchemy.api")
    db_api = glance.db.get_api()
    db_api.setup_db_env()
    db_api.get_engine()
    return db_api
示例#2
0
def get_db(config):
    config(sql_connection='sqlite://', verbose=False, debug=False)
    CONF.set_override('data_api', 'glance.db.sqlalchemy.api')
    db_api = glance.db.get_api()
    db_api.setup_db_env()
    db_api.get_engine()
    return db_api
示例#3
0
def get_db(config):
    CONF.set_override('data_api', 'glance.db.simple.api')
    db_api = glance.db.get_api()
    return db_api
示例#4
0
def get_db(config):
    CONF.set_override('data_api', 'glance.db.simple.api')
    db_api = glance.db.get_api()
    return db_api
示例#5
0
def get_db(config):
    CONF.set_override('data_api', 'glance.db.simple.api',
                      enforce_type=True)
    db_api = glance.db.get_api()
    return db_api
示例#6
0
def get_db(config):
    CONF.set_override("data_api", "glance.db.simple.api")
    db_api = glance.db.get_api()
    return db_api
示例#7
0
def get_db(config):
    config(sql_connection='sqlite://', verbose=False, debug=False)
    CONF.set_override('data_api', 'glance.db.registry.api')
    db_api = glance.db.get_api()
    db_api.setup_db_env()
    return db_api
示例#8
0
def get_db(config, workers=1):
    CONF.set_override('data_api', 'glance.db.simple.api')
    CONF.set_override('workers', workers)
    db_api = glance.db.get_api()
    return db_api