Skip to content

Generate the lab topology with a plain image name, not a registry address - #22

Merged
mbakalarski merged 2 commits into
mainfrom
topology-image-without-registry
Aug 5, 2026
Merged

Generate the lab topology with a plain image name, not a registry address#22
mbakalarski merged 2 commits into
mainfrom
topology-image-without-registry

Conversation

@mbakalarski

Copy link
Copy Markdown
Member

examples/lab/topology.yaml is committed here and fetched at a tag by netclab-xp, where it is read as documentation as much as it is run. It named localhost: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 import and kind load, which leaves the image as ceos: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 a yq line to undo it.

  • the generator’s default becomes the plain name; --image already existed and is unchanged
  • kind-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, and test_topology_golden compares it to generator output
  • the EOS version still comes from the topology, so the model keeps deciding which image the lab runs
  • fixes a trap that the new one would have replaced, leaking a regenerated topology on exit

test_topology_golden passes; bash -n on the script and the rewrite checked against the committed file.

🤖 Generated with Claude Code

…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.
@mbakalarski
mbakalarski merged commit 4e57a71 into main Aug 5, 2026
4 checks passed
@mbakalarski
mbakalarski deleted the topology-image-without-registry branch August 5, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant