Add TP-Link AP support with wireless client sub-locations

- Add NodeType enum (switch, ap, wireless_client, wired_client)
- Poll SNMPv2c and SNMPv3 in parallel to win race with ping
- Render APs with bordered sub-locations containing wireless clients
- Fall back to parent interface stats when child lacks them
- Log when unreachable nodes become reachable via merge

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ian Gulliver
2026-02-02 20:33:42 -08:00
parent bd829eb888
commit 92ab5d8a6e
11 changed files with 261 additions and 23 deletions

View File

@@ -19,6 +19,15 @@ func newID(prefix string) string {
return tid.String()
}
type NodeType string
const (
NodeTypeSwitch NodeType = "switch"
NodeTypeAP NodeType = "ap"
NodeTypeWirelessClient NodeType = "wireless_client"
NodeTypeWiredClient NodeType = "wired_client"
)
type ArtNetUniverse int
func (u ArtNetUniverse) Net() int {
@@ -464,6 +473,7 @@ type Node struct {
Names NameSet `json:"names"`
Interfaces InterfaceMap `json:"interfaces"`
MACTable map[string]string `json:"mac_table,omitempty"`
Type NodeType `json:"type,omitempty"`
PoEBudget *PoEBudget `json:"poe_budget,omitempty"`
DanteTxChannels int `json:"dante_tx_channels,omitempty"`
DanteClockMasterSeen time.Time `json:"-"`