diff options
| author | Daniil Baturin <daniil@vyos.io> | 2026-02-16 12:00:47 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-16 12:00:47 +0000 |
| commit | 2bf396b489f89ee76d8f8ad6633bcea0aac82e26 (patch) | |
| tree | a41fc635250112daf4d387936469544c02b58607 | |
| parent | 2a4f1578b1cdef04d5577c0441250dc8ec067937 (diff) | |
| parent | ab888b9d959a894e280fa83d01a935f16bdd10f1 (diff) | |
| download | vyos-1x-2bf396b489f89ee76d8f8ad6633bcea0aac82e26.tar.gz vyos-1x-2bf396b489f89ee76d8f8ad6633bcea0aac82e26.zip | |
Merge pull request #4988 from c-po/bgp-remote-as-auto
bgp: T7984: add CLI support for "neighbor <N> remote-as auto"
| -rw-r--r-- | interface-definitions/include/bgp/remote-as.xml.i | 8 | ||||
| -rwxr-xr-x | smoketest/scripts/cli/test_protocols_bgp.py | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/interface-definitions/include/bgp/remote-as.xml.i b/interface-definitions/include/bgp/remote-as.xml.i index 79d3b95a9..4c622b831 100644 --- a/interface-definitions/include/bgp/remote-as.xml.i +++ b/interface-definitions/include/bgp/remote-as.xml.i @@ -3,13 +3,17 @@ <properties> <help>Neighbor BGP AS number</help> <completionHelp> - <list>external internal</list> + <list>auto external internal</list> </completionHelp> <valueHelp> <format>u32:1-4294967294</format> <description>Neighbor AS number</description> </valueHelp> <valueHelp> + <format>auto</format> + <description>Automatically detect remote AS</description> + </valueHelp> + <valueHelp> <format>external</format> <description>Any AS different from the local AS</description> </valueHelp> @@ -19,7 +23,7 @@ </valueHelp> <constraint> <validator name="numeric" argument="--range 1-4294967294"/> - <regex>(external|internal)</regex> + <regex>(auto|external|internal)</regex> </constraint> <constraintErrorMessage>Invalid AS number</constraintErrorMessage> </properties> diff --git a/smoketest/scripts/cli/test_protocols_bgp.py b/smoketest/scripts/cli/test_protocols_bgp.py index 06377eee3..edd797cf6 100755 --- a/smoketest/scripts/cli/test_protocols_bgp.py +++ b/smoketest/scripts/cli/test_protocols_bgp.py @@ -40,7 +40,7 @@ bfd_profile = 'foo-bar-baz' import_afi = 'ipv4-unicast' import_vrf = 'red' -import_rd = ASN + ':100' +import_rd = f'{ASN}:100' import_vrf_base = ['vrf', 'name'] neighbor_config = { '192.0.2.1' : { @@ -64,7 +64,7 @@ neighbor_config = { }, '192.0.2.2' : { 'bfd_profile' : bfd_profile, - 'remote_as' : '200', + 'remote_as' : 'auto', 'shutdown' : '', 'no_cap_nego' : '', 'port' : '667', @@ -111,7 +111,7 @@ neighbor_config = { 'local_role_strict': '', }, '2001:db8::2' : { - 'remote_as' : '456', + 'remote_as' : 'auto', 'shutdown' : '', 'no_cap_nego' : '', 'port' : '667', @@ -141,7 +141,7 @@ peer_group_config = { 'p_attr_discard' : ['100', '150', '200'], }, 'bar' : { - 'remote_as' : '111', + 'remote_as' : 'auto', 'graceful_rst_no' : '', 'port' : '667', 'p_attr_taw' : '126', |
