Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Create gen-topo.py
  • Loading branch information
sbyrnes committed Mar 4, 2024
1 parent 7d4516f commit 31c976a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions 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)

0 comments on commit 31c976a

Please sign in to comment.