docs(CLI): the trunk allowed list is edited in place with add and remove #1822

Merged
jaylouisw merged 1 commit from docs/1117-0915 into main 2026-11-17 09:22:48 +00:00
Owner

docs/CLI.md documented switchport trunk allowed vlan <list> and all, and nothing else. The console accepts two more forms and has for a while:

  • switchport trunk allowed vlan add <list> and remove <list> (engine/cli.js, the trunk/allowed/vlan branch, #1455), which edit the list the port already carries;
  • no switchport trunk allowed vlan, which restores the default all (Trunk on Fa0/1 allows all VLANs again).

The console is emphatic about them: its own refusal for a bad word reads % Unrecognized "banana": this console takes a list (10,20), a range (10-20), "all", "add <list>" or "remove <list>" � four forms, of which this page listed two. remove on a default trunk now subtracts and prints the remainder folded into ranges (#1749), which is documented in ARCHITECTURE.md but never reached the operator-facing reference.

So this adds one section, with three transcripts that were each replayed into a real generic-switch session line for line: the add/remove receipts, the no-op answers (already allows VLANs 30: the list is unchanged (20,30), % VLANs 99 are not allowed ...), the no form, remove 10 on a default trunk answering 1-9,11-1001,1006-4094, the quoted refusal, and the bare add's % Incomplete command line.

Guards, before and after: syntax-check 383 files OK; docs-show-commands 52 show forms / 104 commands / 62 refusals (unchanged � the section introduces no new show form); docs-cli-transcript 4 passed; help-completeness 8 passed; no-form-help-key 81 passed; help-key-works-in-every-prompt 10 tests.

Out of scope here, and worth an engine change rather than a doc one: the help index row still reads switchport trunk allowed vlan <list|all> and omits add/remove, which is the same defect #1491 fixed for whole verbs, one level down.

`docs/CLI.md` documented `switchport trunk allowed vlan <list>` and `all`, and nothing else. The console accepts two more forms and has for a while: - `switchport trunk allowed vlan add <list>` and `remove <list>` (`engine/cli.js`, the `trunk`/`allowed`/`vlan` branch, #1455), which edit the list the port already carries; - `no switchport trunk allowed vlan`, which restores the default `all` (`Trunk on Fa0/1 allows all VLANs again`). The console is emphatic about them: its own refusal for a bad word reads `% Unrecognized "banana": this console takes a list (10,20), a range (10-20), "all", "add <list>" or "remove <list>"` � four forms, of which this page listed two. `remove` on a default trunk now subtracts and prints the remainder folded into ranges (#1749), which is documented in ARCHITECTURE.md but never reached the operator-facing reference. So this adds one section, with three transcripts that were each replayed into a real `generic-switch` session line for line: the add/remove receipts, the no-op answers (`already allows VLANs 30: the list is unchanged (20,30)`, `% VLANs 99 are not allowed ...`), the `no` form, `remove 10` on a default trunk answering `1-9,11-1001,1006-4094`, the quoted refusal, and the bare `add`'s `% Incomplete command` line. Guards, before and after: syntax-check 383 files OK; docs-show-commands 52 show forms / 104 commands / 62 refusals (unchanged � the section introduces no new `show` form); docs-cli-transcript 4 passed; help-completeness 8 passed; no-form-help-key 81 passed; help-key-works-in-every-prompt 10 tests. Out of scope here, and worth an engine change rather than a doc one: the `help` index row still reads `switchport trunk allowed vlan <list|all>` and omits `add`/`remove`, which is the same defect #1491 fixed for whole verbs, one level down.
docs(CLI): the allowed list is edited in place with add and remove, and no page said so (#1749)
All checks were successful
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 5s
CI / Classify the change (pull_request) Successful in 7s
CI / Server smoke test (pull_request) Has been skipped
CI / Docker build (pull_request) Has been skipped
CI / Test (Node 20) (pull_request) Successful in 46s
CI / Test (Node 18) (pull_request) Successful in 53s
CI / Test (Node 22) (pull_request) Successful in 50s
CI / Arm auto-merge (pull_request) Successful in 18s
2f46f99919
The console has read `switchport trunk allowed vlan add <list>` and `remove <list>` since #1455, its own
refusal names all four forms it takes, and the default-trunk `remove` arithmetic landed in #1749 - but
docs/CLI.md, the page an operator reads before opening the console, described only the replacing form. A
verb the box accepts and the reference never mentions is a verb only its author knows about.

Every line of the three new transcripts was replayed into a real generic-switch session and matches the
console word for word: the added/removed receipt, the no-op answers, the `no` form, `remove 10` on a
default trunk printing `1-9,11-1001,1006-4094`, the quoted refusal, and the bare `add`'s incomplete line.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge!1822
No description provided.