fix(plus)!: drop set_vlan, delete_vlan and set_interface stubs
The three methods only raised NotImplementedError. napalm-device-types declares them on SwitchDriver for type checking only, so a driver that cannot carry them out is meant not to have them; netOrk reads the capability from the method being callable and offered "Add VLAN" and the port VLAN editor on Plus switches, which then failed. BREAKING CHANGE: NetgearPlusDriver has no set_vlan, delete_vlan or set_interface attribute any more. Closes #9
This commit is contained in:
1 parent
fa56ed4cfa
commit
6f9914f29e
3 files changed
+25
-25
No files matched your search
@@ -0,0 +1,18 @@
|
||||
"""Netgear Plus only has the methods it can carry out.
|
||||
|
||||
An application reads a capability from the method being there: netOrk offers
|
||||
"Add VLAN" and the port VLAN editor when ``set_vlan`` / ``set_interface`` are
|
||||
callable (#9). A method that only raises NotImplementedError
|
||||
made the HTTP-only Plus switches look able to do it.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
|
||||
from napalm_netgear.netgear_plus import NetgearPlusDriver
|
||||
|
||||
|
||||
@pytest.mark.parametrize("method", ["set_vlan", "delete_vlan", "set_interface"])
|
||||
def test_plus_has_no_vlan_or_port_writes(method):
|
||||
assert not callable(getattr(NetgearPlusDriver, method, None))
|
||||
Reference in new issue
Block a user