[snmp] support multiple community strings (proposal 2) (#1583)

* [snmp] support multiple community strings

* Use community old if communities is absent
This commit is contained in:
Taoyu Li 2018-04-10 20:20:35 -07:00 committed by lguohan
parent ca111db34d
commit 856fc830b5

View File

@ -27,8 +27,13 @@ view systemonly included .1.3.6.1.2.1.1
view systemonly included .1.3.6.1.2.1.25.1
# Default access to basic system info
{% if snmp_rocommunities %}
{% for community in snmp_rocommunities %}
rocommunity {{ community }}
{% endfor %}
{% else %}
rocommunity {{ snmp_rocommunity }}
{$ endif %}
###############################################################################
#