Agent: Change method order

This commit is contained in:
Mike Salvatore 2022-09-27 19:21:34 -04:00 committed by Shreya Malviya
parent 082bb3bb6f
commit ba0ffeacce
1 changed files with 5 additions and 5 deletions

View File

@ -258,11 +258,6 @@ class InfectionMonkey:
return agent_event_serializer_registry
def _build_server_list(self, relay_port: int) -> Sequence[str]:
my_servers = set(map(str, self._opts.servers))
relay_servers = {f"{ip}:{relay_port}" for ip in get_my_ip_addresses()}
return list(my_servers.union(relay_servers))
def _build_master(self, relay_port: int):
servers = self._build_server_list(relay_port)
local_network_interfaces = get_network_interfaces()
@ -298,6 +293,11 @@ class InfectionMonkey:
propagation_credentials_repository,
)
def _build_server_list(self, relay_port: int) -> Sequence[str]:
my_servers = set(map(str, self._opts.servers))
relay_servers = {f"{ip}:{relay_port}" for ip in get_my_ip_addresses()}
return list(my_servers.union(relay_servers))
def _subscribe_events(
self,
agent_event_queue: IAgentEventQueue,