Esempio n. 1
0
def listDbs():
    """ Return the list of databases """

    _log.debug('request: %s', request)
    _log.debug('GET => get database list')

    # use non-privileged account, may limit the list of databases returned.
    dbConn = Config.instance().dbEngine().connect()
    dbs = utils.listDbs(dbConn)

    _log.debug('dbs = %s', dbs)

    dbData = []
    for dbName in dbs:
        if dbName not in _specialDbs:
            dbData += [_dbDict(dbName)]

    return json.jsonify(results=dbData)
Esempio n. 2
0
def listDbs():
    """ Return the list of databases """

    _log.debug('request: %s', request)
    _log.debug('GET => get database list')

    # use non-privileged account, may limit the list of databases returned.
    dbConn = Config.instance().dbEngine().connect()
    dbs = utils.listDbs(dbConn)

    _log.debug('dbs = %s', dbs)

    dbData = []
    for dbName in dbs:
        if dbName not in _specialDbs:
            dbData += [_dbDict(dbName)]

    return json.jsonify(results=dbData)