From 890c9e8984c6b4eeef7ee277c88777416e1fb340 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 16 Jun 2019 15:13:21 +0200 Subject: T849: move BGP peer-group node to ipv4 address family To have a consitent IPv4/IPv6 CLI a lot of BGP neighbor nodes have been migrated. The IPv4 peer-group has been forgotten, leaving a non consistent CLI. Previously: ----------- neighbor 2001:DB8:FFFF::1 { address-family { ipv6-unicast { peer-group iBGP } } peer-group iBGP } Now: ---- neighbor 2001:DB8:FFFF::1 { address-family { ipv6-unicast { peer-group iBGP } } address-family { ipv4-unicast { peer-group iBGP } } } --- Makefile.am | 2 +- cfg-version/quagga@3 | 0 cfg-version/quagga@4 | 0 scripts/bgp/vyatta-bgp.pl | 12 ++++++------ .../node.tag/address-family/ipv4-unicast/peer-group/node.def | 6 ++++++ .../bgp/node.tag/neighbor/node.tag/peer-group/node.def | 6 ------ 6 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 cfg-version/quagga@3 create mode 100644 cfg-version/quagga@4 create mode 100644 templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv4-unicast/peer-group/node.def delete mode 100644 templates/protocols/bgp/node.tag/neighbor/node.tag/peer-group/node.def diff --git a/Makefile.am b/Makefile.am index 434de372..cd4b1ba8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,7 +21,7 @@ share_perl5_DATA = lib/Vyatta/Quagga/Config.pm src_check_prefix_boundary = src/check_prefix_boundary.c -curver_DATA = cfg-version/quagga@3 +curver_DATA = cfg-version/quagga@4 cpiop = find . ! -regex '\(.*~\|.*\.bak\|.*\.swp\|.*\#.*\#\)' -print0 | \ cpio -0pd diff --git a/cfg-version/quagga@3 b/cfg-version/quagga@3 deleted file mode 100644 index e69de29b..00000000 diff --git a/cfg-version/quagga@4 b/cfg-version/quagga@4 new file mode 100644 index 00000000..e69de29b diff --git a/scripts/bgp/vyatta-bgp.pl b/scripts/bgp/vyatta-bgp.pl index 2a3ca514..331f41ed 100755 --- a/scripts/bgp/vyatta-bgp.pl +++ b/scripts/bgp/vyatta-bgp.pl @@ -575,11 +575,6 @@ my %qcom = ( set => 'router bgp #3 ; neighbor #5 password #7', del => 'router bgp #3 ; no neighbor #5 password', }, - 'protocols bgp var neighbor var peer-group' => { - set => 'router bgp #3 ; neighbor #5 peer-group #7', - del => 'router bgp #3 ; no neighbor #5 peer-group #7', - noerr => 'del', - }, 'protocols bgp var neighbor var port' => { set => 'router bgp #3 ; neighbor #5 port #7', del => 'router bgp #3 ; no neighbor #5 port', @@ -949,7 +944,7 @@ my %qcom = ( set => 'router bgp #3 ; address-family ipv4 unicast ; neighbor #5 capability orf prefix-list send', del => 'router bgp #3 ; address-family ipv4 unicast ; no neighbor #5 capability orf prefix-list send', }, - ## Note that the activate will need to be moved when we migrate to + ## Note that the activate will need to be moved when we migrate to ## supporting a single IP version in a peering session. 'protocols bgp var peer-group var address-family ipv4-unicast default-originate' => { set => 'router bgp #3 ; address-family ipv4 unicast ; neighbor #5 activate ; neighbor #5 default-originate', @@ -959,6 +954,11 @@ my %qcom = ( set => 'router bgp #3 ; address-family ipv4 unicast ; neighbor #5 activate ; neighbor #5 default-originate route-map #10', del => 'router bgp #3 ; address-family ipv4 unicast ; no neighbor #5 default-originate route-map #10', }, + 'protocols bgp var peer-group var address-family ipv4-unicast peer-group' => { + set => 'router bgp #3 ; address-family ipv4 unicast ; neighbor #5 peer-group #7', + del => 'router bgp #3 ; address-family ipv4 unicast ; no neighbor #5 peer-group #7', + noerr => 'del', + }, 'protocols bgp var peer-group var address-family ipv4-unicast disable-send-community' => { set => undef, del => undef, diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv4-unicast/peer-group/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv4-unicast/peer-group/node.def new file mode 100644 index 00000000..5da142d6 --- /dev/null +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv4-unicast/peer-group/node.def @@ -0,0 +1,6 @@ +type: txt +help: IPv4 peer group for this peer +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-bgp.pl --list-peer-groups --as $VAR(../../@) ) + echo -n ${params[@]##*/} +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"protocols bgp $VAR(../../@) peer-group $VAR(@)\" "; "protocols bgp $VAR(../../@) peer-group $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/peer-group/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/peer-group/node.def deleted file mode 100644 index 5da142d6..00000000 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/peer-group/node.def +++ /dev/null @@ -1,6 +0,0 @@ -type: txt -help: IPv4 peer group for this peer -allowed: local -a params - params=$( /opt/vyatta/sbin/vyatta-bgp.pl --list-peer-groups --as $VAR(../../@) ) - echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"protocols bgp $VAR(../../@) peer-group $VAR(@)\" "; "protocols bgp $VAR(../../@) peer-group $VAR(@) doesn't exist" -- cgit v1.2.3