From 3dd78cddfe90851cb7a6891add8a0973d23da292 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 4 Feb 2021 00:00:41 +0100 Subject: vrf: T2450: provide full protocol support in XML and Python with new CLI --- .../include/static-route-blackhole.xml.i | 10 + .../include/static-route-disable.xml.i | 8 - .../include/static-route-next-hop-interface.xml.i | 17 + .../include/static-route-next-hop-vrf.xml.i | 12 +- interface-definitions/include/static-route.xml.i | 63 ++++ interface-definitions/include/static-route6.xml.i | 63 ++++ interface-definitions/protocols-static.xml.in | 24 +- interface-definitions/protocols-vrf.xml.in | 347 +-------------------- interface-definitions/vrf.xml.in | 2 +- 9 files changed, 184 insertions(+), 362 deletions(-) create mode 100644 interface-definitions/include/static-route-blackhole.xml.i delete mode 100644 interface-definitions/include/static-route-disable.xml.i create mode 100644 interface-definitions/include/static-route-next-hop-interface.xml.i create mode 100644 interface-definitions/include/static-route.xml.i create mode 100644 interface-definitions/include/static-route6.xml.i (limited to 'interface-definitions') diff --git a/interface-definitions/include/static-route-blackhole.xml.i b/interface-definitions/include/static-route-blackhole.xml.i new file mode 100644 index 000000000..c880ee778 --- /dev/null +++ b/interface-definitions/include/static-route-blackhole.xml.i @@ -0,0 +1,10 @@ + + + + Silently discard packets when matched + + + #include + + + diff --git a/interface-definitions/include/static-route-disable.xml.i b/interface-definitions/include/static-route-disable.xml.i deleted file mode 100644 index 100ca3cbf..000000000 --- a/interface-definitions/include/static-route-disable.xml.i +++ /dev/null @@ -1,8 +0,0 @@ - - - - Disable interface static route - - - - diff --git a/interface-definitions/include/static-route-next-hop-interface.xml.i b/interface-definitions/include/static-route-next-hop-interface.xml.i new file mode 100644 index 000000000..01c253597 --- /dev/null +++ b/interface-definitions/include/static-route-next-hop-interface.xml.i @@ -0,0 +1,17 @@ + + + + Gateway interface name + + + + + txt + Gateway interface name + + + ^(br|bond|dum|en|eth|gnv|peth|tun|vti|vxlan|wg|wlan)[0-9]+|lo$ + + + + diff --git a/interface-definitions/include/static-route-next-hop-vrf.xml.i b/interface-definitions/include/static-route-next-hop-vrf.xml.i index c90140856..ae2515a12 100644 --- a/interface-definitions/include/static-route-next-hop-vrf.xml.i +++ b/interface-definitions/include/static-route-next-hop-vrf.xml.i @@ -1,16 +1,18 @@ - + VRF to leak route + + default + vrf name + txt Name of VRF to leak to - - protocols vrf - - ^[a-zA-Z0-9\-_]{1,100}$ + ^(default)$ + diff --git a/interface-definitions/include/static-route.xml.i b/interface-definitions/include/static-route.xml.i new file mode 100644 index 000000000..9ab3926da --- /dev/null +++ b/interface-definitions/include/static-route.xml.i @@ -0,0 +1,63 @@ + + + + VRF static IPv4 route + + ipv4net + VRF static IPv4 route + + + + + + + + + Silently discard pkts when matched + + + #include + + + + + Next-hop IPv4 router interface + + + + + txt + Gateway interface name + + + ^(br|bond|dum|en|eth|gnv|peth|tun|vti|vxlan|wg|wlan)[0-9]+|lo$ + + + + #include + #include + #include + + + + + Next-hop IPv4 router address + + ipv4 + Next-hop router address + + + + + + + #include + #include + #include + #include + + + + + + diff --git a/interface-definitions/include/static-route6.xml.i b/interface-definitions/include/static-route6.xml.i new file mode 100644 index 000000000..d484b285c --- /dev/null +++ b/interface-definitions/include/static-route6.xml.i @@ -0,0 +1,63 @@ + + + + VRF static IPv6 route + + ipv6net + VRF static IPv6 route + + + + + + + + + Silently discard pkts when matched + + + #include + + + + + IPv6 gateway interface name + + + + + txt + Gateway interface name + + + ^(br|bond|dum|en|eth|gnv|peth|tun|vti|vxlan|wg|wlan)[0-9]+|lo$ + + + + #include + #include + #include + + + + + IPv6 gateway address + + ipv6 + Next-hop IPv6 router + + + + + + + #include + #include + #include + #include + + + + + + diff --git a/interface-definitions/protocols-static.xml.in b/interface-definitions/protocols-static.xml.in index 2a9f7014f..3ad6434db 100644 --- a/interface-definitions/protocols-static.xml.in +++ b/interface-definitions/protocols-static.xml.in @@ -28,11 +28,11 @@ - #include + #include #include #include - + @@ -55,10 +55,10 @@ - #include + #include #include - + #include @@ -118,7 +118,7 @@ - #include + #include #include @@ -169,7 +169,7 @@ - #include + #include #include @@ -220,10 +220,10 @@ - #include + #include #include - + @@ -246,10 +246,10 @@ - #include + #include #include - + @@ -296,7 +296,7 @@ - #include + #include #include @@ -347,7 +347,7 @@ - #include + #include #include diff --git a/interface-definitions/protocols-vrf.xml.in b/interface-definitions/protocols-vrf.xml.in index d58f85b02..81942d124 100644 --- a/interface-definitions/protocols-vrf.xml.in +++ b/interface-definitions/protocols-vrf.xml.in @@ -1,18 +1,21 @@ - - + Name of VRF to add route for + + vrf name + txt - Name of VRF to add route for + VRF instance name - - protocols vrf - + + + + VRF instance name must be 15 characters or less and can not\nbe named as regular network interfaces.\n @@ -20,336 +23,8 @@ Static route parameters - - - Interface based static route - - ipv4net - Interface based static route - - - - - - - - - Next-hop interface [REQUIRED] - - - - - - - - Disable IPv4 interface static route - - - - - - Distance for this route - - u32:1-255 - Distance for this route - - - - - - - - - VRF to leak route - - txt - Name of VRF to leak to - - - default - Name of VRF to leak to - - - default - protocols vrf - - - ^[a-zA-Z0-9\-_]{1,100}$ - - - - - - - - - - Interface based IPv6 static route - - ipv6net - Interface based IPv6 static route - - - - - - - - - Next-hop interface [REQUIRED] - - - - - - - - Disable IPv6 interface static route - - - - - - Distance for this route - - u32:1-255 - Distance for this route - - - - - - - - - VRF to leak route - - txt - Name of VRF to leak to - - - default - Name of VRF to leak to - - - default - protocols vrf - - - ^[a-zA-Z0-9\-_]{1,100}$ - - - - - - - - - - VRF static IPv4 route - - ipv4net - VRF static IPv4 route - - - - - - - - - Silently discard pkts when matched - - - - - Distance value for this route - - u32:1-255 - Distance for this route - - - - - - - - - - - DHCP interface that supplies the next-hop IP address for this static route - - - - - txt - DHCP interface - - - - - - Next-hop router - - ipv4 - Next-hop router - - - - - - - - - Disable IPv4 interface static route - - - - - - Distance for this route - - u32:1-255 - Distance for this route - - - - - - - - - IPv4 gateway interface name - - - - - txt - IPv4 gateway interface name - - - - - - VRF to leak route - - txt - Name of VRF to leak to - - - default - Name of VRF to leak to - - - default - protocols vrf - - - ^[a-zA-Z0-9\-_]{1,100}$ - - - - - - - - - - VRF static IPv6 route - - ipv6net - VRF static IPv6 route - - - - - - - - - Silently discard pkts when matched - - - - - Distance value for this route - - u32:1-255 - Distance for this route - - - - - - - - - - - Next-hop IPv6 router [REQUIRED] - - ipv6 - Next-hop IPv6 router [REQUIRED] - - - - - - - - - Disable IPv6 interface static route - - - - - - Distance for this route - - u32:1-255 - Distance for this route - - - - - - - - - IPv6 gateway interface name - - - - - txt - IPv6 gateway interface name - - - - - - VRF to leak route - - txt - Name of VRF to leak to - - - default - Name of VRF to leak to - - - default - protocols vrf - - - ^[a-zA-Z0-9\-_]{1,100}$ - - - - - - - + #include + #include diff --git a/interface-definitions/vrf.xml.in b/interface-definitions/vrf.xml.in index 81c89d94b..eca9e75a7 100644 --- a/interface-definitions/vrf.xml.in +++ b/interface-definitions/vrf.xml.in @@ -21,7 +21,7 @@ VRF instance name must be 15 characters or less and can not\nbe named as regular network interfaces.\n - name + txt Instance name -- cgit v1.2.3