summaryrefslogtreecommitdiff
path: root/smoketest/scripts
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-08-18 12:47:01 +0200
committerChristian Poessinger <christian@poessinger.com>2021-08-18 12:58:15 +0200
commit1cc2ac26106f8efad6defaba9ba4d1296d75cf1f (patch)
tree093f0df871f965e98d4097ea974b74eee7f8f76e /smoketest/scripts
parent231095f95df129ef9e051ec218a1c3fe9e99cd98 (diff)
downloadvyos-1x-1cc2ac26106f8efad6defaba9ba4d1296d75cf1f.tar.gz
vyos-1x-1cc2ac26106f8efad6defaba9ba4d1296d75cf1f.zip
bgp: T3759: add l3vpn "rd" route-distinguisher commands
Add the following new commands: * set protocols bgp address-family ipv4-unicast rd vpn export * set protocols bgp address-family ipv6-unicast rd vpn export
Diffstat (limited to 'smoketest/scripts')
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_bgp.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/smoketest/scripts/cli/test_protocols_bgp.py b/smoketest/scripts/cli/test_protocols_bgp.py
index d3d061229..4149b0bdd 100755
--- a/smoketest/scripts/cli/test_protocols_bgp.py
+++ b/smoketest/scripts/cli/test_protocols_bgp.py
@@ -731,6 +731,7 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase):
neighbor = '192.0.2.55'
vrf_name = 'red'
label = 'auto'
+ rd = f'{neighbor}:{ASN}'
self.cli_set(base_path + ['local-as', ASN])
# testing only one AFI is sufficient as it's generic code
@@ -739,16 +740,23 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase):
self.cli_set(base_path + ['address-family', afi, 'import', 'vpn'])
self.cli_set(base_path + ['address-family', afi, 'label', 'vpn', 'export', label])
+ self.cli_set(base_path + ['address-family', 'ipv4-unicast', 'rd', 'vpn', 'export', rd])
+
# commit changes
self.cli_commit()
# Verify FRR bgpd configuration
frrconfig = self.getFRRconfig(f'router bgp {ASN}')
self.assertIn(f'router bgp {ASN}', frrconfig)
- self.assertIn(f' address-family ipv6 unicast', frrconfig)
- self.assertIn(f' export vpn', frrconfig)
- self.assertIn(f' import vpn', frrconfig)
- self.assertIn(f' exit-address-family', frrconfig)
+ for afi in ['ipv4', 'ipv6']:
+ self.assertIn(f' address-family {afi} unicast', frrconfig)
+ self.assertIn(f' export vpn', frrconfig)
+ self.assertIn(f' import vpn', frrconfig)
+ self.assertIn(f' label vpn export {label}', frrconfig)
+ self.assertIn(f' exit-address-family', frrconfig)
+
+ self.assertIn(f' address-family ipv4 unicast', frrconfig)
+ self.assertIn(f' rd vpn export {rd}', frrconfig)
if __name__ == '__main__':
unittest.main(verbosity=2) \ No newline at end of file