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