Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing SNMP server community #393

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,21 @@ Redundancy:

```yaml
snmp_server:
communities:
< community_name_1 >:
access: < ro | rw >
access_list_ipv4:
name: < acl_ipv4_name >
access_list_ipv6:
name: < acl_ipv6_name >
view: <view_name >
< community_name_2 >:
access: < ro | rw >
access_list_ipv4:
name: < acl_ipv4_name >
access_list_ipv6:
name: < acl_ipv6_name >
view: <view_name >
contact: < contact_name >
location: < location >
local_interfaces:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ snmp-server view {{ view['name'] }} {{ view['MIB_family_name'] }} {% if view['in

{% endfor %}
{% endif %}
{% if snmp_server.communities is defined and snmp_server.communities is not none %}
{% for community in snmp_server.communities | arista.avd.natural_sort %}
snmp-server community {{ community }} {% if snmp_server.communities[community].view is defined %}view {{ snmp_server.communities[community].view }} {% endif %}{% if snmp_server.communities[community].access is defined %} {{ snmp_server.communities[community].access }} {% else %} ro {% endif %} {% if snmp_server.communities[community].access_list_ipv6.name is defined %} ipv6 {{ snmp_server.communities[community].access_list_ipv6.name }} {% endif %}{% if snmp_server.communities[community].access_list_ipv4.name is defined %}{{ snmp_server.communities[community].access_list_ipv4.name }} {% endif %}
{% endfor %}
{% endif %}
{% if snmp_server.groups is defined and snmp_server.groups is not none %}
{% for group in snmp_server.groups %}
snmp-server group {{ group['name'] }} {{ group['version'] }} {% if group['authentication']is defined and group['version'] == 'v3' %} {{ group['authentication'] }} {% endif %}{% if group['read'] is defined %}read {{ group['read'] }} {% endif %}{% if group['write'] is defined %}write {{ group['write'] }}{% endif %}{% if group['notify'] is defined %}notify {{ group['notify'] }} {% endif %}
Expand Down