def get_db():
    opts = get_options()
    db_engine = opts.pop('db')
    if db_engine == 'elasticsearch':
        logging.debug(_i18n._LI('Elastichsearch config options: %s') % str(opts))
        db = elastic.ElasticSearchEngine(**opts)
    else:
        raise Exception(_i18n._('Database Engine %s not supported') % db_engine)
    return db
dataset/ETHPy150Open openstack/freezer-api/freezer_api/storage/driver.py/get_db/original