BB: Fix AgentConfiguration logic in MonkeyIslandClient

This commit is contained in:
Shreya Malviya 2022-08-30 17:17:19 +05:30
parent f841bc041b
commit ff52fbefe4
1 changed files with 1 additions and 2 deletions

View File

@ -5,7 +5,6 @@ from typing import Sequence, Union
from bson import json_util
from common.agent_configuration import AgentConfiguration
from common.credentials import Credentials
from envs.monkey_zoo.blackbox.island_client.monkey_island_requests import MonkeyIslandRequests
from envs.monkey_zoo.blackbox.test_configurations.test_configuration import TestConfiguration
@ -51,7 +50,7 @@ class MonkeyIslandClient(object):
def _import_config(self, test_configuration: TestConfiguration):
response = self.requests.put_json(
"api/agent-configuration",
json=AgentConfiguration.to_mapping(test_configuration.agent_configuration),
json=test_configuration.agent_configuration.dict(),
)
if response.ok:
LOGGER.info("Configuration is imported.")