Modify minigraph parser output format so it fit DB schema
Modify configuration templates to fit new schema
Systemd services dependencies are modified so database starts before any configuration consumer
In Jinja2, '|' cannot be treated directly as piping operator. The
operator precedence of '|' is higher than '*'. The filter only applies
to the value just before it. Group the expression to make sure that the
filter is applied to the outcome of the expression.
Update the unit test to add such case.
* [docker-teamd]: Explicitly set LAG hwaddr
Team device is initially created without any members and has a random HW
address, which is later changed to port's address. This configuration
sets team device's address explicitly to base MAC to avoid reassignment.
Signed-off-by: marian-pritsak <marianp@mellanox.com>
* Update teamd config tests with hwaddr
Signed-off-by: marian-pritsak <marianp@mellanox.com>
* Align HW addr byte for Centec and Mellanox
Signed-off-by: marian-pritsak <marianp@mellanox.com>
* Change HW addr to unicast in config tests
Signed-off-by: marian-pritsak <marianp@mellanox.com>
- 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>
- 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>
Add a sonic-config-engine to help generate config file based on minigraph and other data on runtime. Modify fpm, teamd, lldp, snmp, and platform-monitor docker to use sonic-config-engine to generate config in docker upon load.