sonic-buildimage/dockers/docker-teamd/teamd.j2
Shuotian Cheng 783be14a5d [minigraph]: Add portchannels/vlans dictionary and update teamd templates (#408)
- minigraph_portchannel_interfaces and minigraph_vlan_interfaces are lists
  of interfaces and the name could duplicate due to multiple IPs
- Add minigraph_portchannels and minigraph_vlans dictionaries to support
  querying port channels and vlans via the name
- Update teamd.j2 template and config.sh file in docker-teamd
- Update zebra.conf.j2 template to add port channel interfaces

Signed-off-by: Shuotian Cheng <shuche@microsoft.com>
2017-03-17 16:48:13 -07:00

21 lines
508 B
Django/Jinja

{
"device": "{{ pc }}",
"runner": {
"name": "lacp",
"active": true,
{# Use 75% links upperbound as min-links #}
"min_ports": {{ minigraph_portchannels[pc]['members'] | length * 0.75 | round(0, 'ceil') | int}},
"tx_hash": ["eth", "ipv4", "ipv6"]
},
"link_watch": {
"name": "ethtool"
},
"ports": {
{% for member in minigraph_portchannels[pc]['members'] %}
"{{member}}": {}{% if not loop.last %},{% endif %}
{% endfor %}
}
}