Add sflow configuration
parent
6ef28c7c95
commit
072d3812bc
|
|
@ -305,6 +305,20 @@ routing-options {
|
|||
{%- endmacro %}
|
||||
|
||||
|
||||
{% macro sflowsection(device) %}
|
||||
{% if device['config_context']['sflow'] %}
|
||||
sflow {
|
||||
{% for collector in device['config_context']['sflow']['collectors'] %}
|
||||
collector {{ collector }};
|
||||
{% endfor %}
|
||||
{% for interface in device['config_context']['sflow']['interfaces'] %}
|
||||
interface {{ interface }};
|
||||
{% endfor %}
|
||||
}
|
||||
{% endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
|
||||
{% macro vlanssection(vlans,device) %}
|
||||
vlans {
|
||||
{# This next line selects all of the VLANs which are configured on this device #}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ protocols {
|
|||
lldp {
|
||||
interface all;
|
||||
}
|
||||
{{ junos.sflowsection(device) }}
|
||||
}
|
||||
{% if device_role['name'] == 'Leaf' %}
|
||||
switch-options {
|
||||
|
|
|
|||
Loading…
Reference in New Issue