fix(driver): leave unsupported getters to NAPALM's stubs
driver / lint (pull_request) Successful in 15s
driver / standard (pull_request) Successful in 17s
driver / types (pull_request) Successful in 1m0s
driver / test (3.13) (pull_request) Successful in 4m13s
driver / test (3.12) (pull_request) Successful in 4m15s
driver / lowest (pull_request) Successful in 3m42s
driver / build (pull_request) Successful in 27s
driver / security (pull_request) Successful in 1m8s
CI / driver (pull_request) Successful in 5m38s
driver / publish (pull_request) Skipped
driver / lint (pull_request) Successful in 15s
driver / standard (pull_request) Successful in 17s
driver / types (pull_request) Successful in 1m0s
driver / test (3.13) (pull_request) Successful in 4m13s
driver / test (3.12) (pull_request) Successful in 4m15s
driver / lowest (pull_request) Successful in 3m42s
driver / build (pull_request) Successful in 27s
driver / security (pull_request) Successful in 1m8s
CI / driver (pull_request) Successful in 5m38s
driver / publish (pull_request) Skipped
get_config() overrode NAPALM's stub with `return {}` and took no
arguments, so get_config(retrieve="running") raised TypeError, which a
caller reports as a failed configuration backup on every poll. The
other getters a speaker has nothing for (environment, optics, routing,
ARP, MAC table, LLDP, NTP, SNMP, BGP, probes, users, network instances,
firewall policies) had the same shape: an empty answer reads as
"implemented, nothing there", and get_route_to() required an argument
NAPALM defaults.
All of them are gone; NAPALM's stubs raise NotImplementedError.
Closes #13
This commit is contained in:
1 parent
a86fb6cc3e
commit
56e0560eb2
4 files changed
+55
-84
No files matched your search
@@ -167,42 +167,6 @@ class SonosDriver(MediaDriver):
|
||||
}
|
||||
return {_INTERFACE: {"ipv4": ipv4_entry, "ipv6": {}}}
|
||||
|
||||
def get_arp_table(self, vrf: str = "") -> list[dict[str, Any]]:
|
||||
"""Return the ARP table (not supported on Sonos)."""
|
||||
return []
|
||||
|
||||
def get_lldp_neighbors(self) -> dict[str, Any]:
|
||||
"""Return LLDP neighbors (not supported on Sonos)."""
|
||||
return {}
|
||||
|
||||
def get_lldp_neighbors_detail(self, interface: str = "") -> dict[str, Any]:
|
||||
"""Return detailed LLDP neighbors (not supported on Sonos)."""
|
||||
return {}
|
||||
|
||||
def get_config(self) -> dict[str, Any]:
|
||||
"""Return the device config (not supported on Sonos)."""
|
||||
return {}
|
||||
|
||||
def get_environment(self) -> dict[str, Any]:
|
||||
"""Return environment/power info (not supported on Sonos)."""
|
||||
return {}
|
||||
|
||||
def get_optics(self) -> dict[str, Any]:
|
||||
"""Return optics info (not supported on Sonos)."""
|
||||
return {}
|
||||
|
||||
def get_ntp_peers(self) -> dict[str, str | None]:
|
||||
"""Return NTP peers (not supported on Sonos)."""
|
||||
return {}
|
||||
|
||||
def get_ntp_servers(self) -> dict[str, str | None]:
|
||||
"""Return NTP servers (not supported on Sonos)."""
|
||||
return {}
|
||||
|
||||
def get_ntp_stats(self) -> list[dict[str, Any]]:
|
||||
"""Return NTP stats (not supported on Sonos)."""
|
||||
return []
|
||||
|
||||
def ping(
|
||||
self,
|
||||
destination: str,
|
||||
@@ -233,50 +197,6 @@ class SonosDriver(MediaDriver):
|
||||
"error": "Not supported on Sonos",
|
||||
}
|
||||
|
||||
def get_route_to(self, destination: str) -> list[dict[str, Any]]:
|
||||
"""Return routing table (not supported on Sonos)."""
|
||||
return []
|
||||
|
||||
def get_snmp_information(self) -> dict[str, Any]:
|
||||
"""Return SNMP info (not supported on Sonos)."""
|
||||
return {}
|
||||
|
||||
def get_users(self) -> dict[str, Any]:
|
||||
"""Return user accounts (not supported on Sonos)."""
|
||||
return {}
|
||||
|
||||
def get_network_instances(self, name: str = "") -> dict[str, Any]:
|
||||
"""Return network instances / VRFs (not supported on Sonos)."""
|
||||
return {}
|
||||
|
||||
def get_bgp_config(self, group: str = "") -> dict[str, Any]:
|
||||
"""Return BGP config (not supported on Sonos)."""
|
||||
return {}
|
||||
|
||||
def get_bgp_neighbors(self) -> dict[str, Any]:
|
||||
"""Return BGP neighbors (not supported on Sonos)."""
|
||||
return {}
|
||||
|
||||
def get_bgp_neighbors_detail(self, neighbor_address: str = "") -> dict[str, Any]:
|
||||
"""Return detailed BGP neighbor info (not supported on Sonos)."""
|
||||
return {}
|
||||
|
||||
def get_probes_config(self) -> dict[str, Any]:
|
||||
"""Return probe config (not supported on Sonos)."""
|
||||
return {}
|
||||
|
||||
def get_probes_results(self) -> dict[str, Any]:
|
||||
"""Return probe results (not supported on Sonos)."""
|
||||
return {}
|
||||
|
||||
def get_mac_address_table(self) -> list[dict[str, Any]]:
|
||||
"""Return MAC address table (not supported on Sonos)."""
|
||||
return []
|
||||
|
||||
def get_firewall_policies(self) -> dict[str, Any]:
|
||||
"""Return firewall policies (not supported on Sonos)."""
|
||||
return {}
|
||||
|
||||
def cli(self, commands: list[str]) -> list[dict[str, Any]]:
|
||||
"""Run CLI commands (not supported on Sonos)."""
|
||||
return []
|
||||
|
||||
Reference in new issue
Block a user