Generate the lab topology with a plain image name, not a registry address - #22
Merged
Conversation
…ress `examples/lab/topology.yaml` is committed and fetched at a tag by netclab-xp, which reads it as documentation as much as it runs it. It named `localhost:5001/netclab/ceos:4.36.1F` -- an address that is correct only on a machine running this repository's bring-up script, and meaningless everywhere else. A reader following netclab-xp's documentation imports cEOS with `docker import` and `kind load`, which leaves it as `ceos:4.36.1F`, so the fetched topology sent them to a registry they do not have. The generator's default becomes that plain name. `--image` already existed and is unchanged, so anything wanting a registry can still ask for one. kind-up.sh is the one consumer that does. It now derives the registry address itself and rewrites a temp copy rather than the committed file -- the file is an artifact other repositories fetch, and the golden test compares it to what the generator produces. The EOS version still comes from the topology, so the model keeps deciding which image the lab runs. Also fixes a trap that the temp-copy trap would have replaced, leaving a regenerated topology behind on exit.
The topology change is consumed by netclab-xp at a tag, so it needs one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
examples/lab/topology.yamlis committed here and fetched at a tag by netclab-xp, where it is read as documentation as much as it is run. It namedlocalhost:5001/netclab/ceos:4.36.1F— an address that is correct only on a machine running this repository’s bring-up, and meaningless anywhere else.A reader following netclab-xp’s documentation imports cEOS with
docker importandkind load, which leaves the image asceos:4.36.1F. The fetched topology therefore pointed them at a registry they do not have, and netclab-xp’s fabric page had to carry ayqline to undo it.--imagealready existed and is unchangedkind-up.sh, the one consumer that does serve cEOS from a registry, derives the address itself and rewrites a temp copy — the committed file is an artifact other repositories fetch, andtest_topology_goldencompares it to generator outputtest_topology_goldenpasses;bash -non the script and the rewrite checked against the committed file.🤖 Generated with Claude Code