Exemplo n.º 1
0
 def _list_transforms(self, tenant_id, limit, offset, uri):
     try:
         transforms = self._transforms_repo.list_transforms(tenant_id,
                                                            limit, offset)
         transforms = helpers.paginate(transforms, uri)
         return transforms
     except repository_exceptions.RepositoryException as ex:
         LOG.error(ex)
         raise falcon.HTTPInternalServerError('Service unavailable',
                                              ex.message)
    def _stream_definition_list(self, tenant_id, name, req_uri,
                                offset, limit):

        stream_definition_rows = (
            self._stream_definitions_repo.get_stream_definitions(
                tenant_id, name, offset, limit))
        result = []
        for stream_definition_row in stream_definition_rows:
            sd = self._build_stream_definition_show_result(
                stream_definition_row)
            helpers.add_links_to_resource(sd, req_uri)
            result.append(sd)

        result = helpers.paginate(result, req_uri)

        return result
Exemplo n.º 3
0
 def _list_events(self, tenant_id, uri, offset, limit):
     rows = self._events_repo.list_events(tenant_id, offset, limit)
     return helpers.paginate(self._build_events(rows), uri)