From eea7fc1ee2bf19d29e8bbd12769ecf55005a33d6 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Tue, 20 Sep 2022 09:58:15 -0400 Subject: [PATCH] Agent: Add AbstractIslandAPIClientFactory --- .../infection_monkey/island_api_client/__init__.py | 1 + .../abstract_island_api_client_factory.py | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 monkey/infection_monkey/island_api_client/abstract_island_api_client_factory.py diff --git a/monkey/infection_monkey/island_api_client/__init__.py b/monkey/infection_monkey/island_api_client/__init__.py index ec513e774..0dd8a7865 100644 --- a/monkey/infection_monkey/island_api_client/__init__.py +++ b/monkey/infection_monkey/island_api_client/__init__.py @@ -6,4 +6,5 @@ from .island_api_client_errors import ( IslandAPITimeoutError, ) from .i_island_api_client import IIslandAPIClient +from .abstract_island_api_client_factory import AbstractIslandAPIClientFactory from .http_island_api_client import HTTPIslandAPIClient diff --git a/monkey/infection_monkey/island_api_client/abstract_island_api_client_factory.py b/monkey/infection_monkey/island_api_client/abstract_island_api_client_factory.py new file mode 100644 index 000000000..2a74dcd96 --- /dev/null +++ b/monkey/infection_monkey/island_api_client/abstract_island_api_client_factory.py @@ -0,0 +1,13 @@ +from abc import ABC, abstractmethod + +from . import IIslandAPIClient + + +class AbstractIslandAPIClientFactory(ABC): + @abstractmethod + def create_island_api_client(self) -> IIslandAPIClient: + """ + Create an IIslandAPIClient + + :return: A concrete instance of an IIslandAPIClient + """