fix(plus): stop reporting unread or failed reads as empty
driver / standard (pull_request) Successful in 18s
driver / lint (pull_request) Successful in 15s
driver / types (pull_request) Successful in 1m10s
driver / test (3.12) (pull_request) Successful in 1m17s
driver / test (3.13) (pull_request) Successful in 1m13s
driver / lowest (pull_request) Successful in 29s
driver / build (pull_request) Successful in 32s
driver / security (pull_request) Successful in 1m16s
CI / driver (pull_request) Successful in 3m7s
driver / publish (pull_request) Skipped

Netgear Plus answered reads its web interface cannot do (MAC table,
LLDP, config, users, SNMP, NTP) with empty values without asking the
switch; those now fall through to NAPALM's NotImplementedError, and the
switch-role getters that only returned {} (spanning tree, port channels,
802.1X, MAC ACL) are gone, as device-types reads capability from the
method being there. get_vlans_detail raises when vlan.cgi cannot be
read, get_vlans keys VLANs by int, and Smart get_snmp_config raises when
show snmp fails instead of reading as "no SNMP".

Closes #21
This commit is contained in:
Christian Manivong committed 2026-11-02 09:22:22 +01:00
1 parent 411fed5532
commit 7e3c7d6285
6 files changed
+169 -137

No files matched your search

+14 -14
View File
@@ -75,21 +75,21 @@ with driver("192.168.0.239", "admin", "password") as device:
| `get_facts` | ✅ | ✅ | model, hostname, os_version, serial; `uptime` is always `0.0` |
| `get_interfaces` | ✅ | ✅ | link, speed, port name; `is_enabled` always `True`, `mtu` always 1518, no MAC |
| `get_interfaces_ip` | ✅ | ⚪ | |
| `get_config` | ✅ | ⚪ | empty strings for running, startup and candidate |
| `get_arp_table` | ✅ | ⚪ | |
| `get_mac_address_table` | ✅ | ⚪ | |
| `get_lldp_neighbors` | ✅ | ⚪ | |
| `get_lldp_neighbors_detail` | ✅ | ⚪ | |
| `get_vlans` | ✅ | ✅ | 802.1Q VLANs from the web page `vlan.cgi`; keys are strings (`"1"`) |
| `get_vlans_detail` | ❌ | ✅ | tagged and untagged ports per VLAN |
| `get_config` | ✅ | ❌ | the web interface has no configuration text |
| `get_arp_table` | ✅ | ⚪ | the switches are L2 only: no ARP table |
| `get_mac_address_table` | ✅ | ❌ | |
| `get_lldp_neighbors` | ✅ | ❌ | |
| `get_lldp_neighbors_detail` | ✅ | ❌ | |
| `get_vlans` | ✅ | ✅ | 802.1Q VLANs from the web page `vlan.cgi`; raises when it cannot be read |
| `get_vlans_detail` | ❌ | ✅ | tagged and untagged ports per VLAN; keys are strings (`"1"`) |
| `get_environment` | ✅ | ✅ | Smart: CPU + memory only. Plus: PoE power status per PoE port only |
| `get_interfaces_counters` | ✅ | ✅ | rx/tx octets from the switch's cumulative totals, CRC errors as rx_errors; the rest `0` |
| `get_users` | ✅ | ⚪ | |
| `get_snmp_information` | ✅ | ⚪ | |
| `get_users` | ✅ | ❌ | |
| `get_snmp_information` | ✅ | ❌ | |
| `get_snmp_config` | ✅ | ⚪ | always `None`: SNMP is not read |
| `get_ntp_servers` | ✅ | ⚪ | |
| `get_ntp_peers` | ✅ | ⚪ | Smart: same as servers |
| `get_ntp_stats` | ⚪ | ⚪ | not exposed via the Smart CLI |
| `get_ntp_servers` | ✅ | ❌ | |
| `get_ntp_peers` | ✅ | ❌ | Smart: same as servers |
| `get_ntp_stats` | ⚪ | ❌ | not exposed via the Smart CLI |
| `get_route_to` | ✅ | ❌ | Smart: static/connected only |
| `get_poe_status` | ✅ | ✅ | delivering or searching per PoE port, the model's power budgets; `enabled` always `True`, no power draw |
| `set_poe_enabled` | ❌ | ✅ | |
@@ -109,8 +109,8 @@ with driver("192.168.0.239", "admin", "password") as device:
| `get_optics` | ⚪ | ❌ | DDM not exposed via the Smart CLI |
| `get_ipv6_neighbors_table` | ⚪ | ❌ | not exposed via the Smart CLI |
`netgear_plus` also has `get_spanning_tree`, `get_port_channels`, `get_dot1x_ports` and
`get_mac_acl`; they always return an empty dict.
Neither driver has `get_spanning_tree`, `get_port_channels`, `get_dot1x_ports` or
`get_mac_acl`.
## Connecting