diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-03-21 20:30:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-21 20:30:28 +0100 |
commit | d2bf3bc3bd12f854cfa2ad8bdf5980e2cd6a90b9 (patch) | |
tree | 2cafb5b7553eb2fdb980201e36fc3a055bc3614f /smoketest/scripts/cli/test_protocols_ospf.py | |
parent | 300f1d2962f9f3f59cc13eac7c03c21f1c9a8eb1 (diff) | |
parent | 0a34f23012f5f0621d5d15a1a5c30c04dfc68bf9 (diff) | |
download | vyos-1x-d2bf3bc3bd12f854cfa2ad8bdf5980e2cd6a90b9.tar.gz vyos-1x-d2bf3bc3bd12f854cfa2ad8bdf5980e2cd6a90b9.zip |
Merge pull request #779 from c-po/isis-vrf
ISIS: add VRF support
Diffstat (limited to 'smoketest/scripts/cli/test_protocols_ospf.py')
-rwxr-xr-x | smoketest/scripts/cli/test_protocols_ospf.py | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/smoketest/scripts/cli/test_protocols_ospf.py b/smoketest/scripts/cli/test_protocols_ospf.py index 385f50918..8d94c86cb 100755 --- a/smoketest/scripts/cli/test_protocols_ospf.py +++ b/smoketest/scripts/cli/test_protocols_ospf.py @@ -288,16 +288,16 @@ class TestProtocolsOSPF(VyOSUnitTestSHIM.TestCase): def test_ospf_11_vrfs(self): - vrfs = ['red', 'green', 'blue'] # It is safe to assume that when the basic VRF test works, all # other OSPF related features work, as we entirely inherit the CLI # templates and Jinja2 FRR template. table = '1000' - for vrf in vrfs: - vrf_base = ['vrf', 'name', vrf] - self.cli_set(vrf_base + ['table', table]) - self.cli_set(vrf_base + ['protocols', 'ospf']) - table = str(int(table) + 1000) + vrf = 'blue' + vrf_base = ['vrf', 'name', vrf] + vrf_iface = 'eth1' + self.cli_set(vrf_base + ['table', table]) + self.cli_set(vrf_base + ['protocols', 'ospf', 'interface', vrf_iface]) + self.cli_set(['interfaces', 'ethernet', vrf_iface, 'vrf', vrf]) # Also set a default VRF OSPF config self.cli_set(base_path) @@ -309,14 +309,13 @@ class TestProtocolsOSPF(VyOSUnitTestSHIM.TestCase): self.assertIn(f' auto-cost reference-bandwidth 100', frrconfig) self.assertIn(f' timers throttle spf 200 1000 10000', frrconfig) # defaults - for vrf in vrfs: - frrconfig = self.getFRRconfig(f'router ospf vrf {vrf}') - self.assertIn(f'router ospf vrf {vrf}', frrconfig) - self.assertIn(f' auto-cost reference-bandwidth 100', frrconfig) - self.assertIn(f' timers throttle spf 200 1000 10000', frrconfig) # defaults - - self.cli_delete(['vrf', 'name', vrf]) + frrconfig = self.getFRRconfig(f'router ospf vrf {vrf}') + self.assertIn(f'router ospf vrf {vrf}', frrconfig) + self.assertIn(f' auto-cost reference-bandwidth 100', frrconfig) + self.assertIn(f' timers throttle spf 200 1000 10000', frrconfig) # defaults + self.cli_delete(['vrf', 'name', vrf]) + self.cli_delete(['interfaces', 'ethernet', vrf_iface, 'vrf']) if __name__ == '__main__': unittest.main(verbosity=2) |