diff --git a/monkey/infection_monkey/system_info/collectors/aws_collector.py b/monkey/infection_monkey/system_info/collectors/aws_collector.py index 71f9e58c1..68d125279 100644 --- a/monkey/infection_monkey/system_info/collectors/aws_collector.py +++ b/monkey/infection_monkey/system_info/collectors/aws_collector.py @@ -1,6 +1,7 @@ import logging from common.cloud.aws.aws_instance import AwsInstance +from common.data.system_info_collectors_names import AWS_COLLECTOR from infection_monkey.system_info.system_info_collector import SystemInfoCollector @@ -12,7 +13,7 @@ class AwsCollector(SystemInfoCollector): Extract info from AWS machines. """ def __init__(self): - super(AwsCollector, self).__init__(name="AwsCollector") + super().__init__(name=AWS_COLLECTOR) def collect(self) -> dict: logger.info("Collecting AWS info") diff --git a/monkey/infection_monkey/system_info/collectors/environment_collector.py b/monkey/infection_monkey/system_info/collectors/environment_collector.py index ac5a5433d..5567477d3 100644 --- a/monkey/infection_monkey/system_info/collectors/environment_collector.py +++ b/monkey/infection_monkey/system_info/collectors/environment_collector.py @@ -1,5 +1,6 @@ from common.cloud.all_instances import get_all_cloud_instances from common.cloud.environment_names import ON_PREMISE +from common.data.system_info_collectors_names import ENVIRONMENT_COLLECTOR from infection_monkey.system_info.system_info_collector import SystemInfoCollector @@ -13,7 +14,7 @@ def get_monkey_environment() -> str: class EnvironmentCollector(SystemInfoCollector): def __init__(self): - super(EnvironmentCollector, self).__init__(name="EnvironmentCollector") + super().__init__(name=ENVIRONMENT_COLLECTOR) def collect(self) -> dict: return {"environment": get_monkey_environment()} diff --git a/monkey/infection_monkey/system_info/collectors/hostname_collector.py b/monkey/infection_monkey/system_info/collectors/hostname_collector.py index 92a522bf9..21d03aac7 100644 --- a/monkey/infection_monkey/system_info/collectors/hostname_collector.py +++ b/monkey/infection_monkey/system_info/collectors/hostname_collector.py @@ -10,7 +10,7 @@ logger = logging.getLogger(__name__) class HostnameCollector(SystemInfoCollector): def __init__(self): - super(HostnameCollector, self).__init__(name=HOSTNAME_COLLECTOR) + super().__init__(name=HOSTNAME_COLLECTOR) def collect(self) -> dict: return {"hostname": socket.getfqdn()} diff --git a/monkey/infection_monkey/system_info/collectors/process_list_collector.py b/monkey/infection_monkey/system_info/collectors/process_list_collector.py index 93f836376..c0610cc74 100644 --- a/monkey/infection_monkey/system_info/collectors/process_list_collector.py +++ b/monkey/infection_monkey/system_info/collectors/process_list_collector.py @@ -16,7 +16,7 @@ except NameError: class ProcessListCollector(SystemInfoCollector): def __init__(self): - super(ProcessListCollector, self).__init__(name=PROCESS_LIST_COLLECTOR) + super().__init__(name=PROCESS_LIST_COLLECTOR) def collect(self) -> dict: """