2017-01-19 22:56:26 -06:00
|
|
|
{
|
|
|
|
"device": "{{ pc }}",
|
2017-06-06 18:13:38 -05:00
|
|
|
"hwaddr": "{{ hwaddr }}",
|
2017-01-19 22:56:26 -06:00
|
|
|
"runner": {
|
|
|
|
"name": "lacp",
|
|
|
|
"active": true,
|
2017-12-16 13:28:18 -06:00
|
|
|
{% if PORTCHANNEL[pc]['fallback'] and ((PORTCHANNEL[pc]['members'] | length) == 1) %}
|
|
|
|
"fallback": {{ PORTCHANNEL[pc]['fallback'] }},
|
|
|
|
{% else %}
|
2017-01-30 19:33:03 -06:00
|
|
|
{# Use 75% links upperbound as min-links #}
|
2017-09-12 16:13:27 -05:00
|
|
|
"min_ports": {{ (PORTCHANNEL[pc]['members'] | length * 0.75) | round(0, 'ceil') | int }},
|
2017-12-16 13:28:18 -06:00
|
|
|
{% endif %}
|
2017-01-19 22:56:26 -06:00
|
|
|
"tx_hash": ["eth", "ipv4", "ipv6"]
|
|
|
|
},
|
|
|
|
"link_watch": {
|
|
|
|
"name": "ethtool"
|
|
|
|
},
|
|
|
|
"ports": {
|
2017-09-12 16:13:27 -05:00
|
|
|
{% for member in PORTCHANNEL[pc]['members'] %}
|
2017-07-06 18:33:24 -05:00
|
|
|
"{{ member }}": {}{% if not loop.last %},{% endif %}
|
2017-01-19 22:56:26 -06:00
|
|
|
|
2017-03-17 23:38:20 -05:00
|
|
|
{% endfor %}
|
2017-01-19 22:56:26 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|