#2064: documentation EVERYWHERE

This commit is contained in:
Czar Echavez
2023-11-27 11:38:03 +00:00
parent cd49f1eb85
commit 299729d5b4
9 changed files with 141 additions and 13 deletions

View File

@@ -1187,6 +1187,7 @@ class Node(SimComponent):
self.start_up_countdown = self.start_up_duration
if self.start_up_duration <= 0:
self._start_up_actions()
self.operating_state = NodeOperatingState.ON
self.sys_log.info("Turned on")
for nic in self.nics.values():
@@ -1202,6 +1203,7 @@ class Node(SimComponent):
self.shut_down_countdown = self.shut_down_duration
if self.shut_down_duration <= 0:
self._shut_down_actions()
self.operating_state = NodeOperatingState.OFF
self.sys_log.info("Turned off")

View File

@@ -1,5 +1,5 @@
from ipaddress import IPv4Address
from typing import Dict, Optional, Union
from typing import Dict, Optional
from primaite import getLogger
from primaite.simulator.network.protocols.dns import DNSPacket, DNSRequest
@@ -51,7 +51,7 @@ class DNSClient(Service):
"""
pass
def add_domain_to_cache(self, domain_name: str, ip_address: IPv4Address) -> Union[bool, None]:
def add_domain_to_cache(self, domain_name: str, ip_address: IPv4Address) -> bool:
"""
Adds a domain name to the DNS Client cache.