diff --git a/napalm_yealink.egg-info/PKG-INFO b/napalm_yealink.egg-info/PKG-INFO deleted file mode 100644 index f80d5df..0000000 --- a/napalm_yealink.egg-info/PKG-INFO +++ /dev/null @@ -1,8 +0,0 @@ -Metadata-Version: 2.4 -Name: napalm-yealink -Version: 0.1.0 -Summary: NAPALM driver for Yealink IP phones and video endpoints -Requires-Python: >=3.10 -Requires-Dist: napalm -Requires-Dist: napalm-device-types -Requires-Dist: requests diff --git a/napalm_yealink.egg-info/SOURCES.txt b/napalm_yealink.egg-info/SOURCES.txt deleted file mode 100644 index 0377478..0000000 --- a/napalm_yealink.egg-info/SOURCES.txt +++ /dev/null @@ -1,10 +0,0 @@ -pyproject.toml -napalm_yealink/__init__.py -napalm_yealink/yealink.py -napalm_yealink.egg-info/PKG-INFO -napalm_yealink.egg-info/SOURCES.txt -napalm_yealink.egg-info/dependency_links.txt -napalm_yealink.egg-info/entry_points.txt -napalm_yealink.egg-info/requires.txt -napalm_yealink.egg-info/top_level.txt -tests/test_fingerprint.py \ No newline at end of file diff --git a/napalm_yealink.egg-info/dependency_links.txt b/napalm_yealink.egg-info/dependency_links.txt deleted file mode 100644 index 8b13789..0000000 --- a/napalm_yealink.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/napalm_yealink.egg-info/entry_points.txt b/napalm_yealink.egg-info/entry_points.txt deleted file mode 100644 index dfce953..0000000 --- a/napalm_yealink.egg-info/entry_points.txt +++ /dev/null @@ -1,2 +0,0 @@ -[napalm.drivers] -yealink = napalm_yealink:YealinkDriver diff --git a/napalm_yealink.egg-info/requires.txt b/napalm_yealink.egg-info/requires.txt deleted file mode 100644 index 2db9ac5..0000000 --- a/napalm_yealink.egg-info/requires.txt +++ /dev/null @@ -1,3 +0,0 @@ -napalm -napalm-device-types -requests diff --git a/napalm_yealink.egg-info/top_level.txt b/napalm_yealink.egg-info/top_level.txt deleted file mode 100644 index f0dc5ee..0000000 --- a/napalm_yealink.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -napalm_yealink diff --git a/napalm_yealink/__pycache__/__init__.cpython-312.pyc b/napalm_yealink/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index f367807..0000000 Binary files a/napalm_yealink/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/napalm_yealink/__pycache__/yealink.cpython-312.pyc b/napalm_yealink/__pycache__/yealink.cpython-312.pyc deleted file mode 100644 index 8da1279..0000000 Binary files a/napalm_yealink/__pycache__/yealink.cpython-312.pyc and /dev/null differ diff --git a/napalm_yealink/yealink.py b/napalm_yealink/yealink.py index 97f4237..91326cd 100644 --- a/napalm_yealink/yealink.py +++ b/napalm_yealink/yealink.py @@ -22,7 +22,6 @@ from requests.exceptions import RequestException from napalm.base.exceptions import ConnectionClosedException, ConnectionException from napalm_device_types import FingerprintRule, PhoneDriver -from napalm_device_types.models import HealthMetricsDict class YealinkDriver(PhoneDriver): @@ -210,18 +209,3 @@ class YealinkDriver(PhoneDriver): def rollback(self) -> None: raise NotImplementedError - - # AccessPointDriver stubs - - def get_wireless_clients(self) -> list: - raise NotImplementedError - - def get_ssids(self) -> dict: - raise NotImplementedError - - def get_radio_info(self) -> dict: - raise NotImplementedError - - @classmethod - async def get_health_metrics(cls, snmp_get, snmp_walk) -> HealthMetricsDict: - raise NotImplementedError diff --git a/pyproject.toml b/pyproject.toml index 2dc347b..cd19958 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "napalm-yealink" -version = "0.1.0" +version = "0.1.1" description = "NAPALM driver for Yealink IP phones and video endpoints" requires-python = ">=3.10" dependencies = [ diff --git a/tests/__pycache__/__init__.cpython-312.pyc b/tests/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 1e4997b..0000000 Binary files a/tests/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/tests/test_capabilities.py b/tests/test_capabilities.py new file mode 100644 index 0000000..e32695d --- /dev/null +++ b/tests/test_capabilities.py @@ -0,0 +1,14 @@ +"""A method exists on the driver only where the phone can answer it. + +The application asks ``callable(getattr(driver, name, None))``; a stub that only +raises would claim a capability the phone does not have. +""" + +import pytest + +from napalm_yealink.yealink import YealinkDriver + + +@pytest.mark.parametrize("name", ["get_health_metrics", "get_ssids", "get_radio_info", "get_wireless_clients"]) +def test_no_stub_claims_what_the_phone_cannot_do(name): + assert name not in vars(YealinkDriver)