cli: show access-lists numbers each line from 10, four columns in #1717
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!1717
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rev/1116-1900"
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?
What a box prints down the left of
show access-listsThe table printed
1,2,3— an array index, two spaces in from the margin. A box prints theentry's sequence number, four columns in:
Evidence
10 permit tcp any any/20 permit udp any anyaccess-list 2 deny host …still displays10/20show_access-list.raw,show_access-list3.raw16,17,9999keptWhat changed
engine/acl.js—numberedEntries(acl): the lines in evaluation order, each with the sequence a box wouldshow (its own, else 10/20/30 by the position it was typed at).
sortAcl()is now that helper with thenumbers dropped, so display order and first-match order cannot drift apart.
engine/cli.js— prints' ' + seq + ' ' + body; a sequence typed inside the line (10 permit ip any any) is printed once; the match counter is still keyed by the text as typed.docs/CLI.md— the sample and the rule, with the citation.test/show-access-lists-numbering.test.js— 16 checks, including that a line numbered 5 is printed andtested before one numbered 10.
research/show-access-lists-numbering.md— the evidence, and the one thing left unresolved.Left unresolved (deliberately, not guessed)
Whether
denyis padded to align withpermit. The captures disagree: a real standard list prints20 deny any log(three spaces) while the same capture's extended lists print30 deny ip …(one space);the 3560 guide's standard list shows one space; one fixture has no indent at all. Nothing was changed there.
Gates
node scripts/syntax-check.js— 357 files, all OK. Full suite, serial: 286 suites, 10,276 assertions, 0failed. Related suites individually: show-access-lists 23, show-access-lists-numbering 16, acl-data 21,
show-ip-spellings 70, help-completeness 8, show-argument-refusal 77, config-undo 47, interface-drops 39,
interface-counters 29 — all passing.
show access-listsnumbers each line from 10, four columns inThe table printed " 1", " 2", " 3" - an array index, two spaces in from the margin. A box prints the entry's sequence number four columns in: "if entries with no sequence numbers are applied, the first entry is assigned a sequence number of 10, and successive entries are incremented by 10" (Cisco IOS XE, IP Access List Entry Sequence Numbering). A reader comparing the simulator with a real box found a column of numbers no box can produce, and could not name the line to change. numberedEntries() in engine/acl.js now yields the lines in evaluation order, each with the sequence a box would show - the entry's own where it was given one, otherwise 10/20/30 by the position it was typed at - and sortAcl() is that helper with the numbers dropped, so the display order and the match order cannot drift. A sequence typed inside the line ("10 permit ip any any") is printed once, and the match counter is still keyed by the text as typed. Evidence, and the padding question left unresolved: research/show-access-lists-numbering.md.bd67c40eb6e787c61e57