MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / to_dict

Method to_dict

traffic_analyzer.py:99–110  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

97class TrafficAlert:
98 """Alert for suspicious traffic pattern"""
99 alert_id: str
100 level: TrafficAlertLevel
101 category: str
102 message: str
103 src_ip: Optional[str] = None
104 dst_ip: Optional[str] = None
105 details: Dict[str, Any] = field(default_factory=dict)
106 timestamp: datetime = field(default_factory=datetime.now)
107 acknowledged: bool = False
108
109 def to_dict(self) -> Dict[str, Any]:
110 return {
111 'alert_id': self.alert_id,
112 'level': self.level.value,
113 'category': self.category,

Callers 4

get_top_hostsMethod · 0.45
get_alertsMethod · 0.45
get_host_detailsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected