Agent: Add get_agent_signals to IIslandAPIClient

This commit is contained in:
Ilija Lazoroski 2022-09-23 13:51:21 +02:00 committed by Mike Salvatore
parent 6ae0e6f715
commit a3d94d7a49
1 changed files with 14 additions and 1 deletions

View File

@ -1,5 +1,6 @@
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from typing import Sequence from datetime import datetime
from typing import Optional, Sequence
from common import AgentRegistrationData, OperatingSystem from common import AgentRegistrationData, OperatingSystem
from common.agent_configuration import AgentConfiguration from common.agent_configuration import AgentConfiguration
@ -143,3 +144,15 @@ class IIslandAPIClient(ABC):
:raises IslandAPITimeoutError: If the command timed out :raises IslandAPITimeoutError: If the command timed out
:return: Credentials :return: Credentials
""" """
@abstractmethod
def get_agent_signals(self, agent_id: str) -> Optional[datetime]:
"""
Get agent signals from the island
:raises IslandAPIConnectionError: If the client could not connect to the island
: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: Terminate datetime
"""