From 2de206ecaa70cdc0994ba0928874dbfd825c1b71 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 23 Jan 2020 21:25:43 +0100 Subject: bgp: T1902: support redistribution of non-main routing table (cherry picked from commit 5a1060a21dbc478c1aaaa4711e66bc882eeae114) --- .../address-family/ipv4-unicast/redistribute/table/node.def | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 templates/protocols/bgp/node.tag/address-family/ipv4-unicast/redistribute/table/node.def diff --git a/templates/protocols/bgp/node.tag/address-family/ipv4-unicast/redistribute/table/node.def b/templates/protocols/bgp/node.tag/address-family/ipv4-unicast/redistribute/table/node.def new file mode 100644 index 00000000..7aae952e --- /dev/null +++ b/templates/protocols/bgp/node.tag/address-family/ipv4-unicast/redistribute/table/node.def @@ -0,0 +1,10 @@ +multi: +type: txt +help: Redistribute non-main Kernel Routing Table +allowed: local -a params + eval "params=($(cli-shell-api listNodes protocols static table))" + echo -n ${params[@]##*/} +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"protocols static table $VAR(@)\" ";"static table $VAR(@) doesn't exist" +create:expression: "vtysh -c \"configure terminal\" -c \"router bgp $VAR(../../../../@)\" -c \"address-family ipv4\" -c \"redistribute table $VAR(@)\" " +delete:expression: "vtysh -c \"configure terminal\" -c \"router bgp $VAR(../../../../@)\" -c \"address-family ipv4\" -c \"no redistribute table $VAR(@)\" " + -- cgit v1.2.3