Skip to content
Snippets Groups Projects
Commit 7a11f3c7 authored by Aleksandr Kurbatov's avatar Aleksandr Kurbatov
Browse files

Merge branch 'snmp-view' into 'develop'

SNMP reorganize

See merge request !57
parents 12d60a6f f38c2a51
No related branches found
No related tags found
1 merge request!57SNMP reorganize
Pipeline #85118 passed
<system xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes">
<security>
<snmp>
{% for community in nokia_snmp_communities %}
<community xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes" alu:operation="replace">
{% if community.hash2 is defined %}
<community-string>{{ community.hash2 }}</community-string>
{% else %}
<community-string>{{ community.name }}</community-string>
{% endif %}
<access-permissions>r</access-permissions>
<version>{{ community.version | default('v2c') }}</version>
<source-access-list>{{ community.acl_name }}</source-access-list>
</community>
<source-access-list xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes" alu:operation="replace">
<list-name>{{ community.acl_name }}</list-name>
{% for entry in community.acl_entries %}
<source-host>
<host-name>{{ entry.hostname }}</host-name>
<address>{{ entry.address }}</address>
</source-host>
{% endfor %}
{% endfor %}
</source-access-list>
</snmp>
</security>
</system>
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
{% include "system/security/user_params.j2" %} {% include "system/security/user_params.j2" %}
{% include "system/security/dist_cpu_protection.j2" %} {% include "system/security/dist_cpu_protection.j2" %}
{% include "system/security/source_addresses.j2" %} {% include "system/security/source_addresses.j2" %}
{% include "system/security/snmp.j2" %}
{# {% include "system/security/ssh.j2" %} #} {# {% include "system/security/ssh.j2" %} #}
</security> </security>
</system> </system>
<snmp>
{% for community in nokia_snmp_communities %}
<community xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes" alu:operation="replace">
{% if community.hash2 is defined %}
<community-string>{{ community.hash2 }}</community-string>
{% else %}
<community-string>{{ community.name }}</community-string>
{% endif %}
<access-permissions>r</access-permissions>
<version>{{ community.version | default('v2c') }}</version>
<source-access-list>{{ community.acl_name }}</source-access-list>
</community>
<source-access-list xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes" alu:operation="replace">
<list-name>{{ community.acl_name }}</list-name>
{% for entry in community.acl_entries %}
<source-host>
<host-name>{{ entry.hostname }}</host-name>
<address>{{ entry.address }}</address>
</source-host>
{% endfor %}
{% endfor %}
</source-access-list>
{% if nokia_snmp_views is defined %}
{% for view in nokia_snmp_views %}
<view alu:operation="replace">
<view-name>{{ view.name }}</view-name>
<subtree>{{ view.subtree }}</subtree>
<type>{{ view.type }}</type>
</view>
{% endfor %}
{% endif %}
</snmp>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment