srl-labs / containerlab

container-based networking labs
https://containerlab.dev
BSD 3-Clause "New" or "Revised" License
1.53k stars 262 forks source link

clab graph shoudn't be run without --topo flag #412

Closed blinklet closed 3 years ago

blinklet commented 3 years ago

The "graph" command does not display anything.

To recreate, run a lab example on your local machine. I am running Containerlab on a laptop running Ubuntu 20.04 desktop. I used lab-examples/srl02. After the lab is running, run the sudo clab graph command. Then, open a browser window at the URL http://localhost:50080/. I see the display shown in the attached image. It just shows the page title with no lab information.

graph-problem

However, if I run the graph command on the topology file, it displays the lab information. The command sudo clab graph --offline --topo srl02.clab.yml results in the display below: graph-prob-2

This is a small problem but I though you'd like to know.

hellt commented 3 years ago

thanks, it seems reasonable to not allow clab graph to be run without provided topo file

I promoted this to an enhancement