libvirtpy 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- libvirtpy-0.1.0/.github/workflows/ci.yml +34 -0
- libvirtpy-0.1.0/.github/workflows/release.yml +35 -0
- libvirtpy-0.1.0/.gitignore +28 -0
- libvirtpy-0.1.0/.python-version +1 -0
- libvirtpy-0.1.0/.readthedocs.yaml +17 -0
- libvirtpy-0.1.0/CHANGELOG.md +60 -0
- libvirtpy-0.1.0/CONTRIBUTING.md +65 -0
- libvirtpy-0.1.0/LICENSE +501 -0
- libvirtpy-0.1.0/NOTICE +23 -0
- libvirtpy-0.1.0/PKG-INFO +109 -0
- libvirtpy-0.1.0/README.md +81 -0
- libvirtpy-0.1.0/SECURITY.md +20 -0
- libvirtpy-0.1.0/docs/architecture.md +82 -0
- libvirtpy-0.1.0/docs/async.md +68 -0
- libvirtpy-0.1.0/docs/client.md +54 -0
- libvirtpy-0.1.0/docs/conf.py +74 -0
- libvirtpy-0.1.0/docs/development.md +743 -0
- libvirtpy-0.1.0/docs/domains.md +140 -0
- libvirtpy-0.1.0/docs/events-streams.md +36 -0
- libvirtpy-0.1.0/docs/faq.md +45 -0
- libvirtpy-0.1.0/docs/host-tuning.md +58 -0
- libvirtpy-0.1.0/docs/index.md +46 -0
- libvirtpy-0.1.0/docs/licensing.md +8 -0
- libvirtpy-0.1.0/docs/quickstart.md +59 -0
- libvirtpy-0.1.0/docs/reference/client.rst +27 -0
- libvirtpy-0.1.0/docs/reference/rpc.rst +32 -0
- libvirtpy-0.1.0/docs/reference/xml.rst +58 -0
- libvirtpy-0.1.0/docs/remote.md +38 -0
- libvirtpy-0.1.0/docs/requirements.txt +3 -0
- libvirtpy-0.1.0/docs/robustness.md +99 -0
- libvirtpy-0.1.0/docs/snapshots-backups.md +70 -0
- libvirtpy-0.1.0/docs/storage-networks.md +90 -0
- libvirtpy-0.1.0/docs/testing.md +16 -0
- libvirtpy-0.1.0/docs/troubleshooting.md +69 -0
- libvirtpy-0.1.0/docs/xml.md +37 -0
- libvirtpy-0.1.0/examples/01_define_start_stop.py +26 -0
- libvirtpy-0.1.0/examples/02_lookup_and_edit_xml.py +45 -0
- libvirtpy-0.1.0/examples/03_set_vcpus_memory.py +43 -0
- libvirtpy-0.1.0/examples/04_networks_pools_volumes.py +62 -0
- libvirtpy-0.1.0/examples/05_snapshots.py +29 -0
- libvirtpy-0.1.0/examples/06_errors.py +49 -0
- libvirtpy-0.1.0/examples/07_async_concurrent.py +30 -0
- libvirtpy-0.1.0/examples/08_proxy_style.py +32 -0
- libvirtpy-0.1.0/examples/09_host_and_other_resources.py +39 -0
- libvirtpy-0.1.0/examples/README.md +28 -0
- libvirtpy-0.1.0/examples/common.py +45 -0
- libvirtpy-0.1.0/examples/real/01_local_system.py +32 -0
- libvirtpy-0.1.0/examples/real/02_local_session.py +32 -0
- libvirtpy-0.1.0/examples/real/03_ssh.py +43 -0
- libvirtpy-0.1.0/examples/real/04_tls.py +36 -0
- libvirtpy-0.1.0/examples/real/05_tls_with_sasl.py +45 -0
- libvirtpy-0.1.0/examples/real/06_async_many_hosts.py +50 -0
- libvirtpy-0.1.0/examples/real/07_inspect_domains.py +53 -0
- libvirtpy-0.1.0/examples/real/08_host_and_tuning.py +59 -0
- libvirtpy-0.1.0/examples/real/09_watch_events.py +53 -0
- libvirtpy-0.1.0/examples/real/10_screenshot_and_download.py +73 -0
- libvirtpy-0.1.0/examples/real/README.md +25 -0
- libvirtpy-0.1.0/examples/real/common.py +77 -0
- libvirtpy-0.1.0/pyproject.toml +104 -0
- libvirtpy-0.1.0/src/libvirtpy/__init__.py +5 -0
- libvirtpy-0.1.0/src/libvirtpy/client/__init__.py +54 -0
- libvirtpy-0.1.0/src/libvirtpy/client/_bases.py +326 -0
- libvirtpy-0.1.0/src/libvirtpy/client/_runner.py +57 -0
- libvirtpy-0.1.0/src/libvirtpy/client/aio.py +5922 -0
- libvirtpy-0.1.0/src/libvirtpy/client/client.py +5695 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/__init__.py +631 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/_common.py +495 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/checkpoint.py +196 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/connection.py +93 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/connection_extra.py +256 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/domain.py +306 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/domain_agent.py +115 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/domain_block.py +368 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/domain_info.py +400 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/domain_lifecycle.py +338 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/domain_migration.py +164 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/domain_network.py +113 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/domain_tuning.py +494 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/host.py +246 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/host_interface.py +100 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/interface_extra.py +45 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/network.py +135 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/network_info.py +155 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/network_port.py +142 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/node_device.py +76 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/node_device_info.py +189 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/nwfilter.py +67 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/nwfilter_binding.py +74 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/secret.py +93 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/secret_extra.py +24 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/snapshot.py +100 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/snapshot_tree.py +114 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/storage.py +267 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/storage_info.py +188 -0
- libvirtpy-0.1.0/src/libvirtpy/client/operations/streams.py +201 -0
- libvirtpy-0.1.0/src/libvirtpy/client/references.py +249 -0
- libvirtpy-0.1.0/src/libvirtpy/client/subscribing.py +88 -0
- libvirtpy-0.1.0/src/libvirtpy/client/testing/__init__.py +24 -0
- libvirtpy-0.1.0/src/libvirtpy/client/testing/_common.py +167 -0
- libvirtpy-0.1.0/src/libvirtpy/client/testing/_domains.py +294 -0
- libvirtpy-0.1.0/src/libvirtpy/client/testing/_objects.py +205 -0
- libvirtpy-0.1.0/src/libvirtpy/client/testing/_state.py +246 -0
- libvirtpy-0.1.0/src/libvirtpy/client/testing/_storage.py +171 -0
- libvirtpy-0.1.0/src/libvirtpy/client/testing/async_transport.py +30 -0
- libvirtpy-0.1.0/src/libvirtpy/client/testing/fake.py +81 -0
- libvirtpy-0.1.0/src/libvirtpy/client/transport.py +87 -0
- libvirtpy-0.1.0/src/libvirtpy/client/types.py +59 -0
- libvirtpy-0.1.0/src/libvirtpy/client/wire.py +436 -0
- libvirtpy-0.1.0/src/libvirtpy/client/wire_aio.py +348 -0
- libvirtpy-0.1.0/src/libvirtpy/errors.py +7 -0
- libvirtpy-0.1.0/src/libvirtpy/py.typed +0 -0
- libvirtpy-0.1.0/src/libvirtpy/rpc/__init__.py +1 -0
- libvirtpy-0.1.0/src/libvirtpy/rpc/aio.py +387 -0
- libvirtpy-0.1.0/src/libvirtpy/rpc/cpumap.py +48 -0
- libvirtpy-0.1.0/src/libvirtpy/rpc/errors.py +186 -0
- libvirtpy-0.1.0/src/libvirtpy/rpc/events.py +259 -0
- libvirtpy-0.1.0/src/libvirtpy/rpc/options.py +66 -0
- libvirtpy-0.1.0/src/libvirtpy/rpc/procedure.py +27 -0
- libvirtpy-0.1.0/src/libvirtpy/rpc/protocol/__init__.py +0 -0
- libvirtpy-0.1.0/src/libvirtpy/rpc/protocol/procedures.py +5163 -0
- libvirtpy-0.1.0/src/libvirtpy/rpc/protocol/typed_hints.py +210 -0
- libvirtpy-0.1.0/src/libvirtpy/rpc/protocol/types.py +9299 -0
- libvirtpy-0.1.0/src/libvirtpy/rpc/remote.py +295 -0
- libvirtpy-0.1.0/src/libvirtpy/rpc/remote_aio.py +106 -0
- libvirtpy-0.1.0/src/libvirtpy/rpc/sasl.py +467 -0
- libvirtpy-0.1.0/src/libvirtpy/rpc/session.py +424 -0
- libvirtpy-0.1.0/src/libvirtpy/rpc/sockets.py +251 -0
- libvirtpy-0.1.0/src/libvirtpy/rpc/stream.py +323 -0
- libvirtpy-0.1.0/src/libvirtpy/rpc/subscription.py +451 -0
- libvirtpy-0.1.0/src/libvirtpy/rpc/sync.py +460 -0
- libvirtpy-0.1.0/src/libvirtpy/rpc/typed_params.py +97 -0
- libvirtpy-0.1.0/src/libvirtpy/rpc/uri.py +85 -0
- libvirtpy-0.1.0/src/libvirtpy/rpc/xdr.py +552 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/__init__.py +49 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/_base.py +145 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/_shared/__init__.py +1 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/_shared/metadata.py +67 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/_shared/network.py +108 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/_shared/storage.py +131 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/_shared/sysinfo.py +83 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/_types.py +197 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/_xml_element.py +134 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/backup/__init__.py +25 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/backup/backup.py +89 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/backup/checkpoint.py +48 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/capabilities/__init__.py +43 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/capabilities/domain.py +436 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/capabilities/host.py +413 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/capabilities/storagepool.py +59 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/__init__.py +493 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/blkiotune.py +81 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/clock.py +79 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/cpu.py +265 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/devices/__init__.py +495 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/devices/address.py +152 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/devices/audio.py +204 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/devices/chardev.py +197 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/devices/common.py +75 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/devices/controller.py +262 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/devices/devices.py +79 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/devices/disk.py +471 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/devices/filesystem.py +206 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/devices/graphics.py +245 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/devices/hostdev.py +221 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/devices/input.py +89 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/devices/interface.py +459 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/devices/iommu.py +54 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/devices/memballoon.py +42 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/devices/memory_device.py +101 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/devices/misc.py +169 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/devices/nvram.py +20 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/devices/shmem.py +46 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/devices/sound.py +42 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/devices/tpm.py +103 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/devices/usb.py +86 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/devices/video.py +101 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/domain.py +157 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/features.py +312 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/iothread.py +41 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/launch_security.py +82 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/memory.py +149 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/misc.py +113 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/namespaces.py +96 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/numa.py +140 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/os.py +267 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/qemu.py +102 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/seclabel.py +29 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/storage_source.py +466 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/domain/sysinfo.py +34 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/interface/__init__.py +17 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/interface/interface.py +153 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/network/__init__.py +101 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/network/network.py +311 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/network/port.py +84 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/nodedev/__init__.py +13 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/nodedev/nodedev.py +490 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/nwfilter/__init__.py +81 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/nwfilter/binding.py +51 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/nwfilter/filter.py +92 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/nwfilter/rules.py +534 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/secret/__init__.py +11 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/secret/secret.py +36 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/snapshot/__init__.py +29 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/snapshot/snapshot.py +136 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/storage/__init__.py +75 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/storage/pool.py +219 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/storage/volume.py +102 -0
- libvirtpy-0.1.0/src/libvirtpy/xml/sysinfo.py +40 -0
- libvirtpy-0.1.0/tests/__init__.py +0 -0
- libvirtpy-0.1.0/tests/builder/__init__.py +0 -0
- libvirtpy-0.1.0/tests/builder/expected/small_kvm_guest.xml +11 -0
- libvirtpy-0.1.0/tests/builder/test_domain_builder.py +25 -0
- libvirtpy-0.1.0/tests/client/__init__.py +0 -0
- libvirtpy-0.1.0/tests/client/conftest.py +92 -0
- libvirtpy-0.1.0/tests/client/test_clients.py +80 -0
- libvirtpy-0.1.0/tests/client/test_events.py +234 -0
- libvirtpy-0.1.0/tests/client/test_examples.py +19 -0
- libvirtpy-0.1.0/tests/client/test_generated_clients.py +147 -0
- libvirtpy-0.1.0/tests/client/test_operations.py +44 -0
- libvirtpy-0.1.0/tests/client/test_operations_speak_the_protocol.py +105 -0
- libvirtpy-0.1.0/tests/client/test_protocol.py +153 -0
- libvirtpy-0.1.0/tests/client/test_protocol_coverage.py +151 -0
- libvirtpy-0.1.0/tests/client/test_real_examples.py +132 -0
- libvirtpy-0.1.0/tests/client/test_reconnect.py +182 -0
- libvirtpy-0.1.0/tests/client/test_remote.py +247 -0
- libvirtpy-0.1.0/tests/client/test_requests_match_protocol.py +103 -0
- libvirtpy-0.1.0/tests/client/test_robustness.py +293 -0
- libvirtpy-0.1.0/tests/client/test_sockets_and_wire.py +117 -0
- libvirtpy-0.1.0/tests/client/test_streams.py +322 -0
- libvirtpy-0.1.0/tests/conftest.py +70 -0
- libvirtpy-0.1.0/tests/data/backup/pull.xml +11 -0
- libvirtpy-0.1.0/tests/data/capabilities/pool_caps.xml +13 -0
- libvirtpy-0.1.0/tests/data/domain/cpu_numa.xml +37 -0
- libvirtpy-0.1.0/tests/data/domain/devices_basic.xml +42 -0
- libvirtpy-0.1.0/tests/data/domain/disks_audio.xml +68 -0
- libvirtpy-0.1.0/tests/data/domain/features.xml +19 -0
- libvirtpy-0.1.0/tests/data/domain/host_tuning.xml +124 -0
- libvirtpy-0.1.0/tests/data/domain/minimal.xml +4 -0
- libvirtpy-0.1.0/tests/data/domain/network_display.xml +116 -0
- libvirtpy-0.1.0/tests/data/domain/os_container.xml +15 -0
- libvirtpy-0.1.0/tests/data/domain/os_hvm.xml +30 -0
- libvirtpy-0.1.0/tests/data/domain/os_xen_bootloader.xml +12 -0
- libvirtpy-0.1.0/tests/data/filter/rules.xml +16 -0
- libvirtpy-0.1.0/tests/data/network/nat_dhcp.xml +53 -0
- libvirtpy-0.1.0/tests/data/nodedev/pci.xml +30 -0
- libvirtpy-0.1.0/tests/data/pool/pools.xml +28 -0
- libvirtpy-0.1.0/tests/data/pool/rbd.xml +18 -0
- libvirtpy-0.1.0/tests/data/secret/ceph.xml +8 -0
- libvirtpy-0.1.0/tests/data/snapshot/disk_snapshot.xml +25 -0
- libvirtpy-0.1.0/tests/data/volume/qcow2.xml +34 -0
- libvirtpy-0.1.0/tests/helpers/__init__.py +0 -0
- libvirtpy-0.1.0/tests/helpers/corpus.py +283 -0
- libvirtpy-0.1.0/tests/helpers/fake_rpc_server.py +607 -0
- libvirtpy-0.1.0/tests/helpers/running_server.py +68 -0
- libvirtpy-0.1.0/tests/helpers/schema.py +21 -0
- libvirtpy-0.1.0/tests/helpers/synthetic_daemon.py +203 -0
- libvirtpy-0.1.0/tests/helpers/test_xmlcompare.py +80 -0
- libvirtpy-0.1.0/tests/helpers/xmlcompare.py +131 -0
- libvirtpy-0.1.0/tests/live/__init__.py +0 -0
- libvirtpy-0.1.0/tests/live/roundtrip.py +81 -0
- libvirtpy-0.1.0/tests/live/scratch.py +122 -0
- libvirtpy-0.1.0/tests/live/test_live.py +83 -0
- libvirtpy-0.1.0/tests/live/test_live_operations.py +133 -0
- libvirtpy-0.1.0/tests/live/test_live_roundtrip.py +132 -0
- libvirtpy-0.1.0/tests/live/test_live_write.py +794 -0
- libvirtpy-0.1.0/tests/live/xml_fixtures.py +77 -0
- libvirtpy-0.1.0/tests/roundtrip/__init__.py +0 -0
- libvirtpy-0.1.0/tests/roundtrip/known_gaps.toml +8 -0
- libvirtpy-0.1.0/tests/roundtrip/test_corpus_roundtrip.py +67 -0
- libvirtpy-0.1.0/tests/roundtrip/test_roundtrip.py +79 -0
- libvirtpy-0.1.0/tests/rpc/__init__.py +0 -0
- libvirtpy-0.1.0/tests/rpc/conftest.py +92 -0
- libvirtpy-0.1.0/tests/rpc/test_fuzz.py +212 -0
- libvirtpy-0.1.0/tests/rpc/test_sasl.py +201 -0
- libvirtpy-0.1.0/tests/rpc/test_session.py +139 -0
- libvirtpy-0.1.0/tests/rpc/test_sockets.py +84 -0
- libvirtpy-0.1.0/tests/rpc/test_typed_params.py +54 -0
- libvirtpy-0.1.0/tests/rpc/test_xdr.py +142 -0
- libvirtpy-0.1.0/tests/schema/__init__.py +0 -0
- libvirtpy-0.1.0/tests/schema/test_model_paths.py +16 -0
- libvirtpy-0.1.0/tests/schema/test_schema.py +110 -0
- libvirtpy-0.1.0/tests/tools/__init__.py +0 -0
- libvirtpy-0.1.0/tests/tools/test_code_layout.py +92 -0
- libvirtpy-0.1.0/tests/tools/test_docstrings.py +79 -0
- libvirtpy-0.1.0/tests/tools/test_fetch_samples.py +45 -0
- libvirtpy-0.1.0/tests/tools/test_gen_client.py +13 -0
- libvirtpy-0.1.0/tests/tools/test_gen_protocol.py +19 -0
- libvirtpy-0.1.0/tests/tools/test_gen_typed_params.py +13 -0
- libvirtpy-0.1.0/tests/tools/test_layers.py +38 -0
- libvirtpy-0.1.0/tests/tools/test_schema_coverage.py +98 -0
- libvirtpy-0.1.0/tests/tools/test_types.py +15 -0
- libvirtpy-0.1.0/tests/tools/test_xdr_parser.py +73 -0
- libvirtpy-0.1.0/tests/unit/__init__.py +0 -0
- libvirtpy-0.1.0/tests/unit/backup/__init__.py +0 -0
- libvirtpy-0.1.0/tests/unit/backup/test_backup_runtime.py +18 -0
- libvirtpy-0.1.0/tests/unit/domain/__init__.py +0 -0
- libvirtpy-0.1.0/tests/unit/domain/devices/__init__.py +0 -0
- libvirtpy-0.1.0/tests/unit/domain/devices/test_address.py +79 -0
- libvirtpy-0.1.0/tests/unit/domain/devices/test_audio.py +61 -0
- libvirtpy-0.1.0/tests/unit/domain/devices/test_chardev.py +66 -0
- libvirtpy-0.1.0/tests/unit/domain/devices/test_controller.py +104 -0
- libvirtpy-0.1.0/tests/unit/domain/devices/test_disk.py +123 -0
- libvirtpy-0.1.0/tests/unit/domain/devices/test_graphics.py +61 -0
- libvirtpy-0.1.0/tests/unit/domain/devices/test_hostdev.py +54 -0
- libvirtpy-0.1.0/tests/unit/domain/devices/test_input.py +45 -0
- libvirtpy-0.1.0/tests/unit/domain/devices/test_interface.py +114 -0
- libvirtpy-0.1.0/tests/unit/domain/devices/test_memballoon.py +19 -0
- libvirtpy-0.1.0/tests/unit/domain/devices/test_small_devices.py +109 -0
- libvirtpy-0.1.0/tests/unit/domain/devices/test_storage_source.py +64 -0
- libvirtpy-0.1.0/tests/unit/domain/devices/test_video.py +23 -0
- libvirtpy-0.1.0/tests/unit/domain/test_clock.py +32 -0
- libvirtpy-0.1.0/tests/unit/domain/test_cpu.py +82 -0
- libvirtpy-0.1.0/tests/unit/domain/test_domain.py +55 -0
- libvirtpy-0.1.0/tests/unit/domain/test_domain_settings.py +144 -0
- libvirtpy-0.1.0/tests/unit/domain/test_features.py +33 -0
- libvirtpy-0.1.0/tests/unit/domain/test_memory.py +51 -0
- libvirtpy-0.1.0/tests/unit/domain/test_numa.py +36 -0
- libvirtpy-0.1.0/tests/unit/domain/test_nvram.py +31 -0
- libvirtpy-0.1.0/tests/unit/domain/test_os.py +64 -0
- libvirtpy-0.1.0/tests/unit/network/__init__.py +0 -0
- libvirtpy-0.1.0/tests/unit/network/test_network.py +104 -0
- libvirtpy-0.1.0/tests/unit/nodedev/__init__.py +0 -0
- libvirtpy-0.1.0/tests/unit/nodedev/test_nodedev.py +18 -0
- libvirtpy-0.1.0/tests/unit/snapshot/__init__.py +0 -0
- libvirtpy-0.1.0/tests/unit/storage/__init__.py +0 -0
- libvirtpy-0.1.0/tests/unit/storage/test_storage.py +83 -0
- libvirtpy-0.1.0/tests/unit/test_base.py +70 -0
- libvirtpy-0.1.0/tests/unit/test_other_documents.py +215 -0
- libvirtpy-0.1.0/tests/unit/test_types.py +121 -0
- libvirtpy-0.1.0/tools/__init__.py +1 -0
- libvirtpy-0.1.0/tools/fetch_samples.py +186 -0
- libvirtpy-0.1.0/tools/gen_client.py +510 -0
- libvirtpy-0.1.0/tools/gen_exports.py +139 -0
- libvirtpy-0.1.0/tools/gen_protocol.py +733 -0
- libvirtpy-0.1.0/tools/gen_typed_params.py +121 -0
- libvirtpy-0.1.0/tools/schema_coverage.py +533 -0
- libvirtpy-0.1.0/tools/setup_test_vps.sh +349 -0
- libvirtpy-0.1.0/tools/xdr_parser.py +352 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
checks:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- uses: actions/setup-python@v5
|
|
14
|
+
with:
|
|
15
|
+
python-version: "3.14"
|
|
16
|
+
allow-prereleases: true
|
|
17
|
+
- run: pip install -e . --group dev --group docs
|
|
18
|
+
- run: ruff format --check
|
|
19
|
+
- run: ruff check
|
|
20
|
+
- run: mypy
|
|
21
|
+
- run: pytest --cov --cov-report=term
|
|
22
|
+
- run: python -m sphinx -W -b html docs docs/_build/html
|
|
23
|
+
|
|
24
|
+
corpus:
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v4
|
|
28
|
+
- uses: actions/setup-python@v5
|
|
29
|
+
with:
|
|
30
|
+
python-version: "3.14"
|
|
31
|
+
allow-prereleases: true
|
|
32
|
+
- run: pip install -e . --group dev
|
|
33
|
+
- run: python tools/fetch_samples.py
|
|
34
|
+
- run: pytest -m corpus -q --tb=short
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
build:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v4
|
|
12
|
+
- uses: actions/setup-python@v5
|
|
13
|
+
with:
|
|
14
|
+
python-version: "3.14"
|
|
15
|
+
allow-prereleases: true
|
|
16
|
+
- run: pip install build twine
|
|
17
|
+
- run: python -m build
|
|
18
|
+
- run: twine check dist/*
|
|
19
|
+
- uses: actions/upload-artifact@v4
|
|
20
|
+
with:
|
|
21
|
+
name: dist
|
|
22
|
+
path: dist/
|
|
23
|
+
|
|
24
|
+
publish:
|
|
25
|
+
needs: build
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
environment: pypi
|
|
28
|
+
permissions:
|
|
29
|
+
id-token: write # PyPI trusted publishing: no API token is stored
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/download-artifact@v4
|
|
32
|
+
with:
|
|
33
|
+
name: dist
|
|
34
|
+
path: dist/
|
|
35
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
.venv/
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
*.egg-info/
|
|
7
|
+
.mypy_cache/
|
|
8
|
+
.ruff_cache/
|
|
9
|
+
.pytest_cache/
|
|
10
|
+
.coverage
|
|
11
|
+
# libvirt sample corpus, downloaded by tools/fetch_samples.py
|
|
12
|
+
.cache/
|
|
13
|
+
# IDE
|
|
14
|
+
.idea/workspace.xml
|
|
15
|
+
docs/_build/
|
|
16
|
+
.idea/
|
|
17
|
+
|
|
18
|
+
# AI tool files and local assistant state: not part of the project
|
|
19
|
+
CLAUDE.md
|
|
20
|
+
GEMINI.md
|
|
21
|
+
.claude/
|
|
22
|
+
.cursor/
|
|
23
|
+
.cursorrules
|
|
24
|
+
.windsurfrules
|
|
25
|
+
.aider*
|
|
26
|
+
.github/copilot-instructions.md
|
|
27
|
+
.continue/
|
|
28
|
+
.codex/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.14
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
|
|
3
|
+
build:
|
|
4
|
+
os: ubuntu-26.04
|
|
5
|
+
tools:
|
|
6
|
+
python: "3.14"
|
|
7
|
+
|
|
8
|
+
sphinx:
|
|
9
|
+
configuration: docs/conf.py
|
|
10
|
+
fail_on_warning: true
|
|
11
|
+
|
|
12
|
+
python:
|
|
13
|
+
install:
|
|
14
|
+
- method: pip
|
|
15
|
+
path: .
|
|
16
|
+
extra_requirements: []
|
|
17
|
+
- requirements: docs/requirements.txt
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to libvirtpy are listed here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project uses
|
|
5
|
+
[Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `libvirtpy.xml`: typed pydantic models for every libvirt XML document (domain,
|
|
12
|
+
network, network port, storage pool and volume, snapshot, checkpoint, backup,
|
|
13
|
+
secret, network filter and binding, host device, host interface, sysinfo, and the
|
|
14
|
+
capabilities documents). They round-trip all 10,728 files of libvirt 12.9.0's test
|
|
15
|
+
corpus and validate against its RelaxNG schemas.
|
|
16
|
+
- `libvirtpy.rpc`: the libvirt wire protocol in pure Python (XDR codec, sans-I/O
|
|
17
|
+
session, synchronous and `asyncio` connections), over UNIX sockets, SSH, TLS and TCP,
|
|
18
|
+
with SASL (SCRAM-SHA-256/1, DIGEST-MD5, PLAIN), events and data streams.
|
|
19
|
+
- `libvirtpy.client`: about 280 operations as `LibvirtClient` and `AsyncLibvirtClient`
|
|
20
|
+
(one implementation, two generated clients), references by id, name, UUID or model,
|
|
21
|
+
per-object proxies, and the in-memory `FakeLibvirt` daemon for tests.
|
|
22
|
+
- Documentation (Sphinx, Read the Docs), runnable examples against a fake daemon and
|
|
23
|
+
against a real libvirt, and `tools/setup_test_vps.sh` to prepare a remote test host.
|
|
24
|
+
|
|
25
|
+
### Robustness
|
|
26
|
+
|
|
27
|
+
- Client keepalive (`keepalive_interval`, `keepalive_count`) detects a dead daemon, an
|
|
28
|
+
optional per-call `timeout` raises `CallTimeoutError` and leaves the connection
|
|
29
|
+
usable, and event subscriptions keep at most `max_events` events (the oldest are
|
|
30
|
+
dropped and counted in `dropped`).
|
|
31
|
+
- Fuzz tests of the XDR decoder, the session, SASL and URI parsing; hostile SCRAM
|
|
32
|
+
and DIGEST-MD5 messages are rejected with `AuthFailedError`.
|
|
33
|
+
|
|
34
|
+
- Optional automatic reconnect (`open(..., reconnect=True)`): a lost connection is
|
|
35
|
+
opened again with backoff; event subscriptions are registered again and
|
|
36
|
+
`subscription.reconnects` counts it.
|
|
37
|
+
|
|
38
|
+
### Quality
|
|
39
|
+
|
|
40
|
+
- Stricter lint (`RUF`, `PERF`, `ARG`, `PIE`), a coverage gate (95%, currently 98%), tests
|
|
41
|
+
that run every generated client method and proxy against the real protocol
|
|
42
|
+
structures, and the fake daemon split into one module per area.
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- `qemu+ssh://`: the remote command is quoted, so the remote shell runs the whole
|
|
47
|
+
`virt-ssh-helper` / `nc -U` script.
|
|
48
|
+
- SASL: the daemon's comma-separated mechanism list is parsed.
|
|
49
|
+
- TLS: a `pkipath` without `cacert.pem` is an error instead of falling back to the
|
|
50
|
+
system CAs; `~` and `$VARIABLES` in `pkipath` are expanded.
|
|
51
|
+
|
|
52
|
+
### Verified
|
|
53
|
+
|
|
54
|
+
- Against a real `qemu:///system`: read-only and write tests (throwaway objects only).
|
|
55
|
+
- Against a real remote libvirt 12 server: SSH, TLS and TLS with a SASL login.
|
|
56
|
+
|
|
57
|
+
### Licence
|
|
58
|
+
|
|
59
|
+
- LGPL-2.1-or-later. The generated protocol code in `libvirtpy.rpc.protocol` is derived
|
|
60
|
+
from libvirt's `.x` files (see `NOTICE`).
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Contributing to libvirtpy
|
|
2
|
+
|
|
3
|
+
Thanks for helping. The rules for code, models and tests are in the
|
|
4
|
+
[development guide](docs/development.md); read it first, it is short where it matters:
|
|
5
|
+
|
|
6
|
+
- Python 3.14 only; full type annotations; `mypy --strict`; `ruff`.
|
|
7
|
+
- Docstrings with `:param:` lines on every function in `src/` and `tools/`.
|
|
8
|
+
- Blank lines between logical steps; public code first, helpers last.
|
|
9
|
+
- Every bug fix comes with a test that fails without the fix.
|
|
10
|
+
|
|
11
|
+
## Setup
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
python3.14 -m venv .venv
|
|
15
|
+
.venv/bin/pip install -e . --group dev --group docs
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Before a pull request
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
.venv/bin/ruff format --check && .venv/bin/ruff check
|
|
22
|
+
.venv/bin/pytest --cov # default run: offline, ~10 s; coverage must stay >= 95%
|
|
23
|
+
# includes mypy --strict (tests/tools/test_types.py)
|
|
24
|
+
.venv/bin/python tools/fetch_samples.py # once: libvirt's test corpus
|
|
25
|
+
.venv/bin/pytest -m corpus -q --tb=short # models and generated files
|
|
26
|
+
.venv/bin/python -m sphinx -W -b html docs docs/_build/html
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`client.py`, `aio.py` and `rpc/protocol/` are **generated**: change the operations or
|
|
30
|
+
the generator, then run `tools/gen_client.py`, `tools/gen_protocol.py`; never edit them.
|
|
31
|
+
|
|
32
|
+
Tests that need a libvirt daemon are opt-in: `pytest -m libvirt` (read-only) and
|
|
33
|
+
`pytest -m libvirt_write` (creates and removes `lvxtest-*` objects on
|
|
34
|
+
`qemu:///system`; never run it on a machine whose domains you care about).
|
|
35
|
+
`tools/setup_test_vps.sh` prepares a server for the remote transports.
|
|
36
|
+
|
|
37
|
+
## Using AI tools
|
|
38
|
+
|
|
39
|
+
Use whatever helps you, and stay the author of what you submit. Some suggestions:
|
|
40
|
+
|
|
41
|
+
- **Read and understand every line** you send. You answer for it in review, and the
|
|
42
|
+
tool does not.
|
|
43
|
+
- **Run the checks yourself** (the commands above); do not trust "all tests pass" from
|
|
44
|
+
a tool. A change that fixes a bug needs a test that fails without the fix.
|
|
45
|
+
- **Do not edit generated files** (`client/client.py`, `client/aio.py`,
|
|
46
|
+
`rpc/protocol/`): change the operations or the generator and regenerate.
|
|
47
|
+
- **Do not paste code you cannot license.** The project is LGPL-2.1-or-later. libvirt's
|
|
48
|
+
own sources, tests and documentation are not ours to copy in; models and tests are
|
|
49
|
+
written from the schemas and the public protocol (`NOTICE` explains what is derived).
|
|
50
|
+
- **Keep tools away from real systems.** `pytest -m libvirt_write` creates and deletes
|
|
51
|
+
objects on `qemu:///system`: never let a tool run it on a machine whose VMs, pools or
|
|
52
|
+
networks you care about, and never give a tool credentials for a remote host.
|
|
53
|
+
- **Do not share private data** with a tool: host names, addresses, certificates, SASL
|
|
54
|
+
passwords or the XML of your own VMs. Use the made-up values of the tests.
|
|
55
|
+
- **Prefer small, reviewable changes** over a large rewrite a tool produced in one go.
|
|
56
|
+
- **Do not commit tool files**: assistant instructions, rules and local state
|
|
57
|
+
(`AGENTS.md`, `CLAUDE.md`, `.cursor/`, ...) are git-ignored on purpose. The shared
|
|
58
|
+
project rules live in the documents above.
|
|
59
|
+
|
|
60
|
+
You do not have to say that a tool was used, but if it helps the reviewer (a big
|
|
61
|
+
generated test table, say), mention it in the pull request.
|
|
62
|
+
|
|
63
|
+
## Licence
|
|
64
|
+
|
|
65
|
+
By contributing you agree that your work is licensed under LGPL-2.1-or-later.
|