forked from p15670423/monkey
BB: Modify MonkeyIslandClient.import_config() to send propagation credentials to relevant endpoint
This commit is contained in:
parent
379ada7a24
commit
8b43d910b6
|
@ -32,9 +32,16 @@ class MonkeyIslandClient(object):
|
||||||
|
|
||||||
@avoid_race_condition
|
@avoid_race_condition
|
||||||
def import_config(self, test_configuration: TestConfiguration):
|
def import_config(self, test_configuration: TestConfiguration):
|
||||||
_ = self.requests.post(
|
self.requests.post(
|
||||||
"api/agent-configuration", data=test_configuration.agent_configuration.to_json()
|
"api/agent-configuration", data=test_configuration.agent_configuration.to_json()
|
||||||
)
|
)
|
||||||
|
serialized_propagation_credentials = json.dumps(
|
||||||
|
[credential.to_json() for credential in test_configuration.propagation_credentials]
|
||||||
|
)
|
||||||
|
self.requests.post(
|
||||||
|
"/api/propagation-credentials/configured-credentials",
|
||||||
|
data=serialized_propagation_credentials,
|
||||||
|
)
|
||||||
|
|
||||||
@avoid_race_condition
|
@avoid_race_condition
|
||||||
def run_monkey_local(self):
|
def run_monkey_local(self):
|
||||||
|
|
Loading…
Reference in New Issue