From 99366052421be4074cfcc3c540f399e642c22fde Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 19 Sep 2022 19:21:03 -0400 Subject: [PATCH] Agent: Add IIslandAPIClient.send_log() --- .../island_api_client/i_island_api_client.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/monkey/infection_monkey/island_api_client/i_island_api_client.py b/monkey/infection_monkey/island_api_client/i_island_api_client.py index 4a168b3d5..2db9ab239 100644 --- a/monkey/infection_monkey/island_api_client/i_island_api_client.py +++ b/monkey/infection_monkey/island_api_client/i_island_api_client.py @@ -17,3 +17,16 @@ class IIslandAPIClient(ABC): :raises IslandAPIError: If an unexpected error occurs while attempting to connect to the island """ + + @abstractmethod + def send_log(self, log_contents: str): + """ + Send the contents of the agent's log to the island + + :param log_contents: The contents of the agent's log + :raises IslandAPIConnectionError: If a connection cannot be made to the island + :raises IslandAPITimeoutError: If a timeout occurs while attempting to connect to the island + or send the log contents + :raises IslandAPIError: If an unexpected error occurred while attempting to send the + contents of the agent's log to the island + """