diff options
author | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2023-03-09 14:22:16 +0100 |
---|---|---|
committer | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2023-03-09 18:03:13 +0100 |
commit | 25b64f32a22c5832eb1eefd1afdfad6efa46bbcb (patch) | |
tree | 1ebee09542f627594bb7fd78967ea31fb3dae083 /python/vyos/configdict.py | |
parent | 80f51ba0bb9df97f1fe1df5b6f7ff3345f62dca9 (diff) | |
download | vyos-1x-25b64f32a22c5832eb1eefd1afdfad6efa46bbcb.tar.gz vyos-1x-25b64f32a22c5832eb1eefd1afdfad6efa46bbcb.zip |
qos: T5018: Fix interface tc qdisc cleanup
Diffstat (limited to 'python/vyos/configdict.py')
-rw-r--r-- | python/vyos/configdict.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py index 53decfbf5..434ff99d7 100644 --- a/python/vyos/configdict.py +++ b/python/vyos/configdict.py @@ -427,6 +427,10 @@ def get_interface_dict(config, base, ifname=''): # Add interface instance name into dictionary dict.update({'ifname': ifname}) + # Check if QoS policy applied on this interface - See ifconfig.interface.set_mirror_redirect() + if config.exists(['qos', 'interface', ifname]): + dict.update({'traffic_policy': {}}) + # XXX: T2665: When there is no DHCPv6-PD configuration given, we can safely # remove the default values from the dict. if 'dhcpv6_options' not in dict: @@ -498,6 +502,9 @@ def get_interface_dict(config, base, ifname=''): # Add subinterface name to dictionary dict['vif'][vif].update({'ifname' : f'{ifname}.{vif}'}) + if config.exists(['qos', 'interface', f'{ifname}.{vif}']): + dict['vif'][vif].update({'traffic_policy': {}}) + default_vif_values = defaults(base + ['vif']) # XXX: T2665: When there is no DHCPv6-PD configuration given, we can safely # remove the default values from the dict. @@ -532,6 +539,9 @@ def get_interface_dict(config, base, ifname=''): # Add subinterface name to dictionary dict['vif_s'][vif_s].update({'ifname' : f'{ifname}.{vif_s}'}) + if config.exists(['qos', 'interface', f'{ifname}.{vif_s}']): + dict['vif_s'][vif_s].update({'traffic_policy': {}}) + default_vif_s_values = defaults(base + ['vif-s']) # XXX: T2665: we only wan't the vif-s defaults - do not care about vif-c if 'vif_c' in default_vif_s_values: del default_vif_s_values['vif_c'] @@ -571,6 +581,9 @@ def get_interface_dict(config, base, ifname=''): # Add subinterface name to dictionary dict['vif_s'][vif_s]['vif_c'][vif_c].update({'ifname' : f'{ifname}.{vif_s}.{vif_c}'}) + if config.exists(['qos', 'interface', f'{ifname}.{vif_s}.{vif_c}']): + dict['vif_s'][vif_s]['vif_c'][vif_c].update({'traffic_policy': {}}) + default_vif_c_values = defaults(base + ['vif-s', 'vif-c']) # XXX: T2665: When there is no DHCPv6-PD configuration given, we can safely |