diff --git a/juniper-macros.j2 b/juniper-macros.j2 index d1085b4..127916e 100644 --- a/juniper-macros.j2 +++ b/juniper-macros.j2 @@ -165,6 +165,23 @@ interfaces { } {%- endmacro %} +{% macro snmpsection(rack, config_context) %} +snmp { + location "Domicilium Datacentre RS02 {{ rack }}"; + contact "{{ config_context['snmp']['contact'] }}"; + community {{ config_context['snmp']['community'] }} { + authorization read-only; +{% for client in config_context['snmp']['clients'] %} +{% if loop.first %} + clients { +{% endif %} + {{ client }}; +{% if loop.last %} + } +{% endif %} + } +} +{- endmacro %} {% macro routingoptionssection(primary_ip4, config_context) %} routing-options { diff --git a/juniper-vxlan.j2 b/juniper-vxlan.j2 index 771b882..3d8d3fa 100644 --- a/juniper-vxlan.j2 +++ b/juniper-vxlan.j2 @@ -28,6 +28,7 @@ policy-options { } } } +{{ junos.snmpsection(rack, config_context) }} {{ junos.routingoptionssection(primary_ip4, config_context) }} protocols { {{ junos.bgpsection(device,tenant['spines']) }}