diff options
| author | Daniil Baturin <daniil@vyos.io> | 2026-06-23 14:46:04 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-23 14:46:04 +0100 |
| commit | 94f4ac3e938ac8aa11f2e4375ae3e9bd01963e8b (patch) | |
| tree | 96f502278fe2725ae4ab77acf8132c47f628e3ff /src | |
| parent | 3edf114bed538733388252da0d23b49002273558 (diff) | |
| parent | 5b654e5b2847cb87e7ac0366fbd4954673be1943 (diff) | |
| download | vyos-1x-94f4ac3e938ac8aa11f2e4375ae3e9bd01963e8b.tar.gz vyos-1x-94f4ac3e938ac8aa11f2e4375ae3e9bd01963e8b.zip | |
Merge pull request #5252 from natali-rs1985/T8913
vpp: T8913: Skip bond teardown for non-structural config changes
Diffstat (limited to 'src')
| -rw-r--r-- | src/conf_mode/vpp_interfaces_bonding.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/conf_mode/vpp_interfaces_bonding.py b/src/conf_mode/vpp_interfaces_bonding.py index c7fd43bb4..932287a03 100644 --- a/src/conf_mode/vpp_interfaces_bonding.py +++ b/src/conf_mode/vpp_interfaces_bonding.py @@ -18,6 +18,7 @@ from vyos.config import Config from vyos.configdict import get_interface_dict +from vyos.configdict import is_node_changed from vyos.configdep import set_dependents, call_dependents from vyos.configverify import verify_mtu_ipv6 from vyos import ConfigError @@ -108,6 +109,12 @@ def get_config(config=None) -> dict: no_tag_node_value_mangle=True, ) + iface_path = ['interfaces', 'vpp', 'bonding', ifname] + rebuild_required_nodes = ['mode', 'hash-policy', 'mac'] + for node in rebuild_required_nodes: + if is_node_changed(conf, iface_path + [node]): + config.update({'rebuild_required': {}}) + config['bond_members'] = deps_bond_dict(conf) # Dependency @@ -225,10 +232,12 @@ def apply(config): ifname = config.get('ifname') bond = VPPBondInterface(ifname, config) - bond.remove() + + if 'deleted' in config or 'rebuild_required' in config: + bond.remove() if 'deleted' in config: - return + return None bond.update(config) |
