7b7a61693a
- 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>
21 lines
500 B
Django/Jinja
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 %}
|
|
}
|
|
}
|
|
|