The driver cannot replace a device's configuration, and said so with a
load_replace_candidate that raised NotImplementedError. A method that only
raises still looks like a replace to anyone who asks whether the driver has
one: netOrk offered a config restore for these devices that could only fail.
None is how a driver switches off a method, the convention netOrk's
capability checks and napalm-device-types follow, so asking now says no.
Nothing in the driver calls it.
- CI moves to .gitea/workflows/ci.yml and calls the shared driver workflow
of NAPALM/driver-standard; .github/ is gone.
- license = "Apache-2.0" and a LICENSE file: the package declared no
license at all. README and CHANGELOG.md, py.typed, links to
git.netork.io, a dev extra with floors; .venv/ and build output ignored.
- Floors on every dependency: napalm-device-types>=4.21.1 (had none),
napalm>=4.0 (what napalm-device-types needs) and requests>=2.28.0.
Without them the lowest CI job resolves napalm 0.10, which does not
build; the tests pass at exactly these floors.
- mypy strict for the package; napalm_yealink.yealink is exempt for now
(20 errors), recorded in the quality baseline with get_facts'
complexity. Coverage floor 42 % (measured 42.61 %).
Closes#4
Mechanical: ruff format, and ruff check --fix with the rule set every NAPALM
driver uses (E, F, I, UP, B at line length 100, Python 3.10). What ruff
cannot fix comes in the next commit.
get_health_metrics, get_ssids, get_radio_info and get_wireless_clients
only raised NotImplementedError. They are left over from when the
driver sat on AccessPointDriver, and a stub makes a capability check
(callable(getattr(driver, name))) answer yes. The application polls
SNMP itself (napalm-device-types docs/STRUCTURE.md); a phone has no
profile to declare.
Also stops tracking the .pyc and egg-info files .gitignore already
lists.
Closes#2
Closes netork#117.
A Yealink is a desk phone. It inherited AccessPointDriver because nothing better
existed, and netOrk reads that role to populate its wireless page, its AP
profile pickers and its SSID drift view — so a phone appeared in all three.
napalm-device-types now has PhoneDriver. TYPE_LABEL comes from it, so the local
override is gone.
The two failing fingerprint tests were asserting the opposite of a deliberate
decision. HTTP_FINGERPRINT carries "yealink" as a heavy but *not* mandatory
rule, with the reason written next to it: some models answer / with a redirect
to their API page, whose body says "yealink" nowhere, and a mandatory rule
disqualifies the driver whenever its pattern is absent. Making it mandatory
would rule out a real phone.
The tests demanded it be mandatory, and the Cisco test then asserted `not
all(...)` over an empty list, which is False. Both now check the property that
actually protects against a false match: none of this driver's patterns appear
on a Cisco page, so it contributes no score and never wins.