From 9d3f88170fabd2211d51a56a642b388529ec385a Mon Sep 17 00:00:00 2001 From: Viacheslav Hletenko Date: Fri, 17 Mar 2023 18:56:47 +0000 Subject: T5086: Fix sflow fix default values for server We drop default values 'port' but don't set it again per server Fix it --- src/conf_mode/system_sflow.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/conf_mode/system_sflow.py b/src/conf_mode/system_sflow.py index 2e19a5d76..a0c3fca7f 100755 --- a/src/conf_mode/system_sflow.py +++ b/src/conf_mode/system_sflow.py @@ -57,6 +57,12 @@ def get_config(config=None): if 'port' in sflow['server']: del sflow['server']['port'] + # Set default values per server + if 'server' in sflow: + for server in sflow['server']: + default_values = defaults(base + ['server']) + sflow['server'][server] = dict_merge(default_values, sflow['server'][server]) + return sflow -- cgit v1.2.3