diff --git a/internal-lab-setup-assets/gen-topo.py b/internal-lab-setup-assets/gen-topo.py new file mode 100644 index 0000000..278fea9 --- /dev/null +++ b/internal-lab-setup-assets/gen-topo.py @@ -0,0 +1,16 @@ +#!/usr/bin/python +import jinja2 + +# Recreated from scratch in 02/2024 + +TEMPLATE_FILE = "workshop.clab.yml.j2" +NUM_LABS = 30 + +templateLoader = jinja2.FileSystemLoader(searchpath="./") +templateEnv = jinja2.Environment(loader=templateLoader) +template = templateEnv.get_template(TEMPLATE_FILE) + +for i in range(1, NUM_LABS + 1): + with open(f"workshop{i}.clab.yml", "w") as f: + outputText = template.render(id=i) + f.write(outputText)