switchport trunk allowed vlan add 30 refuses a token nobody typed #1455
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1455
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 branch glued the tokens after
switchport trunk allowed vlantogether with no separator — deliberate, so that10, 20and40 - 42typed with spaces still parsed — and the join also ate the verbs IOS puts in front of a list to edit the one already there. The refusal quotes a token nobody typed, and the only way to add a VLAN is to retype the whole list from memory: exactly the mistakeadd/removeexist to prevent.Editing a trunk's allowed list is an existing mechanism with an existing command;
addandremoveare that command's other two forms.What should be true
add <list>is the union with what the trunk already allows, and says what it added;remove <list>is the difference, and says what it took out;add 10when 10 is allowed prints the list unchanged;remove 99when 99 was never allowed is refused with the list it left alone;% Unrecognized "except"with the accepted forms, never the gluedexcept20;10, 20with spaces,40 - 42ranges,all,no switchport trunk allowed vlan, the bare command's% Incomplete command;show running-config,show interfaces <port>andshow vlan briefagree, and the line the config prints can be typed back as a no-op.Evidence:
test/trunk-allowed-add-remove.test.js, 42 checks. Revertingengine/cli.jsfails 19. Neighbours green:vlan59,voice-vlan30,show-vlan29,show-argument-refusal77,switchport-mismatch26,interface-door-atomicity12,config-roundtrip46.addandremove#1822