ixvm-fra01: allow disabling peering
This commit is contained in:
parent
f27ec35837
commit
326f7259b7
1 changed files with 3 additions and 0 deletions
|
@ -81,8 +81,10 @@ let
|
|||
ipv4 table ${ixName}4;
|
||||
ipv6 table ${ixName}6;
|
||||
'' + lib.concatImapStringsSep "\n" ( i: v: generateSnippetForRouter (args // { routerNum = i; router = v; }) ) ix.remote.routers;
|
||||
enabledSnippet = { enabled ? true, ... }: "disabled ${if enabled then "off" else "on"};";
|
||||
generateSnippetForRouter = { ixName, ix, routerNum, router, ... }: ''
|
||||
protocol bgp ${ixName}${toString routerNum}_4 {
|
||||
${enabledSnippet router};
|
||||
local ${ix.local.v4} as ${toString ix.local.asn};
|
||||
neighbor ${router.v4} as ${toString ix.remote.asn};
|
||||
ipv4 {
|
||||
|
@ -92,6 +94,7 @@ let
|
|||
};
|
||||
};
|
||||
protocol bgp ${ixName}${toString routerNum}_6 {
|
||||
${enabledSnippet router};
|
||||
local ${ix.local.v6} as ${toString ix.local.asn};
|
||||
neighbor ${router.v6} as ${toString ix.remote.asn};
|
||||
ipv6 {
|
||||
|
|
Loading…
Reference in a new issue