Remove commented out code
This commit is contained in:
@@ -57,27 +57,6 @@ class HostObservation(AbstractObservation, identifier="HOST"):
|
||||
include_users: Optional[bool] = True
|
||||
"""If True, report user session information."""
|
||||
|
||||
# @field_validator("monitored_traffic", mode="before")
|
||||
# def traffic_lookup(cls, val: Optional[Dict]) -> Optional[Dict]:
|
||||
# """
|
||||
# Convert monitored_traffic by lookup against Port and Protocol dicts.
|
||||
|
||||
# This is necessary for retaining compatiblility with configs written for PrimAITE <=3.3.
|
||||
# This method will be removed in PrimAITE >= 4.0
|
||||
# """
|
||||
# if val is None:
|
||||
# return val
|
||||
# new_val = {}
|
||||
# for proto, port_list in val.items():
|
||||
# # convert protocol, for instance ICMP becomes "icmp"
|
||||
# proto = PROTOCOL_LOOKUP[proto] if proto in PROTOCOL_LOOKUP else proto
|
||||
# new_val[proto] = []
|
||||
# for port in port_list:
|
||||
# # convert ports, for instance "HTTP" becomes 80
|
||||
# port = PORT_LOOKUP[port] if port in PORT_LOOKUP else port
|
||||
# new_val[proto].append(port)
|
||||
# return new_val
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
where: WhereType,
|
||||
|
||||
Reference in New Issue
Block a user