Skip to content

[fanout-switch-deploy] Support multiple speeds and port breakout #561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 4, 2018
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
34 changes: 34 additions & 0 deletions ansible/roles/fanout/templates/arista_7060_deploy.j2
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,46 @@ vrf definition management
{% set intf = 'Ethernet' + i|string + '/1' %}
interface {{ intf }}
{% if intf in device_port_vlans and device_port_vlans[intf]['mode'] != "Trunk" %}
{% if device_port_vlans[intf]['speed'] == "100000" %}
description {{ device_conn[intf]['peerdevice'] }}-{{ device_conn[intf]['peerport'] }}
switchport access vlan {{ device_port_vlans[intf]['vlanids'] }}
switchport mode dot1q-tunnel
spanning-tree portfast
speed forced 100gfull
error-correction encoding reed-solomon
no shutdown
{% elif device_port_vlans[intf]['speed'] == "40000" %}
description {{ device_conn[intf]['peerdevice'] }}-{{ device_conn[intf]['peerport'] }}
switchport access vlan {{ device_port_vlans[intf]['vlanids'] }}
switchport mode dot1q-tunnel
spanning-tree portfast
speed forced 40gfull
no shutdown
{% elif device_port_vlans[intf]['speed'] == "50000" %}
description {{ device_conn[intf]['peerdevice'] }}-{{ device_conn[intf]['peerport'] }}
switchport access vlan {{ device_port_vlans[intf]['vlanids'] }}
switchport mode dot1q-tunnel
spanning-tree portfast
speed forced 50gfull
no error-correction encoding
no shutdown
{% set intf = 'Ethernet' + i|string + '/3' %}
interface {{ intf }}
{% if intf in device_port_vlans and device_port_vlans[intf]['mode'] != "Trunk" %}
description {{ device_conn[intf]['peerdevice'] }}-{{ device_conn[intf]['peerport'] }}
switchport access vlan {{ device_port_vlans[intf]['vlanids'] }}
switchport mode dot1q-tunnel
spanning-tree portfast
speed forced 50gfull
no error-correction encoding
no shutdown
{% else %}
shutdown
{% endif %}
{% else %}
{# Not valid speed value #}
shutdown
{% endif %}
{% elif intf in device_port_vlans and device_port_vlans[intf]['mode'] == 'Trunk' %}
description {{ device_conn[intf]['peerdevice'] }}-{{ device_conn[intf]['peerport'] }}
switchport mode trunk
Expand Down