sonic-buildimage/dockers/docker-teamd/teamd.j2
Shuotian Cheng 7b7a61693a [sonic-cfggen]: Add -p option and add teamd.j2 test (#414)
- Add -p --port-config option to feed sonic-cfggen with port_config.ini
  file when necessary.
- Update minigraph.py file to accept the -p option
- Add test_j2files.py test to test config.sh and all .j2 templates
  * Currently test_teamd is added to test both the config.sh and teamd.j2
    file works well with the t0 sample minigraph and sample port config
    file
  * The sample output is added to the folder sample_output for comparison

Signed-off-by: Shuotian Cheng <shuche@microsoft.com>
2017-03-17 21:38:20 -07:00

21 lines
500 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 %}
}
}