summaryrefslogtreecommitdiff
path: root/smoketest
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-02-14 17:25:06 +0100
committerChristian Poessinger <christian@poessinger.com>2021-02-14 17:25:06 +0100
commit580baddebb933ef388c7adabf4f4971c03decf5f (patch)
tree93c1e6d32da56b5567bfeb5315c7658f2f02153f /smoketest
parentb01c23d48a3ff3b95175568198fb307ffbc04b86 (diff)
downloadvyos-1x-580baddebb933ef388c7adabf4f4971c03decf5f.tar.gz
vyos-1x-580baddebb933ef388c7adabf4f4971c03decf5f.zip
bgp: T1513: add per VNI advertise-default-gw, advertise-svi-ip options
Diffstat (limited to 'smoketest')
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_bgp.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/smoketest/scripts/cli/test_protocols_bgp.py b/smoketest/scripts/cli/test_protocols_bgp.py
index 833ca8311..ce643a247 100755
--- a/smoketest/scripts/cli/test_protocols_bgp.py
+++ b/smoketest/scripts/cli/test_protocols_bgp.py
@@ -127,10 +127,13 @@ peer_group_config = {
}
def getFRRBGPconfig():
- return cmd(f'vtysh -c "show run" | sed -n "/router bgp {ASN}/,/^!/p"')
+ return cmd(f'vtysh -c "show run" | sed -n "/^router bgp {ASN}/,/^!/p"')
+
+def getFRRBGPVNIconfig(vni):
+ return cmd(f'vtysh -c "show run" | sed -n "/^ vni {vni}/,/^!/p"')
def getFRRRPKIconfig():
- return cmd(f'vtysh -c "show run" | sed -n "/rpki/,/^!/p"')
+ return cmd(f'vtysh -c "show run" | sed -n "/^rpki/,/^!/p"')
class TestProtocolsBGP(unittest.TestCase):
def setUp(self):
@@ -487,7 +490,8 @@ class TestProtocolsBGP(unittest.TestCase):
self.session.set(base_path + ['address-family', 'l2vpn-evpn', 'advertise-svi-ip'])
self.session.set(base_path + ['address-family', 'l2vpn-evpn', 'flooding', 'disable'])
for vni in vnis:
- self.session.set(base_path + ['address-family', 'l2vpn-evpn', 'vni', vni])
+ self.session.set(base_path + ['address-family', 'l2vpn-evpn', 'vni', vni, 'advertise-default-gw'])
+ self.session.set(base_path + ['address-family', 'l2vpn-evpn', 'vni', vni, 'advertise-svi-ip'])
# commit changes
self.session.commit()
@@ -501,7 +505,10 @@ class TestProtocolsBGP(unittest.TestCase):
self.assertIn(f' advertise-svi-ip', frrconfig)
self.assertIn(f' flooding disable', frrconfig)
for vni in vnis:
- self.assertIn(f' vni {vni}', frrconfig)
+ vniconfig = getFRRBGPVNIconfig(vni)
+ self.assertIn(f'vni {vni}', vniconfig)
+ self.assertIn(f' advertise-default-gw', vniconfig)
+ self.assertIn(f' advertise-svi-ip', vniconfig)
if __name__ == '__main__':
unittest.main(verbosity=2)