Island: Use ip address in scan report

This commit is contained in:
Kekoa Kaaikala 2022-09-30 18:20:04 +00:00
parent b7566a805b
commit 519f48b6d8
2 changed files with 3 additions and 3 deletions

View File

@ -120,7 +120,7 @@ class ReportService:
formatted_nodes.append(
{
"hostname": machine.hostname,
"ip_addresses": list(map(str, machine.network_interfaces)),
"ip_addresses": [str(iface.ip) for iface in machine.network_interfaces],
"accessible_from_nodes": list(
map(lambda m: m.dict(simplify=True), accessible_from)
),

View File

@ -48,14 +48,14 @@ MACHINES = [MACHINE_1, MACHINE_2, MACHINE_3, ISLAND_MACHINE]
EXPECTED_SCANNED_MACHINES = [
{
"hostname": MACHINE_1.hostname,
"ip_addresses": list(map(str, MACHINE_1.network_interfaces)),
"ip_addresses": [str(iface.ip) for iface in MACHINE_1.network_interfaces],
"accessible_from_nodes": [ISLAND_MACHINE.dict(simplify=True)],
"services": [],
"domain_name": "",
},
{
"hostname": MACHINE_2.hostname,
"ip_addresses": list(map(str, MACHINE_2.network_interfaces)),
"ip_addresses": [str(iface.ip) for iface in MACHINE_2.network_interfaces],
"accessible_from_nodes": [MACHINE_1.dict(simplify=True)],
"services": [],
"domain_name": "",