Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions ansible/templates/topo/t1-64-lag.j2
Original file line number Diff line number Diff line change
Expand Up @@ -324,35 +324,35 @@
<ElementType>DeviceInterfaceLink</ElementType>
<EndDevice>{{ inventory_hostname }}</EndDevice>
<EndPort>{{ port_alias[32+index*8+2] }}</EndPort>
<StartDevice>ARISTA{{ '%02d' % (index+1) }}T0</StartDevice>
<StartDevice>ARISTA{{ '%02d' % (index*5+1) }}T0</StartDevice>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why 5 magic number?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in total there are 20 T0 devices connected. we have four groups of links and each of the group has five up links.

<StartPort>Ethernet1</StartPort>
</DeviceLinkBase>
<DeviceLinkBase>
<ElementType>DeviceInterfaceLink</ElementType>
<EndDevice>{{ inventory_hostname }}</EndDevice>
<EndPort>{{ port_alias[32+index*8+2] }}</EndPort>
<StartDevice>ARISTA{{ '%02d' % (index+1) }}T0</StartDevice>
<EndPort>{{ port_alias[32+index*8+4] }}</EndPort>
<StartDevice>ARISTA{{ '%02d' % (index*5+2) }}T0</StartDevice>
<StartPort>Ethernet1</StartPort>
</DeviceLinkBase>
<DeviceLinkBase>
<ElementType>DeviceInterfaceLink</ElementType>
<EndDevice>{{ inventory_hostname }}</EndDevice>
<EndPort>{{ port_alias[32+index*8+5] }}</EndPort>
<StartDevice>ARISTA{{ '%02d' % (index+1) }}T0</StartDevice>
<StartDevice>ARISTA{{ '%02d' % (index*5+3) }}T0</StartDevice>
<StartPort>Ethernet1</StartPort>
</DeviceLinkBase>
<DeviceLinkBase>
<ElementType>DeviceInterfaceLink</ElementType>
<EndDevice>{{ inventory_hostname }}</EndDevice>
<EndPort>{{ port_alias[32+index*8+6] }}</EndPort>
<StartDevice>ARISTA{{ '%02d' % (index+1) }}T0</StartDevice>
<StartDevice>ARISTA{{ '%02d' % (index*5+4) }}T0</StartDevice>
<StartPort>Ethernet1</StartPort>
</DeviceLinkBase>
<DeviceLinkBase>
<ElementType>DeviceInterfaceLink</ElementType>
<EndDevice>{{ inventory_hostname }}</EndDevice>
<EndPort>{{ port_alias[32+index*8+7] }}</EndPort>
<StartDevice>ARISTA{{ '%02d' % (index+1) }}T0</StartDevice>
<StartDevice>ARISTA{{ '%02d' % (index*5+5) }}T0</StartDevice>
<StartPort>Ethernet1</StartPort>
</DeviceLinkBase>
{% endfor %}
Expand Down