Island: Convert scanned machines to json serializable data

This commit is contained in:
vakaris_zilius 2022-09-30 12:41:09 +00:00 committed by Kekoa Kaaikala
parent d974b03ab0
commit 9048f72030
1 changed files with 4 additions and 2 deletions

View File

@ -120,8 +120,10 @@ class ReportService:
formatted_nodes.append( formatted_nodes.append(
{ {
"hostname": machine.hostname, "hostname": machine.hostname,
"ip_addresses": machine.network_interfaces, "ip_addresses": list(map(str, machine.network_interfaces)),
"accessible_from_nodes": accessible_from, "accessible_from_nodes": list(
map(lambda m: m.dict(simplify=True), accessible_from)
),
"domain_name": "", "domain_name": "",
# TODO add services # TODO add services
"services": [], "services": [],