fix(config): leave get_config to NAPALM's stub #22
No files matched your search
@@ -399,16 +399,6 @@ class ZyxelVMGDriver(ResidentialGatewayDriver):
|
||||
"""Not supported on Zyxel VMG."""
|
||||
return {}
|
||||
|
||||
def get_config(
|
||||
self,
|
||||
retrieve: str = "all",
|
||||
full: bool = False,
|
||||
sanitized: bool = False,
|
||||
format: str = "text",
|
||||
) -> dict[str, Any]:
|
||||
"""Not supported on Zyxel VMG."""
|
||||
return {}
|
||||
|
||||
def get_environment(self) -> dict[str, Any]:
|
||||
"""Not supported on Zyxel VMG."""
|
||||
return {}
|
||||
|
||||
+9
-3
@@ -423,9 +423,15 @@ class TestZyxelVMGDriver:
|
||||
assert result["MyWiFi"]["encryption"] == "WPA2"
|
||||
assert result["MyWiFi"]["clients"] == 3
|
||||
|
||||
def test_get_config(self):
|
||||
self._setup_mocked_http()
|
||||
assert self.driver.get_config() == {}
|
||||
def test_get_config_is_left_to_napalms_stub(self):
|
||||
"""A VMG has no configuration export: the driver must not override
|
||||
get_config, so NAPALM's stub tells callers it is not supported. A stub
|
||||
returning {} read as a backup that came back empty."""
|
||||
from napalm.base import NetworkDriver
|
||||
|
||||
assert ZyxelVMGDriver.get_config is NetworkDriver.get_config
|
||||
with pytest.raises(NotImplementedError):
|
||||
self.driver.get_config()
|
||||
|
||||
def test_cli(self):
|
||||
self._setup_mocked_http()
|
||||
|
||||
Reference in new issue
Block a user