show running-config now prints the whole config: VLANs, DHCP pools, DNS zones and VRRP (#1232) #1233
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!1233
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/running-config-complete"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
show running-confignow prints the whole config, not most of itFixes #1232.
#1231 made the output replayable. It was still incomplete: the VLAN table, every DHCP pool, every DNS
zone and every VRRP group existed in the device state —
show vlan,show vrrpand the rest reportedthem — and appeared nowhere in the "backup". A config that omits the whole VLAN table is perfectly
replayable, which is exactly why the round-trip test could not see it.
How it was found
By asking the complementary question: configure a device through the CLI, then look for every
configured value in the printed text. The values that never appear are the omissions. (The same sweep
correctly ignores physical inventory — cage, speed caps, media — which is device spec, not config.)
What is printed now
and, inside the interface that owns them:
Details that matter for a faithful round trip:
host <addr> <mac>is printed in that order. The state is keyed by hardware address and holdsthe pinned address, which is the reverse; printing the key first produced a reservation for a device
whose MAC was an IP address.
lease <days> <hours> <minutes>, the form thecommand takes.
preempt/advertise 1, switchportallowed vlan all), the same rule the rest of the config follows.Two fields are deliberately not printed because no command can express them: a DNS zone's
defaultTtland a per-record
ttl. That is documented indocs/CLI.mdrather than left as a silent hole.Evidence
test/config-roundtrip.test.jsgrew the other half of the invariant — 45 checks now:vlans,dhcpPools,dnsZonesandvrrpare deep-equal after the round trip;configobject asserts that no configured value is missing fromthe text, with an explicit, reasoned list of the few that are not printed — so a future config
object added to the engine cannot be forgotten by the printer without this failing.
Reverting
engine/cli.jsfails it immediately:The repository's own exemption audit (
test/skip-audit.test.js) flagged my new skip in the sweep; itis now annotated as ordinary control flow with its reason, which is what that audit exists for.
docs/CLI.mdgains a table of exactly what the config contains.Suite: 132 suites, 5,780 assertions, 0 failed.
show running-confignow prints the whole config, not most of it