- 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.
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.
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.