36 Commits
Author SHA1 Message Date
christianmanivong 8339e7b548 Merge pull request 'feat: get_web_login_auth on the vCenter (0.6.0)' (#14) from feature/web-login-auth-662 into main
driver / test (3.13) (push) Successful in 53s
driver / lint (push) Successful in 13s
driver / lowest (push) Successful in 29s
driver / types (push) Successful in 1m9s
driver / build (push) Successful in 27s
driver / security (push) Successful in 59s
driver / publish (push) Successful in 25s
driver / standard (push) Successful in 16s
driver / test (3.12) (push) Successful in 1m11s
CI / driver (push) Successful in 5m51s
v0.6.0
2026-11-29 22:41:24 +00:00
Christian Manivong 3275f06615 refactor: split web_login_sources so it stays within the complexity ratchet (NetOrk/netork#662)
driver / standard (pull_request) Successful in 14s
driver / lowest (pull_request) Successful in 51s
driver / types (pull_request) Successful in 1m24s
driver / test (3.13) (pull_request) Successful in 1m12s
driver / test (3.12) (pull_request) Successful in 1m26s
driver / build (pull_request) Successful in 32s
driver / security (pull_request) Successful in 1m10s
CI / driver (pull_request) Successful in 2m15s
driver / publish (pull_request) Skipped
driver / lint (pull_request) Successful in 13s
2026-11-29 23:30:19 +01:00
Christian Manivong 6a66c05f5e feat: read the identity providers best effort; a refused list is federation not read (NetOrk/netork#662)
driver / standard (pull_request) Failing after 17s
driver / lowest (pull_request) Successful in 34s
driver / test (3.12) (pull_request) Successful in 1m3s
driver / types (pull_request) Successful in 1m5s
driver / test (3.13) (pull_request) Successful in 1m2s
driver / build (pull_request) Successful in 24s
driver / security (pull_request) Successful in 1m8s
CI / driver (pull_request) Failing after 1m59s
driver / publish (pull_request) Skipped
driver / lint (pull_request) Successful in 15s
Listing the providers needs VcIdentityProviders.Manage besides .Read,
which allows changing the identity provider configuration. The verdict is
not assessed either way, so the driver no longer needs it: a 401/403 on
GET /api/vcenter/identity/providers yields the SSO domains plus one
source, "identity federation (not read)" (federation, unknown), instead
of an error. PermissionError stays for a refused domainList; any other
error of the REST read is raised as before. Part of 0.6.0, not yet tagged.
2026-11-29 22:41:02 +01:00
Christian Manivong cf4d115475 chore(release): 0.6.0
driver / standard (pull_request) Successful in 15s
driver / lowest (pull_request) Successful in 34s
driver / types (pull_request) Successful in 1m3s
driver / test (3.12) (pull_request) Successful in 1m6s
driver / test (3.13) (pull_request) Successful in 57s
driver / build (pull_request) Successful in 24s
driver / security (pull_request) Successful in 59s
CI / driver (pull_request) Successful in 1m48s
driver / publish (pull_request) Skipped
driver / lint (pull_request) Successful in 14s
2026-11-29 20:10:03 +01:00
Christian Manivong ab18ca87ca feat: get_web_login_auth on the vCenter, a source per provider and SSO domain (NetOrk/netork#662)
The vCenter driver reads how people log in to the vSphere Client, in
napalm-device-types' WebLoginAuthDict: each identity provider of identity
federation (GET /api/vcenter/identity/providers) is a source that decides
itself (external), the default first; each SSO domain the vSphere API names
(UserDirectory.domainList) is a source whose second factor cannot be read
(unknown), since smart card and RSA SecurID live in SSO's authentication
policy, which neither API exposes.

Listing the providers needs VcIdentityProviders.Read and .Manage; without
them the vCenter answers 403 and the driver raises PermissionError naming
them. The REST read logs in to /api/session with the same account and logs
out after. The ESXi driver has no reader.
2026-11-29 20:09:55 +01:00
christianmanivong e1677bebb2 Merge pull request 'chore(release): 0.5.0' (#13) from feature/pve93-2728 into main
driver / types (push) Successful in 1m8s
driver / lint (push) Successful in 16s
driver / test (3.13) (push) Successful in 1m1s
driver / lowest (push) Successful in 36s
driver / build (push) Successful in 30s
driver / security (push) Successful in 1m12s
driver / publish (push) Successful in 34s
driver / standard (push) Successful in 17s
driver / test (3.12) (push) Successful in 1m7s
CI / driver (push) Successful in 6m46s
v0.5.0
2026-11-26 17:12:08 +00:00
Christian Manivong ebf437dac6 chore(release): 0.5.0
driver / standard (pull_request) Successful in 18s
driver / types (pull_request) Successful in 1m7s
driver / test (3.12) (pull_request) Successful in 1m9s
driver / test (3.13) (pull_request) Successful in 1m2s
driver / lowest (pull_request) Successful in 32s
driver / build (pull_request) Successful in 30s
driver / security (pull_request) Successful in 1m8s
CI / driver (pull_request) Successful in 2m49s
driver / publish (pull_request) Skipped
driver / lint (pull_request) Successful in 14s
2026-11-26 18:05:27 +01:00
Christian Manivong 005575d18e feat: get_vms reports the instance UUID as the guest uid (NetOrk/netork#2728) 2026-11-26 17:26:57 +01:00
christianmanivong 14a1b08db2 Merge pull request 'chore(release): 0.4.0' (#12) from chore/release-0.4.0 into main
driver / types (push) Successful in 1m10s
driver / lint (push) Successful in 14s
driver / test (3.12) (push) Successful in 1m14s
driver / test (3.13) (push) Successful in 1m4s
driver / lowest (push) Successful in 32s
driver / build (push) Successful in 29s
driver / security (push) Successful in 1m9s
driver / publish (push) Successful in 29s
driver / standard (push) Successful in 17s
CI / driver (push) Successful in 3m24s
v0.4.0
2026-11-25 21:17:19 +00:00
Christian Manivong d8a9088747 chore(release): 0.4.0
driver / standard (pull_request) Successful in 19s
driver / types (pull_request) Successful in 1m11s
driver / test (3.12) (pull_request) Successful in 1m13s
driver / test (3.13) (pull_request) Successful in 1m1s
driver / lowest (pull_request) Successful in 36s
driver / build (pull_request) Successful in 33s
driver / security (pull_request) Successful in 1m15s
CI / driver (pull_request) Successful in 3m4s
driver / publish (pull_request) Skipped
driver / lint (pull_request) Successful in 17s
2026-11-25 22:09:47 +01:00
Christian Manivong 2367155b73 Merge branch 'fix/vm-resume-2658' 2026-11-25 22:09:31 +01:00
Christian Manivong b781538a87 feat(power): resume_vm powers a suspended VM on (NetOrk/netork#2658)
driver / standard (pull_request) Successful in 16s
driver / types (pull_request) Successful in 1m13s
driver / test (3.12) (pull_request) Successful in 1m9s
driver / test (3.13) (pull_request) Successful in 57s
driver / lowest (pull_request) Successful in 31s
driver / build (pull_request) Successful in 29s
driver / security (pull_request) Successful in 1m8s
CI / driver (pull_request) Successful in 2m49s
driver / publish (pull_request) Skipped
driver / lint (pull_request) Successful in 15s
The hypervisor contract gained resume_vm beside suspend_vm. vSphere has no
call of its own for it: PowerOnVM_Task resumes a suspended VM from its saved
state. A VM that is not suspended is refused, so resume never starts a VM
that was off.
2026-11-25 21:29:22 +01:00
christianmanivong 447b17cbeb Merge pull request 'feat: get_clusters() and create_vm_from_cloud_init(node=)' (#10) from feat/cluster-inventory into main
driver / lint (push) Successful in 15s
driver / types (push) Successful in 1m15s
driver / test (3.13) (push) Successful in 1m30s
driver / lowest (push) Successful in 34s
driver / test (3.12) (push) Successful in 1m37s
driver / build (push) Successful in 35s
driver / security (push) Successful in 1m8s
driver / publish (push) Skipped
driver / standard (push) Successful in 15s
CI / driver (push) Successful in 2m53s
2026-11-01 19:11:34 +00:00
Christian Manivong 881ba7f1db ci: install napalm-device-types from main until the cluster shapes are on PyPI
driver / standard (pull_request) Successful in 14s
driver / types (pull_request) Successful in 1m5s
driver / test (3.12) (pull_request) Successful in 1m4s
driver / test (3.13) (pull_request) Successful in 1m4s
driver / lowest (pull_request) Successful in 38s
driver / build (pull_request) Successful in 26s
driver / security (pull_request) Successful in 1m6s
CI / driver (pull_request) Successful in 2m34s
driver / publish (pull_request) Skipped
driver / lint (pull_request) Successful in 14s
2026-11-01 20:07:02 +01:00
Christian Manivong 68194b6164 refactor: import the cluster shapes from the package root
driver / standard (pull_request) Successful in 19s
driver / types (pull_request) Failing after 1m12s
driver / test (3.12) (pull_request) Failing after 1m9s
driver / test (3.13) (pull_request) Failing after 58s
driver / lowest (pull_request) Failing after 46s
driver / build (pull_request) Successful in 36s
driver / security (pull_request) Successful in 1m24s
CI / driver (pull_request) Failing after 3m10s
driver / publish (pull_request) Skipped
driver / lint (pull_request) Successful in 16s
napalm-device-types keeps them in a module of their own now; the package exports them.

Refs NetOrk/netork#484
2026-11-01 17:08:10 +01:00
Christian Manivong 52c802ed41 feat: get_clusters() and create_vm_from_cloud_init(node=)
driver / standard (pull_request) Successful in 14s
driver / types (pull_request) Failing after 1m2s
driver / test (3.12) (pull_request) Failing after 57s
driver / test (3.13) (pull_request) Failing after 52s
driver / lowest (pull_request) Failing after 25s
driver / build (pull_request) Successful in 24s
driver / security (pull_request) Successful in 57s
CI / driver (pull_request) Failing after 2m21s
driver / publish (pull_request) Skipped
driver / lint (pull_request) Successful in 13s
vCenter reports each cluster compute resource, and each standalone host
it runs as a cluster of one, identified by "<instanceUuid>/<moref>"; an
ESXi host reports itself. Nodes carry state, maintenance, CPU and memory;
datastores and port groups carry the hosts that see them.

create_vm_from_cloud_init(node=) places the VM on that host and refuses
one that does not exist or cannot take it, before anything is created.
Placement now runs before the image download, so a refused host fails at
once instead of after the download.

Refs NetOrk/netork#484, NetOrk/netork#1822
2026-11-01 16:38:38 +01:00
christianmanivong 1bf8de4c23 Merge pull request 'chore: Python 3.12 is the floor (NAPALM/driver-standard#6)' (#9) from chore/python-312-floor into main
driver / lint (push) Successful in 12s
driver / types (push) Successful in 1m36s
driver / test (3.12) (push) Successful in 1m34s
driver / test (3.13) (push) Successful in 1m13s
driver / lowest (push) Successful in 29s
driver / build (push) Successful in 35s
driver / security (push) Successful in 1m13s
driver / publish (push) Skipped
driver / standard (push) Successful in 18s
CI / driver (push) Successful in 3m18s
2026-10-27 11:38:15 +00:00
Christian Manivong fdb43fe882 fix: the floor on PyYAML is 6.0.1 (NAPALM/driver-standard#6)
driver / standard (pull_request) Successful in 14s
driver / types (pull_request) Successful in 1m1s
driver / test (3.12) (pull_request) Successful in 1m1s
driver / test (3.13) (pull_request) Successful in 49s
driver / lowest (pull_request) Successful in 25s
driver / build (pull_request) Successful in 25s
driver / security (pull_request) Successful in 59s
CI / driver (pull_request) Successful in 2m20s
driver / publish (pull_request) Skipped
driver / lint (pull_request) Successful in 13s
PyYAML 6.0 ships no Python 3.12 wheel and fails to build from source
there, so the lowest job could not install it.
2026-10-27 12:22:48 +01:00
Christian Manivong e66c7795bc fix: the floor on napalm is 5.1 (NAPALM/driver-standard#6)
driver / standard (pull_request) Successful in 14s
driver / types (pull_request) Successful in 1m1s
driver / test (3.12) (pull_request) Successful in 1m2s
driver / test (3.13) (pull_request) Successful in 54s
driver / lowest (pull_request) Failing after 21s
driver / build (pull_request) Successful in 26s
driver / security (pull_request) Successful in 59s
CI / driver (pull_request) Failing after 2m28s
driver / publish (pull_request) Skipped
driver / lint (pull_request) Successful in 13s
napalm 5.0 and older import pkg_resources, which a Python 3.12 venv no
longer has, so the lowest job failed on them.
2026-10-27 10:49:32 +01:00
Christian Manivong 3b3f5d9d02 chore: Python 3.12 is the floor (NAPALM/driver-standard#6)
driver / standard (pull_request) Successful in 18s
driver / test (3.13) (pull_request) Successful in 55s
driver / types (pull_request) Successful in 1m7s
driver / test (3.12) (pull_request) Successful in 1m9s
driver / lowest (pull_request) Failing after 5s
driver / build (pull_request) Successful in 35s
driver / security (pull_request) Successful in 1m12s
CI / driver (pull_request) Failing after 2m51s
driver / publish (pull_request) Skipped
driver / lint (pull_request) Successful in 14s
netOrk runs every driver in its own containers on Python 3.12, so 3.10
and 3.11 are no longer supported or tested. requires-python, mypy and
ruff move to 3.12, along with what ruff's pyupgrade rules then rewrite.
2026-10-27 10:19:01 +01:00
christianmanivong e235eb96b4 Merge pull request 'chore: adopt the NAPALM driver standard' (#8) from chore/driver-standard into main
driver / lint (push) Successful in 13s
driver / types (push) Successful in 1m0s
driver / test (3.11) (push) Successful in 57s
driver / lowest (push) Successful in 35s
driver / test (3.13) (push) Successful in 56s
driver / build (push) Successful in 24s
driver / security (push) Successful in 55s
driver / publish (push) Successful in 26s
driver / standard (push) Successful in 14s
driver / test (3.10) (push) Successful in 59s
driver / test (3.12) (push) Successful in 1m3s
CI / driver (push) Successful in 3m8s
v0.3.0
2026-10-23 10:43:57 +00:00
Christian Manivong 46b595e8ba chore(release): 0.3.0
driver / standard (pull_request) Successful in 13s
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
driver / lint (pull_request) Successful in 11s
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 / 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
driver / lint (pull_request) Successful in 11s
- 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
christianmanivong f943fde994 Merge pull request 'feat!: report hosts and licenses as facts, not warnings (0.2.0)' (#6) from feat/facts-not-warnings into main
CI / test (3.10) (push) Successful in 27s
CI / test (3.11) (push) Successful in 25s
CI / test (3.12) (push) Successful in 26s
2026-10-17 08:34:58 +00:00
Christian Manivong 990dfe2f3c feat!: report hosts and licenses as facts, not warnings (0.2.0)
CI / test (3.10) (push) Successful in 27s
CI / test (3.11) (push) Successful in 25s
CI / test (3.12) (push) Successful in 27s
CI / test (3.10) (pull_request) Successful in 27s
CI / test (3.12) (pull_request) Successful in 26s
CI / test (3.11) (pull_request) Successful in 24s
get_device_warnings is gone; netOrk names the warnings from facts
(netOrk #1111). get_hypervisor_hosts() reports each host's connection
state, maintenance mode, configuration issues and managing vCenter;
get_licenses() the assigned licenses with the edition key as edition,
never the key itself.

The reach stays: the ESXi driver reports connected as None (a
disconnected host could not have answered), and managed_by only for a
host it reached directly. parse/warnings.py is replaced by
parse/hosts.py and parse/licenses.py.
2026-10-17 09:41:47 +02:00
christianmanivong 276276bd9f Merge pull request 'feat(vm-provision): declare the guest agent per guest OS, Linux only' (#4) from feat/guest-os into main
CI / test (3.10) (push) Successful in 27s
CI / test (3.11) (push) Successful in 26s
CI / test (3.12) (push) Successful in 28s
2026-10-08 06:05:06 +00:00
Christian Manivong b5c830acfe feat(vm-provision): declare the guest agent per guest OS, Linux only
CI / test (3.10) (push) Successful in 30s
CI / test (3.11) (push) Successful in 26s
CI / test (3.12) (push) Successful in 28s
CI / test (3.10) (pull_request) Successful in 27s
CI / test (3.12) (pull_request) Successful in 27s
CI / test (3.11) (pull_request) Successful in 26s
Follows napalm-device-types 3.0, which replaces GUEST_AGENT_PACKAGES /
GUEST_AGENT_RUNCMD with GUEST_AGENTS = {guest_os: (packages, runcmd)}.
VMware lists Linux with open-vm-tools, as before, and refuses any other
guest_os before anything is created: BSD guests on VMware are optional
for now (NetOrk/netork#801).

The NoCloud network-config moved to napalm-device-types
(`provisioning.network_config`), which Proxmox now uses as well; the seed
module's copy is gone, and the tests check that the generic one is used.
2026-10-08 07:54:13 +02:00
christianmanivong 0430ded280 Merge pull request 'ci: run the tests and build the package on every push and pull request' (#3) from ci/workflow into main
CI / test (3.10) (push) Successful in 27s
CI / test (3.11) (push) Successful in 25s
CI / test (3.12) (push) Successful in 27s
2026-10-07 06:42:10 +00:00
Christian Manivong 3171721b44 ci: run the tests and build the package on every push and pull request
CI / test (3.10) (push) Successful in 29s
CI / test (3.11) (push) Successful in 26s
CI / test (3.12) (push) Successful in 29s
CI / test (3.10) (pull_request) Successful in 27s
CI / test (3.12) (pull_request) Successful in 27s
CI / test (3.11) (pull_request) Successful in 25s
The same job as napalm-fritzbox and napalm-opnsense: Python 3.10, 3.11 and
3.12, pytest, then wheel and sdist. napalm-device-types comes from
git.netork.io first, because PyPI has an unrelated package of that name.
2026-10-07 07:52:44 +02:00
christianmanivong b5bc04ec83 Merge pull request 'feat(provisioning): accept cpu_type, and refuse one that cannot be honoured' (#2) from feat/vm-cpu-type into main 2026-10-04 15:42:16 +00:00
Christian Manivong 4b4410741f feat(provisioning): accept cpu_type, and refuse one that cannot be honoured
napalm_device_types' create_vm_from_cloud_init gained cpu_type, the CPU model
a new VM gets (netork#494). VMware sets CPU compatibility per cluster (EVC),
not per VM, and this driver has no get_vm_cpu_types() to offer a model, so
None is the only value it can honour. Anything else raises ValueError before
the image is fetched rather than being dropped silently.
2026-10-04 12:02:48 +02:00
christianmanivong 25bad821ab Merge pull request 'feat: VM provisioning, and reboot_host on ESXi' (#1) from feature/host-reboot-snapshots-provisioning into main 2026-10-01 18:59:37 +00:00
Christian Manivong 2b84ceae3a feat: VM provisioning, and reboot_host on ESXi
create_vm_from_cloud_init takes the same qcow2/raw cloud images netOrk
offers for Proxmox. ESXi can neither boot nor download them, so the
driver does both: download with checksum check and one retry, convert
with qemu-img to a streamOptimized VMDK (cached by URL), import through
a minimal OVF descriptor over NFC, pin requested MACs, grow the disk,
and attach a NoCloud seed ISO placed next to the VM's files. NoCloud
rather than guestinfo because it needs nothing in the guest; the
user-data installs open-vm-tools, which the driver declares as its
guest agent. A failure after the import removes the VM again.

Placement is a pure decision over inventory rows: a connected host
outside maintenance mode that sees the datastore and every port group,
with the resource pool and VM folder found by walking up to the
datacenter -- one path for a standalone host and for a vCenter.

Two faults vcsim surfaced and the tests now pin: a chunked upload body
next to a Content-Length is refused with 500, so the disk goes up as a
sized file object that also reports lease progress; and a device edit
replaces the device as sent, so disk and NIC edits start from the live
objects, backing included (vcsim panicked on a disk without one).

destroy_vm, get_vm_status, get_network_targets (port groups with their
fixed VLAN) and get_image_storages complete the contract.

reboot_host on ESXi uses RebootHost_Task and refuses outside
maintenance mode: force=True would cut power to running VMs.

Tested against vcsim in ESXi and vCenter mode, end to end.
2026-09-24 10:00:33 +02:00
Christian Manivong c8e472b4c6 feat: NAPALM drivers for VMware ESXi and vCenter
Two drivers from one package, both in the hypervisor role:

- vmware_esxi talks to one host directly: facts, vmnics and vmkernel
  NICs, CDP/LLDP neighbours, sensors, VMs, datastores and port groups.
- vmware_vcenter talks to a vCenter: every VM of every host it manages,
  with the host as the VM's node, plus distributed port groups. It
  reports no interfaces of its own; the hosts' NICs belong to the hosts.

Both implement the HypervisorDriver VM contract: get_vms, get_vm_config,
start/stop/reboot/suspend_vm and the four snapshot methods, and emit raw
device warnings (maintenance mode, disconnected host, config issues,
host managed by a vCenter, free license making the API read-only).

Every read is a PropertyCollector query for the explicit paths in
paths.py, converted by to_plain() into dicts and lists; the parsers
only ever see that. tools/harvest.py dumps exactly those paths to JSON
and tools/sanitize.py scrubs the dump, so a real host can become a test
fixture without code changes. A VM's vmid is its instance UUID, which
survives vMotion and re-registration; a MoRef does not.

Tested against govmomi's vcsim in ESXi and vCenter mode, including real
power and snapshot tasks. Not yet tested against real hardware.
2026-09-24 09:07:30 +02:00