def query_topology_db(self, dict_convert=False, **req):
session = db.get_session()<EOL>with session.begin(subtransactions=True):<EOL><INDENT>try:<EOL><INDENT>topo_disc = session.query(DfaTopologyDb).filter_by(**req).all()<EOL><DEDENT>except orm_exc.NoResultFound:<EOL><INDENT>LOG.info("<STR_LIT>", req)<EOL>return None<EOL><DEDENT><DEDENT>if dict_convert:<EOL><INDENT>return self._convert_topo_obj_dict(topo_disc)<EOL><DEDENT>return topo_disc<EOL>
Query an entry to the topology DB.