summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-08-17 19:09:47 +0200
committerChristian Poessinger <christian@poessinger.com>2021-08-17 19:14:17 +0200
commit1faa8728239cc5309cdaa82453b886710ad83699 (patch)
tree9d082305607044068a3ebe39696ad207329a706c /smoketest/scripts/cli
parent387732762169a11e9502d89b08c728f0c40c4953 (diff)
downloadvyos-1x-1faa8728239cc5309cdaa82453b886710ad83699.tar.gz
vyos-1x-1faa8728239cc5309cdaa82453b886710ad83699.zip
bgp: T3759: add l3vpn import/export vpn command for IPv4/IPv6 AFI
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_bgp.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_protocols_bgp.py b/smoketest/scripts/cli/test_protocols_bgp.py
index c3a2ffbf9..22e892e26 100755
--- a/smoketest/scripts/cli/test_protocols_bgp.py
+++ b/smoketest/scripts/cli/test_protocols_bgp.py
@@ -710,5 +710,25 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase):
self.assertIn(f'router bgp {ASN}', frrconfig)
self.assertIn(f' neighbor {neighbor} solo', frrconfig)
+ def test_bgp_14_vpn(self):
+ remote_asn = str(int(ASN) + 150)
+ neighbor = '192.0.2.55'
+
+ self.cli_set(base_path + ['local-as', ASN])
+ # testing only one AFI is sufficient as it's generic code
+ self.cli_set(base_path + ['address-family', 'ipv6-unicast', 'export', 'vpn'])
+ self.cli_set(base_path + ['address-family', 'ipv6-unicast', 'import', 'vpn'])
+
+ # 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)
+
if __name__ == '__main__':
unittest.main(verbosity=2) \ No newline at end of file