BlockTrafficZone
Bases: ControlTraffic
Action that enables Blue agents to block off access between two subnets in the network. This functionality mimics firewall rules.
Attributes:
Name | Type | Description |
---|---|---|
from_subnet |
str
|
name of subnet that the traffic should be blocked from |
to_subnet |
str
|
name of subnet that the traffic should be blocked from going to |
Functions
__init__
Parameters:
Name | Type | Description | Default |
---|---|---|---|
session |
int
|
session identifier |
required |
agent |
str
|
name of agent performing action |
required |
from_subnet |
str
|
name of subnet that the traffic should be blocked from |
required |
to_subnet |
str
|
name of subnet that the traffic should be blocked from going to |
required |
execute_control_traffic
Checks for pre-existing blocks, and blocks the connection between the to and from subnet.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state |
State
|
the current state of the environment |
required |
Returns:
Type | Description |
---|---|
Observation
|
the observation space for this action, holding a true or false success value |
ControlTraffic
Bases: LocalAction
Abstract parent class of all actions that control traffic.
Functions
__init__
Parameters:
Name | Type | Description | Default |
---|---|---|---|
session |
int
|
session id |
required |
agent |
str
|
agent name |
required |
execute
The function that is called when the action is performed/executed.
Checks that the action to be performed is valid (agent and session details)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state |
State
|
current state of the environment |
required |
Returns:
Type | Description |
---|---|
Observation
|
|