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