chore: adopt the NAPALM driver standard
driver / standard (pull_request) Successful in 13s
driver / lint (pull_request) Successful in 11s
driver / types (pull_request) Successful in 44s
driver / test (3.10) (pull_request) Successful in 45s
driver / test (3.11) (pull_request) Successful in 47s
driver / test (3.12) (pull_request) Successful in 44s
driver / test (3.13) (pull_request) Successful in 41s
driver / lowest (pull_request) Successful in 22s
driver / security (pull_request) Successful in 46s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Successful in 5m35s
driver / publish (pull_request) Skipped
driver / standard (pull_request) Successful in 13s
driver / lint (pull_request) Successful in 11s
driver / types (pull_request) Successful in 44s
driver / test (3.10) (pull_request) Successful in 45s
driver / test (3.11) (pull_request) Successful in 47s
driver / test (3.12) (pull_request) Successful in 44s
driver / test (3.13) (pull_request) Successful in 41s
driver / lowest (pull_request) Successful in 22s
driver / security (pull_request) Successful in 46s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Successful in 5m35s
driver / publish (pull_request) Skipped
- 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
This commit is contained in:
1 parent
946dff5d08
commit
75869eae06
9 files changed
+347
-53
No files matched your search
@@ -0,0 +1,55 @@
|
||||
# napalm-yealink
|
||||
|
||||
NAPALM driver for Yealink IP phones and video endpoints (T, W, CP and VP series), built on
|
||||
[napalm-device-types](https://git.netork.io/NAPALM/napalm-device-types) (`PhoneDriver`).
|
||||
|
||||
## Tested against
|
||||
|
||||
| Model | Firmware |
|
||||
|---|---|
|
||||
| not recorded yet | not recorded yet |
|
||||
|
||||
## Connection
|
||||
|
||||
The phone's REST API under `/api/v1/` over HTTPS on port 443. `open()` logs in at
|
||||
`/api/v1/session/login` with the username and the MD5 hex digest of the password (the
|
||||
driver computes it) and keeps the session cookie. A refused login does not fail `open()`:
|
||||
even without a session, `/api/v1/system/info` names the model and firmware.
|
||||
|
||||
```python
|
||||
from napalm import get_network_driver
|
||||
|
||||
driver = get_network_driver("yealink")
|
||||
with driver("192.0.2.20", "admin", "secret") as device:
|
||||
print(device.get_facts())
|
||||
```
|
||||
|
||||
| Optional argument | Default | Meaning |
|
||||
|---|---|---|
|
||||
| `verify_ssl` | `False` | verify the phone's TLS certificate |
|
||||
|
||||
## Supported
|
||||
|
||||
| Getter / action | |
|
||||
|---|---|
|
||||
| `get_facts` | model, firmware, hostname, serial number from `/api/v1/system/info` |
|
||||
| `is_alive` | TCP connect to port 443 |
|
||||
|
||||
## Not supported
|
||||
|
||||
Everything else a NAPALM driver can offer — interfaces, configuration, LLDP, ARP, MAC
|
||||
table, NTP, SNMP, users, routes, `ping` and the CLI — raises `NotImplementedError`.
|
||||
`get_facts` reports no uptime and no interfaces.
|
||||
|
||||
## Development
|
||||
|
||||
The rules are in [STANDARDS.md](https://git.netork.io/NAPALM/driver-standard/src/branch/main/STANDARDS.md).
|
||||
|
||||
```bash
|
||||
python -m venv .venv && .venv/bin/pip install -e ".[dev]"
|
||||
.venv/bin/pytest --cov
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Apache-2.0
|
||||
Reference in new issue
Block a user