diff options
author | Christian Breunig <christian@breunig.cc> | 2023-12-24 10:17:20 +0100 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2023-12-24 16:40:10 +0000 |
commit | cddd596a0e03a0ecbbe63bba4f64e9932d02d01f (patch) | |
tree | 306032c313424baf7f1a741d43ffde76298ef5ee /python/vyos/configdict.py | |
parent | 50ec7b3cd28d1dec1592a141f4eaf2e5c7082ba3 (diff) | |
download | vyos-1x-cddd596a0e03a0ecbbe63bba4f64e9932d02d01f.tar.gz vyos-1x-cddd596a0e03a0ecbbe63bba4f64e9932d02d01f.zip |
T5837: cleanup use of calls to vyos.configdict.node_changed()
node_changed() will return a list of changed keys under "path". We are not
always interested what changed, sometimes we are only interested if something
changed at all, that what vyos.configdict.is_node_changed() is for.
(cherry picked from commit 5e7a8288d06a6d6beee5e1abd2e06698ab778650)
Diffstat (limited to 'python/vyos/configdict.py')
-rw-r--r-- | python/vyos/configdict.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py index 075ffe466..ed8137c0a 100644 --- a/python/vyos/configdict.py +++ b/python/vyos/configdict.py @@ -104,6 +104,10 @@ def list_diff(first, second): return [item for item in first if item not in second] def is_node_changed(conf, path): + """ + Check if any key under path has been changed and return True. + If nothing changed, return false + """ from vyos.configdiff import get_config_diff D = get_config_diff(conf, key_mangling=('-', '_')) return D.is_node_changed(path) |