style: ruff format and ruff check --fix with the standard's rule set (E, F, I, UP, B, line length 100, Python 3.10). Mechanical.
fix: zip(..., strict=True) in provisioning (B905): the OVF asks for one adapter per requested NIC, so a VM that comes back with fewer adapters now fails (and is discarded like any other failure after the import) instead of getting a seed that leaves a NIC unconfigured; a test covers it. A failed abort of the import lease is logged at debug level (B110). Justified nosec for false positives: 0.0.0.0 in the parsers is data vSphere reports (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 does not apply.
chore: CI in .gitea/workflows/ci.yml calling the shared driver workflow, .github/ removed; setuptools>=77, SPDX license string, napalm-device-types>=4.21.1, dev extra, Issues/Changelog links; README installs from PyPI; strict mypy with eleven modules exempt for now (_inventory, _session, _tasks, base, esxi, parse.environment, parse.snapshots, parse.vm_devices, provision.seed, provision.transfer, provisioning; 35 errors); quality baseline written; coverage floor 97 %.
## Summary
napalm-vmware adopts the NAPALM driver standard (https://git.netork.io/NAPALM/driver-standard).
Epic: NAPALM/driver-standard#2.
## Changes
- **style**: `ruff format` and `ruff check --fix` with the standard's rule set (E, F, I, UP, B, line length 100, Python 3.10). Mechanical.
- **fix**: `zip(..., strict=True)` in provisioning (B905): the OVF asks for one adapter per requested NIC, so a VM that comes back with fewer adapters now fails (and is discarded like any other failure after the import) instead of getting a seed that leaves a NIC unconfigured; a test covers it. A failed abort of the import lease is logged at debug level (B110). Justified `nosec` for false positives: `0.0.0.0` in the parsers is data vSphere reports (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 does not apply.
- **chore**: CI in `.gitea/workflows/ci.yml` calling the shared driver workflow, `.github/` removed; `setuptools>=77`, SPDX license string, `napalm-device-types>=4.21.1`, dev extra, Issues/Changelog links; README installs from PyPI; strict mypy with eleven modules exempt for now (`_inventory`, `_session`, `_tasks`, `base`, `esxi`, `parse.environment`, `parse.snapshots`, `parse.vm_devices`, `provision.seed`, `provision.transfer`, `provisioning`; 35 errors); quality baseline written; coverage floor 97 %.
## Related Issue
Closes #7
## Testing
Locally: 296 tests (7 vcsim tests skipped), coverage 97.11 %, ruff, mypy, bandit clean; `napalm-standard check` and `ratchet` clean; build + `twine check --strict` pass.
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.
- 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.
- 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 %).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
napalm-vmware adopts the NAPALM driver standard (https://git.netork.io/NAPALM/driver-standard).
Epic: NAPALM/driver-standard#2.
Changes
ruff formatandruff check --fixwith the standard's rule set (E, F, I, UP, B, line length 100, Python 3.10). Mechanical.zip(..., strict=True)in provisioning (B905): the OVF asks for one adapter per requested NIC, so a VM that comes back with fewer adapters now fails (and is discarded like any other failure after the import) instead of getting a seed that leaves a NIC unconfigured; a test covers it. A failed abort of the import lease is logged at debug level (B110). Justifiednosecfor false positives:0.0.0.0in the parsers is data vSphere reports (B104); qemu-img runs with a fixed argv and no shell (B404, B603);xml.sax.saxutilsonly escapes the OVF descriptor the driver writes, nothing is parsed (B406), so defusedxml does not apply..gitea/workflows/ci.ymlcalling the shared driver workflow,.github/removed;setuptools>=77, SPDX license string,napalm-device-types>=4.21.1, dev extra, Issues/Changelog links; README installs from PyPI; strict mypy with eleven modules exempt for now (_inventory,_session,_tasks,base,esxi,parse.environment,parse.snapshots,parse.vm_devices,provision.seed,provision.transfer,provisioning; 35 errors); quality baseline written; coverage floor 97 %.Related Issue
Closes #7
Testing
Locally: 296 tests (7 vcsim tests skipped), coverage 97.11 %, ruff, mypy, bandit clean;
napalm-standard checkandratchetclean; build +twine check --strictpass.