diff options
| author | Daniil Baturin <daniil@vyos.io> | 2025-05-27 15:17:02 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-27 15:17:02 +0100 |
| commit | a81ab0c6808080f521bfb673c61f90a744c625ff (patch) | |
| tree | ec0fdbbcc37bd135e03c26151ab207753aa355f2 /python | |
| parent | 0b1d137bd5d0c23d4fdfab95eb6fd39518be08de (diff) | |
| parent | 5918dcce154a6a0e44a31b3ff5bf20b625250502 (diff) | |
| download | vyos-1x-a81ab0c6808080f521bfb673c61f90a744c625ff.tar.gz vyos-1x-a81ab0c6808080f521bfb673c61f90a744c625ff.zip | |
Merge pull request #4524 from sarthurdev/T7350
flowtable: T7350: Prevent interface deletion if referenced on flowtable
Diffstat (limited to 'python')
| -rw-r--r-- | python/vyos/configdict.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py index a34b0176a..040eb49ba 100644 --- a/python/vyos/configdict.py +++ b/python/vyos/configdict.py @@ -703,3 +703,18 @@ def get_accel_dict(config, base, chap_secrets, with_pki=False): dict['authentication']['radius']['server'][server]['acct_port'] = '0' return dict + +def get_flowtable_interfaces(config): + """ + Return all interfaces used in flowtables + """ + ft_base = ['firewall', 'flowtable'] + + if not config.exists(ft_base): + return [] + + ifaces = [] + for ft_name in config.list_nodes(ft_base): + ifaces += config.return_values(ft_base + [ft_name, 'interface']) + + return ifaces |
