netlab
netlab copied to clipboard
Unify /etc/hosts file handling across CL,FRR and Linux VMs and containers
The hosts file handling is done exclusively in the 'linux/hosts.j2' template with the contents being generated in the 'linux/hosts-common.j2' template.
These templates are used in CL, FRR, and Linux initial configuration templates as well as (using symlinks) in the hosts.j2 templates used to generate clab_files that are mapped into the container /etc/hosts files.
The content-generation template has been rewritten from scratch (the previous one generated invalid file format) and can be controlled with the 'netlab_intf_hosts' variable to generate hostnames that include interface names.