Agent: Rename IslandAPIClient -> HTTPIslandAPIClient

This commit is contained in:
Mike Salvatore 2022-09-19 08:03:45 -04:00
parent 6d5503bd6e
commit 43d6ebcc15
4 changed files with 11 additions and 8 deletions

View File

@ -5,4 +5,4 @@ from .island_api_client_errors import (
IslandAPITimeoutError,
)
from .i_island_api_client import IIslandAPIClient
from .island_api_client import IslandAPIClient
from .http_island_api_client import HTTPIslandAPIClient

View File

@ -4,12 +4,12 @@ import requests
from common.common_consts.timeouts import MEDIUM_REQUEST_TIMEOUT
from . import IslandAPIConnectionError, IslandAPIError, IslandAPITimeoutError
from . import IIslandAPIClient, IslandAPIConnectionError, IslandAPIError, IslandAPITimeoutError
logger = logging.getLogger(__name__)
class IslandAPIClient:
class HTTPIslandAPIClient(IIslandAPIClient):
"""
A client for requests from the Agent to the Island API
"""

View File

@ -3,7 +3,7 @@ import requests
import requests_mock
from infection_monkey.island_api_client import (
IslandAPIClient,
HTTPIslandAPIClient,
IslandAPIConnectionError,
IslandAPIError,
IslandAPITimeoutError,
@ -27,4 +27,4 @@ def test_island_api_client(actual_error, expected_error):
m.get(ISLAND_URI, exc=actual_error)
with pytest.raises(expected_error):
IslandAPIClient(SERVER)
HTTPIslandAPIClient(SERVER)

View File

@ -9,8 +9,11 @@ from common.agent_configuration.agent_sub_configurations import (
)
from common.credentials import Credentials, LMHash, NTHash
from infection_monkey.exploit.log4shell_utils.ldap_server import LDAPServerFactory
from infection_monkey.island_api_client import IIslandAPIClient
from infection_monkey.transport import IslandAPIClient, IslandAPIRequestFailedError
from infection_monkey.island_api_client import (
HTTPIslandAPIClient,
IIslandAPIClient,
IslandAPIRequestFailedError,
)
from monkey_island.cc.event_queue import IslandEventTopic, PyPubSubIslandEventQueue
from monkey_island.cc.models import Report
from monkey_island.cc.models.networkmap import Arc, NetworkMap
@ -333,5 +336,5 @@ IslandEventTopic.RESET_AGENT_CONFIGURATION
# TODO: Remove after #2292 is closed
IIslandAPIClient
IslandAPIClient
HTTPIslandAPIClient
IslandAPIRequestFailedError