diff --git a/envs/monkey_zoo/blackbox/island_client/monkey_island_client.py b/envs/monkey_zoo/blackbox/island_client/monkey_island_client.py index 71f9f200c..b687890b0 100644 --- a/envs/monkey_zoo/blackbox/island_client/monkey_island_client.py +++ b/envs/monkey_zoo/blackbox/island_client/monkey_island_client.py @@ -5,6 +5,7 @@ from typing import Union from bson import json_util +from common.configuration import AgentConfiguration from envs.monkey_zoo.blackbox.island_client.monkey_island_requests import MonkeyIslandRequests from envs.monkey_zoo.blackbox.test_configurations.test_configuration import TestConfiguration @@ -33,7 +34,8 @@ class MonkeyIslandClient(object): @avoid_race_condition def import_config(self, test_configuration: TestConfiguration): self.requests.post( - "api/agent-configuration", data=test_configuration.agent_configuration.to_json() + "api/agent-configuration", + data=AgentConfiguration.to_mapping(test_configuration.agent_configuration), ) serialized_propagation_credentials = json.dumps( [credential.to_json() for credential in test_configuration.propagation_credentials]