예제 #1
0
def DeleteFleetspeakPendingMessages(grr_id: str) -> None:
    """Deletes fleetspeak messages pending for the given client."""
    delete_req = admin_pb2.DeletePendingMessagesRequest()
    delete_req.client_ids.append(GRRIDToFleetspeakID(grr_id))
    fleetspeak_connector.CONN.outgoing.DeletePendingMessages(
        delete_req,
        single_try_timeout=WRITE_SINGLE_TRY_TIMEOUT,
        timeout=WRITE_TOTAL_TIMEOUT)
예제 #2
0
def DeleteFleetspeakPendingMessages(grr_id: str) -> None:
  """Deletes fleetspeak messages pending for the given client."""
  delete_req = admin_pb2.DeletePendingMessagesRequest()
  delete_req.client_ids.append(GRRIDToFleetspeakID(grr_id))
  fleetspeak_connector.CONN.outgoing.DeletePendingMessages(delete_req)
예제 #3
0
 def testDeletePendingMessages(self):
     t = FakeStub()
     s = connector.OutgoingConnection(None, 'test', t)
     s.DeletePendingMessages(admin_pb2.DeletePendingMessagesRequest())
     self.assertTrue(t.delete_done)
     self.assertFalse(t.delete_errors)