Merge ixvm-fra01 changes

This commit is contained in:
Luke Granger-Brown 2020-05-08 17:52:55 +01:00
commit 9c45d867e2

View file

@ -80,8 +80,20 @@ let
generateSnippetForIX = { ixName, ix, ... }@args: '' generateSnippetForIX = { ixName, ix, ... }@args: ''
ipv4 table ${ixName}4; ipv4 table ${ixName}4;
ipv6 table ${ixName}6; ipv6 table ${ixName}6;
protocol pipe ${ixName}pipe_4 {
table ${ixName}4;
peer table master4;
import none;
export all;
};
protocol pipe ${ixName}pipe_6 {
table ${ixName}6;
peer table master6;
import none;
export all;
};
'' + lib.concatImapStringsSep "\n" ( i: v: generateSnippetForRouter (args // { routerNum = i; router = v; }) ) ix.remote.routers; '' + lib.concatImapStringsSep "\n" ( i: v: generateSnippetForRouter (args // { routerNum = i; router = v; }) ) ix.remote.routers;
enabledSnippet = { enabled ? true, ... }: "disabled ${if enabled then "off" else "on"};"; enabledSnippet = { enabled ? true, ... }: "disabled ${if enabled then "off" else "on"}";
generateSnippetForRouter = { ixName, ix, routerNum, router, ... }: '' generateSnippetForRouter = { ixName, ix, routerNum, router, ... }: ''
protocol bgp ${ixName}${toString routerNum}_4 { protocol bgp ${ixName}${toString routerNum}_4 {
${enabledSnippet router}; ${enabledSnippet router};
@ -112,6 +124,23 @@ in {
listen bgp dual; listen bgp dual;
${generateSnippet peering {}} ${generateSnippet peering {}}
protocol kernel {
persist;
ipv4 {
import none;
export none;
};
};
protocol kernel {
persist;
ipv6 {
import none;
export none;
};
};
protocol device {
};
''; '';
}; };