From c37876cb973e1f841a601bf404027c3c27ab26a3 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Fri, 16 Sep 2022 18:00:05 +0530 Subject: [PATCH] Island: Rename resource Events -> AgentEvents --- monkey/monkey_island/cc/app.py | 4 ++-- monkey/monkey_island/cc/resources/__init__.py | 2 +- monkey/monkey_island/cc/resources/events.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/monkey/monkey_island/cc/app.py b/monkey/monkey_island/cc/app.py index a678ddd9b..22a8497e9 100644 --- a/monkey/monkey_island/cc/app.py +++ b/monkey/monkey_island/cc/app.py @@ -13,9 +13,9 @@ from monkey_island.cc.database import database, mongo from monkey_island.cc.resources import ( AgentBinaries, AgentConfiguration, + AgentEvents, Agents, ClearSimulationData, - Events, IPAddresses, IslandLog, PBAFileDownload, @@ -187,7 +187,7 @@ def init_restful_endpoints(api: FlaskDIWrapper): api.add_resource(IslandLog) api.add_resource(IPAddresses) - api.add_resource(Events) + api.add_resource(AgentEvents) # API Spec: These two should be the same resource, GET for download and POST for upload api.add_resource(PBAFileDownload) diff --git a/monkey/monkey_island/cc/resources/__init__.py b/monkey/monkey_island/cc/resources/__init__.py index 980414a8f..822180ebe 100644 --- a/monkey/monkey_island/cc/resources/__init__.py +++ b/monkey/monkey_island/cc/resources/__init__.py @@ -8,5 +8,5 @@ from .ip_addresses import IPAddresses from .agent_configuration import AgentConfiguration from .pba_file_upload import PBAFileUpload, LINUX_PBA_TYPE, WINDOWS_PBA_TYPE from .pba_file_download import PBAFileDownload -from .events import Events +from .events import AgentEvents from .agents import Agents diff --git a/monkey/monkey_island/cc/resources/events.py b/monkey/monkey_island/cc/resources/events.py index 42612ec6f..b24ff3ad3 100644 --- a/monkey/monkey_island/cc/resources/events.py +++ b/monkey/monkey_island/cc/resources/events.py @@ -10,7 +10,7 @@ from monkey_island.cc.resources.AbstractResource import AbstractResource logger = logging.getLogger(__name__) -class Events(AbstractResource): +class AgentEvents(AbstractResource): urls = ["/api/events"] def __init__(