From a2be330d16841be96ac1f5a92980b94aa93f4346 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Fri, 23 Sep 2022 17:10:24 +0200 Subject: [PATCH] Island: IIslandAPIClient.get_agent_signals to return AgentSignals --- .../island_api_client/i_island_api_client.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 c2a4dc899..3101cc8f8 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 @@ -1,8 +1,7 @@ from abc import ABC, abstractmethod -from datetime import datetime from typing import Optional, Sequence -from common import AgentRegistrationData, OperatingSystem +from common import AgentRegistrationData, AgentSignals, OperatingSystem from common.agent_configuration import AgentConfiguration from common.agent_events import AbstractAgentEvent from common.credentials import Credentials @@ -133,7 +132,7 @@ class IIslandAPIClient(ABC): """ @abstractmethod - def get_agent_signals(self, agent_id: str) -> Optional[datetime]: + def get_agent_signals(self, agent_id: str) -> AgentSignals: """ Gets an agent's signals from the island @@ -142,5 +141,5 @@ class IIslandAPIClient(ABC): :raises IslandAPIRequestError: If there was a problem with the client request :raises IslandAPIRequestFailedError: If the server experienced an error :raises IslandAPITimeoutError: If the command timed out - :return: The relevant agent's terminate signal's timestamp + :return: The relevant agent's signal's """