MarkGodwin / tplink-omada-api

MIT License
16 stars 12 forks source link

Fix link speeds enum #23

Closed mheath closed 1 year ago

mheath commented 1 year ago

It appears the documentation is in error when it says that link speed 4 is 10 Gbps. I have a TL-SG3210XHP-M2 with 8 2.5 Gbps ports and 2 10 Gbps SFP+ ports. The switch_ports CLI command reports the max speed of the 2.5 Gbps ports as 'SPEED_10_GBPS' and errors on the SFP+ ports saying that '5' is not a valid value for LinkSpeed.

I also have a TL-SX3016F switch with 16 SFP+ 10 Gbps ports which fails.

This commit fixes the issues with both switches.

MarkGodwin commented 1 year ago

Thanks. I have a feeling some of the link speed enum values aren't compatible between different endpoints. I'll have to keep an eye out for that. If there is a mismatch, we can probably straighten it out in the API interface.