converge: the Device column is fixed at 23 characters, and the default name of 1475 catalogue devices is longer #1732
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1732
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
The measurement
_converge()prints its table from three fixed widths:pad()right-pads and never truncates, so a name of 24 characters or more does not widen its column - it runs straight into the instant beside it. A lab of two ISR 4331s, nothing renamed:router-r1followed immediately by16000 msreads as the instantr116000 mson a device calledrouter-r1; the Ready column cannot be found by eye and the row cannot be read field by field.Why this is the default case, not the long-name case
A device with no explicit name gets
label + '-' + last four characters of the id(engine/device.js:168). Counting that suffix, 1475 of the 2329 specs indevices/have a default name longer than 22 characters, and 79 more land exactly on 23. So this is what the console prints for an untouched lab on the majority of the catalogue, not only for someone who renamed a box to something long.The heading was wrong too
The header text was typed by hand rather than built from the row widths, and it said
Ready Basis- three spaces - while the rows put their basis text ten characters after the instant. In the sample indocs/CONVERGENCE.mdthe heading'sBasissat at column 41 and the data at column 43. A heading is a row like any other.Proposed
Same rule
show lldp neighborsalready follows (#1265): take the widths from the data, keep the existing minimums so a short-named lab prints exactly what it printed before, and build header and rows from those one widths. Wideningdocs/CONVERGENCE.mdanddocs/LINK-STATE.mdsamples accordingly.