daemon: cleaned up InterfaceData class, it now leverages dataclass, removed extra bloat and no longer requires parameters as they are optional
This commit is contained in:
parent
6ddf1ac9a4
commit
18044f9474
5 changed files with 31 additions and 85 deletions
|
@ -29,7 +29,9 @@ _EMANE_MODELS = [
|
|||
_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
def ping(from_node, to_node, ip_prefixes, count=3):
|
||||
def ping(
|
||||
from_node: CoreNode, to_node: CoreNode, ip_prefixes: IpPrefixes, count: int = 3
|
||||
):
|
||||
address = ip_prefixes.ip4_address(to_node)
|
||||
try:
|
||||
from_node.cmd(f"ping -c {count} {address}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue