A rudimentary script to convert an EVE-NG .unl file to a containerlab topology.
It can also be used to 'extract' startup confgs from an EVE-NG .unl file.
-
Place the EVE-NG
.unlfile in the same directory asparse.py. -
In
parse.pyedit:REGISTRYto your container registry (usually this should bevrnetlab).file_pathto the name of your.unlfile (including file extension).
-
Run
parse.py. A new export directory with the lab name should be created. In that directory you will find:
- Converted containerlab topology
- Any startup configurations under the 'config' directory.
Mapping
You may have to edit the MAPPING dictionary. MAPPING is used to convert the EVE-NG template name to the correct containerlab kind.
It is simple to add a mapping and the format is as follows:
MAPPING = {
'EVE-NG Name': 'Containerlab Kind'
}Links
-
Only point-to-point links are supported, currently multipoint or networks connected via 'dumb' switches aren't supported.
-
The topology
yamlfile will not contain the links in the abbreviated format you are used to. Indentation will also be incorrect. These two issues are mainly visual and the topology will work with containerlab as normal.