summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-10-29 20:35:44 +0100
committerGitHub <noreply@github.com>2026-10-29 20:35:44 +0100
commitcc972e7de80aea6101e936bffde775c0ee86bbc4 (patch)
treeb864a064f61d4321690055e651af18f9e0cc90a1 /python
parent3929a15037341c23a53d5c6927bda34e79e4993a (diff)
parentab0b2975d4a0e390f4a32a051bb42e760157dd23 (diff)
downloadvyos-1x-cc972e7de80aea6101e936bffde775c0ee86bbc4.tar.gz
vyos-1x-cc972e7de80aea6101e936bffde775c0ee86bbc4.zip
Merge pull request #5608 from c-po/T9538-reset-wireguard-verify
op-mode: T9538: fix interface check in reset wireguard
Diffstat (limited to 'python')
-rw-r--r--python/vyos/opmode.py4
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