forked from p15670423/monkey
Agent: Add from_dict method to AgentConfiguration
Creating AgentConfiguration object from dictionary makes sense because it doesn't couple the configuration to any specific serialization methods. Also, the json sent from the island doesn't match the config structure because it stores config in a dict under "config" key.
This commit is contained in:
parent
d079d74b2c
commit
77804caab5
|
@ -24,6 +24,10 @@ class AgentConfiguration:
|
|||
payloads: List[PluginConfiguration]
|
||||
propagation: PropagationConfiguration
|
||||
|
||||
@staticmethod
|
||||
def from_dict(_dict: dict):
|
||||
return AgentConfigurationSchema().load(_dict)
|
||||
|
||||
|
||||
class AgentConfigurationSchema(Schema):
|
||||
keep_tunnel_open_time = fields.Float()
|
||||
|
|
Loading…
Reference in New Issue