silo.low_code.agent.config_generator module

class silo.low_code.agent.config_generator.AgentConfigGenerator(da_job)

Bases: object

Generates an agent config

This class allows for easier generator of agent configs by being a front-end for setting values correctly and ensuring that all required information is present and valid.

The created commands use a specific name that allows the framework to automatically rebuild the ResultContainers with the correct data. This is accomplished by appending the RC’s Requestors hash.

add_command(command, result_container)

Add a command that will be executed by the agent

The provided command must be a python object formatted correctly for the given execution type (datatype). For example, JMX and PowerShell require different information within this field.

Parameters
  • command (..agent.messages.ProtocolConfig) – Information related to the command that needs to be executed. This data must match the required information for the given datatype.

  • result_container (ResultContainer) – ResultContainer for extracting required information for the command

Returns

Command was successfully added

Return type

bool

generate_group()

Generate the group_id for the agent

Returns

Unique hash for the given information

Return type

int