diff options
Diffstat (limited to '6/bgp.pl')
-rw-r--r-- | 6/bgp.pl | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -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). |