Fix CSS326 support - #4
Conversation
|
This is great work, I tested it on my CSS318 which also runs SWoS not Lite, and seems to work perfectly: For others that don't like to wait for the request to be merged:
Ignore any Thank you @vvbelousov ! |
CSS326-24G-2S+ runs full SwOS, but was detected as SwOS Lite.
The field-name test used `k.startswith('i') and len(k) == 3`, which
matches ico/img/imr/ip0/ivl in SwOS sys.b. That made has_hex_fields true
on every SwOS device, so detection always fell through to the model
prefix, which mapped CSS* to SwOS Lite. CRS devices only worked because
the same fallback mapped CRS* to SwOS - strip the model string and a
SwOS device came back as unknown.
Match i + digits exactly so field naming decides, as the code intended.
Model prefix is now a last resort, and a CSS model is resolved by which
field style it uses rather than assumed to be Lite.
Verified against the six devices in webui_reference/ (SwOS sys.b carries
no i+digits field; SwOS Lite carries no id/ver/brd) and on a CRS309-1G-8S+
(SwOS 2.18) and CSS610-8P-2S+ (SwOS Lite 2.21).
Also stop exporting untouched ports as port_vlans. An untouched port
reports vlan_mode 'Optional' on both platforms, but only 'Disabled' was
treated as baseline, so every port landed in the export. On the two test
switches this drops the noise from 9/9 to 4 and 10/10 to 1, with every
dropped port confirmed to be at ('Optional','Any',1,False).
Taken from PR #4, logic only - the docstring removal and quote
reformatting in that PR were left out.
|
Thanks — good catch, and the diagnosis holds up. I've merged the logic. The root cause is nastier than it looks: Your export fix is right too, and broader than the PR describes. I did leave out the reformatting. The docstring removal in One ask: could you dump the CSS326-24G-2S+ web UI into |
|
@Dennis-Q missed this earlier, thanks for testing — CSS318-16G-2S+ is a useful second data This is all released now, so the workaround isn't needed any more — and worth flagging that v1.4.0 also adds And if you're willing — could you dump the CSS318 web UI into |
Fix CSS326 support: correct SwOS detection + clean VLAN export
Result: correct detection and no noisy port_vlans in export.
Tested on: