def ListErrors(self) -> utils.ItemsIterator[HuntError]: args = hunt_pb2.ApiListHuntErrorsArgs(hunt_id=self.hunt_id) items = self._context.SendIteratorRequest("ListHuntErrors", args) return utils.MapItemsIterator( lambda data: HuntError(data=data, context=self._context), items)
def ListClients(self, client_status): args = hunt_pb2.ApiListHuntClientsArgs(hunt_id=self.hunt_id, client_status=client_status) items = self._context.SendIteratorRequest("ListHuntClients", args) return utils.MapItemsIterator( lambda data: HuntClient(data=data, context=self._context), items)
def ListLogs(self): args = flow_pb2.ApiListFlowLogsArgs( client_id=self.client_id, flow_id=self.flow_id) items = self._context.SendIteratorRequest("ListFlowLogs", args) return utils.MapItemsIterator(lambda data: FlowLog(data=data), items)
def ListCrashes(self): args = hunt_pb2.ApiListHuntCrashesArgs(hunt_id=self.hunt_id) items = self._context.SendIteratorRequest("ListHuntCrashes", args) return utils.MapItemsIterator( lambda data: client.ClientCrash(data=data, context=self._context), items)
def ListLogs(self): args = hunt_pb2.ApiListHuntLogsArgs(hunt_id=self.hunt_id) items = self._context.SendIteratorRequest("ListHuntLogs", args) return utils.MapItemsIterator( lambda data: HuntLog(data=data, context=self._context), items)
def ListResults(self) -> utils.ItemsIterator[FlowResult]: args = flow_pb2.ApiListFlowResultsArgs(client_id=self.client_id, flow_id=self.flow_id) items = self._context.SendIteratorRequest("ListFlowResults", args) return utils.MapItemsIterator(lambda data: FlowResult(data=data), items)
def ListHunts(context=None): """List all GRR hunts.""" items = context.SendIteratorRequest("ListHunts", hunt_pb2.ApiListHuntsArgs()) return utils.MapItemsIterator(lambda data: Hunt(data=data, context=context), items)
def ListGrrBinaries(context=None): """Lists all registered Grr binaries.""" items = context.SendIteratorRequest("ListGrrBinaries", None) return utils.MapItemsIterator( lambda data: GrrBinary(data=data, context=context), items)