The set and no forms of spanning-tree vlan give the same answer (#1509) #1561

Merged
jaylouisw merged 1 commit from fix/1115-2306 into main 2026-11-16 00:27:46 +00:00
Owner

Fixes #1509

no spanning-tree vlan 10 answered % Unknown spanning-tree sub-command "vlan": the only form here is no spanning-tree ..., while spanning-tree vlan 10 answered % This device runs one spanning tree, not one per VLAN: use spanning-tree priority <0-61440>``. Per-VLAN STP is a real IOS concept this model deliberately does not have; the no branch called it an unknown word, so an operator reading the refusal concludes the console has never heard of it - which is what the other door denies, and not true.

#1501 hoisted the unmodelled verbs into one list for both directions and left vlan - the one sub-command that is not a verb - duplicated in the set branch only. The explanation is now one constant (STP_ONE_TREE) used by both directions, and the no form names the removal that does exist: no spanning-tree priority. Neither direction touches config.stpPriority.

Test

test/no-command-touches-only-what-it-names.test.js: a new check that both directions state the concept, that neither says "unknown", that each names the command that exists, and that the priority survives both. Against the previous handler it fails with exactly the reported message; with this change the file is 12/12 (node test/no-command-touches-only-what-it-names.test.js).

Full suite npm test: 255 suites, 9298 assertions, 0 failed. node scripts/syntax-check.js: 325 files OK.

At the console now:

sw1(config)#spanning-tree vlan 10
% This device runs one spanning tree, not one per VLAN: use `spanning-tree priority <0-61440>`

sw1(config)#no spanning-tree vlan 10
% This device runs one spanning tree, not one per VLAN: there is no per-VLAN tree to remove, so the removal that exists is `no spanning-tree priority`, which takes the bridge priority off
Fixes #1509 `no spanning-tree vlan 10` answered `% Unknown spanning-tree sub-command "vlan": the only form here is `no spanning-tree` ...`, while `spanning-tree vlan 10` answered `% This device runs one spanning tree, not one per VLAN: use `spanning-tree priority <0-61440>``. Per-VLAN STP is a real IOS concept this model deliberately does not have; the `no` branch called it an unknown word, so an operator reading the refusal concludes the console has never heard of it - which is what the other door denies, and not true. `#1501` hoisted the *unmodelled verbs* into one list for both directions and left `vlan` - the one sub-command that is not a verb - duplicated in the set branch only. The explanation is now one constant (`STP_ONE_TREE`) used by both directions, and the `no` form names the removal that does exist: `no spanning-tree priority`. Neither direction touches `config.stpPriority`. ## Test `test/no-command-touches-only-what-it-names.test.js`: a new check that both directions state the concept, that neither says "unknown", that each names the command that exists, and that the priority survives both. Against the previous handler it fails with exactly the reported message; with this change the file is **12/12** (`node test/no-command-touches-only-what-it-names.test.js`). Full suite `npm test`: **255 suites, 9298 assertions, 0 failed**. `node scripts/syntax-check.js`: 325 files OK. At the console now: ``` sw1(config)#spanning-tree vlan 10 % This device runs one spanning tree, not one per VLAN: use `spanning-tree priority <0-61440>` sw1(config)#no spanning-tree vlan 10 % This device runs one spanning tree, not one per VLAN: there is no per-VLAN tree to remove, so the removal that exists is `no spanning-tree priority`, which takes the bridge priority off ```
Both directions of spanning-tree vlan explain the one tree (#1509)
All checks were successful
CI / Classify the change (pull_request) Successful in 17s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 20s
CI / Test (Node 18) (pull_request) Successful in 3m23s
CI / Test (Node 20) (pull_request) Successful in 3m9s
CI / Server smoke test (pull_request) Successful in 30s
CI / Docker build (pull_request) Successful in 22s
CI / Test (Node 22) (pull_request) Successful in 3m0s
5be72702af
`spanning-tree vlan 10` said this device runs one spanning tree, not one per VLAN.
`no spanning-tree vlan 10` called `vlan` an unknown sub-command, which reads as a
console that has never heard of per-VLAN STP - the opposite of the other door, and
untrue. #1501 hoisted the unmodelled verbs into one list for both directions; `vlan`
is not a verb, so it stayed in the set branch only.

The explanation is now one constant used by both, and the `no` direction names the
removal that does exist (`no spanning-tree priority`). Neither removes the priority.
jaylouisw scheduled this pull request to auto merge when all checks succeed 2026-11-16 00:27:31 +00:00
jaylouisw force-pushed fix/1115-2306 from 5be72702af
All checks were successful
CI / Classify the change (pull_request) Successful in 17s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 20s
CI / Test (Node 18) (pull_request) Successful in 3m23s
CI / Test (Node 20) (pull_request) Successful in 3m9s
CI / Server smoke test (pull_request) Successful in 30s
CI / Docker build (pull_request) Successful in 22s
CI / Test (Node 22) (pull_request) Successful in 3m0s
to ba1aaecdbc
Some checks failed
CI / Classify the change (pull_request) Successful in 18s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 19s
CI / Test (Node 20) (pull_request) Failing after 3m21s
CI / Test (Node 18) (pull_request) Failing after 3m33s
CI / Server smoke test (pull_request) Successful in 37s
CI / Docker build (pull_request) Successful in 24s
CI / Test (Node 22) (pull_request) Failing after 3m10s
2026-11-16 00:27:34 +00:00
Compare
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!1561
No description provided.