summaryrefslogtreecommitdiff
path: root/6/bgp.pl
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2023-11-14 14:14:44 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2023-11-14 14:14:44 +0100
commit6dca28918be80a3ef0c2959a99067337f59f5972 (patch)
treee72273247504d89e0f462c7308e96a22bf17ee40 /6/bgp.pl
parentde3d2c7ed173d6a3478f2432dea441a7e2e1088a (diff)
downloadprolog-firewall-6dca28918be80a3ef0c2959a99067337f59f5972.tar.gz
prolog-firewall-6dca28918be80a3ef0c2959a99067337f59f5972.tar.bz2
prolog-firewall-6dca28918be80a3ef0c2959a99067337f59f5972.tar.xz
prolog-firewall-6dca28918be80a3ef0c2959a99067337f59f5972.zip
wip
Diffstat (limited to '6/bgp.pl')
-rw-r--r--6/bgp.pl13
1 files changed, 2 insertions, 11 deletions
diff --git a/6/bgp.pl b/6/bgp.pl
index d9b448b..6d16500 100644
--- a/6/bgp.pl
+++ b/6/bgp.pl
@@ -84,15 +84,6 @@ to_dict(neighbor(_, Remote), Dict) :- host_config(Remote, RC),
}
}.
-routers_entry(router(R), Dict) :-
- D = to_dict(router(R)),
- pairs_keys_values(Data, [R], [D]),
- dict_create(Dict, _, Data).
-
-bird_config(Dict) :-
+bird_config(RouterDicts) :-
routers(Routers),
- maplist(to_dict(), Routers, RouterDicts),
-% maplist(routers_entry(), Routers, RouterDicts),
- Dict = _{routers:RouterDicts}.
-% findall(neighbor(H, R), (host(H), host(R), neighbor(H, R)), Routers),
-% yaml_write(current_output, _{neighbors:BgpConnectionDicts}).
+ maplist(to_dict(), Routers, RouterDicts).