daemon: updated IpPrefixes and InterfaceHelper to remove duplicate code

This commit is contained in:
Blake Harnden 2020-06-09 18:40:50 -07:00
parent 21da670698
commit d71d84fae7
4 changed files with 53 additions and 106 deletions

View file

@ -22,7 +22,7 @@ _WIRED = [PtpNet, HubNode, SwitchNode]
def ping(from_node: CoreNode, to_node: CoreNode, ip_prefixes: IpPrefixes):
address = ip_prefixes.ip4_address(to_node)
address = ip_prefixes.ip4_address(to_node.id)
try:
from_node.cmd(f"ping -c 1 {address}")
status = 0