freifunk-gluon / gluon

a modular framework for creating OpenWrt-based firmwares for wireless mesh nodes
https://gluon.readthedocs.io
Other
550 stars 324 forks source link

DSA/swconfig info in gluon-info #2908

Open AiyionPrime opened 1 year ago

AiyionPrime commented 1 year ago

I'd like gluon to have some sort of tracking how a devices ports are currently managed. And therefore what capabilities are expected to work.

Any idea what to assess beyond whether swconfig is on the device?

AiyionPrime commented 1 year ago

Maybe we can use a common endpoint for this and #2907.

mkg20001 commented 1 year ago

platform.lua already provides a bunch of is_* functions which could be used

I added a is_swconfig() function in my PR

a767421 (#2907)

Edit: Now it's in ethernet module (as switch type detection is a bit more complicated). There is a PR https://github.com/freifunk-gluon/gluon/pull/2915 which the VLAN ui depends on

mkg20001 commented 1 year ago

gluon-info now contains a switch type entry, same for webinterface

root@ssg3-hap-ac2:~# gluon-info 
Hostname:                   ssg3-hap-ac2
MAC address:                18:fd:74:77:27:65
Hardware model:             MikroTik hAP ac2
Gluon version / Site version:   v2021.1-1101-gbfd13b0 / 015b00d
Firmware release:           0.3+exp20230725
Site:                       Funkfeuer Graz
Domain:                     n/a
Public VPN key:             n/a
Switch type:                dsa