From 9b99a01653e3315b1abc9ef98824ca71bd283047 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Tue, 30 Jul 2024 08:07:29 +0200 Subject: pbr: T6430: refactor to use vyos.utils.network.get_vrf_tableid() Commit 452068ce78 ("interfaces: T6592: moving an interface between VRF instances failed") added a similar but more detailed implementation of get_vrf_table_id() that was added in commit adeac78ed of this PR. Move to the common available implementation. --- src/conf_mode/policy_route.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/conf_mode/policy_route.py b/src/conf_mode/policy_route.py index da9002b59..223175b8a 100755 --- a/src/conf_mode/policy_route.py +++ b/src/conf_mode/policy_route.py @@ -25,7 +25,7 @@ from vyos.template import render from vyos.utils.dict import dict_search_args from vyos.utils.process import cmd from vyos.utils.process import run -from vyos.utils.network import get_vrf_table_id +from vyos.utils.network import get_vrf_tableid from vyos.defaults import rt_global_table from vyos.defaults import rt_global_vrf from vyos import ConfigError @@ -165,14 +165,14 @@ def apply_table_marks(policy): if set_vrf == 'default': vrf_table_id = rt_global_vrf else: - vrf_table_id = get_vrf_table_id(set_vrf) + vrf_table_id = get_vrf_tableid(set_vrf) elif set_table: if set_table == 'main': vrf_table_id = rt_global_table else: vrf_table_id = set_table if vrf_table_id is not None: - vrf_table_id = int(vrf_table_id) + vrf_table_id = int(vrf_table_id) if vrf_table_id in tables: continue tables.append(vrf_table_id) -- cgit v1.2.3