2041: Remove NTPRequest class (review comment)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import datetime
|
||||
from ipaddress import IPv4Address
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
@@ -9,12 +8,6 @@ from pydantic import BaseModel
|
||||
from primaite.simulator.network.protocols.packet import DataPacket
|
||||
|
||||
|
||||
class NTPRequest(BaseModel):
|
||||
"""Represents a NTP Request packet."""
|
||||
|
||||
ntp_client: Optional[IPv4Address] = None
|
||||
|
||||
|
||||
class NTPReply(BaseModel):
|
||||
"""Represents a NTP Reply packet."""
|
||||
|
||||
@@ -30,8 +23,6 @@ class NTPPacket(DataPacket):
|
||||
:param ntp_reply: NTPReply packet from NTP Server.
|
||||
"""
|
||||
|
||||
ntp_request: NTPRequest
|
||||
"NTP Request packet sent by NTP Client."
|
||||
ntp_reply: Optional[NTPReply] = None
|
||||
|
||||
def generate_reply(self, ntp_server_time: datetime) -> NTPPacket:
|
||||
|
||||
Reference in New Issue
Block a user