In progress update for non-VXLAN roles
parent
8b8733e8f9
commit
91bf65108f
|
|
@ -85,6 +85,11 @@ chassis {
|
||||||
{% if interface.mtu and not interface.lag %}
|
{% if interface.mtu and not interface.lag %}
|
||||||
mtu {{ interface.mtu }};
|
mtu {{ interface.mtu }};
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if interface.tags.filter(name__in=['vpls-core','vpls-edge']).count() %}
|
||||||
|
flexible-vlan-tagging;
|
||||||
|
native-vlan-id 1;
|
||||||
|
encapsulation flexible-ethernet-services;
|
||||||
|
{% endif %}
|
||||||
{% if interface.lag %}
|
{% if interface.lag %}
|
||||||
ether-options {
|
ether-options {
|
||||||
802.3ad {{ interface.lag.name }};
|
802.3ad {{ interface.lag.name }};
|
||||||
|
|
@ -112,11 +117,15 @@ chassis {
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if interface.ip_addresses.count() > 0 %}
|
{% if interface.ip_addresses.count() > 0 %}
|
||||||
unit 0 {
|
unit 0 {
|
||||||
|
{% if interface.tags.filter(name__in=['vpls-core']).count() %}
|
||||||
|
vlan-id 1;
|
||||||
|
{% endif %}
|
||||||
family inet {
|
family inet {
|
||||||
{% if interface.ip_addresses.first().status == 'reserved' %}inactive: {% endif %}address {{ interface.ip_addresses.first().address }};
|
{% if interface.ip_addresses.first().status == 'reserved' %}inactive: {% endif %}address {{ interface.ip_addresses.first().address }};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if device.role.name in ['Leaf','Spine'] %}
|
||||||
{% if interface.mode != '' %}
|
{% if interface.mode != '' %}
|
||||||
unit 0 {
|
unit 0 {
|
||||||
family ethernet-switching {
|
family ethernet-switching {
|
||||||
|
|
@ -139,6 +148,15 @@ chassis {
|
||||||
storm-control default;
|
storm-control default;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
{% elif device.role.name in ['Provider Core'] %}
|
||||||
|
{% if interface.tags.filter(name__in=['vpls-edge']).count() %}
|
||||||
|
{% for vlan in interface.tagged_vlans %}
|
||||||
|
unit {{ vlan.vid }} {
|
||||||
|
encapsulation vlan-vpls;
|
||||||
|
vlan-id {{ vlan.vid }};
|
||||||
|
}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
}
|
}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue