#2869 - Remove agent_name from ConfigSchema and replace with type
This commit is contained in:
@@ -17,12 +17,12 @@ class AbstractTAPAgent(AbstractScriptedAgent, identifier="AbstractTAP"):
|
||||
"""Base class for TAP agents to inherit from."""
|
||||
|
||||
config: "AbstractTAPAgent.ConfigSchema" = Field(default_factory=lambda: AbstractTAPAgent.ConfigSchema())
|
||||
agent_name: str = "Abstract_TAP"
|
||||
next_execution_timestep: int = 0
|
||||
|
||||
class ConfigSchema(AbstractScriptedAgent.ConfigSchema):
|
||||
"""Configuration schema for Abstract TAP agents."""
|
||||
|
||||
type: str = "AbstractTAP"
|
||||
starting_node_name: Optional[str] = None
|
||||
|
||||
@abstractmethod
|
||||
|
||||
@@ -13,11 +13,11 @@ class DataManipulationAgent(AbstractTAPAgent, identifier="RedDatabaseCorruptingA
|
||||
"""Agent that uses a DataManipulationBot to perform an SQL injection attack."""
|
||||
|
||||
config: "DataManipulationAgent.ConfigSchema" = Field(default_factory=lambda: DataManipulationAgent.ConfigSchema())
|
||||
agent_name: str = "Data_Manipulation_Agent"
|
||||
|
||||
class ConfigSchema(AbstractTAPAgent.ConfigSchema):
|
||||
"""Configuration Schema for DataManipulationAgent."""
|
||||
|
||||
type: str = "RedDatabaseCorruptingAgent"
|
||||
starting_application_name: Optional[str] = None
|
||||
|
||||
@property
|
||||
|
||||
@@ -18,7 +18,7 @@ class RandomAgent(AbstractScriptedAgent, identifier="RandomAgent"):
|
||||
class ConfigSchema(AbstractScriptedAgent.ConfigSchema):
|
||||
"""Configuration Schema for Random Agents."""
|
||||
|
||||
agent_name: str = "Random_Agent"
|
||||
type: str = "RandomAgent"
|
||||
|
||||
def get_action(self) -> Tuple[str, Dict]:
|
||||
"""Sample the action space randomly.
|
||||
@@ -41,7 +41,7 @@ class PeriodicAgent(AbstractScriptedAgent, identifier="PeriodicAgent"):
|
||||
class ConfigSchema(AbstractScriptedAgent.ConfigSchema):
|
||||
"""Configuration Schema for Periodic Agent."""
|
||||
|
||||
agent_name: str = "Periodic_Agent"
|
||||
type: str = "PeriodicAgent"
|
||||
"""Name of the agent."""
|
||||
|
||||
max_executions: int = 999999
|
||||
|
||||
Reference in New Issue
Block a user