#2912 - Minor changes to documentation page for extensible actions
This commit is contained in:
@@ -27,6 +27,8 @@ New actions to be used within PrimAITE require:
|
||||
class ExampleAction(AbstractAction, identifier="Example_action"):
|
||||
"""An example action for demonstration purposes."""
|
||||
|
||||
config: "ExampleAction.ConfigSchema"
|
||||
|
||||
class ConfigSchema(AbstractAction.ConfigSchema):
|
||||
"""The configuration schema with all attributes expected goes here."""
|
||||
target_application: str
|
||||
@@ -55,7 +57,7 @@ New actions to be used within PrimAITE require:
|
||||
"node",
|
||||
config.node_name,
|
||||
"file_system",
|
||||
cls.model_fields["verb"].default,
|
||||
config.verb,
|
||||
"folder",
|
||||
config.folder_name,
|
||||
]
|
||||
|
||||
@@ -84,19 +84,6 @@ class FirewallACLAddRuleAction(ACLAbstractAction, identifier="firewall_acl_add_r
|
||||
|
||||
config: "FirewallACLAddRuleAction.ConfigSchema"
|
||||
|
||||
# max_acl_rules: int
|
||||
# num_ips: int
|
||||
# num_ports: int
|
||||
# num_protocols: int
|
||||
# num_permissions: int = 3
|
||||
# permission: str
|
||||
# target_firewall_nodename: str
|
||||
# src_ip: str
|
||||
# dst_ip: str
|
||||
# dst_wildcard: str
|
||||
# src_port: Union[int| None]
|
||||
# dst_port: Union[int | None]
|
||||
|
||||
class ConfigSchema(ACLAbstractAction.ConfigSchema):
|
||||
"""Configuration schema for FirewallACLAddRuleAction."""
|
||||
|
||||
@@ -113,12 +100,6 @@ class FirewallACLAddRuleAction(ACLAbstractAction, identifier="firewall_acl_add_r
|
||||
source_wildcard_id: int
|
||||
dest_wildcard_id: int
|
||||
|
||||
# max_acl_rules: int
|
||||
# num_ips: int
|
||||
# num_ports: int
|
||||
# num_protocols: int
|
||||
# num_permissions: int = 3
|
||||
|
||||
@classmethod
|
||||
def form_request(cls, config: ConfigSchema) -> List[str]:
|
||||
"""Return the action formatted as a request which can be ingested by the PrimAITE simulation."""
|
||||
|
||||
Reference in New Issue
Block a user