summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-12-30 09:48:13 +0100
committerChristian Poessinger <christian@poessinger.com>2022-12-30 09:49:03 +0100
commit3abec988c44e8e211b91caf504bb6a756668791a (patch)
tree7a00c24592b93b1f7199f53c944d78bcc174250c
parentc42736469a06851a49d4ea5c12c57ecac238b7a4 (diff)
downloadvyos-1x-3abec988c44e8e211b91caf504bb6a756668791a.tar.gz
vyos-1x-3abec988c44e8e211b91caf504bb6a756668791a.zip
pseudo-ethernet: T4391: use is_node_changed() over error prone leaf_node_changed()
We only need to use leaf_node_changed() if we are interested in the detailed change to a CLI node (what was the previous content). If we are only interested in if a node changed "at all" is_node_changed() should be used.
-rwxr-xr-xsrc/conf_mode/interfaces-pseudo-ethernet.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conf_mode/interfaces-pseudo-ethernet.py b/src/conf_mode/interfaces-pseudo-ethernet.py
index 4c65bc0b6..dce5c2358 100755
--- a/src/conf_mode/interfaces-pseudo-ethernet.py
+++ b/src/conf_mode/interfaces-pseudo-ethernet.py
@@ -21,7 +21,7 @@ from vyos.config import Config
from vyos.configdict import get_interface_dict
from vyos.configdict import is_node_changed
from vyos.configdict import is_source_interface
-from vyos.configdict import leaf_node_changed
+from vyos.configdict import is_node_changed
from vyos.configverify import verify_vrf
from vyos.configverify import verify_address
from vyos.configverify import verify_bridge_delete
@@ -51,7 +51,7 @@ def get_config(config=None):
mode = is_node_changed(conf, ['mode'])
if mode: peth.update({'shutdown_required' : {}})
- if leaf_node_changed(conf, base + [ifname, 'mode']):
+ if is_node_changed(conf, base + [ifname, 'mode']):
peth.update({'rebuild_required': {}})
if 'source_interface' in peth: