summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_vrf.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-07-22 10:49:33 +0200
committerGitHub <noreply@github.com>2024-07-22 10:49:33 +0200
commita3d76254f4d47665f56261c9089a8a34761e0e18 (patch)
tree1ca3d162d7a6c859c079afb3ffe09248b6a954af /smoketest/scripts/cli/test_vrf.py
parent5be256235052592dab254f55f5f329feb5e955b0 (diff)
parent2b35ea81627277cd680ecd4ba79e944cc785c94b (diff)
downloadvyos-1x-a3d76254f4d47665f56261c9089a8a34761e0e18.tar.gz
vyos-1x-a3d76254f4d47665f56261c9089a8a34761e0e18.zip
Merge pull request #3836 from vyos/mergify/bp/circinus/pr-3834
interfaces: T6592: moving an interface between VRF instances failed (backport #3834)
Diffstat (limited to 'smoketest/scripts/cli/test_vrf.py')
-rwxr-xr-xsmoketest/scripts/cli/test_vrf.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/smoketest/scripts/cli/test_vrf.py b/smoketest/scripts/cli/test_vrf.py
index 243397dc2..176882ca5 100755
--- a/smoketest/scripts/cli/test_vrf.py
+++ b/smoketest/scripts/cli/test_vrf.py
@@ -25,6 +25,7 @@ from vyos.ifconfig import Interface
from vyos.ifconfig import Section
from vyos.utils.file import read_file
from vyos.utils.network import get_interface_config
+from vyos.utils.network import get_vrf_tableid
from vyos.utils.network import is_intf_addr_assigned
from vyos.utils.network import interface_exists
from vyos.utils.system import sysctl_read
@@ -111,8 +112,7 @@ class VRFTest(VyOSUnitTestSHIM.TestCase):
frrconfig = self.getFRRconfig(f'vrf {vrf}')
self.assertIn(f' vni {table}', frrconfig)
- tmp = get_interface_config(vrf)
- self.assertEqual(int(table), tmp['linkinfo']['info_data']['table'])
+ self.assertEqual(int(table), get_vrf_tableid(vrf))
# Increment table ID for the next run
table = str(int(table) + 1)
@@ -266,8 +266,7 @@ class VRFTest(VyOSUnitTestSHIM.TestCase):
for address in addresses:
self.assertTrue(is_intf_addr_assigned(interface, address))
# Verify VRF table ID
- tmp = get_interface_config(vrf)
- self.assertEqual(int(table), tmp['linkinfo']['info_data']['table'])
+ self.assertEqual(int(table), get_vrf_tableid(vrf))
# Verify interface is assigned to VRF
tmp = get_interface_config(interface)