Change link_peers to connected_endpoints; fix bug in snmpsection
parent
3bd19cd510
commit
ee0620612b
|
|
@ -152,7 +152,7 @@ chassis {
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if interface.ip_addresses.count() > 0 %}
|
{% if interface.ip_addresses.count() > 0 %}
|
||||||
unit 0 {
|
unit 0 {
|
||||||
{% if (interface.link_peers) and (interface.link_peers[0].device.role.name == 'Provider Core') %}
|
{% if (interface.connected_endpoints) and (interface.connected_endpoints[0].device.role.name == 'Provider Core') %}
|
||||||
vlan-id 1;
|
vlan-id 1;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
family inet {
|
family inet {
|
||||||
|
|
@ -183,8 +183,8 @@ chassis {
|
||||||
storm-control default;
|
storm-control default;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{% elif interface.device.role.name in ['Provider Core'] and interface.link_peers %}
|
{% elif interface.device.role.name in ['Provider Core'] and interface.connected_endpoints %}
|
||||||
{% if interface.link_peers[0].device.role.name in ['Provider Edge'] %}
|
{% if interface.connected_endpoints[0].device.role.name in ['Provider Edge'] %}
|
||||||
{% for vlan in interface.tagged_vlans %}
|
{% for vlan in interface.tagged_vlans %}
|
||||||
unit {{ vlan.vid }} {
|
unit {{ vlan.vid }} {
|
||||||
encapsulation vlan-vpls;
|
encapsulation vlan-vpls;
|
||||||
|
|
@ -202,7 +202,7 @@ interfaces {
|
||||||
{% if device.role.name in ['Provider Core'] %}
|
{% if device.role.name in ['Provider Core'] %}
|
||||||
interface-range core-mpls {
|
interface-range core-mpls {
|
||||||
{% for interface in device.interfaces.filter(cable__isnull=False) %}
|
{% for interface in device.interfaces.filter(cable__isnull=False) %}
|
||||||
{% if interface.link_peers and interface.link_peers[0].device.role.name in ['Provider Core'] %}
|
{% if interface.connected_endpoints and interface.connected_endpoints[0].device.role.name in ['Provider Core'] %}
|
||||||
member {{ interface }};
|
member {{ interface }};
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
{{ junos.chassissection(device,breakout_ports) }}
|
{{ junos.chassissection(device,breakout_ports) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ junos.interfacesection(device,ipam.VLAN.objects.filter(tenant=device.tenant)) }}
|
{{ junos.interfacesection(device,ipam.VLAN.objects.filter(tenant=device.tenant)) }}
|
||||||
{{ junos.snmpsection(device.rack, snmp) }}
|
{{ junos.snmpsection(device, snmp) }}
|
||||||
{% if device.role.name == 'Leaf' %}
|
{% if device.role.name == 'Leaf' %}
|
||||||
forwarding-options {
|
forwarding-options {
|
||||||
storm-control-profiles default {
|
storm-control-profiles default {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue