diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/vyos/opmode.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/vyos/opmode.py b/python/vyos/opmode.py index 6c3158ee6..70a7de79e 100644 --- a/python/vyos/opmode.py +++ b/python/vyos/opmode.py @@ -329,7 +329,7 @@ def run(module): # although they may print their own warnings or status messages func(**args) -def verify_cli_exists(cli_path: list, error_msg: str=''): +def verify_cli_exists(cli_path: list, error_msg: str='', intf_key: str='intf_name'): """Decorator checks if CLI config exists using a dynamic path and error message""" def decorator(func): from functools import wraps @@ -342,7 +342,7 @@ def verify_cli_exists(cli_path: list, error_msg: str=''): from vyos.configquery import ConfigTreeQuery config = ConfigTreeQuery() - interface = kwargs.get('intf_name') + interface = kwargs.get(intf_key) # Combine the base CLI path with the specific interface name path = cli_path + [interface] if interface else cli_path |
