Repository navigation
Add network-xray external tool - #3953
Conversation
network-xray (https://github.com/rclab-dev/network-xray) displays a containerlab topology and routing state collected from FRR and SR Linux routers. Adds the tool definition, the tool description, and an entry in the list of external tools.
ipspace
left a comment
There was a problem hiding this comment.
Ignoring the "true name of clab.yml" issue for the moment, please rename the tool to "network_xray". If you use dashes in the tool name, it cannot be enabled with an environment variable (see https://ipspace.github.io/netlab/extools.html#enabling-tools-in-user-defaults)
| (extool-network-xray)= | ||
| # network-xray | ||
|
|
||
| [network-xray](https://github.com/rclab-dev/network-xray) displays a containerlab topology and routing state collected from FRR and Nokia SR Linux routers. |
There was a problem hiding this comment.
I would reword this as "displays a lab topology" ... "from FRRouting and Nokia SR Linux containers" to emphasize it's containers only.
|
|
||
| ``` | ||
| tools: | ||
| network-xray: |
There was a problem hiding this comment.
The tool needs to be renamed to "network_xray", or we can't enable it with an environment variable (which cannot contain a dash). Applies to numerous references in documentation.
|
|
||
| **Notes:** | ||
|
|
||
| * network-xray requires the *clab* provider: it reads the lab name from the generated `clab.yml` file and expects the default `clab-<lab>-<node>` container names (a custom `prefix` is not supported). |
There was a problem hiding this comment.
I would reword "requires... " as "works only with containerlab-only topologies". Then we also get away from the clab.yml versus clab-augment.yml problem.
A tool name containing a dash cannot be enabled with an environment variable. Rename the tool definition and its documentation page, and update the references in the documentation. Reword the tool description to emphasize that network-xray works with FRRouting and Nokia SR Linux containers only, and that it works only with containerlab-only topologies.
|
Thanks for the review! I've pushed a commit that addresses all three points:
I tested the renamed tool with One related question: the bgplab |
Thank you!
No worries, I'll fix that as I also have to add a bit of documentation to explain how to start external tools. |
As discussed by e-mail, this adds network-xray as an opt-in Docker tool for containerlab labs, with documentation and an entry in the external-tools list.
It displays the lab topology and reads routing state from FRR and SR Linux containers. Other devices can appear in the topology without router-state details. This integration uses
clab.ymland the default container naming convention.Enable it with:
netlab upstarts the tool and prints its URL (netlab connect network-xrayprints it again). The web port is 8600, or 8600 plus the multilab instance ID.netlab downremoves the container.Changes:
netsim/tools/network-xray.yml-- tool definition (ghcr.io/rclab-dev/network-xray:1)docs/extool/network-xray.md-- tool descriptiondocs/extools.md-- added to the list of external toolsThe documentation explains the Docker socket's host-level privileges and the unauthenticated web interface. This definition does not export validation data or integrate
netlab validateresults; I plan to use the JSON output ofnetlab validatefor that once it is available.Because the tool name contains a dash, it cannot be enabled with a
NETLAB_TOOLS_..._ENABLEDenvironment variable; use the lab topology or~/.netlab.yml(tools.network-xray.enabled: True). I am happy to rename it if you prefer a different name.Tested with this branch (clab provider) and
ghcr.io/rclab-dev/network-xray:1(v1.0.5) using FRR and SR Linux labs:netlab upstarts the container and prints the URL, the page shows the lab including the BGP state of the SR Linux node, andnetlab downremoves the container.