def search(self, regex):
        try:
            spec = {'$or': [{'data.content'    : {'$regex': regex, '$options': 'im'}},
                            {'data.description': {'$regex': regex, '$options': 'im'}}]}
            fields = {'_id': 0}
            cur = self.db.docs.find(spec, fields)
        except Exception as e:
            raise DatabaseException(e)
        return [Document(**row) for row in cur]
def query_vpp_config(self):
        ds = list(self._test.vapi.vpp.details_iter(
            self._test.vapi.ip_path_mtu_get))

        for d in ds:
            if self.nh == str(d.pmtu.nh) \
               and self.table_id == d.pmtu.table_id \
               and self.pmtu == d.pmtu.path_mtu:
                return True
        return False