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

@ -32,7 +32,7 @@ _DIR = os.path.dirname(os.path.abspath(__file__))
def ping(
from_node: CoreNode, to_node: CoreNode, ip_prefixes: IpPrefixes, count: int = 3
):
address = ip_prefixes.ip4_address(to_node)
address = ip_prefixes.ip4_address(to_node.id)
try:
from_node.cmd(f"ping -c {count} {address}")
status = 0