diff options
author | Christian Breunig <christian@breunig.cc> | 2024-07-20 11:26:35 +0200 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2024-07-20 14:21:20 +0000 |
commit | 44e5a11979fd1eb6854603f5bc674bec50cc5dcc (patch) | |
tree | 2601126049b50bd5a33c5959be7f4bf022159b70 /smoketest/scripts/cli/test_protocols_static.py | |
parent | 1b3350788ceeace52e2d693a18d92d82464220c0 (diff) | |
download | vyos-1x-44e5a11979fd1eb6854603f5bc674bec50cc5dcc.tar.gz vyos-1x-44e5a11979fd1eb6854603f5bc674bec50cc5dcc.zip |
utils: migrate to new get_vrf_tableid() helper
Commit 452068ce7 ("interfaces: T6592: moving an interface between VRF instances
failed") introduced a new helper to retrieve the VRF table ID from the Kernel.
This commit migrates the old code path where the individual fields got queried
to the new helper vyos.utils.network.get_vrf_tableid().
(cherry picked from commit 36f3791e0c15267483d59a3bb74465811d08df88)
Diffstat (limited to 'smoketest/scripts/cli/test_protocols_static.py')
-rwxr-xr-x | smoketest/scripts/cli/test_protocols_static.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/smoketest/scripts/cli/test_protocols_static.py b/smoketest/scripts/cli/test_protocols_static.py index c5cf2aab6..f676e2a52 100755 --- a/smoketest/scripts/cli/test_protocols_static.py +++ b/smoketest/scripts/cli/test_protocols_static.py @@ -21,6 +21,7 @@ from base_vyostest_shim import VyOSUnitTestSHIM from vyos.configsession import ConfigSessionError from vyos.template import is_ipv6 from vyos.utils.network import get_interface_config +from vyos.utils.network import get_vrf_tableid base_path = ['protocols', 'static'] vrf_path = ['protocols', 'vrf'] @@ -421,7 +422,7 @@ class TestProtocolsStatic(VyOSUnitTestSHIM.TestCase): tmp = get_interface_config(vrf) # Compare VRF table ID - self.assertEqual(tmp['linkinfo']['info_data']['table'], int(vrf_config['table'])) + self.assertEqual(get_vrf_tableid(vrf), int(vrf_config['table'])) self.assertEqual(tmp['linkinfo']['info_kind'], 'vrf') # Verify FRR bgpd configuration @@ -478,4 +479,4 @@ class TestProtocolsStatic(VyOSUnitTestSHIM.TestCase): self.assertIn(tmp, frrconfig) if __name__ == '__main__': - unittest.main(verbosity=2) + unittest.main(verbosity=2, failfast=True) |