chore: adopt the NAPALM driver standard #8

Merged
christianmanivong merged 4 commits from chore/driver-standard into main 2026-10-23 10:43:57 +00:00
4 Commits
Author SHA1 Message Date
Christian Manivong 46b595e8ba chore(release): 0.3.0
driver / standard (pull_request) Successful in 13s
driver / lint (pull_request) Successful in 11s
driver / types (pull_request) Successful in 48s
driver / test (3.10) (pull_request) Successful in 50s
driver / test (3.11) (pull_request) Successful in 49s
driver / test (3.12) (pull_request) Successful in 49s
driver / test (3.13) (pull_request) Successful in 43s
driver / lowest (pull_request) Successful in 24s
driver / security (pull_request) Successful in 47s
driver / build (pull_request) Successful in 23s
CI / driver (pull_request) Successful in 5m57s
driver / publish (pull_request) Skipped
2026-10-23 10:29:09 +02:00
Christian Manivong 24617b7f82 chore: adopt the NAPALM driver standard
driver / standard (pull_request) Successful in 14s
driver / lint (pull_request) Successful in 11s
driver / types (pull_request) Successful in 46s
driver / test (3.10) (pull_request) Successful in 50s
driver / test (3.11) (pull_request) Successful in 48s
driver / test (3.12) (pull_request) Successful in 49s
driver / test (3.13) (pull_request) Successful in 42s
driver / lowest (pull_request) Successful in 24s
driver / security (pull_request) Successful in 46s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Successful in 5m52s
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.
- setuptools>=77 with the SPDX license string, no License classifier,
  Python 3.13 classifier, napalm-device-types>=4.21.1, a dev extra with
  floors, Issues and Changelog links; README installs from PyPI and links
  pyVmomi on PyPI.
- mypy strict for the package (the blanket ignore_missing_imports is now
  limited to napalm and yaml); exempt for now (35 errors): _inventory,
  _session, _tasks, base, esxi, parse.environment, parse.snapshots,
  parse.vm_devices, provision.seed, provision.transfer, provisioning.
  Recorded in the quality baseline with the long and complex functions.
- Coverage floor 97 % (measured 97.11 %).
2026-10-23 08:40:42 +02:00
Christian Manivong 06b446934f fix: what bandit and the remaining lint rules found
- zip() in provisioning is strict (B905): the OVF asks for one adapter
  per requested NIC, so the two lists match. A VM that came back with
  fewer adapters used to get a seed that left a NIC unconfigured; it now
  fails, and create_vm_from_cloud_init discards it as on any other error
  after the import. A test covers it.
- A failed abort of the import lease is logged at debug level instead of
  passed over (B110); the original error is still the one raised.
- nosec for false positives, each with its reason: the 0.0.0.0 entries in
  the parsers are addresses vSphere reports, not binds (B104); qemu-img
  runs with a fixed argv and no shell (B404, B603); xml.sax.saxutils only
  escapes the OVF descriptor the driver writes, nothing is parsed (B406),
  so defusedxml would not apply.
2026-10-23 08:38:41 +02:00
Christian Manivong 1271218868 style: ruff format and the lint rules of the driver standard
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.
2026-10-23 08:36:49 +02:00