summaryrefslogtreecommitdiff
path: root/src/conf_mode/snmp.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-02-10 19:45:52 +0100
committerGitHub <noreply@github.com>2023-02-10 19:45:52 +0100
commit847434e1e34ea66c41a0c77ff22321452fbe5f7b (patch)
tree048ae0c57eb8eb18adf03687358119795415b4b8 /src/conf_mode/snmp.py
parentabb45b2dac6d21899b47f792f887c42e757f0a2f (diff)
parent011e6a2cdea8fca73f7c433de5e2d6bc22bd9c19 (diff)
downloadvyos-1x-847434e1e34ea66c41a0c77ff22321452fbe5f7b.tar.gz
vyos-1x-847434e1e34ea66c41a0c77ff22321452fbe5f7b.zip
Merge pull request #1805 from nicolas-fort/T4857-frr-fix
T4857: snmp: Fix error when not defining client|network under community
Diffstat (limited to 'src/conf_mode/snmp.py')
-rwxr-xr-xsrc/conf_mode/snmp.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/conf_mode/snmp.py b/src/conf_mode/snmp.py
index ab2ccf99e..1a8434783 100755
--- a/src/conf_mode/snmp.py
+++ b/src/conf_mode/snmp.py
@@ -103,6 +103,9 @@ def get_config(config=None):
if 'community' in snmp:
default_values = defaults(base + ['community'])
+ if 'network' in default_values:
+ # convert multiple default networks to list
+ default_values['network'] = default_values['network'].split()
for community in snmp['community']:
snmp['community'][community] = dict_merge(
default_values, snmp['community'][community])