@@ -127,6 +127,28 @@ def bootstrap(context: Context, branch: str = "main") -> None:
127127 context .run (f"./scripts/bootstrap.sh { branch } " )
128128
129129
130+ @task (optional = ["branch" ], name = "demo-dc-arista" )
131+ def demo_dc_arista (context : Context , branch : str = "add-dc3" ) -> None :
132+ """Create branch and load Arista DC demo topology."""
133+ print (f"Creating branch: { branch } " )
134+ context .run (f"uv run infrahubctl branch create { branch } " )
135+ print (f"Loading DC Arista topology to branch: { branch } " )
136+ context .run (f"uv run infrahubctl object load objects/dc-arista-s.yml --branch { branch } " )
137+ print (f"✓ DC Arista topology loaded to branch '{ branch } '" )
138+
139+
140+ @task (optional = ["branch" , "topology" ])
141+ def containerlab (context : Context , branch : str = "add-dc3" , topology : str = "DC-3" ) -> None :
142+ """Generate configs and deploy containerlab topology."""
143+ print (f"Generating configurations from branch: { branch } " )
144+ context .run (f"uv run scripts/get_configs.py --branch { branch } " )
145+
146+ topology_file = f"generated-configs/clab/{ topology } .clab.yml"
147+ print (f"\n Deploying containerlab topology: { topology_file } " )
148+ context .run (f"sudo -E containerlab deploy -t { topology_file } " )
149+ print (f"✓ Containerlab topology '{ topology } ' deployed successfully" )
150+
151+
130152@task
131153def destroy (context : Context ) -> None :
132154 """Destroy all containers."""
0 commit comments