[PATCH v2 00/34] Add 'version' to other exported types

Hi, The goal of this patch series is to provide 'since' version to all exported types. This is the non lazy version of the v1. In this series, we do change the docstrings of all exported types, to add the version metadata, in order to have scripts/apibuild.py to fetch it and add it to the appropriated XML API. This patch series also enforces that every new exported types requires a docstring with version with the proper format. v1: https://listman.redhat.com/archives/libvir-list/2022-April/229881.html I've created a script that helped me out and it covered a good amound of cases. I hand fixes all the missing docstrings and corner cases that my script missed. As mentioned in v1, I've used: git grep -rq $symbol $tag $includedir This is used to find if a given $symbol exists in a given $tag or not. $tag starts with v1.0.0 and I have ignored any $tag that does not start with 'v' or has '-rc' in the name. To help review this not so small changeset, the changes were split in the following order: * docs: generated: 98% work from the script. I've split it further, by module + group type. * docs: manual: -> 30% manual labor, 70% vim's macro. It was also split where it seems reasonable. * docs: (...) -> Some fixes needed in the docs. * scripts: -> Improvements to apibuild script. * syms: -> Some fixes found with the found mismatch between docstring and sym files. Other than that, I only caught two false positives, that is, a $symbol was present in a $tag but it was exported only at a latter $tag. Branch : https://gitlab.com/victortoso/libvirt/-/commits/add-since-version Green CI: https://gitlab.com/victortoso/libvirt/-/pipelines/517262280 Cheers, Victor Victor Toso (34): docs: Fix generated documentation of virConnectListAllNodeDeviceFlags docs: variable: Move docstring from source to header file docs: generated: enums: libvirt: append 'Since version' metadata docs: generated: enums: qemu: append 'Since version' metadata docs: generated: enums: admin: append 'Since version' metadata docs: generated: macros: libvirt: append 'Since version' metadata docs: generated: macros: admin: append 'Since version' metadata docs: generated: typedefs: libvirt: append 'Since version' metadata docs: generated: typedefs: qemu: append 'Since version' metadata docs: generated: typedefs: admin: append 'Since version' metadata docs: generated: functions: libvirt: append 'Since version' metadata docs: generated: functions: qemu: append 'Since version' metadata docs: generated: functions: lxc: append 'Since version' metadata docs: generated: functions: admin: append 'Since version' metadata docs: manual: typedef: add docstring and Since metadata docs: manual: functions: add Since metadata docs: manual: enums: add docstring and Since metadata docs: manual: macros: add docstring and Since metadata docs: manual: libvirt-common: add docstring and Since metadata docs: Fix generated documentation of virStorageVolInfoFlags docs: Fix and append Since to virConnectListAllStoragePoolsFlags docs: Fix and append Since to virDomainDeviceModifyFlags docs: Fix and append Since to virDomainMemoryModFlags docs: Fix and append Since to virDomainVcpuFlags scripts: apibuild: parse 'Since' version for enums scripts: apibuild: fix parsing block comments from typedef enum scripts: apibuild: parse 'Since' for typedefs scripts: apibuild: parse 'Since' for macros scripts: apibuild: parse 'Since' for functions scripts: apibuild: factor out comment cleaning scripts: apibuild: add parsing variable's comments syms: admin: Add sections to match when API was introduced syms: libvirt: move virDomainSetBlockThreshold to 3.2.0 syntax-check: sc_prohibit_nonreentrant: skip comments build-aux/syntax-check.mk | 2 +- include/libvirt/libvirt-admin.h | 95 +- include/libvirt/libvirt-common.h.in | 54 +- include/libvirt/libvirt-domain-checkpoint.h | 62 +- include/libvirt/libvirt-domain-snapshot.h | 100 +- include/libvirt/libvirt-domain.h | 2665 +++++++++++++++---- include/libvirt/libvirt-event.h | 35 +- include/libvirt/libvirt-host.h | 320 ++- include/libvirt/libvirt-interface.h | 33 +- include/libvirt/libvirt-network.h | 195 +- include/libvirt/libvirt-nodedev.h | 100 +- include/libvirt/libvirt-nwfilter.h | 29 +- include/libvirt/libvirt-qemu.h | 39 +- include/libvirt/libvirt-secret.h | 81 +- include/libvirt/libvirt-storage.h | 316 ++- include/libvirt/libvirt-stream.h | 48 +- include/libvirt/virterror.h | 428 +-- scripts/apibuild.py | 136 +- src/admin/libvirt-admin.c | 93 + src/admin/libvirt_admin_public.syms | 58 +- src/libvirt-domain-checkpoint.c | 36 + src/libvirt-domain-snapshot.c | 63 + src/libvirt-domain.c | 557 +++- src/libvirt-host.c | 102 + src/libvirt-interface.c | 63 + src/libvirt-lxc.c | 12 + src/libvirt-network.c | 135 + src/libvirt-nodedev.c | 81 + src/libvirt-nwfilter.c | 72 + src/libvirt-qemu.c | 18 + src/libvirt-secret.c | 60 + src/libvirt-storage.c | 171 ++ src/libvirt-stream.c | 51 + src/libvirt.c | 29 +- src/libvirt_public.syms | 8 +- src/util/virerror.c | 45 + src/util/virevent.c | 27 + src/util/virtypedparam-public.c | 57 + 38 files changed, 5317 insertions(+), 1159 deletions(-) -- 2.35.1

scripts/apibuild.py does not handle well enum's with comments between values. The outcome depends on whether the enum value has its own docstring or not. Either way, virConnectListAllNodeDeviceFlags documentation is explicit that this enum is about filtering node devices. We can move the information that it is either by "capability" or "active" state to the block of comment above. Using git diff --word-diff to show the fixed ouput xml (redacted). <enum name='VIR_CONNECT_LIST_NODE_DEVICES_ACTIVE' ... [-info='Inactive-]{+info='Active+} devices'/> <enum name='VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_CARD' ... [-info='vDPA-]{+info='s390 AP Card+} device'/> <enum name='VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_MATRIX' ... [-Queue'/>-]{+Matrix'/>+} <enum name='VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_QUEUE' ... [-Card device'/>-]{+Queue'/>+} <enum name='VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCW_DEV' ... [-info='Mediated-]{+info='CCW+} device'/> <enum name='VIR_CONNECT_LIST_NODE_DEVICES_CAP_CSS_DEV' ... [-info='CCW-]{+info='CSS+} device'/> <enum name='VIR_CONNECT_LIST_NODE_DEVICES_CAP_DRM' ... [-info='Capable of scsi_generic'/>-]{+info='DRM device'/>+} <enum name='VIR_CONNECT_LIST_NODE_DEVICES_CAP_FC_HOST' ... [-info='Storage device'/>-]{+info='FC Host Bus Adapter'/>+} <enum name='VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV' ... [-info='Capable of mediated devices'/>-]{+info='Mediated device'/>+} <enum name='VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV_TYPES' ... [-info='DRM device'/>-]{+info='Capable of mediated devices'/>+} <enum name='VIR_CONNECT_LIST_NODE_DEVICES_CAP_NET' ... [-info='USB interface'/>-]{+info='Network device'/>+} <enum name='VIR_CONNECT_LIST_NODE_DEVICES_CAP_PCI_DEV' ... [-info='System capability'/>-]{+info='PCI device'/>+} <enum name='VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI' ... [-Target'/>-]{+device'/>+} <enum name='VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_GENERIC' ... [-vport'/>-]{+scsi_generic'/>+} <enum name='VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_HOST' ... [-info='Network device'/>-]{+info='SCSI Host Bus Adapter'/>+} <enum name='VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_TARGET' ... [-Host Bus Adapter'/>-]{+Target'/>+} <enum name='VIR_CONNECT_LIST_NODE_DEVICES_CAP_STORAGE' ... [-info='SCSI-]{+info='Storage+} device'/> <enum name='VIR_CONNECT_LIST_NODE_DEVICES_CAP_SYSTEM' ... [-info='filter the devices by cap type'/>-]{+info='System capability'/>+} <enum name='VIR_CONNECT_LIST_NODE_DEVICES_CAP_USB_DEV' ... [-info='PCI-]{+info='USB+} device'/> <enum name='VIR_CONNECT_LIST_NODE_DEVICES_CAP_USB_INTERFACE' ... [-device'/>-]{+interface'/>+} <enum name='VIR_CONNECT_LIST_NODE_DEVICES_CAP_VDPA' ... [-info='CSS-]{+info='vDPA+} device'/> <enum name='VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPD' ... [-info='s390 AP Matrix'/>-]{+info='Device with VPD'/>+} <enum name='VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPORTS' ... [-info='FC Host Bus Adapter'/>-]{+info='Capable of vport'/>+} <enum name='VIR_CONNECT_LIST_NODE_DEVICES_INACTIVE' ... [-info='Device with VPD filter the devices by active state'/>-]{+info='Inactive devices'/>+} Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-nodedev.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/libvirt/libvirt-nodedev.h b/include/libvirt/libvirt-nodedev.h index 0c01d51aab..8efcd7f506 100644 --- a/include/libvirt/libvirt-nodedev.h +++ b/include/libvirt/libvirt-nodedev.h @@ -60,9 +60,9 @@ int virNodeListDevices (virConnectPtr conn, /* * virConnectListAllNodeDevices: * - * Flags used to filter the returned node devices. */ + * Flags used to filter either by capability or active state, the + * returned node devices. */ typedef enum { - /* filter the devices by cap type */ VIR_CONNECT_LIST_NODE_DEVICES_CAP_SYSTEM = 1 << 0, /* System capability */ VIR_CONNECT_LIST_NODE_DEVICES_CAP_PCI_DEV = 1 << 1, /* PCI device */ VIR_CONNECT_LIST_NODE_DEVICES_CAP_USB_DEV = 1 << 2, /* USB device */ @@ -86,7 +86,6 @@ typedef enum { VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_MATRIX = 1 << 20, /* s390 AP Matrix */ VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPD = 1 << 21, /* Device with VPD */ - /* filter the devices by active state */ VIR_CONNECT_LIST_NODE_DEVICES_INACTIVE = 1 << 30, /* Inactive devices */ VIR_CONNECT_LIST_NODE_DEVICES_ACTIVE = 1U << 31, /* Active devices */ } virConnectListAllNodeDeviceFlags; -- 2.35.1

virConnectAuthPtrDefault is the only variable that we export and with the documentation being at the C file, it makes harder to find it. With this patch, the documentation of this variable can be found by those who look at the header file for guidance plus, it will also be included in the XML API, as the followup patch will fix apibuild.py to store what is documented in the header file for this variable. Note that the apibuild, does not do the same with .c files. It'd require adding it for (parsing) recursion, similar to what is done for functions. Considering the pros/cons, seems more reasonable to move the docstring to the header file instead. Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-host.h | 13 +++++++++++++ src/libvirt.c | 11 +---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/include/libvirt/libvirt-host.h b/include/libvirt/libvirt-host.h index 1dc4b8a147..8081d9e39d 100644 --- a/include/libvirt/libvirt-host.h +++ b/include/libvirt/libvirt-host.h @@ -562,6 +562,19 @@ struct _virConnectAuth { typedef struct _virConnectAuth virConnectAuth; typedef virConnectAuth *virConnectAuthPtr; +/* + * virConnectAuthPtrDefault: + * + * A default implementation of the authentication callbacks. This + * implementation is suitable for command line based tools. It will + * prompt for username, passwords, realm and one time keys as needed. + * It will print on STDOUT, and read from STDIN. If this is not + * suitable for the application's needs an alternative implementation + * should be provided. + * + * Since: v1.0.0 + * + */ VIR_EXPORT_VAR virConnectAuthPtr virConnectAuthPtrDefault; /** diff --git a/src/libvirt.c b/src/libvirt.c index 45315f484c..6cda75d1ca 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -197,16 +197,7 @@ static virConnectAuth virConnectAuthDefault = { NULL, }; -/* - * virConnectAuthPtrDefault - * - * A default implementation of the authentication callbacks. This - * implementation is suitable for command line based tools. It will - * prompt for username, passwords, realm and one time keys as needed. - * It will print on STDOUT, and read from STDIN. If this is not - * suitable for the application's needs an alternative implementation - * should be provided. - */ +/* Explanation in the header file */ virConnectAuthPtr virConnectAuthPtrDefault = &virConnectAuthDefault; static bool virGlobalError; -- 2.35.1

On Thu, Apr 14, 2022 at 22:47:13 +0200, Victor Toso wrote:
virConnectAuthPtrDefault is the only variable that we export and with the documentation being at the C file, it makes harder to find it.
With this patch, the documentation of this variable can be found by those who look at the header file for guidance plus, it will also be included in the XML API, as the followup patch will fix apibuild.py to store what is documented in the header file for this variable.
Note that the apibuild, does not do the same with .c files. It'd require adding it for (parsing) recursion, similar to what is done for functions. Considering the pros/cons, seems more reasonable to move the docstring to the header file instead.
Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-host.h | 13 +++++++++++++ src/libvirt.c | 11 +---------- 2 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/include/libvirt/libvirt-host.h b/include/libvirt/libvirt-host.h index 1dc4b8a147..8081d9e39d 100644 --- a/include/libvirt/libvirt-host.h +++ b/include/libvirt/libvirt-host.h @@ -562,6 +562,19 @@ struct _virConnectAuth { typedef struct _virConnectAuth virConnectAuth; typedef virConnectAuth *virConnectAuthPtr;
+/* + * virConnectAuthPtrDefault: + * + * A default implementation of the authentication callbacks. This + * implementation is suitable for command line based tools. It will + * prompt for username, passwords, realm and one time keys as needed. + * It will print on STDOUT, and read from STDIN. If this is not + * suitable for the application's needs an alternative implementation + * should be provided. + * + * Since: v1.0.0
This seems to be added by commit v0.3.3-120-g7fa9ceb740

Minor hand adjustments around syntax, not the metadata per se. Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-domain-checkpoint.h | 28 +- include/libvirt/libvirt-domain-snapshot.h | 60 +- include/libvirt/libvirt-domain.h | 877 +++++++++++--------- include/libvirt/libvirt-host.h | 36 +- include/libvirt/libvirt-interface.h | 4 +- include/libvirt/libvirt-network.h | 50 +- include/libvirt/libvirt-nodedev.h | 54 +- include/libvirt/libvirt-nwfilter.h | 4 +- include/libvirt/libvirt-secret.h | 10 +- include/libvirt/libvirt-storage.h | 96 ++- include/libvirt/virterror.h | 394 ++++----- 11 files changed, 877 insertions(+), 736 deletions(-) diff --git a/include/libvirt/libvirt-domain-checkpoint.h b/include/libvirt/libvirt-domain-checkpoint.h index a2f97531f8..a59578b857 100644 --- a/include/libvirt/libvirt-domain-checkpoint.h +++ b/include/libvirt/libvirt-domain-checkpoint.h @@ -52,13 +52,13 @@ virConnectPtr virDomainCheckpointGetConnect(virDomainCheckpointPtr checkpoint); typedef enum { VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE = (1 << 0), /* Restore or alter - metadata */ + metadata (Since: v5.6.0) */ VIR_DOMAIN_CHECKPOINT_CREATE_QUIESCE = (1 << 1), /* use guest agent to quiesce all mounted file systems within - the domain */ + the domain (Since: v5.6.0) */ VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE_VALIDATE = (1 << 2), /* validate disk data state - when redefining a checkpoint */ + when redefining a checkpoint (Since: v6.10.0) */ } virDomainCheckpointCreateFlags; /* Create a checkpoint using the current VM state. */ @@ -67,11 +67,11 @@ virDomainCheckpointPtr virDomainCheckpointCreateXML(virDomainPtr domain, unsigned int flags); typedef enum { - VIR_DOMAIN_CHECKPOINT_XML_SECURE = (1 << 0), /* Include sensitive data */ + VIR_DOMAIN_CHECKPOINT_XML_SECURE = (1 << 0), /* Include sensitive data (Since: v5.6.0) */ VIR_DOMAIN_CHECKPOINT_XML_NO_DOMAIN = (1 << 1), /* Suppress <domain> - subelement */ + subelement (Since: v5.6.0) */ VIR_DOMAIN_CHECKPOINT_XML_SIZE = (1 << 2), /* Include dynamic - per-<disk> size */ + per-<disk> size (Since: v5.6.0) */ } virDomainCheckpointXMLFlags; /* Dump the XML of a checkpoint */ @@ -90,18 +90,18 @@ char *virDomainCheckpointGetXMLDesc(virDomainCheckpointPtr checkpoint, typedef enum { VIR_DOMAIN_CHECKPOINT_LIST_ROOTS = (1 << 0), /* Filter by checkpoints with no parents, when - listing a domain */ + listing a domain (Since: v5.6.0) */ VIR_DOMAIN_CHECKPOINT_LIST_DESCENDANTS = (1 << 0), /* List all descendants, not just children, when - listing a checkpoint */ + listing a checkpoint (Since: v5.6.0) */ VIR_DOMAIN_CHECKPOINT_LIST_TOPOLOGICAL = (1 << 1), /* Ensure parents occur before children in - the resulting list */ + the resulting list (Since: v5.6.0) */ VIR_DOMAIN_CHECKPOINT_LIST_LEAVES = (1 << 2), /* Filter by checkpoints - with no children */ + with no children (Since: v5.6.0) */ VIR_DOMAIN_CHECKPOINT_LIST_NO_LEAVES = (1 << 3), /* Filter by checkpoints - that have children */ + that have children (Since: v5.6.0) */ } virDomainCheckpointListFlags; /* Get all checkpoint objects for this domain */ @@ -125,9 +125,9 @@ virDomainCheckpointPtr virDomainCheckpointGetParent(virDomainCheckpointPtr check /* Delete a checkpoint */ typedef enum { - VIR_DOMAIN_CHECKPOINT_DELETE_CHILDREN = (1 << 0), /* Also delete children */ - VIR_DOMAIN_CHECKPOINT_DELETE_METADATA_ONLY = (1 << 1), /* Delete just metadata */ - VIR_DOMAIN_CHECKPOINT_DELETE_CHILDREN_ONLY = (1 << 2), /* Delete just children */ + VIR_DOMAIN_CHECKPOINT_DELETE_CHILDREN = (1 << 0), /* Also delete children (Since: v5.6.0) */ + VIR_DOMAIN_CHECKPOINT_DELETE_METADATA_ONLY = (1 << 1), /* Delete just metadata (Since: v5.6.0) */ + VIR_DOMAIN_CHECKPOINT_DELETE_CHILDREN_ONLY = (1 << 2), /* Delete just children (Since: v5.6.0) */ } virDomainCheckpointDeleteFlags; int virDomainCheckpointDelete(virDomainCheckpointPtr checkpoint, diff --git a/include/libvirt/libvirt-domain-snapshot.h b/include/libvirt/libvirt-domain-snapshot.h index d729d1a532..40f7a95441 100644 --- a/include/libvirt/libvirt-domain-snapshot.h +++ b/include/libvirt/libvirt-domain-snapshot.h @@ -51,28 +51,28 @@ virConnectPtr virDomainSnapshotGetConnect(virDomainSnapshotPtr snapshot); typedef enum { VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE = (1 << 0), /* Restore or alter - metadata */ + metadata (Since: v1.0.0) */ VIR_DOMAIN_SNAPSHOT_CREATE_CURRENT = (1 << 1), /* With redefine, make - snapshot current */ + snapshot current (Since: v1.0.0) */ VIR_DOMAIN_SNAPSHOT_CREATE_NO_METADATA = (1 << 2), /* Make snapshot without - remembering it */ + remembering it (Since: v1.0.0) */ VIR_DOMAIN_SNAPSHOT_CREATE_HALT = (1 << 3), /* Stop running guest - after snapshot */ + after snapshot (Since: v1.0.0) */ VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY = (1 << 4), /* disk snapshot, not - full system */ + full system (Since: v1.0.0) */ VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXT = (1 << 5), /* reuse any existing - external files */ + external files (Since: v1.0.0) */ VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE = (1 << 6), /* use guest agent to quiesce all mounted file systems within - the domain */ + the domain (Since: v1.0.0) */ VIR_DOMAIN_SNAPSHOT_CREATE_ATOMIC = (1 << 7), /* atomically avoid - partial changes */ + partial changes (Since: v1.0.0) */ VIR_DOMAIN_SNAPSHOT_CREATE_LIVE = (1 << 8), /* create the snapshot while the guest is - running */ + running (Since: v1.0.1) */ VIR_DOMAIN_SNAPSHOT_CREATE_VALIDATE = (1 << 9), /* validate the XML - against the schema */ + against the schema (Since: v5.6.0) */ } virDomainSnapshotCreateFlags; /* Take a snapshot of the current VM state */ @@ -81,7 +81,7 @@ virDomainSnapshotPtr virDomainSnapshotCreateXML(virDomainPtr domain, unsigned int flags); typedef enum { - VIR_DOMAIN_SNAPSHOT_XML_SECURE = VIR_DOMAIN_XML_SECURE, /* dump security sensitive information too */ + VIR_DOMAIN_SNAPSHOT_XML_SECURE = VIR_DOMAIN_XML_SECURE, /* dump security sensitive information too (Since: v5.1.0) */ } virDomainSnapshotXMLFlags; /* Dump the XML of a snapshot */ @@ -102,45 +102,45 @@ char *virDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, typedef enum { VIR_DOMAIN_SNAPSHOT_LIST_ROOTS = (1 << 0), /* Filter by snapshots with no parents, when - listing a domain */ + listing a domain (Since: v1.0.0) */ VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS = (1 << 0), /* List all descendants, not just children, when listing a snapshot */ - /* For historical reasons, groups do not use contiguous bits. */ + /* For historical reasons, groups do not use contiguous bits. (Since: v1.0.0) */ VIR_DOMAIN_SNAPSHOT_LIST_LEAVES = (1 << 2), /* Filter by snapshots - with no children */ + with no children (Since: v1.0.0) */ VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES = (1 << 3), /* Filter by snapshots - that have children */ + that have children (Since: v1.0.0) */ VIR_DOMAIN_SNAPSHOT_LIST_METADATA = (1 << 1), /* Filter by snapshots - which have metadata */ + which have metadata (Since: v1.0.0) */ VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA = (1 << 4), /* Filter by snapshots - with no metadata */ + with no metadata (Since: v1.0.0) */ VIR_DOMAIN_SNAPSHOT_LIST_INACTIVE = (1 << 5), /* Filter by snapshots taken while guest was - shut off */ + shut off (Since: v1.0.1) */ VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE = (1 << 6), /* Filter by snapshots taken while guest was active, and with - memory state */ + memory state (Since: v1.0.1) */ VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY = (1 << 7), /* Filter by snapshots taken while guest was active, but without - memory state */ + memory state (Since: v1.0.1) */ VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL = (1 << 8), /* Filter by snapshots stored internal to - disk images */ + disk images (Since: v1.0.1) */ VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL = (1 << 9), /* Filter by snapshots that use files external - to disk images */ + to disk images (Since: v1.0.1) */ VIR_DOMAIN_SNAPSHOT_LIST_TOPOLOGICAL = (1 << 10), /* Ensure parents occur before children in - the resulting list */ + the resulting list (Since: v5.2.0) */ } virDomainSnapshotListFlags; /* Return the number of snapshots for this domain */ @@ -195,10 +195,10 @@ int virDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot, unsigned int flags); typedef enum { - VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING = 1 << 0, /* Run after revert */ - VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED = 1 << 1, /* Pause after revert */ - VIR_DOMAIN_SNAPSHOT_REVERT_FORCE = 1 << 2, /* Allow risky reverts */ - VIR_DOMAIN_SNAPSHOT_REVERT_RESET_NVRAM = 1 << 3, /* Re-initialize NVRAM from template */ + VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING = 1 << 0, /* Run after revert (Since: v1.0.0) */ + VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED = 1 << 1, /* Pause after revert (Since: v1.0.0) */ + VIR_DOMAIN_SNAPSHOT_REVERT_FORCE = 1 << 2, /* Allow risky reverts (Since: v1.0.0) */ + VIR_DOMAIN_SNAPSHOT_REVERT_RESET_NVRAM = 1 << 3, /* Re-initialize NVRAM from template (Since: v8.1.0) */ } virDomainSnapshotRevertFlags; /* Revert the domain to a point-in-time snapshot. The @@ -210,9 +210,9 @@ int virDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, /* Delete a snapshot */ typedef enum { - VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN = (1 << 0), /* Also delete children */ - VIR_DOMAIN_SNAPSHOT_DELETE_METADATA_ONLY = (1 << 1), /* Delete just metadata */ - VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN_ONLY = (1 << 2), /* Delete just children */ + VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN = (1 << 0), /* Also delete children (Since: v1.0.0) */ + VIR_DOMAIN_SNAPSHOT_DELETE_METADATA_ONLY = (1 << 1), /* Delete just metadata (Since: v1.0.0) */ + VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN_ONLY = (1 << 2), /* Delete just children (Since: v1.0.0) */ } virDomainSnapshotDeleteFlags; int virDomainSnapshotDelete(virDomainSnapshotPtr snapshot, diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index 1275f4530d..c3dd4d33c0 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -49,15 +49,15 @@ typedef virDomain *virDomainPtr; * A domain may be in different states at a given point in time */ typedef enum { - VIR_DOMAIN_NOSTATE = 0, /* no state */ - VIR_DOMAIN_RUNNING = 1, /* the domain is running */ - VIR_DOMAIN_BLOCKED = 2, /* the domain is blocked on resource */ - VIR_DOMAIN_PAUSED = 3, /* the domain is paused by user */ - VIR_DOMAIN_SHUTDOWN= 4, /* the domain is being shut down */ - VIR_DOMAIN_SHUTOFF = 5, /* the domain is shut off */ - VIR_DOMAIN_CRASHED = 6, /* the domain is crashed */ + VIR_DOMAIN_NOSTATE = 0, /* no state (Since: v1.0.0) */ + VIR_DOMAIN_RUNNING = 1, /* the domain is running (Since: v1.0.0) */ + VIR_DOMAIN_BLOCKED = 2, /* the domain is blocked on resource (Since: v1.0.0) */ + VIR_DOMAIN_PAUSED = 3, /* the domain is paused by user (Since: v1.0.0) */ + VIR_DOMAIN_SHUTDOWN= 4, /* the domain is being shut down (Since: v1.0.0) */ + VIR_DOMAIN_SHUTOFF = 5, /* the domain is shut off (Since: v1.0.0) */ + VIR_DOMAIN_CRASHED = 6, /* the domain is crashed (Since: v1.0.0) */ VIR_DOMAIN_PMSUSPENDED = 7, /* the domain is suspended by guest - power management */ + power management (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_LAST @@ -79,17 +79,17 @@ typedef enum { typedef enum { VIR_DOMAIN_RUNNING_UNKNOWN = 0, - VIR_DOMAIN_RUNNING_BOOTED = 1, /* normal startup from boot */ - VIR_DOMAIN_RUNNING_MIGRATED = 2, /* migrated from another host */ - VIR_DOMAIN_RUNNING_RESTORED = 3, /* restored from a state file */ - VIR_DOMAIN_RUNNING_FROM_SNAPSHOT = 4, /* restored from snapshot */ - VIR_DOMAIN_RUNNING_UNPAUSED = 5, /* returned from paused state */ - VIR_DOMAIN_RUNNING_MIGRATION_CANCELED = 6, /* returned from migration */ - VIR_DOMAIN_RUNNING_SAVE_CANCELED = 7, /* returned from failed save process */ + VIR_DOMAIN_RUNNING_BOOTED = 1, /* normal startup from boot (Since: v1.0.0) */ + VIR_DOMAIN_RUNNING_MIGRATED = 2, /* migrated from another host (Since: v1.0.0) */ + VIR_DOMAIN_RUNNING_RESTORED = 3, /* restored from a state file (Since: v1.0.0) */ + VIR_DOMAIN_RUNNING_FROM_SNAPSHOT = 4, /* restored from snapshot (Since: v1.0.0) */ + VIR_DOMAIN_RUNNING_UNPAUSED = 5, /* returned from paused state (Since: v1.0.0) */ + VIR_DOMAIN_RUNNING_MIGRATION_CANCELED = 6, /* returned from migration (Since: v1.0.0) */ + VIR_DOMAIN_RUNNING_SAVE_CANCELED = 7, /* returned from failed save process (Since: v1.0.0) */ VIR_DOMAIN_RUNNING_WAKEUP = 8, /* returned from pmsuspended due to - wakeup event */ - VIR_DOMAIN_RUNNING_CRASHED = 9, /* resumed from crashed */ - VIR_DOMAIN_RUNNING_POSTCOPY = 10, /* running in post-copy migration mode */ + wakeup event (Since: v1.0.0) */ + VIR_DOMAIN_RUNNING_CRASHED = 9, /* resumed from crashed (Since: v1.1.1) */ + VIR_DOMAIN_RUNNING_POSTCOPY = 10, /* running in post-copy migration mode (Since: v1.3.3) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_RUNNING_LAST @@ -97,7 +97,7 @@ typedef enum { } virDomainRunningReason; typedef enum { - VIR_DOMAIN_BLOCKED_UNKNOWN = 0, /* the reason is unknown */ + VIR_DOMAIN_BLOCKED_UNKNOWN = 0, /* the reason is unknown (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_BLOCKED_LAST @@ -105,20 +105,20 @@ typedef enum { } virDomainBlockedReason; typedef enum { - VIR_DOMAIN_PAUSED_UNKNOWN = 0, /* the reason is unknown */ - VIR_DOMAIN_PAUSED_USER = 1, /* paused on user request */ - VIR_DOMAIN_PAUSED_MIGRATION = 2, /* paused for offline migration */ - VIR_DOMAIN_PAUSED_SAVE = 3, /* paused for save */ - VIR_DOMAIN_PAUSED_DUMP = 4, /* paused for offline core dump */ - VIR_DOMAIN_PAUSED_IOERROR = 5, /* paused due to a disk I/O error */ - VIR_DOMAIN_PAUSED_WATCHDOG = 6, /* paused due to a watchdog event */ - VIR_DOMAIN_PAUSED_FROM_SNAPSHOT = 7, /* paused after restoring from snapshot */ - VIR_DOMAIN_PAUSED_SHUTTING_DOWN = 8, /* paused during shutdown process */ - VIR_DOMAIN_PAUSED_SNAPSHOT = 9, /* paused while creating a snapshot */ - VIR_DOMAIN_PAUSED_CRASHED = 10, /* paused due to a guest crash */ - VIR_DOMAIN_PAUSED_STARTING_UP = 11, /* the domain is being started */ - VIR_DOMAIN_PAUSED_POSTCOPY = 12, /* paused for post-copy migration */ - VIR_DOMAIN_PAUSED_POSTCOPY_FAILED = 13, /* paused after failed post-copy */ + VIR_DOMAIN_PAUSED_UNKNOWN = 0, /* the reason is unknown (Since: v1.0.0) */ + VIR_DOMAIN_PAUSED_USER = 1, /* paused on user request (Since: v1.0.0) */ + VIR_DOMAIN_PAUSED_MIGRATION = 2, /* paused for offline migration (Since: v1.0.0) */ + VIR_DOMAIN_PAUSED_SAVE = 3, /* paused for save (Since: v1.0.0) */ + VIR_DOMAIN_PAUSED_DUMP = 4, /* paused for offline core dump (Since: v1.0.0) */ + VIR_DOMAIN_PAUSED_IOERROR = 5, /* paused due to a disk I/O error (Since: v1.0.0) */ + VIR_DOMAIN_PAUSED_WATCHDOG = 6, /* paused due to a watchdog event (Since: v1.0.0) */ + VIR_DOMAIN_PAUSED_FROM_SNAPSHOT = 7, /* paused after restoring from snapshot (Since: v1.0.0) */ + VIR_DOMAIN_PAUSED_SHUTTING_DOWN = 8, /* paused during shutdown process (Since: v1.0.0) */ + VIR_DOMAIN_PAUSED_SNAPSHOT = 9, /* paused while creating a snapshot (Since: v1.0.1) */ + VIR_DOMAIN_PAUSED_CRASHED = 10, /* paused due to a guest crash (Since: v1.1.1) */ + VIR_DOMAIN_PAUSED_STARTING_UP = 11, /* the domain is being started (Since: v1.2.14) */ + VIR_DOMAIN_PAUSED_POSTCOPY = 12, /* paused for post-copy migration (Since: v1.3.3) */ + VIR_DOMAIN_PAUSED_POSTCOPY_FAILED = 13, /* paused after failed post-copy (Since: v1.3.3) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_PAUSED_LAST @@ -126,8 +126,8 @@ typedef enum { } virDomainPausedReason; typedef enum { - VIR_DOMAIN_SHUTDOWN_UNKNOWN = 0, /* the reason is unknown */ - VIR_DOMAIN_SHUTDOWN_USER = 1, /* shutting down on user request */ + VIR_DOMAIN_SHUTDOWN_UNKNOWN = 0, /* the reason is unknown (Since: v1.0.0) */ + VIR_DOMAIN_SHUTDOWN_USER = 1, /* shutting down on user request (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_SHUTDOWN_LAST @@ -135,25 +135,25 @@ typedef enum { } virDomainShutdownReason; typedef enum { - VIR_DOMAIN_SHUTOFF_UNKNOWN = 0, /* the reason is unknown */ - VIR_DOMAIN_SHUTOFF_SHUTDOWN = 1, /* normal shutdown */ - VIR_DOMAIN_SHUTOFF_DESTROYED = 2, /* forced poweroff */ - VIR_DOMAIN_SHUTOFF_CRASHED = 3, /* domain crashed */ - VIR_DOMAIN_SHUTOFF_MIGRATED = 4, /* migrated to another host */ - VIR_DOMAIN_SHUTOFF_SAVED = 5, /* saved to a file */ - VIR_DOMAIN_SHUTOFF_FAILED = 6, /* domain failed to start */ + VIR_DOMAIN_SHUTOFF_UNKNOWN = 0, /* the reason is unknown (Since: v1.0.0) */ + VIR_DOMAIN_SHUTOFF_SHUTDOWN = 1, /* normal shutdown (Since: v1.0.0) */ + VIR_DOMAIN_SHUTOFF_DESTROYED = 2, /* forced poweroff (Since: v1.0.0) */ + VIR_DOMAIN_SHUTOFF_CRASHED = 3, /* domain crashed (Since: v1.0.0) */ + VIR_DOMAIN_SHUTOFF_MIGRATED = 4, /* migrated to another host (Since: v1.0.0) */ + VIR_DOMAIN_SHUTOFF_SAVED = 5, /* saved to a file (Since: v1.0.0) */ + VIR_DOMAIN_SHUTOFF_FAILED = 6, /* domain failed to start (Since: v1.0.0) */ VIR_DOMAIN_SHUTOFF_FROM_SNAPSHOT = 7, /* restored from a snapshot which was - * taken while domain was shutoff */ + * taken while domain was shutoff (Since: v1.0.0) */ VIR_DOMAIN_SHUTOFF_DAEMON = 8, /* daemon decides to kill domain - during reconnection processing */ + during reconnection processing (Since: v4.10.0) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_SHUTOFF_LAST # endif } virDomainShutoffReason; typedef enum { - VIR_DOMAIN_CRASHED_UNKNOWN = 0, /* crashed for unknown reason */ - VIR_DOMAIN_CRASHED_PANICKED = 1, /* domain panicked */ + VIR_DOMAIN_CRASHED_UNKNOWN = 0, /* crashed for unknown reason (Since: v1.0.0) */ + VIR_DOMAIN_CRASHED_PANICKED = 1, /* domain panicked (Since: v1.1.1) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_CRASHED_LAST @@ -182,14 +182,14 @@ typedef enum { * Current state of a control interface to the domain. */ typedef enum { - VIR_DOMAIN_CONTROL_OK = 0, /* operational, ready to accept commands */ + VIR_DOMAIN_CONTROL_OK = 0, /* operational, ready to accept commands (Since: v1.0.0) */ VIR_DOMAIN_CONTROL_JOB = 1, /* background job is running (can be monitored by virDomainGetJobInfo); only - limited set of commands may be allowed */ - VIR_DOMAIN_CONTROL_OCCUPIED = 2, /* occupied by a running command */ + limited set of commands may be allowed (Since: v1.0.0) */ + VIR_DOMAIN_CONTROL_OCCUPIED = 2, /* occupied by a running command (Since: v1.0.0) */ VIR_DOMAIN_CONTROL_ERROR = 3, /* unusable, domain cannot be fully operated, possible reason is provided - in the details field */ + in the details field (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_CONTROL_LAST @@ -203,13 +203,13 @@ typedef enum { */ typedef enum { VIR_DOMAIN_CONTROL_ERROR_REASON_NONE = 0, /* server didn't provide a - reason */ + reason (Since: v1.2.14) */ VIR_DOMAIN_CONTROL_ERROR_REASON_UNKNOWN = 1, /* unknown reason for the - error */ + error (Since: v1.2.14) */ VIR_DOMAIN_CONTROL_ERROR_REASON_MONITOR = 2, /* monitor connection is - broken */ + broken (Since: v1.2.14) */ VIR_DOMAIN_CONTROL_ERROR_REASON_INTERNAL = 3, /* error caused due to - internal failure in libvirt + internal failure in libvirt (Since: v1.2.14) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_CONTROL_ERROR_REASON_LAST @@ -258,10 +258,10 @@ typedef virDomainControlInfo *virDomainControlInfoPtr; * These enums should not conflict with those of virTypedParameterFlags. */ typedef enum { - VIR_DOMAIN_AFFECT_CURRENT = 0, /* Affect current domain state. */ - VIR_DOMAIN_AFFECT_LIVE = 1 << 0, /* Affect running domain state. */ + VIR_DOMAIN_AFFECT_CURRENT = 0, /* Affect current domain state. (Since: v1.0.0) */ + VIR_DOMAIN_AFFECT_LIVE = 1 << 0, /* Affect running domain state. (Since: v1.0.0) */ VIR_DOMAIN_AFFECT_CONFIG = 1 << 1, /* Affect persistent domain state. */ - /* 1 << 2 is reserved for virTypedParameterFlags */ + /* 1 << 2 is reserved for virTypedParameterFlags (Since: v1.0.0) */ } virDomainModificationImpact; /** @@ -296,13 +296,13 @@ typedef virDomainInfo *virDomainInfoPtr; * Domain. */ typedef enum { - VIR_DOMAIN_NONE = 0, /* Default behavior */ - VIR_DOMAIN_START_PAUSED = 1 << 0, /* Launch guest in paused state */ - VIR_DOMAIN_START_AUTODESTROY = 1 << 1, /* Automatically kill guest when virConnectPtr is closed */ - VIR_DOMAIN_START_BYPASS_CACHE = 1 << 2, /* Avoid file system cache pollution */ - VIR_DOMAIN_START_FORCE_BOOT = 1 << 3, /* Boot, discarding any managed save */ - VIR_DOMAIN_START_VALIDATE = 1 << 4, /* Validate the XML document against schema */ - VIR_DOMAIN_START_RESET_NVRAM = 1 << 5, /* Re-initialize NVRAM from template */ + VIR_DOMAIN_NONE = 0, /* Default behavior (Since: v1.0.0) */ + VIR_DOMAIN_START_PAUSED = 1 << 0, /* Launch guest in paused state (Since: v1.0.0) */ + VIR_DOMAIN_START_AUTODESTROY = 1 << 1, /* Automatically kill guest when virConnectPtr is closed (Since: v1.0.0) */ + VIR_DOMAIN_START_BYPASS_CACHE = 1 << 2, /* Avoid file system cache pollution (Since: v1.0.0) */ + VIR_DOMAIN_START_FORCE_BOOT = 1 << 3, /* Boot, discarding any managed save (Since: v1.0.0) */ + VIR_DOMAIN_START_VALIDATE = 1 << 4, /* Validate the XML document against schema (Since: v1.2.12) */ + VIR_DOMAIN_START_RESET_NVRAM = 1 << 5, /* Re-initialize NVRAM from template (Since: v8.1.0) */ } virDomainCreateFlags; @@ -585,9 +585,9 @@ typedef virDomainInterfaceStatsStruct *virDomainInterfaceStatsPtr; * Memory Statistics Tags: */ typedef enum { - /* The total amount of data read from swap space (in kB). */ + /* The total amount of data read from swap space (in kB). (Since: v1.0.0) */ VIR_DOMAIN_MEMORY_STAT_SWAP_IN = 0, - /* The total amount of memory written out to swap space (in kB). */ + /* The total amount of memory written out to swap space (in kB). (Since: v1.0.0) */ VIR_DOMAIN_MEMORY_STAT_SWAP_OUT = 1, /* @@ -595,6 +595,9 @@ typedef enum { * that is not available. When servicing the page fault, if disk IO is * required, it is considered a major fault. If not, it is a minor fault. * These are expressed as the number of faults that have occurred. + * + * Since: v1.0.0 + * */ VIR_DOMAIN_MEMORY_STAT_MAJOR_FAULT = 2, VIR_DOMAIN_MEMORY_STAT_MINOR_FAULT = 3, @@ -603,6 +606,9 @@ typedef enum { * The amount of memory left completely unused by the system. Memory that * is available but used for reclaimable caches should NOT be reported as * free. This value is expressed in kB. + * + * Since: v1.0.0 + * */ VIR_DOMAIN_MEMORY_STAT_UNUSED = 4, @@ -611,47 +617,77 @@ typedef enum { * may be less than the amount of memory assigned to the domain if a * balloon driver is in use or if the guest OS does not initialize all * assigned pages. This value is expressed in kB. + * + * Since: v1.0.0 + * */ VIR_DOMAIN_MEMORY_STAT_AVAILABLE = 5, - /* Current balloon value (in KB). */ + /* + * Current balloon value (in KB). + * + * Since: v1.0.0 + * + */ VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON = 6, /* Resident Set Size of the process running the domain. This value - * is in kB */ + * is in kB + * + * Since: v1.0.0 + */ VIR_DOMAIN_MEMORY_STAT_RSS = 7, /* * How much the balloon can be inflated without pushing the guest system * to swap, corresponds to 'Available' in /proc/meminfo + * + * Since: v2.1.0 + * */ VIR_DOMAIN_MEMORY_STAT_USABLE = 8, - /* Timestamp of the last update of statistics, in seconds. */ + /* + * Timestamp of the last update of statistics, in seconds. + * + * Since: v2.1.0 + */ VIR_DOMAIN_MEMORY_STAT_LAST_UPDATE = 9, /* * The amount of memory, that can be quickly reclaimed without * additional I/O (in kB). Typically these pages are used for caching files * from disk. + * + * Since: v4.6.0 + * */ VIR_DOMAIN_MEMORY_STAT_DISK_CACHES = 10, /* * The number of successful huge page allocations from inside the domain via * virtio balloon. + * + * Since: v5.4.0 + * */ VIR_DOMAIN_MEMORY_STAT_HUGETLB_PGALLOC = 11, /* * The number of failed huge page allocations from inside the domain via * virtio balloon. + * + * Since: v5.4.0 + * */ VIR_DOMAIN_MEMORY_STAT_HUGETLB_PGFAIL = 12, /* * The number of statistics supported by this version of the interface. * To add new statistics, add them to the enum and increase this value. + * + * Since: v1.0.0 + * */ VIR_DOMAIN_MEMORY_STAT_NR = 13, @@ -672,11 +708,11 @@ typedef virDomainMemoryStatStruct *virDomainMemoryStatPtr; /* Domain core dump flags. */ typedef enum { - VIR_DUMP_CRASH = (1 << 0), /* crash after dump */ - VIR_DUMP_LIVE = (1 << 1), /* live dump */ - VIR_DUMP_BYPASS_CACHE = (1 << 2), /* avoid file system cache pollution */ - VIR_DUMP_RESET = (1 << 3), /* reset domain after dump finishes */ - VIR_DUMP_MEMORY_ONLY = (1 << 4), /* use dump-guest-memory */ + VIR_DUMP_CRASH = (1 << 0), /* crash after dump (Since: v1.0.0) */ + VIR_DUMP_LIVE = (1 << 1), /* live dump (Since: v1.0.0) */ + VIR_DUMP_BYPASS_CACHE = (1 << 2), /* avoid file system cache pollution (Since: v1.0.0) */ + VIR_DUMP_RESET = (1 << 3), /* reset domain after dump finishes (Since: v1.0.0) */ + VIR_DUMP_MEMORY_ONLY = (1 << 4), /* use dump-guest-memory (Since: v1.0.0) */ } virDomainCoreDumpFlags; /** @@ -685,14 +721,14 @@ typedef enum { * Values for specifying different formats of domain core dumps. */ typedef enum { - VIR_DOMAIN_CORE_DUMP_FORMAT_RAW, /* dump guest memory in raw format */ + VIR_DOMAIN_CORE_DUMP_FORMAT_RAW, /* dump guest memory in raw format (Since: v1.2.3) */ VIR_DOMAIN_CORE_DUMP_FORMAT_KDUMP_ZLIB, /* kdump-compressed format, with - * zlib compression */ + * zlib compression (Since: v1.2.3) */ VIR_DOMAIN_CORE_DUMP_FORMAT_KDUMP_LZO, /* kdump-compressed format, with - * lzo compression */ + * lzo compression (Since: v1.2.3) */ VIR_DOMAIN_CORE_DUMP_FORMAT_KDUMP_SNAPPY, /* kdump-compressed format, with - * snappy compression */ - VIR_DOMAIN_CORE_DUMP_FORMAT_WIN_DMP, /* Windows full crashdump format */ + * snappy compression (Since: v1.2.3) */ + VIR_DOMAIN_CORE_DUMP_FORMAT_WIN_DMP, /* Windows full crashdump format (Since: v7.4.0) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_CORE_DUMP_FORMAT_LAST /* @@ -710,6 +746,9 @@ typedef enum { * The migration may never converge if the domain is changing its memory * faster then it can be transferred. The domain can be manually paused * anytime during migration using virDomainSuspend. + * + * Since: v1.0.0 + * */ VIR_MIGRATE_LIVE = (1 << 0), @@ -718,6 +757,9 @@ typedef enum { * controls the migration process. In peer-to-peer mode, the source * libvirtd controls the migration by calling the destination daemon * directly. + * + * Since: v1.0.0 + * */ VIR_MIGRATE_PEER2PEER = (1 << 1), @@ -728,6 +770,9 @@ typedef enum { * * Note the less-common spelling that we're stuck with: * VIR_MIGRATE_TUNNELLED should be VIR_MIGRATE_TUNNELED. + * + * Since: v1.0.0 + * */ VIR_MIGRATE_TUNNELLED = (1 << 2), @@ -735,17 +780,26 @@ typedef enum { * migration. If the domain was persistent on the source host and * VIR_MIGRATE_UNDEFINE_SOURCE is not used, it will end up persistent on * both hosts. + * + * Since: v1.0.0 + * */ VIR_MIGRATE_PERSIST_DEST = (1 << 3), /* Undefine the domain on the source host once migration successfully * finishes. + * + * Since: v1.0.0 + * */ VIR_MIGRATE_UNDEFINE_SOURCE = (1 << 4), /* Leave the domain suspended on the destination host. virDomainResume (on * the virDomainPtr returned by the migration API) has to be called * explicitly to resume domain's virtual CPUs. + * + * Since: v1.0.0 + * */ VIR_MIGRATE_PAUSED = (1 << 5), @@ -755,6 +809,9 @@ typedef enum { * disks should be migrated. * * This flag and VIR_MIGRATE_NON_SHARED_INC are mutually exclusive. + * + * Since: v1.0.0 + * */ VIR_MIGRATE_NON_SHARED_DISK = (1 << 6), @@ -765,6 +822,9 @@ typedef enum { * on the source host. * * This flag and VIR_MIGRATE_NON_SHARED_DISK are mutually exclusive. + * + * Since: v1.0.0 + * */ VIR_MIGRATE_NON_SHARED_INC = (1 << 7), @@ -772,6 +832,9 @@ typedef enum { * process. This flag is used automatically when both sides support it. * Explicitly setting this flag will cause migration to fail if either the * source or the destination does not support it. + * + * Since: v1.0.0 + * */ VIR_MIGRATE_CHANGE_PROTECTION = (1 << 8), @@ -782,6 +845,9 @@ typedef enum { * without explicitly setting cache mode to "none". Migrating such domains * is unsafe unless the disk images are stored on coherent clustered * filesystem, such as GFS2 or GPFS. + * + * Since: v1.0.0 + * */ VIR_MIGRATE_UNSAFE = (1 << 9), @@ -791,6 +857,9 @@ typedef enum { * * Offline migration may not copy disk storage or any other file based * storage (such as UEFI variables). + * + * Since: v1.0.1 + * */ VIR_MIGRATE_OFFLINE = (1 << 10), @@ -798,11 +867,17 @@ typedef enum { * VIR_MIGRATE_PARAM_COMPRESSION. A hypervisor default method will be used * if this parameter is omitted. Individual compression methods can be * tuned via their specific VIR_MIGRATE_PARAM_COMPRESSION_* parameters. + * + * Since: v1.0.3 + * */ VIR_MIGRATE_COMPRESSED = (1 << 11), /* Cancel migration if a soft error (such as I/O error) happens during * migration. + * + * Since: v1.1.0 + * */ VIR_MIGRATE_ABORT_ON_ERROR = (1 << 12), @@ -811,6 +886,9 @@ typedef enum { * not change its memory faster than a hypervisor can transfer the changed * memory to the destination host. VIR_MIGRATE_PARAM_AUTO_CONVERGE_* * parameters can be used to tune the algorithm. + * + * Since: v1.2.3 + * */ VIR_MIGRATE_AUTO_CONVERGE = (1 << 13), @@ -828,6 +906,9 @@ typedef enum { * most of the host's memory). Doing so may be dangerous to both the * domain and the host itself since the host's kernel may run out of * memory. + * + * Since: v1.2.9 + * */ VIR_MIGRATE_RDMA_PIN_ALL = (1 << 14), @@ -835,6 +916,9 @@ typedef enum { * migration. However, the migration will start normally and * virDomainMigrateStartPostCopy needs to be called to switch it into the * post-copy mode. See virDomainMigrateStartPostCopy for more details. + * + * Since: v1.3.3 + * */ VIR_MIGRATE_POSTCOPY = (1 << 15), @@ -842,12 +926,18 @@ typedef enum { * to use the TLS environment configured by the hypervisor in order to * perform the migration. If incorrectly configured on either source or * destination, the migration will fail. + * + * Since: v3.2.0 + * */ VIR_MIGRATE_TLS = (1 << 16), /* Send memory pages to the destination host through several network * connections. See VIR_MIGRATE_PARAM_PARALLEL_* parameters for * configuring the parallel migration. + * + * Since: v5.2.0 + * */ VIR_MIGRATE_PARALLEL = (1 << 17), @@ -858,6 +948,9 @@ typedef enum { * * Requires one of VIR_MIGRATE_NON_SHARED_DISK, VIR_MIGRATE_NON_SHARED_INC * to be present as well. + * + * Since: v8.0.0 + * */ VIR_MIGRATE_NON_SHARED_SYNCHRONOUS_WRITES = (1 << 18), @@ -1138,7 +1231,7 @@ int virDomainMigrateSetCompressionCache(virDomainPtr domain, /* Domain migration speed flags. */ typedef enum { - /* Set or get maximum speed of post-copy migration. */ + /* Set or get maximum speed of post-copy migration. (Since: v5.1.0) */ VIR_DOMAIN_MIGRATE_MAX_SPEED_POSTCOPY = (1 << 0), } virDomainMigrateMaxSpeedFlags; @@ -1200,12 +1293,12 @@ virDomainPtr virDomainLookupByUUIDString (virConnectPtr conn, const char *uuid); typedef enum { - VIR_DOMAIN_SHUTDOWN_DEFAULT = 0, /* hypervisor choice */ - VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN = (1 << 0), /* Send ACPI event */ - VIR_DOMAIN_SHUTDOWN_GUEST_AGENT = (1 << 1), /* Use guest agent */ - VIR_DOMAIN_SHUTDOWN_INITCTL = (1 << 2), /* Use initctl */ - VIR_DOMAIN_SHUTDOWN_SIGNAL = (1 << 3), /* Send a signal */ - VIR_DOMAIN_SHUTDOWN_PARAVIRT = (1 << 4), /* Use paravirt guest control */ + VIR_DOMAIN_SHUTDOWN_DEFAULT = 0, /* hypervisor choice (Since: v1.0.0) */ + VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN = (1 << 0), /* Send ACPI event (Since: v1.0.0) */ + VIR_DOMAIN_SHUTDOWN_GUEST_AGENT = (1 << 1), /* Use guest agent (Since: v1.0.0) */ + VIR_DOMAIN_SHUTDOWN_INITCTL = (1 << 2), /* Use initctl (Since: v1.0.1) */ + VIR_DOMAIN_SHUTDOWN_SIGNAL = (1 << 3), /* Send a signal (Since: v1.0.1) */ + VIR_DOMAIN_SHUTDOWN_PARAVIRT = (1 << 4), /* Use paravirt guest control (Since: v1.2.5) */ } virDomainShutdownFlagValues; int virDomainShutdown (virDomainPtr domain); @@ -1213,12 +1306,12 @@ int virDomainShutdownFlags (virDomainPtr domain, unsigned int flags); typedef enum { - VIR_DOMAIN_REBOOT_DEFAULT = 0, /* hypervisor choice */ - VIR_DOMAIN_REBOOT_ACPI_POWER_BTN = (1 << 0), /* Send ACPI event */ - VIR_DOMAIN_REBOOT_GUEST_AGENT = (1 << 1), /* Use guest agent */ - VIR_DOMAIN_REBOOT_INITCTL = (1 << 2), /* Use initctl */ - VIR_DOMAIN_REBOOT_SIGNAL = (1 << 3), /* Send a signal */ - VIR_DOMAIN_REBOOT_PARAVIRT = (1 << 4), /* Use paravirt guest control */ + VIR_DOMAIN_REBOOT_DEFAULT = 0, /* hypervisor choice (Since: v1.0.0) */ + VIR_DOMAIN_REBOOT_ACPI_POWER_BTN = (1 << 0), /* Send ACPI event (Since: v1.0.0) */ + VIR_DOMAIN_REBOOT_GUEST_AGENT = (1 << 1), /* Use guest agent (Since: v1.0.0) */ + VIR_DOMAIN_REBOOT_INITCTL = (1 << 2), /* Use initctl (Since: v1.0.1) */ + VIR_DOMAIN_REBOOT_SIGNAL = (1 << 3), /* Send a signal (Since: v1.0.1) */ + VIR_DOMAIN_REBOOT_PARAVIRT = (1 << 4), /* Use paravirt guest control (Since: v1.2.5) */ } virDomainRebootFlagValues; int virDomainReboot (virDomainPtr domain, @@ -1235,9 +1328,9 @@ int virDomainDestroy (virDomainPtr domain); * virDomainDestroyFlags() function */ typedef enum { - VIR_DOMAIN_DESTROY_DEFAULT = 0, /* Default behavior - could lead to data loss!! */ - VIR_DOMAIN_DESTROY_GRACEFUL = 1 << 0, /* only SIGTERM, no SIGKILL */ - VIR_DOMAIN_DESTROY_REMOVE_LOGS = 1 << 1, /* remove VM logs on destroy */ + VIR_DOMAIN_DESTROY_DEFAULT = 0, /* Default behavior - could lead to data loss!! (Since: v1.0.0) */ + VIR_DOMAIN_DESTROY_GRACEFUL = 1 << 0, /* only SIGTERM, no SIGKILL (Since: v1.0.0) */ + VIR_DOMAIN_DESTROY_REMOVE_LOGS = 1 << 1, /* remove VM logs on destroy (Since: v8.3.0) */ } virDomainDestroyFlagsValues; int virDomainDestroyFlags (virDomainPtr domain, @@ -1267,10 +1360,10 @@ int virDomainPMWakeup (virDomainPtr domain, * flags apply to all these functions. */ typedef enum { - VIR_DOMAIN_SAVE_BYPASS_CACHE = 1 << 0, /* Avoid file system cache pollution */ - VIR_DOMAIN_SAVE_RUNNING = 1 << 1, /* Favor running over paused */ - VIR_DOMAIN_SAVE_PAUSED = 1 << 2, /* Favor paused over running */ - VIR_DOMAIN_SAVE_RESET_NVRAM = 1 << 3, /* Re-initialize NVRAM from template */ + VIR_DOMAIN_SAVE_BYPASS_CACHE = 1 << 0, /* Avoid file system cache pollution (Since: v1.0.0) */ + VIR_DOMAIN_SAVE_RUNNING = 1 << 1, /* Favor running over paused (Since: v1.0.0) */ + VIR_DOMAIN_SAVE_PAUSED = 1 << 2, /* Favor paused over running (Since: v1.0.0) */ + VIR_DOMAIN_SAVE_RESET_NVRAM = 1 << 3, /* Re-initialize NVRAM from template (Since: v8.1.0) */ } virDomainSaveRestoreFlags; int virDomainSave (virDomainPtr domain, @@ -1520,12 +1613,12 @@ int virDomainGetMemoryParameters(virDomainPtr domain, /* Memory size modification flags. */ typedef enum { - /* See virDomainModificationImpact for these flags. */ + /* See virDomainModificationImpact for these flags. (Since: v1.0.0) */ VIR_DOMAIN_MEM_CURRENT = VIR_DOMAIN_AFFECT_CURRENT, VIR_DOMAIN_MEM_LIVE = VIR_DOMAIN_AFFECT_LIVE, VIR_DOMAIN_MEM_CONFIG = VIR_DOMAIN_AFFECT_CONFIG, - /* Additionally, these flags may be bitwise-OR'd in. */ + /* Additionally, these flags may be bitwise-OR'd in. (Since: v1.0.0) */ VIR_DOMAIN_MEM_MAXIMUM = (1 << 2), /* affect Max rather than current */ } virDomainMemoryModFlags; @@ -1544,7 +1637,7 @@ typedef enum { VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE = 3, # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_NUMATUNE_MEM_LAST /* This constant is subject to change */ + VIR_DOMAIN_NUMATUNE_MEM_LAST /* This constant is subject to change (Since: v1.0.0) */ # endif } virDomainNumatuneMemMode; @@ -1597,8 +1690,8 @@ int virDomainGetSecurityLabel (virDomainPtr domain, virSecurityLabelPtr seclabel); typedef enum { - VIR_DOMAIN_GET_HOSTNAME_LEASE = (1 << 0), /* Parse DHCP lease file */ - VIR_DOMAIN_GET_HOSTNAME_AGENT = (1 << 1), /* Query qemu guest agent */ + VIR_DOMAIN_GET_HOSTNAME_LEASE = (1 << 0), /* Parse DHCP lease file (Since: v6.1.0) */ + VIR_DOMAIN_GET_HOSTNAME_AGENT = (1 << 1), /* Query qemu guest agent (Since: v6.1.0) */ } virDomainGetHostnameFlags; char * virDomainGetHostname (virDomainPtr domain, @@ -1607,9 +1700,9 @@ int virDomainGetSecurityLabelList (virDomainPtr domain, virSecurityLabelPtr* seclabels); typedef enum { - VIR_DOMAIN_METADATA_DESCRIPTION = 0, /* Operate on <description> */ - VIR_DOMAIN_METADATA_TITLE = 1, /* Operate on <title> */ - VIR_DOMAIN_METADATA_ELEMENT = 2, /* Operate on <metadata> */ + VIR_DOMAIN_METADATA_DESCRIPTION = 0, /* Operate on <description> (Since: v1.0.0) */ + VIR_DOMAIN_METADATA_TITLE = 1, /* Operate on <title> (Since: v1.0.0) */ + VIR_DOMAIN_METADATA_ELEMENT = 2, /* Operate on <metadata> (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_METADATA_LAST @@ -1640,14 +1733,14 @@ virDomainGetMetadata(virDomainPtr domain, */ typedef enum { - VIR_DOMAIN_XML_SECURE = (1 << 0), /* dump security sensitive information too */ - VIR_DOMAIN_XML_INACTIVE = (1 << 1), /* dump inactive domain information */ - VIR_DOMAIN_XML_UPDATE_CPU = (1 << 2), /* update guest CPU requirements according to host CPU */ - VIR_DOMAIN_XML_MIGRATABLE = (1 << 3), /* dump XML suitable for migration */ + VIR_DOMAIN_XML_SECURE = (1 << 0), /* dump security sensitive information too (Since: v1.0.0) */ + VIR_DOMAIN_XML_INACTIVE = (1 << 1), /* dump inactive domain information (Since: v1.0.0) */ + VIR_DOMAIN_XML_UPDATE_CPU = (1 << 2), /* update guest CPU requirements according to host CPU (Since: v1.0.0) */ + VIR_DOMAIN_XML_MIGRATABLE = (1 << 3), /* dump XML suitable for migration (Since: v1.0.0) */ } virDomainXMLFlags; typedef enum { - VIR_DOMAIN_SAVE_IMAGE_XML_SECURE = VIR_DOMAIN_XML_SECURE, /* dump security sensitive information too */ + VIR_DOMAIN_SAVE_IMAGE_XML_SECURE = VIR_DOMAIN_XML_SECURE, /* dump security sensitive information too (Since: v5.1.0) */ } virDomainSaveImageXMLFlags; char * virDomainGetXMLDesc (virDomainPtr domain, @@ -1752,7 +1845,7 @@ int virDomainBlockPeek (virDomainPtr dom, * Flags available for virDomainBlockResize(). */ typedef enum { - VIR_DOMAIN_BLOCK_RESIZE_BYTES = 1 << 0, /* size in bytes instead of KiB */ + VIR_DOMAIN_BLOCK_RESIZE_BYTES = 1 << 0, /* size in bytes instead of KiB (Since: v1.0.0) */ } virDomainBlockResizeFlags; int virDomainBlockResize (virDomainPtr dom, @@ -1814,8 +1907,8 @@ int virDomainMemoryStats (virDomainPtr dom, /* Memory peeking flags. */ typedef enum { - VIR_MEMORY_VIRTUAL = 1 << 0, /* addresses are virtual addresses */ - VIR_MEMORY_PHYSICAL = 1 << 1, /* addresses are physical addresses */ + VIR_MEMORY_VIRTUAL = 1 << 0, /* addresses are virtual addresses (Since: v1.0.0) */ + VIR_MEMORY_PHYSICAL = 1 << 1, /* addresses are physical addresses (Since: v1.0.0) */ } virDomainMemoryFlags; int virDomainMemoryPeek (virDomainPtr dom, @@ -1825,7 +1918,7 @@ int virDomainMemoryPeek (virDomainPtr dom, unsigned int flags); typedef enum { - VIR_DOMAIN_DEFINE_VALIDATE = (1 << 0), /* Validate the XML document against schema */ + VIR_DOMAIN_DEFINE_VALIDATE = (1 << 0), /* Validate the XML document against schema (Since: v1.2.12) */ } virDomainDefineFlags; /* @@ -1841,18 +1934,18 @@ int virDomainUndefine (virDomainPtr domain); typedef enum { VIR_DOMAIN_UNDEFINE_MANAGED_SAVE = (1 << 0), /* Also remove any - managed save */ + managed save (Since: v1.0.0) */ VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA = (1 << 1), /* If last use of domain, then also remove any - snapshot metadata */ + snapshot metadata (Since: v1.0.0) */ VIR_DOMAIN_UNDEFINE_NVRAM = (1 << 2), /* Also remove any - nvram file */ - VIR_DOMAIN_UNDEFINE_KEEP_NVRAM = (1 << 3), /* Keep nvram file */ + nvram file (Since: v1.2.9) */ + VIR_DOMAIN_UNDEFINE_KEEP_NVRAM = (1 << 3), /* Keep nvram file (Since: v2.3.0) */ VIR_DOMAIN_UNDEFINE_CHECKPOINTS_METADATA = (1 << 4), /* If last use of domain, then also remove any checkpoint metadata */ - /* Future undefine control flags should come here. */ + /* Future undefine control flags should come here. (Since: v5.6.0) */ } virDomainUndefineFlagsValues; @@ -1916,9 +2009,9 @@ int virDomainSetAutostart (virDomainPtr domain, */ typedef enum { - VIR_VCPU_OFFLINE = 0, /* the virtual CPU is offline */ - VIR_VCPU_RUNNING = 1, /* the virtual CPU is running */ - VIR_VCPU_BLOCKED = 2, /* the virtual CPU is blocked on resource */ + VIR_VCPU_OFFLINE = 0, /* the virtual CPU is offline (Since: v1.0.0) */ + VIR_VCPU_RUNNING = 1, /* the virtual CPU is running (Since: v1.0.0) */ + VIR_VCPU_BLOCKED = 2, /* the virtual CPU is blocked on resource (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS VIR_VCPU_LAST @@ -1926,8 +2019,8 @@ typedef enum { } virVcpuState; typedef enum { - VIR_VCPU_INFO_CPU_OFFLINE = -1, /* the vCPU is offline */ - VIR_VCPU_INFO_CPU_UNAVAILABLE = -2, /* the hypervisor does not expose real CPU information */ + VIR_VCPU_INFO_CPU_OFFLINE = -1, /* the vCPU is offline (Since: v6.10.0) */ + VIR_VCPU_INFO_CPU_UNAVAILABLE = -2, /* the hypervisor does not expose real CPU information (Since: v6.10.0) */ } virVcpuHostCpuState; typedef struct _virVcpuInfo virVcpuInfo; @@ -1941,14 +2034,14 @@ typedef virVcpuInfo *virVcpuInfoPtr; /* Flags for controlling virtual CPU hot-plugging. */ typedef enum { - /* See virDomainModificationImpact for these flags. */ + /* See virDomainModificationImpact for these flags. (Since: v1.0.0) */ VIR_DOMAIN_VCPU_CURRENT = VIR_DOMAIN_AFFECT_CURRENT, VIR_DOMAIN_VCPU_LIVE = VIR_DOMAIN_AFFECT_LIVE, VIR_DOMAIN_VCPU_CONFIG = VIR_DOMAIN_AFFECT_CONFIG, - /* Additionally, these flags may be bitwise-OR'd in. */ - VIR_DOMAIN_VCPU_MAXIMUM = (1 << 2), /* Max rather than current count */ - VIR_DOMAIN_VCPU_GUEST = (1 << 3), /* Modify state of the cpu in the guest */ + /* Additionally, these flags may be bitwise-OR'd in. (Since: v1.0.0) */ + VIR_DOMAIN_VCPU_MAXIMUM = (1 << 2), /* Max rather than current count (Since: v1.1.0) */ + VIR_DOMAIN_VCPU_GUEST = (1 << 3), /* Modify state of the cpu in the guest (Since: v2.4.0) */ VIR_DOMAIN_VCPU_HOTPLUGGABLE = (1 << 4), /* Make vcpus added hot(un)pluggable */ } virDomainVcpuFlags; @@ -2159,12 +2252,12 @@ int virDomainGetVcpus (virDomainPtr domain, typedef enum { - /* See virDomainModificationImpact for these flags. */ + /* See virDomainModificationImpact for these flags. (Since: v1.0.0) */ VIR_DOMAIN_DEVICE_MODIFY_CURRENT = VIR_DOMAIN_AFFECT_CURRENT, VIR_DOMAIN_DEVICE_MODIFY_LIVE = VIR_DOMAIN_AFFECT_LIVE, VIR_DOMAIN_DEVICE_MODIFY_CONFIG = VIR_DOMAIN_AFFECT_CONFIG, - /* Additionally, these flags may be bitwise-OR'd in. */ + /* Additionally, these flags may be bitwise-OR'd in. (Since: v1.0.0) */ VIR_DOMAIN_DEVICE_MODIFY_FORCE = (1 << 2), /* Forcibly modify device (ex. force eject a cdrom) */ } virDomainDeviceModifyFlags; @@ -2191,16 +2284,16 @@ struct _virDomainStatsRecord { }; typedef enum { - VIR_DOMAIN_STATS_STATE = (1 << 0), /* return domain state */ - VIR_DOMAIN_STATS_CPU_TOTAL = (1 << 1), /* return domain CPU info */ - VIR_DOMAIN_STATS_BALLOON = (1 << 2), /* return domain balloon info */ - VIR_DOMAIN_STATS_VCPU = (1 << 3), /* return domain virtual CPU info */ - VIR_DOMAIN_STATS_INTERFACE = (1 << 4), /* return domain interfaces info */ - VIR_DOMAIN_STATS_BLOCK = (1 << 5), /* return domain block info */ - VIR_DOMAIN_STATS_PERF = (1 << 6), /* return domain perf event info */ - VIR_DOMAIN_STATS_IOTHREAD = (1 << 7), /* return iothread poll info */ - VIR_DOMAIN_STATS_MEMORY = (1 << 8), /* return domain memory info */ - VIR_DOMAIN_STATS_DIRTYRATE = (1 << 9), /* return domain dirty rate info */ + VIR_DOMAIN_STATS_STATE = (1 << 0), /* return domain state (Since: v1.2.8) */ + VIR_DOMAIN_STATS_CPU_TOTAL = (1 << 1), /* return domain CPU info (Since: v1.2.9) */ + VIR_DOMAIN_STATS_BALLOON = (1 << 2), /* return domain balloon info (Since: v1.2.9) */ + VIR_DOMAIN_STATS_VCPU = (1 << 3), /* return domain virtual CPU info (Since: v1.2.9) */ + VIR_DOMAIN_STATS_INTERFACE = (1 << 4), /* return domain interfaces info (Since: v1.2.9) */ + VIR_DOMAIN_STATS_BLOCK = (1 << 5), /* return domain block info (Since: v1.2.9) */ + VIR_DOMAIN_STATS_PERF = (1 << 6), /* return domain perf event info (Since: v1.3.3) */ + VIR_DOMAIN_STATS_IOTHREAD = (1 << 7), /* return iothread poll info (Since: v4.10.0) */ + VIR_DOMAIN_STATS_MEMORY = (1 << 8), /* return domain memory info (Since: v6.0.0) */ + VIR_DOMAIN_STATS_DIRTYRATE = (1 << 9), /* return domain dirty rate info (Since: v7.2.0) */ } virDomainStatsTypes; typedef enum { @@ -2216,9 +2309,9 @@ typedef enum { VIR_CONNECT_GET_ALL_DOMAINS_STATS_OTHER = VIR_CONNECT_LIST_DOMAINS_OTHER, VIR_CONNECT_GET_ALL_DOMAINS_STATS_NOWAIT = 1 << 29, /* report statistics that can be obtained - immediately without any blocking */ - VIR_CONNECT_GET_ALL_DOMAINS_STATS_BACKING = 1 << 30, /* include backing chain for block stats */ - VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS = 1U << 31, /* enforce requested stats */ + immediately without any blocking (Since: v4.5.0) */ + VIR_CONNECT_GET_ALL_DOMAINS_STATS_BACKING = 1 << 30, /* include backing chain for block stats (Since: v1.2.12) */ + VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS = 1U << 31, /* enforce requested stats (Since: v1.2.8) */ } virConnectGetAllDomainStatsFlags; int virConnectGetAllDomainStats(virConnectPtr conn, @@ -2482,26 +2575,41 @@ int virDomainSetPerfEvents(virDomainPtr dom, * Describes various possible block jobs. */ typedef enum { - /* Placeholder */ + /* Placeholder (Since: v1.0.0) */ VIR_DOMAIN_BLOCK_JOB_TYPE_UNKNOWN = 0, /* Block Pull (virDomainBlockPull, or virDomainBlockRebase without - * flags), job ends on completion */ + * flags), job ends on completion + * + * Since: v1.0.0 + */ VIR_DOMAIN_BLOCK_JOB_TYPE_PULL = 1, /* Block Copy (virDomainBlockCopy, or virDomainBlockRebase with - * flags), job exists as long as mirroring is active */ + * flags), job exists as long as mirroring is active + * + * Since: v1.0.0 + */ VIR_DOMAIN_BLOCK_JOB_TYPE_COPY = 2, /* Block Commit (virDomainBlockCommit without flags), job ends on - * completion */ + * completion + * + * Since: v1.0.0 + */ VIR_DOMAIN_BLOCK_JOB_TYPE_COMMIT = 3, /* Active Block Commit (virDomainBlockCommit with flags), job - * exists as long as sync is active */ + * exists as long as sync is active + * + * Since: v1.2.6 + */ VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT = 4, - /* Backup (virDomainBackupBegin) */ + /* Backup (virDomainBackupBegin) + * + * Since: v6.0.0 + */ VIR_DOMAIN_BLOCK_JOB_TYPE_BACKUP = 5, # ifdef VIR_ENUM_SENTINELS @@ -2527,7 +2635,7 @@ int virDomainBlockJobAbort(virDomainPtr dom, const char *disk, /* Flags for use with virDomainGetBlockJobInfo */ typedef enum { VIR_DOMAIN_BLOCK_JOB_INFO_BANDWIDTH_BYTES = 1 << 0, /* bandwidth in bytes/s - instead of MiB/s */ + instead of MiB/s (Since: v1.2.9) */ } virDomainBlockJobInfoFlags; /* An iterator for monitoring block job operations */ @@ -2556,7 +2664,7 @@ int virDomainGetBlockJobInfo(virDomainPtr dom, const char *disk, /* Flags for use with virDomainBlockJobSetSpeed */ typedef enum { VIR_DOMAIN_BLOCK_JOB_SPEED_BANDWIDTH_BYTES = 1 << 0, /* bandwidth in bytes/s - instead of MiB/s */ + instead of MiB/s (Since: v1.2.9) */ } virDomainBlockJobSetSpeedFlags; int virDomainBlockJobSetSpeed(virDomainPtr dom, const char *disk, @@ -2566,7 +2674,7 @@ int virDomainBlockJobSetSpeed(virDomainPtr dom, const char *disk, * of the flags for virDomainBlockRebase) */ typedef enum { VIR_DOMAIN_BLOCK_PULL_BANDWIDTH_BYTES = 1 << 6, /* bandwidth in bytes/s - instead of MiB/s */ + instead of MiB/s (Since: v1.2.9) */ } virDomainBlockPullFlags; int virDomainBlockPull(virDomainPtr dom, const char *disk, @@ -2579,18 +2687,18 @@ int virDomainBlockPull(virDomainPtr dom, const char *disk, */ typedef enum { VIR_DOMAIN_BLOCK_REBASE_SHALLOW = 1 << 0, /* Limit copy to top of source - backing chain */ + backing chain (Since: v1.0.0) */ VIR_DOMAIN_BLOCK_REBASE_REUSE_EXT = 1 << 1, /* Reuse existing external - file for a copy */ - VIR_DOMAIN_BLOCK_REBASE_COPY_RAW = 1 << 2, /* Make destination file raw */ - VIR_DOMAIN_BLOCK_REBASE_COPY = 1 << 3, /* Start a copy job */ + file for a copy (Since: v1.0.0) */ + VIR_DOMAIN_BLOCK_REBASE_COPY_RAW = 1 << 2, /* Make destination file raw (Since: v1.0.0) */ + VIR_DOMAIN_BLOCK_REBASE_COPY = 1 << 3, /* Start a copy job (Since: v1.0.0) */ VIR_DOMAIN_BLOCK_REBASE_RELATIVE = 1 << 4, /* Keep backing chain referenced using relative - names */ + names (Since: v1.2.7) */ VIR_DOMAIN_BLOCK_REBASE_COPY_DEV = 1 << 5, /* Treat destination as block - device instead of file */ + device instead of file (Since: v1.2.9) */ VIR_DOMAIN_BLOCK_REBASE_BANDWIDTH_BYTES = 1 << 6, /* bandwidth in bytes/s - instead of MiB/s */ + instead of MiB/s (Since: v1.2.9) */ } virDomainBlockRebaseFlags; int virDomainBlockRebase(virDomainPtr dom, const char *disk, @@ -2603,17 +2711,20 @@ int virDomainBlockRebase(virDomainPtr dom, const char *disk, * Flags available for virDomainBlockCopy(). */ typedef enum { - /* Limit copy to top of source backing chain */ + /* Limit copy to top of source backing chain (Since: v1.2.8) */ VIR_DOMAIN_BLOCK_COPY_SHALLOW = 1 << 0, - /* Reuse existing external file for a copy */ + /* Reuse existing external file for a copy (Since: v1.2.8) */ VIR_DOMAIN_BLOCK_COPY_REUSE_EXT = 1 << 1, - /* Don't force usage of recoverable job for the copy operation */ + /* Don't force usage of recoverable job for the copy operation (Since: v3.5.0) */ VIR_DOMAIN_BLOCK_COPY_TRANSIENT_JOB = 1 << 2, /* Force the copy job to synchronously propagate guest writes into - * the destination image, so that the copy is guaranteed to converge */ + * the destination image, so that the copy is guaranteed to converge + * + * Since: v8.0.0 + */ VIR_DOMAIN_BLOCK_COPY_SYNCHRONOUS_WRITES = 1 << 3, } virDomainBlockCopyFlags; @@ -2669,17 +2780,17 @@ int virDomainBlockCopy(virDomainPtr dom, const char *disk, */ typedef enum { VIR_DOMAIN_BLOCK_COMMIT_SHALLOW = 1 << 0, /* NULL base means next backing - file, not whole chain */ + file, not whole chain (Since: v1.0.0) */ VIR_DOMAIN_BLOCK_COMMIT_DELETE = 1 << 1, /* Delete any files that are now invalid after their contents - have been committed */ + have been committed (Since: v1.0.0) */ VIR_DOMAIN_BLOCK_COMMIT_ACTIVE = 1 << 2, /* Allow a two-phase commit when - top is the active layer */ + top is the active layer (Since: v1.2.6) */ VIR_DOMAIN_BLOCK_COMMIT_RELATIVE = 1 << 3, /* keep the backing chain referenced using relative - names */ + names (Since: v1.2.7) */ VIR_DOMAIN_BLOCK_COMMIT_BANDWIDTH_BYTES = 1 << 4, /* bandwidth in bytes/s - instead of MiB/s */ + instead of MiB/s (Since: v1.2.9) */ } virDomainBlockCommitFlags; int virDomainBlockCommit(virDomainPtr dom, const char *disk, const char *base, @@ -2864,9 +2975,9 @@ virDomainGetBlockIoTune(virDomainPtr dom, * Disk I/O error. */ typedef enum { - VIR_DOMAIN_DISK_ERROR_NONE = 0, /* no error */ - VIR_DOMAIN_DISK_ERROR_UNSPEC = 1, /* unspecified I/O error */ - VIR_DOMAIN_DISK_ERROR_NO_SPACE = 2, /* no space left on the device */ + VIR_DOMAIN_DISK_ERROR_NONE = 0, /* no error (Since: v1.0.0) */ + VIR_DOMAIN_DISK_ERROR_UNSPEC = 1, /* unspecified I/O error (Since: v1.0.0) */ + VIR_DOMAIN_DISK_ERROR_NO_SPACE = 2, /* no space left on the device (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_DISK_ERROR_LAST @@ -2951,77 +3062,77 @@ int virDomainSendKey(virDomainPtr domain, * mapping in Linux. */ typedef enum { - VIR_DOMAIN_PROCESS_SIGNAL_NOP = 0, /* No constant in POSIX/Linux */ - VIR_DOMAIN_PROCESS_SIGNAL_HUP = 1, /* SIGHUP */ - VIR_DOMAIN_PROCESS_SIGNAL_INT = 2, /* SIGINT */ - VIR_DOMAIN_PROCESS_SIGNAL_QUIT = 3, /* SIGQUIT */ - VIR_DOMAIN_PROCESS_SIGNAL_ILL = 4, /* SIGILL */ - VIR_DOMAIN_PROCESS_SIGNAL_TRAP = 5, /* SIGTRAP */ - VIR_DOMAIN_PROCESS_SIGNAL_ABRT = 6, /* SIGABRT */ - VIR_DOMAIN_PROCESS_SIGNAL_BUS = 7, /* SIGBUS */ - VIR_DOMAIN_PROCESS_SIGNAL_FPE = 8, /* SIGFPE */ - VIR_DOMAIN_PROCESS_SIGNAL_KILL = 9, /* SIGKILL */ - - VIR_DOMAIN_PROCESS_SIGNAL_USR1 = 10, /* SIGUSR1 */ - VIR_DOMAIN_PROCESS_SIGNAL_SEGV = 11, /* SIGSEGV */ - VIR_DOMAIN_PROCESS_SIGNAL_USR2 = 12, /* SIGUSR2 */ - VIR_DOMAIN_PROCESS_SIGNAL_PIPE = 13, /* SIGPIPE */ - VIR_DOMAIN_PROCESS_SIGNAL_ALRM = 14, /* SIGALRM */ - VIR_DOMAIN_PROCESS_SIGNAL_TERM = 15, /* SIGTERM */ - VIR_DOMAIN_PROCESS_SIGNAL_STKFLT = 16, /* Not in POSIX (SIGSTKFLT on Linux )*/ - VIR_DOMAIN_PROCESS_SIGNAL_CHLD = 17, /* SIGCHLD */ - VIR_DOMAIN_PROCESS_SIGNAL_CONT = 18, /* SIGCONT */ - VIR_DOMAIN_PROCESS_SIGNAL_STOP = 19, /* SIGSTOP */ - - VIR_DOMAIN_PROCESS_SIGNAL_TSTP = 20, /* SIGTSTP */ - VIR_DOMAIN_PROCESS_SIGNAL_TTIN = 21, /* SIGTTIN */ - VIR_DOMAIN_PROCESS_SIGNAL_TTOU = 22, /* SIGTTOU */ - VIR_DOMAIN_PROCESS_SIGNAL_URG = 23, /* SIGURG */ - VIR_DOMAIN_PROCESS_SIGNAL_XCPU = 24, /* SIGXCPU */ - VIR_DOMAIN_PROCESS_SIGNAL_XFSZ = 25, /* SIGXFSZ */ - VIR_DOMAIN_PROCESS_SIGNAL_VTALRM = 26, /* SIGVTALRM */ - VIR_DOMAIN_PROCESS_SIGNAL_PROF = 27, /* SIGPROF */ - VIR_DOMAIN_PROCESS_SIGNAL_WINCH = 28, /* Not in POSIX (SIGWINCH on Linux) */ - VIR_DOMAIN_PROCESS_SIGNAL_POLL = 29, /* SIGPOLL (also known as SIGIO on Linux) */ - - VIR_DOMAIN_PROCESS_SIGNAL_PWR = 30, /* Not in POSIX (SIGPWR on Linux) */ - VIR_DOMAIN_PROCESS_SIGNAL_SYS = 31, /* SIGSYS (also known as SIGUNUSED on Linux) */ - VIR_DOMAIN_PROCESS_SIGNAL_RT0 = 32, /* SIGRTMIN */ + VIR_DOMAIN_PROCESS_SIGNAL_NOP = 0, /* No constant in POSIX/Linux (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_HUP = 1, /* SIGHUP (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_INT = 2, /* SIGINT (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_QUIT = 3, /* SIGQUIT (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_ILL = 4, /* SIGILL (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_TRAP = 5, /* SIGTRAP (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_ABRT = 6, /* SIGABRT (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_BUS = 7, /* SIGBUS (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_FPE = 8, /* SIGFPE (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_KILL = 9, /* SIGKILL (Since: v1.0.1) */ + + VIR_DOMAIN_PROCESS_SIGNAL_USR1 = 10, /* SIGUSR1 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_SEGV = 11, /* SIGSEGV (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_USR2 = 12, /* SIGUSR2 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_PIPE = 13, /* SIGPIPE (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_ALRM = 14, /* SIGALRM (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_TERM = 15, /* SIGTERM (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_STKFLT = 16, /* Not in POSIX (SIGSTKFLT on Linux (Since: v1.0.1) )*/ + VIR_DOMAIN_PROCESS_SIGNAL_CHLD = 17, /* SIGCHLD (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_CONT = 18, /* SIGCONT (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_STOP = 19, /* SIGSTOP (Since: v1.0.1) */ + + VIR_DOMAIN_PROCESS_SIGNAL_TSTP = 20, /* SIGTSTP (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_TTIN = 21, /* SIGTTIN (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_TTOU = 22, /* SIGTTOU (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_URG = 23, /* SIGURG (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_XCPU = 24, /* SIGXCPU (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_XFSZ = 25, /* SIGXFSZ (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_VTALRM = 26, /* SIGVTALRM (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_PROF = 27, /* SIGPROF (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_WINCH = 28, /* Not in POSIX (SIGWINCH on Linux) (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_POLL = 29, /* SIGPOLL (also known as SIGIO on Linux) (Since: v1.0.1) */ + + VIR_DOMAIN_PROCESS_SIGNAL_PWR = 30, /* Not in POSIX (SIGPWR on Linux) (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_SYS = 31, /* SIGSYS (also known as SIGUNUSED on Linux) (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT0 = 32, /* SIGRTMIN (Since: v1.0.1) */ VIR_DOMAIN_PROCESS_SIGNAL_RT1 = 33, /* SIGRTMIN + 1 */ VIR_DOMAIN_PROCESS_SIGNAL_RT2 = 34, /* SIGRTMIN + 2 */ VIR_DOMAIN_PROCESS_SIGNAL_RT3 = 35, /* SIGRTMIN + 3 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT4 = 36, /* SIGRTMIN + 4 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT5 = 37, /* SIGRTMIN + 5 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT6 = 38, /* SIGRTMIN + 6 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT7 = 39, /* SIGRTMIN + 7 */ - - VIR_DOMAIN_PROCESS_SIGNAL_RT8 = 40, /* SIGRTMIN + 8 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT9 = 41, /* SIGRTMIN + 9 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT10 = 42, /* SIGRTMIN + 10 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT11 = 43, /* SIGRTMIN + 11 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT12 = 44, /* SIGRTMIN + 12 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT13 = 45, /* SIGRTMIN + 13 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT14 = 46, /* SIGRTMIN + 14 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT15 = 47, /* SIGRTMIN + 15 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT16 = 48, /* SIGRTMIN + 16 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT17 = 49, /* SIGRTMIN + 17 */ - - VIR_DOMAIN_PROCESS_SIGNAL_RT18 = 50, /* SIGRTMIN + 18 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT19 = 51, /* SIGRTMIN + 19 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT20 = 52, /* SIGRTMIN + 20 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT21 = 53, /* SIGRTMIN + 21 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT22 = 54, /* SIGRTMIN + 22 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT23 = 55, /* SIGRTMIN + 23 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT24 = 56, /* SIGRTMIN + 24 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT25 = 57, /* SIGRTMIN + 25 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT26 = 58, /* SIGRTMIN + 26 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT27 = 59, /* SIGRTMIN + 27 */ - - VIR_DOMAIN_PROCESS_SIGNAL_RT28 = 60, /* SIGRTMIN + 28 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT29 = 61, /* SIGRTMIN + 29 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT30 = 62, /* SIGRTMIN + 30 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT31 = 63, /* SIGRTMIN + 31 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT32 = 64, /* SIGRTMIN + 32 / SIGRTMAX */ + VIR_DOMAIN_PROCESS_SIGNAL_RT4 = 36, /* SIGRTMIN + 4 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT5 = 37, /* SIGRTMIN + 5 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT6 = 38, /* SIGRTMIN + 6 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT7 = 39, /* SIGRTMIN + 7 (Since: v1.0.1) */ + + VIR_DOMAIN_PROCESS_SIGNAL_RT8 = 40, /* SIGRTMIN + 8 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT9 = 41, /* SIGRTMIN + 9 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT10 = 42, /* SIGRTMIN + 10 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT11 = 43, /* SIGRTMIN + 11 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT12 = 44, /* SIGRTMIN + 12 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT13 = 45, /* SIGRTMIN + 13 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT14 = 46, /* SIGRTMIN + 14 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT15 = 47, /* SIGRTMIN + 15 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT16 = 48, /* SIGRTMIN + 16 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT17 = 49, /* SIGRTMIN + 17 (Since: v1.0.1) */ + + VIR_DOMAIN_PROCESS_SIGNAL_RT18 = 50, /* SIGRTMIN + 18 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT19 = 51, /* SIGRTMIN + 19 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT20 = 52, /* SIGRTMIN + 20 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT21 = 53, /* SIGRTMIN + 21 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT22 = 54, /* SIGRTMIN + 22 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT23 = 55, /* SIGRTMIN + 23 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT24 = 56, /* SIGRTMIN + 24 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT25 = 57, /* SIGRTMIN + 25 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT26 = 58, /* SIGRTMIN + 26 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT27 = 59, /* SIGRTMIN + 27 (Since: v1.0.1) */ + + VIR_DOMAIN_PROCESS_SIGNAL_RT28 = 60, /* SIGRTMIN + 28 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT29 = 61, /* SIGRTMIN + 29 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT30 = 62, /* SIGRTMIN + 30 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT31 = 63, /* SIGRTMIN + 31 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT32 = 64, /* SIGRTMIN + 32 / SIGRTMAX (Since: v1.0.1) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_PROCESS_SIGNAL_LAST @@ -3072,10 +3183,10 @@ typedef enum { * Details on the cause of a 'defined' lifecycle event */ typedef enum { - VIR_DOMAIN_EVENT_DEFINED_ADDED = 0, /* Newly created config file */ - VIR_DOMAIN_EVENT_DEFINED_UPDATED = 1, /* Changed config file */ - VIR_DOMAIN_EVENT_DEFINED_RENAMED = 2, /* Domain was renamed */ - VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT = 3, /* Config was restored from a snapshot */ + VIR_DOMAIN_EVENT_DEFINED_ADDED = 0, /* Newly created config file (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_DEFINED_UPDATED = 1, /* Changed config file (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_DEFINED_RENAMED = 2, /* Domain was renamed (Since: v1.2.19) */ + VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT = 3, /* Config was restored from a snapshot (Since: v1.3.3) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_EVENT_DEFINED_LAST @@ -3088,8 +3199,8 @@ typedef enum { * Details on the cause of an 'undefined' lifecycle event */ typedef enum { - VIR_DOMAIN_EVENT_UNDEFINED_REMOVED = 0, /* Deleted the config file */ - VIR_DOMAIN_EVENT_UNDEFINED_RENAMED = 1, /* Domain was renamed */ + VIR_DOMAIN_EVENT_UNDEFINED_REMOVED = 0, /* Deleted the config file (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_UNDEFINED_RENAMED = 1, /* Domain was renamed (Since: v1.2.19) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_EVENT_UNDEFINED_LAST @@ -3102,11 +3213,11 @@ typedef enum { * Details on the cause of a 'started' lifecycle event */ typedef enum { - VIR_DOMAIN_EVENT_STARTED_BOOTED = 0, /* Normal startup from boot */ - VIR_DOMAIN_EVENT_STARTED_MIGRATED = 1, /* Incoming migration from another host */ - VIR_DOMAIN_EVENT_STARTED_RESTORED = 2, /* Restored from a state file */ - VIR_DOMAIN_EVENT_STARTED_FROM_SNAPSHOT = 3, /* Restored from snapshot */ - VIR_DOMAIN_EVENT_STARTED_WAKEUP = 4, /* Started due to wakeup event */ + VIR_DOMAIN_EVENT_STARTED_BOOTED = 0, /* Normal startup from boot (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_STARTED_MIGRATED = 1, /* Incoming migration from another host (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_STARTED_RESTORED = 2, /* Restored from a state file (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_STARTED_FROM_SNAPSHOT = 3, /* Restored from snapshot (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_STARTED_WAKEUP = 4, /* Started due to wakeup event (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_EVENT_STARTED_LAST @@ -3119,15 +3230,15 @@ typedef enum { * Details on the cause of a 'suspended' lifecycle event */ typedef enum { - VIR_DOMAIN_EVENT_SUSPENDED_PAUSED = 0, /* Normal suspend due to admin pause */ - VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED = 1, /* Suspended for offline migration */ - VIR_DOMAIN_EVENT_SUSPENDED_IOERROR = 2, /* Suspended due to a disk I/O error */ - VIR_DOMAIN_EVENT_SUSPENDED_WATCHDOG = 3, /* Suspended due to a watchdog firing */ - VIR_DOMAIN_EVENT_SUSPENDED_RESTORED = 4, /* Restored from paused state file */ - VIR_DOMAIN_EVENT_SUSPENDED_FROM_SNAPSHOT = 5, /* Restored from paused snapshot */ - VIR_DOMAIN_EVENT_SUSPENDED_API_ERROR = 6, /* suspended after failure during libvirt API call */ - VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY = 7, /* suspended for post-copy migration */ - VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY_FAILED = 8, /* suspended after failed post-copy */ + VIR_DOMAIN_EVENT_SUSPENDED_PAUSED = 0, /* Normal suspend due to admin pause (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED = 1, /* Suspended for offline migration (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_SUSPENDED_IOERROR = 2, /* Suspended due to a disk I/O error (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_SUSPENDED_WATCHDOG = 3, /* Suspended due to a watchdog firing (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_SUSPENDED_RESTORED = 4, /* Restored from paused state file (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_SUSPENDED_FROM_SNAPSHOT = 5, /* Restored from paused snapshot (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_SUSPENDED_API_ERROR = 6, /* suspended after failure during libvirt API call (Since: v1.0.1) */ + VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY = 7, /* suspended for post-copy migration (Since: v1.3.3) */ + VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY_FAILED = 8, /* suspended after failed post-copy (Since: v1.3.3) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_EVENT_SUSPENDED_LAST @@ -3140,11 +3251,11 @@ typedef enum { * Details on the cause of a 'resumed' lifecycle event */ typedef enum { - VIR_DOMAIN_EVENT_RESUMED_UNPAUSED = 0, /* Normal resume due to admin unpause */ - VIR_DOMAIN_EVENT_RESUMED_MIGRATED = 1, /* Resumed for completion of migration */ - VIR_DOMAIN_EVENT_RESUMED_FROM_SNAPSHOT = 2, /* Resumed from snapshot */ + VIR_DOMAIN_EVENT_RESUMED_UNPAUSED = 0, /* Normal resume due to admin unpause (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_RESUMED_MIGRATED = 1, /* Resumed for completion of migration (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_RESUMED_FROM_SNAPSHOT = 2, /* Resumed from snapshot (Since: v1.0.0) */ VIR_DOMAIN_EVENT_RESUMED_POSTCOPY = 3, /* Resumed, but migration is still - running in post-copy mode */ + running in post-copy mode (Since: v1.3.3) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_EVENT_RESUMED_LAST @@ -3157,13 +3268,13 @@ typedef enum { * Details on the cause of a 'stopped' lifecycle event */ typedef enum { - VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN = 0, /* Normal shutdown */ - VIR_DOMAIN_EVENT_STOPPED_DESTROYED = 1, /* Forced poweroff from host */ - VIR_DOMAIN_EVENT_STOPPED_CRASHED = 2, /* Guest crashed */ - VIR_DOMAIN_EVENT_STOPPED_MIGRATED = 3, /* Migrated off to another host */ - VIR_DOMAIN_EVENT_STOPPED_SAVED = 4, /* Saved to a state file */ - VIR_DOMAIN_EVENT_STOPPED_FAILED = 5, /* Host emulator/mgmt failed */ - VIR_DOMAIN_EVENT_STOPPED_FROM_SNAPSHOT = 6, /* offline snapshot loaded */ + VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN = 0, /* Normal shutdown (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_STOPPED_DESTROYED = 1, /* Forced poweroff from host (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_STOPPED_CRASHED = 2, /* Guest crashed (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_STOPPED_MIGRATED = 3, /* Migrated off to another host (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_STOPPED_SAVED = 4, /* Saved to a state file (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_STOPPED_FAILED = 5, /* Host emulator/mgmt failed (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_STOPPED_FROM_SNAPSHOT = 6, /* offline snapshot loaded (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_EVENT_STOPPED_LAST @@ -3177,15 +3288,18 @@ typedef enum { * Details on the cause of a 'shutdown' lifecycle event */ typedef enum { - /* Guest finished shutdown sequence */ + /* Guest finished shutdown sequence (Since: v1.0.0) */ VIR_DOMAIN_EVENT_SHUTDOWN_FINISHED = 0, /* Domain finished shutting down after request from the guest itself - * (e.g. hardware-specific action) */ + * (e.g. hardware-specific action) (Since: v3.4.0) */ VIR_DOMAIN_EVENT_SHUTDOWN_GUEST = 1, /* Domain finished shutting down after request from the host (e.g. killed by - * a signal) */ + * a signal) + * + * Since: v3.4.0 + */ VIR_DOMAIN_EVENT_SHUTDOWN_HOST = 2, # ifdef VIR_ENUM_SENTINELS @@ -3199,8 +3313,8 @@ typedef enum { * Details on the cause of a 'pmsuspended' lifecycle event */ typedef enum { - VIR_DOMAIN_EVENT_PMSUSPENDED_MEMORY = 0, /* Guest was PM suspended to memory */ - VIR_DOMAIN_EVENT_PMSUSPENDED_DISK = 1, /* Guest was PM suspended to disk */ + VIR_DOMAIN_EVENT_PMSUSPENDED_MEMORY = 0, /* Guest was PM suspended to memory (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_PMSUSPENDED_DISK = 1, /* Guest was PM suspended to disk (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_EVENT_PMSUSPENDED_LAST @@ -3213,8 +3327,8 @@ typedef enum { * Details on the cause of a 'crashed' lifecycle event */ typedef enum { - VIR_DOMAIN_EVENT_CRASHED_PANICKED = 0, /* Guest was panicked */ - VIR_DOMAIN_EVENT_CRASHED_CRASHLOADED = 1, /* Guest was crashloaded */ + VIR_DOMAIN_EVENT_CRASHED_PANICKED = 0, /* Guest was panicked (Since: v1.1.1) */ + VIR_DOMAIN_EVENT_CRASHED_CRASHLOADED = 1, /* Guest was crashloaded (Since: v6.1.0) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_EVENT_CRASHED_LAST @@ -3227,10 +3341,10 @@ typedef enum { * Recipient of a memory failure event. */ typedef enum { - /* memory failure at hypersivor memory address space */ + /* memory failure at hypersivor memory address space (Since: v6.9.0) */ VIR_DOMAIN_EVENT_MEMORY_FAILURE_RECIPIENT_HYPERVISOR = 0, - /* memory failure at guest memory address space */ + /* memory failure at guest memory address space (Since: v6.9.0) */ VIR_DOMAIN_EVENT_MEMORY_FAILURE_RECIPIENT_GUEST = 1, # ifdef VIR_ENUM_SENTINELS @@ -3246,20 +3360,32 @@ typedef enum { */ typedef enum { /* the memory failure could be ignored. This will only be the case for - * action-optional failures. */ + * action-optional failures. + * + * Since: v6.9.0 + */ VIR_DOMAIN_EVENT_MEMORY_FAILURE_ACTION_IGNORE = 0, /* memory failure occurred in guest memory, the guest enabled MCE handling * mechanism, and hypervisor could inject the MCE into the guest - * successfully. */ + * successfully. + * + * Since: v6.9.0 + */ VIR_DOMAIN_EVENT_MEMORY_FAILURE_ACTION_INJECT = 1, /* the failure is unrecoverable. This occurs for action-required failures - * if the recipient is the hypervisor; hypervisor will exit. */ + * if the recipient is the hypervisor; hypervisor will exit. + * + * Since: v6.9.0 + */ VIR_DOMAIN_EVENT_MEMORY_FAILURE_ACTION_FATAL = 2, /* the failure is unrecoverable but confined to the guest. This occurs if - * the recipient is a guest which is not ready to handle memory failures. */ + * the recipient is a guest which is not ready to handle memory failures. + * + * Since: v6.9.0 + */ VIR_DOMAIN_EVENT_MEMORY_FAILURE_ACTION_RESET = 3, # ifdef VIR_ENUM_SENTINELS @@ -3270,11 +3396,14 @@ typedef enum { typedef enum { /* whether a memory failure event is action-required or action-optional - * (e.g. a failure during memory scrub). */ + * (e.g. a failure during memory scrub). (Since: v6.9.0) */ VIR_DOMAIN_MEMORY_FAILURE_ACTION_REQUIRED = (1 << 0), /* whether the failure occurred while the previous failure was still in - * progress. */ + * progress. + * + * Since: v6.9.0 + */ VIR_DOMAIN_MEMORY_FAILURE_RECURSIVE = (1 << 1), } virDomainMemoryFailureFlags; @@ -3311,12 +3440,12 @@ int virDomainIsPersistent(virDomainPtr dom); int virDomainIsUpdated(virDomainPtr dom); typedef enum { - VIR_DOMAIN_JOB_NONE = 0, /* No job is active */ - VIR_DOMAIN_JOB_BOUNDED = 1, /* Job with a finite completion time */ - VIR_DOMAIN_JOB_UNBOUNDED = 2, /* Job without a finite completion time */ - VIR_DOMAIN_JOB_COMPLETED = 3, /* Job has finished, but isn't cleaned up */ - VIR_DOMAIN_JOB_FAILED = 4, /* Job hit error, but isn't cleaned up */ - VIR_DOMAIN_JOB_CANCELLED = 5, /* Job was aborted, but isn't cleaned up */ + VIR_DOMAIN_JOB_NONE = 0, /* No job is active (Since: v1.0.0) */ + VIR_DOMAIN_JOB_BOUNDED = 1, /* Job with a finite completion time (Since: v1.0.0) */ + VIR_DOMAIN_JOB_UNBOUNDED = 2, /* Job without a finite completion time (Since: v1.0.0) */ + VIR_DOMAIN_JOB_COMPLETED = 3, /* Job has finished, but isn't cleaned up (Since: v1.0.0) */ + VIR_DOMAIN_JOB_FAILED = 4, /* Job hit error, but isn't cleaned up (Since: v1.0.0) */ + VIR_DOMAIN_JOB_CANCELLED = 5, /* Job was aborted, but isn't cleaned up (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_JOB_LAST @@ -3367,9 +3496,9 @@ struct _virDomainJobInfo { */ typedef enum { VIR_DOMAIN_JOB_STATS_COMPLETED = 1 << 0, /* return stats of a recently - * completed job */ + * completed job (Since: v1.2.9) */ VIR_DOMAIN_JOB_STATS_KEEP_COMPLETED = 1 << 1, /* don't remove completed - stats when reading them */ + stats when reading them (Since: v6.0.0) */ } virDomainGetJobStatsFlags; int virDomainGetJobInfo(virDomainPtr dom, @@ -3388,7 +3517,7 @@ typedef enum { VIR_DOMAIN_JOB_OPERATION_RESTORE = 3, VIR_DOMAIN_JOB_OPERATION_MIGRATION_IN = 4, VIR_DOMAIN_JOB_OPERATION_MIGRATION_OUT = 5, - VIR_DOMAIN_JOB_OPERATION_SNAPSHOT = 6, + VIR_DOMAIN_JOB_OPERATION_SNAPSHOT = 6, /* Since: v3.3.0 */ VIR_DOMAIN_JOB_OPERATION_SNAPSHOT_REVERT = 7, VIR_DOMAIN_JOB_OPERATION_DUMP = 8, VIR_DOMAIN_JOB_OPERATION_BACKUP = 9, @@ -3769,13 +3898,13 @@ typedef void (*virConnectDomainEventRTCChangeCallback)(virConnectPtr conn, * The action that is to be taken due to the watchdog device firing */ typedef enum { - VIR_DOMAIN_EVENT_WATCHDOG_NONE = 0, /* No action, watchdog ignored */ - VIR_DOMAIN_EVENT_WATCHDOG_PAUSE, /* Guest CPUs are paused */ - VIR_DOMAIN_EVENT_WATCHDOG_RESET, /* Guest CPUs are reset */ - VIR_DOMAIN_EVENT_WATCHDOG_POWEROFF, /* Guest is forcibly powered off */ - VIR_DOMAIN_EVENT_WATCHDOG_SHUTDOWN, /* Guest is requested to gracefully shutdown */ - VIR_DOMAIN_EVENT_WATCHDOG_DEBUG, /* No action, a debug message logged */ - VIR_DOMAIN_EVENT_WATCHDOG_INJECTNMI,/* Inject a non-maskable interrupt into guest */ + VIR_DOMAIN_EVENT_WATCHDOG_NONE = 0, /* No action, watchdog ignored (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_WATCHDOG_PAUSE, /* Guest CPUs are paused (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_WATCHDOG_RESET, /* Guest CPUs are reset (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_WATCHDOG_POWEROFF, /* Guest is forcibly powered off (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_WATCHDOG_SHUTDOWN, /* Guest is requested to gracefully shutdown (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_WATCHDOG_DEBUG, /* No action, a debug message logged (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_WATCHDOG_INJECTNMI,/* Inject a non-maskable interrupt into guest (Since: v1.2.17) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_EVENT_WATCHDOG_LAST @@ -3804,9 +3933,9 @@ typedef void (*virConnectDomainEventWatchdogCallback)(virConnectPtr conn, * The action that is to be taken due to an IO error occurring */ typedef enum { - VIR_DOMAIN_EVENT_IO_ERROR_NONE = 0, /* No action, IO error ignored */ - VIR_DOMAIN_EVENT_IO_ERROR_PAUSE, /* Guest CPUs are paused */ - VIR_DOMAIN_EVENT_IO_ERROR_REPORT, /* IO error reported to guest OS */ + VIR_DOMAIN_EVENT_IO_ERROR_NONE = 0, /* No action, IO error ignored (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_IO_ERROR_PAUSE, /* Guest CPUs are paused (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_IO_ERROR_REPORT, /* IO error reported to guest OS (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_EVENT_IO_ERROR_LAST @@ -3867,9 +3996,9 @@ typedef void (*virConnectDomainEventIOErrorReasonCallback)(virConnectPtr conn, * The phase of the graphics client connection */ typedef enum { - VIR_DOMAIN_EVENT_GRAPHICS_CONNECT = 0, /* Initial socket connection established */ - VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE, /* Authentication & setup completed */ - VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT, /* Final socket disconnection */ + VIR_DOMAIN_EVENT_GRAPHICS_CONNECT = 0, /* Initial socket connection established (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE, /* Authentication & setup completed (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT, /* Final socket disconnection (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_EVENT_GRAPHICS_LAST @@ -3882,9 +4011,9 @@ typedef enum { * The type of address for the connection */ typedef enum { - VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4, /* IPv4 address */ - VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6, /* IPv6 address */ - VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_UNIX, /* UNIX socket path */ + VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4, /* IPv4 address (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6, /* IPv6 address (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_UNIX, /* UNIX socket path (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_LAST @@ -4017,11 +4146,17 @@ typedef void (*virConnectDomainEventBlockJobCallback)(virConnectPtr conn, */ typedef enum { /* Removable media changed to empty according to startup policy as source - * was missing. oldSrcPath is set, newSrcPath is NULL */ + * was missing. oldSrcPath is set, newSrcPath is NULL + * + * Since: v1.0.0 + * */ VIR_DOMAIN_EVENT_DISK_CHANGE_MISSING_ON_START = 0, /* Disk was dropped from domain as source file was missing. - * oldSrcPath is set, newSrcPath is NULL */ + * oldSrcPath is set, newSrcPath is NULL + * + * Since: v1.1.2 + * */ VIR_DOMAIN_EVENT_DISK_DROP_MISSING_ON_START = 1, # ifdef VIR_ENUM_SENTINELS @@ -4579,8 +4714,8 @@ typedef void (*virConnectDomainEventTunableCallback)(virConnectPtr conn, typedef enum { - VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_CONNECTED = 1, /* agent connected */ - VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_DISCONNECTED = 2, /* agent disconnected */ + VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_CONNECTED = 1, /* agent connected (Since: v1.2.11) */ + VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_DISCONNECTED = 2, /* agent disconnected (Since: v1.2.11) */ # ifdef VIR_ENUM_SENTINELS VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_LAST @@ -4588,9 +4723,9 @@ typedef enum { } virConnectDomainEventAgentLifecycleState; typedef enum { - VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_UNKNOWN = 0, /* unknown state change reason */ - VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_DOMAIN_STARTED = 1, /* state changed due to domain start */ - VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_CHANNEL = 2, /* channel state changed */ + VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_UNKNOWN = 0, /* unknown state change reason (Since: v1.2.11) */ + VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_DOMAIN_STARTED = 1, /* state changed due to domain start (Since: v1.2.11) */ + VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_CHANNEL = 2, /* channel state changed (Since: v1.2.11) */ # ifdef VIR_ENUM_SENTINELS VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_LAST @@ -4713,33 +4848,33 @@ typedef void (*virConnectDomainEventMemoryDeviceSizeChangeCallback)(virConnectPt * signature of callback function will be used. */ typedef enum { - VIR_DOMAIN_EVENT_ID_LIFECYCLE = 0, /* virConnectDomainEventCallback */ - VIR_DOMAIN_EVENT_ID_REBOOT = 1, /* virConnectDomainEventGenericCallback */ - VIR_DOMAIN_EVENT_ID_RTC_CHANGE = 2, /* virConnectDomainEventRTCChangeCallback */ - VIR_DOMAIN_EVENT_ID_WATCHDOG = 3, /* virConnectDomainEventWatchdogCallback */ - VIR_DOMAIN_EVENT_ID_IO_ERROR = 4, /* virConnectDomainEventIOErrorCallback */ - VIR_DOMAIN_EVENT_ID_GRAPHICS = 5, /* virConnectDomainEventGraphicsCallback */ - VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON = 6, /* virConnectDomainEventIOErrorReasonCallback */ - VIR_DOMAIN_EVENT_ID_CONTROL_ERROR = 7, /* virConnectDomainEventGenericCallback */ - VIR_DOMAIN_EVENT_ID_BLOCK_JOB = 8, /* virConnectDomainEventBlockJobCallback */ - VIR_DOMAIN_EVENT_ID_DISK_CHANGE = 9, /* virConnectDomainEventDiskChangeCallback */ - VIR_DOMAIN_EVENT_ID_TRAY_CHANGE = 10, /* virConnectDomainEventTrayChangeCallback */ - VIR_DOMAIN_EVENT_ID_PMWAKEUP = 11, /* virConnectDomainEventPMWakeupCallback */ - VIR_DOMAIN_EVENT_ID_PMSUSPEND = 12, /* virConnectDomainEventPMSuspendCallback */ - VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE = 13, /* virConnectDomainEventBalloonChangeCallback */ - VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK = 14, /* virConnectDomainEventPMSuspendDiskCallback */ - VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED = 15, /* virConnectDomainEventDeviceRemovedCallback */ - VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2 = 16, /* virConnectDomainEventBlockJobCallback */ - VIR_DOMAIN_EVENT_ID_TUNABLE = 17, /* virConnectDomainEventTunableCallback */ - VIR_DOMAIN_EVENT_ID_AGENT_LIFECYCLE = 18,/* virConnectDomainEventAgentLifecycleCallback */ - VIR_DOMAIN_EVENT_ID_DEVICE_ADDED = 19, /* virConnectDomainEventDeviceAddedCallback */ - VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION = 20, /* virConnectDomainEventMigrationIterationCallback */ - VIR_DOMAIN_EVENT_ID_JOB_COMPLETED = 21, /* virConnectDomainEventJobCompletedCallback */ - VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED = 22, /* virConnectDomainEventDeviceRemovalFailedCallback */ - VIR_DOMAIN_EVENT_ID_METADATA_CHANGE = 23, /* virConnectDomainEventMetadataChangeCallback */ - VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD = 24, /* virConnectDomainEventBlockThresholdCallback */ - VIR_DOMAIN_EVENT_ID_MEMORY_FAILURE = 25, /* virConnectDomainEventMemoryFailureCallback */ - VIR_DOMAIN_EVENT_ID_MEMORY_DEVICE_SIZE_CHANGE = 26, /* virConnectDomainEventMemoryDeviceSizeChangeCallback */ + VIR_DOMAIN_EVENT_ID_LIFECYCLE = 0, /* virConnectDomainEventCallback (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_ID_REBOOT = 1, /* virConnectDomainEventGenericCallback (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_ID_RTC_CHANGE = 2, /* virConnectDomainEventRTCChangeCallback (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_ID_WATCHDOG = 3, /* virConnectDomainEventWatchdogCallback (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_ID_IO_ERROR = 4, /* virConnectDomainEventIOErrorCallback (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_ID_GRAPHICS = 5, /* virConnectDomainEventGraphicsCallback (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON = 6, /* virConnectDomainEventIOErrorReasonCallback (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_ID_CONTROL_ERROR = 7, /* virConnectDomainEventGenericCallback (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_ID_BLOCK_JOB = 8, /* virConnectDomainEventBlockJobCallback (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_ID_DISK_CHANGE = 9, /* virConnectDomainEventDiskChangeCallback (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_ID_TRAY_CHANGE = 10, /* virConnectDomainEventTrayChangeCallback (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_ID_PMWAKEUP = 11, /* virConnectDomainEventPMWakeupCallback (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_ID_PMSUSPEND = 12, /* virConnectDomainEventPMSuspendCallback (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE = 13, /* virConnectDomainEventBalloonChangeCallback (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK = 14, /* virConnectDomainEventPMSuspendDiskCallback (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED = 15, /* virConnectDomainEventDeviceRemovedCallback (Since: v1.1.1) */ + VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2 = 16, /* virConnectDomainEventBlockJobCallback (Since: v1.2.6) */ + VIR_DOMAIN_EVENT_ID_TUNABLE = 17, /* virConnectDomainEventTunableCallback (Since: v1.2.9) */ + VIR_DOMAIN_EVENT_ID_AGENT_LIFECYCLE = 18,/* virConnectDomainEventAgentLifecycleCallback (Since: v1.2.11) */ + VIR_DOMAIN_EVENT_ID_DEVICE_ADDED = 19, /* virConnectDomainEventDeviceAddedCallback (Since: v1.2.15) */ + VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION = 20, /* virConnectDomainEventMigrationIterationCallback (Since: v1.3.2) */ + VIR_DOMAIN_EVENT_ID_JOB_COMPLETED = 21, /* virConnectDomainEventJobCompletedCallback (Since: v1.3.3) */ + VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED = 22, /* virConnectDomainEventDeviceRemovalFailedCallback (Since: v1.3.4) */ + VIR_DOMAIN_EVENT_ID_METADATA_CHANGE = 23, /* virConnectDomainEventMetadataChangeCallback (Since: v3.0.0) */ + VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD = 24, /* virConnectDomainEventBlockThresholdCallback (Since: v3.2.0) */ + VIR_DOMAIN_EVENT_ID_MEMORY_FAILURE = 25, /* virConnectDomainEventMemoryFailureCallback (Since: v6.9.0) */ + VIR_DOMAIN_EVENT_ID_MEMORY_DEVICE_SIZE_CHANGE = 26, /* virConnectDomainEventMemoryDeviceSizeChangeCallback (Since: v7.9.0) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_EVENT_ID_LAST @@ -4773,9 +4908,9 @@ typedef enum { VIR_DOMAIN_CONSOLE_FORCE = (1 << 0), /* abort a (possibly) active console connection to force a new - connection */ + connection (Since: v1.0.0) */ VIR_DOMAIN_CONSOLE_SAFE = (1 << 1), /* check if the console driver supports - safe console operations */ + safe console operations (Since: v1.0.0) */ } virDomainConsoleFlags; int virDomainOpenConsole(virDomainPtr dom, @@ -4791,7 +4926,7 @@ int virDomainOpenConsole(virDomainPtr dom, typedef enum { VIR_DOMAIN_CHANNEL_FORCE = (1 << 0), /* abort a (possibly) active channel connection to force a new - connection */ + connection (Since: v1.0.2) */ } virDomainChannelFlags; int virDomainOpenChannel(virDomainPtr dom, @@ -4857,7 +4992,7 @@ int virDomainGetTime(virDomainPtr dom, unsigned int flags); typedef enum { - VIR_DOMAIN_TIME_SYNC = (1 << 0), /* Re-sync domain time from domain's RTC */ + VIR_DOMAIN_TIME_SYNC = (1 << 0), /* Re-sync domain time from domain's RTC (Since: v1.2.5) */ } virDomainSetTimeFlags; int virDomainSetTime(virDomainPtr dom, @@ -4998,9 +5133,9 @@ typedef struct _virTypedParameter virMemoryParameter; typedef virMemoryParameter *virMemoryParameterPtr; typedef enum { - VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LEASE = 0, /* Parse DHCP lease file */ - VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT = 1, /* Query qemu guest agent */ - VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP = 2, /* Query ARP tables */ + VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LEASE = 0, /* Parse DHCP lease file (Since: v1.2.14) */ + VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT = 1, /* Query qemu guest agent (Since: v1.2.14) */ + VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP = 2, /* Query ARP tables (Since: v4.2.0) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LAST @@ -5032,7 +5167,7 @@ int virDomainInterfaceAddresses(virDomainPtr dom, void virDomainInterfaceFree(virDomainInterfacePtr iface); typedef enum { - VIR_DOMAIN_PASSWORD_ENCRYPTED = 1 << 0, /* the password is already encrypted */ + VIR_DOMAIN_PASSWORD_ENCRYPTED = 1 << 0, /* the password is already encrypted (Since: v1.2.16) */ } virDomainSetUserPasswordFlags; int virDomainSetUserPassword(virDomainPtr dom, @@ -5076,7 +5211,7 @@ typedef enum { typedef enum { VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY = 0, - VIR_DOMAIN_LIFECYCLE_ACTION_RESTART = 1, + VIR_DOMAIN_LIFECYCLE_ACTION_RESTART = 1, /* Since: v3.9.0 */ VIR_DOMAIN_LIFECYCLE_ACTION_RESTART_RENAME = 2, VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE = 3, VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROY = 4, @@ -5178,13 +5313,13 @@ int virDomainSetLaunchSecurityState(virDomainPtr domain, unsigned int flags); typedef enum { - VIR_DOMAIN_GUEST_INFO_USERS = (1 << 0), /* return active users */ - VIR_DOMAIN_GUEST_INFO_OS = (1 << 1), /* return OS information */ - VIR_DOMAIN_GUEST_INFO_TIMEZONE = (1 << 2), /* return timezone information */ - VIR_DOMAIN_GUEST_INFO_HOSTNAME = (1 << 3), /* return hostname information */ - VIR_DOMAIN_GUEST_INFO_FILESYSTEM = (1 << 4), /* return filesystem information */ - VIR_DOMAIN_GUEST_INFO_DISKS = (1 << 5), /* return disks information */ - VIR_DOMAIN_GUEST_INFO_INTERFACES = (1 << 6), /* return interfaces information */ + VIR_DOMAIN_GUEST_INFO_USERS = (1 << 0), /* return active users (Since: v5.7.0) */ + VIR_DOMAIN_GUEST_INFO_OS = (1 << 1), /* return OS information (Since: v5.7.0) */ + VIR_DOMAIN_GUEST_INFO_TIMEZONE = (1 << 2), /* return timezone information (Since: v5.7.0) */ + VIR_DOMAIN_GUEST_INFO_HOSTNAME = (1 << 3), /* return hostname information (Since: v5.7.0) */ + VIR_DOMAIN_GUEST_INFO_FILESYSTEM = (1 << 4), /* return filesystem information (Since: v5.7.0) */ + VIR_DOMAIN_GUEST_INFO_DISKS = (1 << 5), /* return disks information (Since: v7.0.0) */ + VIR_DOMAIN_GUEST_INFO_INTERFACES = (1 << 6), /* return interfaces information (Since: v7.10.0) */ } virDomainGuestInfoTypes; int virDomainGetGuestInfo(virDomainPtr domain, @@ -5205,7 +5340,7 @@ int virDomainAgentSetResponseTimeout(virDomainPtr domain, typedef enum { VIR_DOMAIN_BACKUP_BEGIN_REUSE_EXTERNAL = (1 << 0), /* reuse separately - provided images */ + provided images (Since: v6.0.0) */ } virDomainBackupBeginFlags; int virDomainBackupBegin(virDomainPtr domain, @@ -5222,8 +5357,8 @@ int virDomainAuthorizedSSHKeysGet(virDomainPtr domain, unsigned int flags); typedef enum { - VIR_DOMAIN_AUTHORIZED_SSH_KEYS_SET_APPEND = (1 << 0), /* don't truncate file, just append */ - VIR_DOMAIN_AUTHORIZED_SSH_KEYS_SET_REMOVE = (1 << 1), /* remove keys, instead of adding them */ + VIR_DOMAIN_AUTHORIZED_SSH_KEYS_SET_APPEND = (1 << 0), /* don't truncate file, just append (Since: v6.10.0) */ + VIR_DOMAIN_AUTHORIZED_SSH_KEYS_SET_REMOVE = (1 << 1), /* remove keys, instead of adding them (Since: v6.10.0) */ } virDomainAuthorizedSSHKeysSetFlags; @@ -5249,11 +5384,11 @@ int virDomainGetMessages(virDomainPtr domain, */ typedef enum { VIR_DOMAIN_DIRTYRATE_UNSTARTED = 0, /* the dirtyrate calculation has - not been started */ + not been started (Since: v7.2.0) */ VIR_DOMAIN_DIRTYRATE_MEASURING = 1, /* the dirtyrate calculation is - measuring */ + measuring (Since: v7.2.0) */ VIR_DOMAIN_DIRTYRATE_MEASURED = 2, /* the dirtyrate calculation is - completed */ + completed (Since: v7.2.0) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_DIRTYRATE_LAST @@ -5268,9 +5403,9 @@ typedef enum { * */ typedef enum { - VIR_DOMAIN_DIRTYRATE_MODE_PAGE_SAMPLING = 0, /* default mode - page-sampling */ - VIR_DOMAIN_DIRTYRATE_MODE_DIRTY_BITMAP = 1 << 0, /* dirty-bitmap mode */ - VIR_DOMAIN_DIRTYRATE_MODE_DIRTY_RING = 1 << 1, /* dirty-ring mode */ + VIR_DOMAIN_DIRTYRATE_MODE_PAGE_SAMPLING = 0, /* default mode - page-sampling (Since: v8.1.0) */ + VIR_DOMAIN_DIRTYRATE_MODE_DIRTY_BITMAP = 1 << 0, /* dirty-bitmap mode (Since: v8.1.0) */ + VIR_DOMAIN_DIRTYRATE_MODE_DIRTY_RING = 1 << 1, /* dirty-ring mode (Since: v8.1.0) */ } virDomainDirtyRateCalcFlags; int virDomainStartDirtyRateCalc(virDomainPtr domain, diff --git a/include/libvirt/libvirt-host.h b/include/libvirt/libvirt-host.h index 8081d9e39d..f6a9588568 100644 --- a/include/libvirt/libvirt-host.h +++ b/include/libvirt/libvirt-host.h @@ -56,7 +56,7 @@ typedef enum { VIR_NODE_SUSPEND_TARGET_HYBRID = 2, # ifdef VIR_ENUM_SENTINELS - VIR_NODE_SUSPEND_TARGET_LAST /* This constant is subject to change */ + VIR_NODE_SUSPEND_TARGET_LAST /* This constant is subject to change (Since: v1.0.0) */ # endif } virNodeSuspendTarget; @@ -499,24 +499,24 @@ int virNodeGetSEVInfo (virConnectPtr conn, * Flags when opening a connection to a hypervisor */ typedef enum { - VIR_CONNECT_RO = (1 << 0), /* A readonly connection */ - VIR_CONNECT_NO_ALIASES = (1 << 1), /* Don't try to resolve URI aliases */ + VIR_CONNECT_RO = (1 << 0), /* A readonly connection (Since: v1.0.0) */ + VIR_CONNECT_NO_ALIASES = (1 << 1), /* Don't try to resolve URI aliases (Since: v1.0.0) */ } virConnectFlags; typedef enum { - VIR_CRED_USERNAME = 1, /* Identity to act as */ - VIR_CRED_AUTHNAME = 2, /* Identify to authorize as */ - VIR_CRED_LANGUAGE = 3, /* RFC 1766 languages, comma separated */ - VIR_CRED_CNONCE = 4, /* client supplies a nonce */ - VIR_CRED_PASSPHRASE = 5, /* Passphrase secret */ - VIR_CRED_ECHOPROMPT = 6, /* Challenge response */ + VIR_CRED_USERNAME = 1, /* Identity to act as (Since: v1.0.0) */ + VIR_CRED_AUTHNAME = 2, /* Identify to authorize as (Since: v1.0.0) */ + VIR_CRED_LANGUAGE = 3, /* RFC 1766 languages, comma separated (Since: v1.0.0) */ + VIR_CRED_CNONCE = 4, /* client supplies a nonce (Since: v1.0.0) */ + VIR_CRED_PASSPHRASE = 5, /* Passphrase secret (Since: v1.0.0) */ + VIR_CRED_ECHOPROMPT = 6, /* Challenge response (Since: v1.0.0) */ VIR_CRED_NOECHOPROMPT = 7, /* Challenge response */ - VIR_CRED_REALM = 8, /* Authentication realm */ - VIR_CRED_EXTERNAL = 9, /* Externally managed credential */ + VIR_CRED_REALM = 8, /* Authentication realm (Since: v1.0.0) */ + VIR_CRED_EXTERNAL = 9, /* Externally managed credential (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_CRED_LAST /* More may be added - expect the unexpected */ + VIR_CRED_LAST /* More may be added - expect the unexpected (Since: v1.0.0) */ # endif } virConnectCredentialType; @@ -782,9 +782,9 @@ typedef enum { typedef enum { VIR_CONNECT_COMPARE_CPU_FAIL_INCOMPATIBLE = (1 << 0), /* treat incompatible - CPUs as failure */ + CPUs as failure (Since: v1.2.6) */ VIR_CONNECT_COMPARE_CPU_VALIDATE_XML = (1 << 1), /* validate the xml - document */ + document (Since: v6.9.0) */ } virConnectCompareCPUFlags; int virConnectCompareCPU(virConnectPtr conn, @@ -809,8 +809,8 @@ int virConnectGetCPUModelNames(virConnectPtr conn, * Flags when getting XML description of a computed CPU */ typedef enum { - VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES = (1 << 0), /* show all features */ - VIR_CONNECT_BASELINE_CPU_MIGRATABLE = (1 << 1), /* filter out non-migratable features */ + VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES = (1 << 0), /* show all features (Since: v1.1.2) */ + VIR_CONNECT_BASELINE_CPU_MIGRATABLE = (1 << 1), /* filter out non-migratable features (Since: v1.2.14) */ } virConnectBaselineCPUFlags; char *virConnectBaselineCPU(virConnectPtr conn, @@ -837,10 +837,10 @@ int virNodeGetFreePages(virConnectPtr conn, typedef enum { VIR_NODE_ALLOC_PAGES_ADD = 0, /* Add @pageCounts to the pages pool. This - can be used only to size up the pool. */ + can be used only to size up the pool. (Since: v1.2.9) */ VIR_NODE_ALLOC_PAGES_SET = (1 << 0), /* Don't add @pageCounts, instead set passed number of pages. This can be - used to free allocated pages. */ + used to free allocated pages. (Since: v1.2.9) */ } virNodeAllocPagesFlags; int virNodeAllocPages(virConnectPtr conn, diff --git a/include/libvirt/libvirt-interface.h b/include/libvirt/libvirt-interface.h index 803cb33ffe..289c3d0b07 100644 --- a/include/libvirt/libvirt-interface.h +++ b/include/libvirt/libvirt-interface.h @@ -76,11 +76,11 @@ const char* virInterfaceGetName (virInterfacePtr iface); const char* virInterfaceGetMACString (virInterfacePtr iface); typedef enum { - VIR_INTERFACE_XML_INACTIVE = 1 << 0 /* dump inactive interface information */ + VIR_INTERFACE_XML_INACTIVE = 1 << 0 /* dump inactive interface information (Since: v1.0.0) */ } virInterfaceXMLFlags; typedef enum { - VIR_INTERFACE_DEFINE_VALIDATE = 1 << 0, /* Validate the XML document against schema */ + VIR_INTERFACE_DEFINE_VALIDATE = 1 << 0, /* Validate the XML document against schema (Since: v7.7.0) */ } virInterfaceDefineFlags; char * virInterfaceGetXMLDesc (virInterfacePtr iface, diff --git a/include/libvirt/libvirt-network.h b/include/libvirt/libvirt-network.h index 80bd03878b..4868a49427 100644 --- a/include/libvirt/libvirt-network.h +++ b/include/libvirt/libvirt-network.h @@ -28,7 +28,7 @@ # endif typedef enum { - VIR_NETWORK_XML_INACTIVE = (1 << 0), /* dump inactive network information */ + VIR_NETWORK_XML_INACTIVE = (1 << 0), /* dump inactive network information (Since: v1.0.0) */ } virNetworkXMLFlags; /** @@ -114,7 +114,7 @@ virNetworkPtr virNetworkLookupByUUIDString (virConnectPtr conn, const char *uuid); typedef enum { - VIR_NETWORK_CREATE_VALIDATE = 1 << 0, /* Validate the XML document against schema */ + VIR_NETWORK_CREATE_VALIDATE = 1 << 0, /* Validate the XML document against schema (Since: v7.8.0) */ } virNetworkCreateFlags; /* @@ -127,7 +127,7 @@ virNetworkPtr virNetworkCreateXMLFlags(virConnectPtr conn, unsigned int flags); typedef enum { - VIR_NETWORK_DEFINE_VALIDATE = 1 << 0, /* Validate the XML document against schema */ + VIR_NETWORK_DEFINE_VALIDATE = 1 << 0, /* Validate the XML document against schema (Since: v7.7.0) */ } virNetworkDefineFlags; /* @@ -152,11 +152,11 @@ int virNetworkUndefine (virNetworkPtr network); * */ typedef enum { - VIR_NETWORK_UPDATE_COMMAND_NONE = 0, /* (invalid) */ - VIR_NETWORK_UPDATE_COMMAND_MODIFY = 1, /* modify an existing element */ - VIR_NETWORK_UPDATE_COMMAND_DELETE = 2, /* delete an existing element */ - VIR_NETWORK_UPDATE_COMMAND_ADD_LAST = 3, /* add an element at end of list */ - VIR_NETWORK_UPDATE_COMMAND_ADD_FIRST = 4, /* add an element at start of list */ + VIR_NETWORK_UPDATE_COMMAND_NONE = 0, /* (invalid (Since: v1.0.0)) */ + VIR_NETWORK_UPDATE_COMMAND_MODIFY = 1, /* modify an existing element (Since: v1.0.0) */ + VIR_NETWORK_UPDATE_COMMAND_DELETE = 2, /* delete an existing element (Since: v1.0.0) */ + VIR_NETWORK_UPDATE_COMMAND_ADD_LAST = 3, /* add an element at end of list (Since: v1.0.0) */ + VIR_NETWORK_UPDATE_COMMAND_ADD_FIRST = 4, /* add an element at start of list (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS VIR_NETWORK_UPDATE_COMMAND_LAST # endif @@ -170,19 +170,19 @@ typedef enum { * */ typedef enum { - VIR_NETWORK_SECTION_NONE = 0, /* (invalid) */ - VIR_NETWORK_SECTION_BRIDGE = 1, /* <bridge> */ - VIR_NETWORK_SECTION_DOMAIN = 2, /* <domain> */ + VIR_NETWORK_SECTION_NONE = 0, /* (invalid (Since: v1.0.0)) */ + VIR_NETWORK_SECTION_BRIDGE = 1, /* <bridge> (Since: v1.0.0) */ + VIR_NETWORK_SECTION_DOMAIN = 2, /* <domain> (Since: v1.0.0) */ VIR_NETWORK_SECTION_IP = 3, /* <ip> */ - VIR_NETWORK_SECTION_IP_DHCP_HOST = 4, /* <ip>/<dhcp>/<host> */ - VIR_NETWORK_SECTION_IP_DHCP_RANGE = 5, /* <ip>/<dhcp>/<range> */ + VIR_NETWORK_SECTION_IP_DHCP_HOST = 4, /* <ip>/<dhcp>/<host> (Since: v1.0.0) */ + VIR_NETWORK_SECTION_IP_DHCP_RANGE = 5, /* <ip>/<dhcp>/<range> (Since: v1.0.0) */ VIR_NETWORK_SECTION_FORWARD = 6, /* <forward> */ - VIR_NETWORK_SECTION_FORWARD_INTERFACE = 7, /* <forward>/<interface> */ - VIR_NETWORK_SECTION_FORWARD_PF = 8, /* <forward>/<pf> */ - VIR_NETWORK_SECTION_PORTGROUP = 9, /* <portgroup> */ - VIR_NETWORK_SECTION_DNS_HOST = 10, /* <dns>/<host> */ - VIR_NETWORK_SECTION_DNS_TXT = 11, /* <dns>/<txt> */ - VIR_NETWORK_SECTION_DNS_SRV = 12, /* <dns>/<srv> */ + VIR_NETWORK_SECTION_FORWARD_INTERFACE = 7, /* <forward>/<interface> (Since: v1.0.0) */ + VIR_NETWORK_SECTION_FORWARD_PF = 8, /* <forward>/<pf> (Since: v1.0.0) */ + VIR_NETWORK_SECTION_PORTGROUP = 9, /* <portgroup> (Since: v1.0.0) */ + VIR_NETWORK_SECTION_DNS_HOST = 10, /* <dns>/<host> (Since: v1.0.0) */ + VIR_NETWORK_SECTION_DNS_TXT = 11, /* <dns>/<txt> (Since: v1.0.0) */ + VIR_NETWORK_SECTION_DNS_SRV = 12, /* <dns>/<srv> (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS VIR_NETWORK_SECTION_LAST # endif @@ -195,9 +195,9 @@ typedef enum { */ typedef enum { VIR_NETWORK_UPDATE_AFFECT_CURRENT = 0, /* affect live if network is active, - config if it's not active */ - VIR_NETWORK_UPDATE_AFFECT_LIVE = 1 << 0, /* affect live state of network only */ - VIR_NETWORK_UPDATE_AFFECT_CONFIG = 1 << 1, /* affect persistent config only */ + config if it's not active (Since: v1.0.0) */ + VIR_NETWORK_UPDATE_AFFECT_LIVE = 1 << 0, /* affect live state of network only (Since: v1.0.0) */ + VIR_NETWORK_UPDATE_AFFECT_CONFIG = 1 << 1, /* affect persistent config only (Since: v1.0.0) */ } virNetworkUpdateFlags; /* @@ -294,7 +294,7 @@ typedef void (*virConnectNetworkEventLifecycleCallback)(virConnectPtr conn, * signature of callback function will be used. */ typedef enum { - VIR_NETWORK_EVENT_ID_LIFECYCLE = 0, /* virConnectNetworkEventLifecycleCallback */ + VIR_NETWORK_EVENT_ID_LIFECYCLE = 0, /* virConnectNetworkEventLifecycleCallback (Since: v1.2.1) */ # ifdef VIR_ENUM_SENTINELS VIR_NETWORK_EVENT_ID_LAST @@ -373,8 +373,8 @@ virNetworkPortLookupByUUIDString(virNetworkPtr net, const char *uuidstr); typedef enum { - VIR_NETWORK_PORT_CREATE_RECLAIM = (1 << 0), /* reclaim existing used resources */ - VIR_NETWORK_PORT_CREATE_VALIDATE = (1 << 1), /* Validate the XML document against schema */ + VIR_NETWORK_PORT_CREATE_RECLAIM = (1 << 0), /* reclaim existing used resources (Since: v5.5.0) */ + VIR_NETWORK_PORT_CREATE_VALIDATE = (1 << 1), /* Validate the XML document against schema (Since: v7.8.0) */ } virNetworkPortCreateFlags; virNetworkPortPtr diff --git a/include/libvirt/libvirt-nodedev.h b/include/libvirt/libvirt-nodedev.h index 8efcd7f506..de398a1767 100644 --- a/include/libvirt/libvirt-nodedev.h +++ b/include/libvirt/libvirt-nodedev.h @@ -63,31 +63,31 @@ int virNodeListDevices (virConnectPtr conn, * Flags used to filter either by capability or active state, the * returned node devices. */ typedef enum { - VIR_CONNECT_LIST_NODE_DEVICES_CAP_SYSTEM = 1 << 0, /* System capability */ - VIR_CONNECT_LIST_NODE_DEVICES_CAP_PCI_DEV = 1 << 1, /* PCI device */ - VIR_CONNECT_LIST_NODE_DEVICES_CAP_USB_DEV = 1 << 2, /* USB device */ - VIR_CONNECT_LIST_NODE_DEVICES_CAP_USB_INTERFACE = 1 << 3, /* USB interface */ - VIR_CONNECT_LIST_NODE_DEVICES_CAP_NET = 1 << 4, /* Network device */ - VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_HOST = 1 << 5, /* SCSI Host Bus Adapter */ - VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_TARGET = 1 << 6, /* SCSI Target */ - VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI = 1 << 7, /* SCSI device */ - VIR_CONNECT_LIST_NODE_DEVICES_CAP_STORAGE = 1 << 8, /* Storage device */ - VIR_CONNECT_LIST_NODE_DEVICES_CAP_FC_HOST = 1 << 9, /* FC Host Bus Adapter */ - VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPORTS = 1 << 10, /* Capable of vport */ - VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_GENERIC = 1 << 11, /* Capable of scsi_generic */ - VIR_CONNECT_LIST_NODE_DEVICES_CAP_DRM = 1 << 12, /* DRM device */ - VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV_TYPES = 1 << 13, /* Capable of mediated devices */ - VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV = 1 << 14, /* Mediated device */ - VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCW_DEV = 1 << 15, /* CCW device */ - VIR_CONNECT_LIST_NODE_DEVICES_CAP_CSS_DEV = 1 << 16, /* CSS device */ - VIR_CONNECT_LIST_NODE_DEVICES_CAP_VDPA = 1 << 17, /* vDPA device */ - VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_CARD = 1 << 18, /* s390 AP Card device */ - VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_QUEUE = 1 << 19, /* s390 AP Queue */ - VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_MATRIX = 1 << 20, /* s390 AP Matrix */ - VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPD = 1 << 21, /* Device with VPD */ - - VIR_CONNECT_LIST_NODE_DEVICES_INACTIVE = 1 << 30, /* Inactive devices */ - VIR_CONNECT_LIST_NODE_DEVICES_ACTIVE = 1U << 31, /* Active devices */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_SYSTEM = 1 << 0, /* System capability (Since: v1.0.0) */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_PCI_DEV = 1 << 1, /* PCI device (Since: v1.0.0) */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_USB_DEV = 1 << 2, /* USB device (Since: v1.0.0) */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_USB_INTERFACE = 1 << 3, /* USB interface (Since: v1.0.0) */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_NET = 1 << 4, /* Network device (Since: v1.0.0) */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_HOST = 1 << 5, /* SCSI Host Bus Adapter (Since: v1.0.0) */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_TARGET = 1 << 6, /* SCSI Target (Since: v1.0.0) */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI = 1 << 7, /* SCSI device (Since: v1.0.0) */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_STORAGE = 1 << 8, /* Storage device (Since: v1.0.0) */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_FC_HOST = 1 << 9, /* FC Host Bus Adapter (Since: v1.0.4) */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPORTS = 1 << 10, /* Capable of vport (Since: v1.0.4) */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_GENERIC = 1 << 11, /* Capable of scsi_generic (Since: v1.1.0) */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_DRM = 1 << 12, /* DRM device (Since: v3.1.0) */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV_TYPES = 1 << 13, /* Capable of mediated devices (Since: v3.4.0) */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV = 1 << 14, /* Mediated device (Since: v3.4.0) */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCW_DEV = 1 << 15, /* CCW device (Since: v3.4.0) */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_CSS_DEV = 1 << 16, /* CSS device (Since: v6.8.0) */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_VDPA = 1 << 17, /* vDPA device (Since: v6.9.0) */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_CARD = 1 << 18, /* s390 AP Card device (Since: v7.0.0) */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_QUEUE = 1 << 19, /* s390 AP Queue (Since: v7.0.0) */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_MATRIX = 1 << 20, /* s390 AP Matrix (Since: v7.0.0) */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPD = 1 << 21, /* Device with VPD (Since: v7.9.0) */ + + VIR_CONNECT_LIST_NODE_DEVICES_INACTIVE = 1 << 30, /* Inactive devices (Since: v7.3.0) */ + VIR_CONNECT_LIST_NODE_DEVICES_ACTIVE = 1U << 31, /* Active devices (Since: v7.3.0) */ } virConnectListAllNodeDeviceFlags; int virConnectListAllNodeDevices (virConnectPtr conn, @@ -167,8 +167,8 @@ int virNodeDeviceIsActive(virNodeDevicePtr dev); * signature of callback function will be used. */ typedef enum { - VIR_NODE_DEVICE_EVENT_ID_LIFECYCLE = 0, /* virConnectNodeDeviceEventLifecycleCallback */ - VIR_NODE_DEVICE_EVENT_ID_UPDATE = 1, /* virConnectNodeDeviceEventGenericCallback */ + VIR_NODE_DEVICE_EVENT_ID_LIFECYCLE = 0, /* virConnectNodeDeviceEventLifecycleCallback (Since: v2.2.0) */ + VIR_NODE_DEVICE_EVENT_ID_UPDATE = 1, /* virConnectNodeDeviceEventGenericCallback (Since: v2.2.0) */ # ifdef VIR_ENUM_SENTINELS VIR_NODE_DEVICE_EVENT_ID_LAST diff --git a/include/libvirt/libvirt-nwfilter.h b/include/libvirt/libvirt-nwfilter.h index 4e28801006..aa8872e156 100644 --- a/include/libvirt/libvirt-nwfilter.h +++ b/include/libvirt/libvirt-nwfilter.h @@ -81,7 +81,7 @@ virNWFilterPtr virNWFilterLookupByUUIDString (virConnectPtr conn, const char *uuid); typedef enum { - VIR_NWFILTER_DEFINE_VALIDATE = 1 << 0, /* Validate the XML document against schema */ + VIR_NWFILTER_DEFINE_VALIDATE = 1 << 0, /* Validate the XML document against schema (Since: v7.7.0) */ } virNWFilterDefineFlags; /* @@ -109,7 +109,7 @@ int virNWFilterFree (virNWFilterPtr nwfilter); */ typedef enum { - VIR_NWFILTER_BINDING_CREATE_VALIDATE = 1 << 0, /* Validate the XML document against schema */ + VIR_NWFILTER_BINDING_CREATE_VALIDATE = 1 << 0, /* Validate the XML document against schema (Since: v7.8.0) */ } virNWFilterBindingCreateFlags; const char* virNWFilterGetName (virNWFilterPtr nwfilter); diff --git a/include/libvirt/libvirt-secret.h b/include/libvirt/libvirt-secret.h index 82e18b8611..6134989369 100644 --- a/include/libvirt/libvirt-secret.h +++ b/include/libvirt/libvirt-secret.h @@ -69,12 +69,12 @@ int virConnectListSecrets (virConnectPtr conn, */ typedef enum { VIR_CONNECT_LIST_SECRETS_EPHEMERAL = 1 << 0, /* kept in memory, never - stored persistently */ + stored persistently (Since: v1.0.0) */ VIR_CONNECT_LIST_SECRETS_NO_EPHEMERAL = 1 << 1, VIR_CONNECT_LIST_SECRETS_PRIVATE = 1 << 2, /* not revealed to any caller of libvirt, nor to any other - node */ + node (Since: v1.0.0) */ VIR_CONNECT_LIST_SECRETS_NO_PRIVATE = 1 << 3, } virConnectListAllSecretsFlags; @@ -90,7 +90,7 @@ virSecretPtr virSecretLookupByUsage(virConnectPtr conn, const char *usageID); typedef enum { - VIR_SECRET_DEFINE_VALIDATE = 1 << 0, /* Validate the XML document against schema */ + VIR_SECRET_DEFINE_VALIDATE = 1 << 0, /* Validate the XML document against schema (Since: v7.7.0) */ } virSecretDefineFlags; virSecretPtr virSecretDefineXML (virConnectPtr conn, @@ -131,8 +131,8 @@ int virSecretFree (virSecretPtr secret); * signature of callback function will be used. */ typedef enum { - VIR_SECRET_EVENT_ID_LIFECYCLE = 0, /* virConnectSecretEventLifecycleCallback */ - VIR_SECRET_EVENT_ID_VALUE_CHANGED = 1, /* virConnectSecretEventGenericCallback */ + VIR_SECRET_EVENT_ID_LIFECYCLE = 0, /* virConnectSecretEventLifecycleCallback (Since: v3.0.0) */ + VIR_SECRET_EVENT_ID_VALUE_CHANGED = 1, /* virConnectSecretEventGenericCallback (Since: v3.0.0) */ # ifdef VIR_ENUM_SENTINELS VIR_SECRET_EVENT_ID_LAST diff --git a/include/libvirt/libvirt-storage.h b/include/libvirt/libvirt-storage.h index bee738880d..e7265fe772 100644 --- a/include/libvirt/libvirt-storage.h +++ b/include/libvirt/libvirt-storage.h @@ -45,11 +45,11 @@ typedef virStoragePool *virStoragePoolPtr; typedef enum { - VIR_STORAGE_POOL_INACTIVE = 0, /* Not running */ - VIR_STORAGE_POOL_BUILDING = 1, /* Initializing pool, not available */ - VIR_STORAGE_POOL_RUNNING = 2, /* Running normally */ - VIR_STORAGE_POOL_DEGRADED = 3, /* Running degraded */ - VIR_STORAGE_POOL_INACCESSIBLE = 4, /* Running, but not accessible */ + VIR_STORAGE_POOL_INACTIVE = 0, /* Not running (Since: v1.0.0) */ + VIR_STORAGE_POOL_BUILDING = 1, /* Initializing pool, not available (Since: v1.0.0) */ + VIR_STORAGE_POOL_RUNNING = 2, /* Running normally (Since: v1.0.0) */ + VIR_STORAGE_POOL_DEGRADED = 3, /* Running degraded (Since: v1.0.0) */ + VIR_STORAGE_POOL_INACCESSIBLE = 4, /* Running, but not accessible (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS VIR_STORAGE_POOL_STATE_LAST @@ -57,33 +57,39 @@ typedef enum { } virStoragePoolState; typedef enum { - VIR_STORAGE_POOL_BUILD_NEW = 0, /* Regular build from scratch */ - VIR_STORAGE_POOL_BUILD_REPAIR = (1 << 0), /* Repair / reinitialize */ - VIR_STORAGE_POOL_BUILD_RESIZE = (1 << 1), /* Extend existing pool */ - VIR_STORAGE_POOL_BUILD_NO_OVERWRITE = (1 << 2), /* Do not overwrite existing pool */ - VIR_STORAGE_POOL_BUILD_OVERWRITE = (1 << 3), /* Overwrite data */ + VIR_STORAGE_POOL_BUILD_NEW = 0, /* Regular build from scratch (Since: v1.0.0) */ + VIR_STORAGE_POOL_BUILD_REPAIR = (1 << 0), /* Repair / reinitialize (Since: v1.0.0) */ + VIR_STORAGE_POOL_BUILD_RESIZE = (1 << 1), /* Extend existing pool (Since: v1.0.0) */ + VIR_STORAGE_POOL_BUILD_NO_OVERWRITE = (1 << 2), /* Do not overwrite existing pool (Since: v1.0.0) */ + VIR_STORAGE_POOL_BUILD_OVERWRITE = (1 << 3), /* Overwrite data (Since: v1.0.0) */ } virStoragePoolBuildFlags; typedef enum { - VIR_STORAGE_POOL_DELETE_NORMAL = 0, /* Delete metadata only (fast) */ - VIR_STORAGE_POOL_DELETE_ZEROED = 1 << 0, /* Clear all data to zeros (slow) */ + VIR_STORAGE_POOL_DELETE_NORMAL = 0, /* Delete metadata only (fast) (Since: v1.0.0) */ + VIR_STORAGE_POOL_DELETE_ZEROED = 1 << 0, /* Clear all data to zeros (slow) (Since: v1.0.0) */ } virStoragePoolDeleteFlags; typedef enum { - /* Create the pool but do not perform pool build */ + /* Create the pool but do not perform pool build (Since: v1.3.1) */ VIR_STORAGE_POOL_CREATE_NORMAL = 0, - /* Create the pool and perform pool build without any flags */ + /* Create the pool and perform pool build without any flags (Since: v1.3.1) */ VIR_STORAGE_POOL_CREATE_WITH_BUILD = 1 << 0, /* Create the pool and perform pool build using the * VIR_STORAGE_POOL_BUILD_OVERWRITE flag. This is mutually - * exclusive to VIR_STORAGE_POOL_CREATE_WITH_BUILD_NO_OVERWRITE */ + * exclusive to VIR_STORAGE_POOL_CREATE_WITH_BUILD_NO_OVERWRITE + * + * Since: v1.3.1 + */ VIR_STORAGE_POOL_CREATE_WITH_BUILD_OVERWRITE = 1 << 1, /* Create the pool and perform pool build using the * VIR_STORAGE_POOL_BUILD_NO_OVERWRITE flag. This is mutually - * exclusive to VIR_STORAGE_POOL_CREATE_WITH_BUILD_OVERWRITE */ + * exclusive to VIR_STORAGE_POOL_CREATE_WITH_BUILD_OVERWRITE + * + * Since: v1.3.1 + */ VIR_STORAGE_POOL_CREATE_WITH_BUILD_NO_OVERWRITE = 1 << 2, } virStoragePoolCreateFlags; @@ -116,13 +122,13 @@ typedef virStorageVol *virStorageVolPtr; typedef enum { - VIR_STORAGE_VOL_FILE = 0, /* Regular file based volumes */ - VIR_STORAGE_VOL_BLOCK = 1, /* Block based volumes */ - VIR_STORAGE_VOL_DIR = 2, /* Directory-passthrough based volume */ - VIR_STORAGE_VOL_NETWORK = 3, /* Network volumes like RBD (RADOS Block Device) */ + VIR_STORAGE_VOL_FILE = 0, /* Regular file based volumes (Since: v1.0.0) */ + VIR_STORAGE_VOL_BLOCK = 1, /* Block based volumes (Since: v1.0.0) */ + VIR_STORAGE_VOL_DIR = 2, /* Directory-passthrough based volume (Since: v1.0.0) */ + VIR_STORAGE_VOL_NETWORK = 3, /* Network volumes like RBD (RADOS Block Device) (Since: v1.0.0) */ VIR_STORAGE_VOL_NETDIR = 4, /* Network accessible directory that can - * contain other network volumes */ - VIR_STORAGE_VOL_PLOOP = 5, /* Ploop based volumes */ + * contain other network volumes (Since: v1.2.0) */ + VIR_STORAGE_VOL_PLOOP = 5, /* Ploop based volumes (Since: v1.3.4) */ # ifdef VIR_ENUM_SENTINELS VIR_STORAGE_VOL_LAST @@ -130,32 +136,32 @@ typedef enum { } virStorageVolType; typedef enum { - VIR_STORAGE_VOL_DELETE_NORMAL = 0, /* Delete metadata only (fast) */ - VIR_STORAGE_VOL_DELETE_ZEROED = 1 << 0, /* Clear all data to zeros (slow) */ - VIR_STORAGE_VOL_DELETE_WITH_SNAPSHOTS = 1 << 1, /* Force removal of volume, even if in use */ + VIR_STORAGE_VOL_DELETE_NORMAL = 0, /* Delete metadata only (fast) (Since: v1.0.0) */ + VIR_STORAGE_VOL_DELETE_ZEROED = 1 << 0, /* Clear all data to zeros (slow) (Since: v1.0.0) */ + VIR_STORAGE_VOL_DELETE_WITH_SNAPSHOTS = 1 << 1, /* Force removal of volume, even if in use (Since: v1.2.21) */ } virStorageVolDeleteFlags; typedef enum { - VIR_STORAGE_VOL_WIPE_ALG_ZERO = 0, /* 1-pass, all zeroes */ + VIR_STORAGE_VOL_WIPE_ALG_ZERO = 0, /* 1-pass, all zeroes (Since: v1.0.0) */ VIR_STORAGE_VOL_WIPE_ALG_NNSA = 1, /* 4-pass NNSA Policy Letter - NAP-14.1-C (XVI-8) */ + NAP-14.1-C (XVI-8) (Since: v1.0.0) */ VIR_STORAGE_VOL_WIPE_ALG_DOD = 2, /* 4-pass DoD 5220.22-M section - 8-306 procedure */ + 8-306 procedure (Since: v1.0.0) */ VIR_STORAGE_VOL_WIPE_ALG_BSI = 3, /* 9-pass method recommended by the German Center of Security in - Information Technologies */ - VIR_STORAGE_VOL_WIPE_ALG_GUTMANN = 4, /* The canonical 35-pass sequence */ + Information Technologies (Since: v1.0.0) */ + VIR_STORAGE_VOL_WIPE_ALG_GUTMANN = 4, /* The canonical 35-pass sequence (Since: v1.0.0) */ VIR_STORAGE_VOL_WIPE_ALG_SCHNEIER = 5, /* 7-pass method described by Bruce Schneier in "Applied - Cryptography" (1996) */ - VIR_STORAGE_VOL_WIPE_ALG_PFITZNER7 = 6, /* 7-pass random */ + Cryptography" (1996) (Since: v1.0.0) */ + VIR_STORAGE_VOL_WIPE_ALG_PFITZNER7 = 6, /* 7-pass random (Since: v1.0.0) */ - VIR_STORAGE_VOL_WIPE_ALG_PFITZNER33 = 7, /* 33-pass random */ + VIR_STORAGE_VOL_WIPE_ALG_PFITZNER33 = 7, /* 33-pass random (Since: v1.0.0) */ - VIR_STORAGE_VOL_WIPE_ALG_RANDOM = 8, /* 1-pass random */ + VIR_STORAGE_VOL_WIPE_ALG_RANDOM = 8, /* 1-pass random (Since: v1.0.0) */ VIR_STORAGE_VOL_WIPE_ALG_TRIM = 9, /* 1-pass, trim all data on the - volume by using TRIM or DISCARD */ + volume by using TRIM or DISCARD (Since: v1.3.2) */ # ifdef VIR_ENUM_SENTINELS VIR_STORAGE_VOL_WIPE_ALG_LAST @@ -186,7 +192,7 @@ struct _virStorageVolInfo { typedef virStorageVolInfo *virStorageVolInfoPtr; typedef enum { - VIR_STORAGE_XML_INACTIVE = (1 << 0), /* dump inactive pool/volume information */ + VIR_STORAGE_XML_INACTIVE = (1 << 0), /* dump inactive pool/volume information (Since: v1.0.0) */ } virStorageXMLFlags; /* @@ -273,7 +279,7 @@ virStoragePoolPtr virStoragePoolLookupByTargetPath(virConnectPtr conn, const char *path); typedef enum { - VIR_STORAGE_POOL_DEFINE_VALIDATE = 1 << 0, /* Validate the XML document against schema */ + VIR_STORAGE_POOL_DEFINE_VALIDATE = 1 << 0, /* Validate the XML document against schema (Since: v7.7.0) */ } virStoragePoolDefineFlags; /* @@ -347,7 +353,7 @@ const char* virStorageVolGetKey (virStorageVolPtr vol); typedef enum { VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA = 1 << 0, - VIR_STORAGE_VOL_CREATE_REFLINK = 1 << 1, /* perform a btrfs lightweight copy */ + VIR_STORAGE_VOL_CREATE_REFLINK = 1 << 1, /* perform a btrfs lightweight copy (Since: v1.2.13) */ } virStorageVolCreateFlags; virStorageVolPtr virStorageVolCreateXML (virStoragePoolPtr pool, @@ -359,7 +365,7 @@ virStorageVolPtr virStorageVolCreateXMLFrom (virStoragePoolPtr pool, unsigned int flags); typedef enum { - VIR_STORAGE_VOL_DOWNLOAD_SPARSE_STREAM = 1 << 0, /* Use sparse stream */ + VIR_STORAGE_VOL_DOWNLOAD_SPARSE_STREAM = 1 << 0, /* Use sparse stream (Since: v3.4.0) */ } virStorageVolDownloadFlags; int virStorageVolDownload (virStorageVolPtr vol, @@ -368,7 +374,7 @@ int virStorageVolDownload (virStorageVolPtr vol, unsigned long long length, unsigned int flags); typedef enum { - VIR_STORAGE_VOL_UPLOAD_SPARSE_STREAM = 1 << 0, /* Use sparse stream */ + VIR_STORAGE_VOL_UPLOAD_SPARSE_STREAM = 1 << 0, /* Use sparse stream (Since: v3.4.0) */ } virStorageVolUploadFlags; int virStorageVolUpload (virStorageVolPtr vol, @@ -397,9 +403,9 @@ char * virStorageVolGetXMLDesc (virStorageVolPtr pool, char * virStorageVolGetPath (virStorageVolPtr vol); typedef enum { - VIR_STORAGE_VOL_RESIZE_ALLOCATE = 1 << 0, /* force allocation of new size */ - VIR_STORAGE_VOL_RESIZE_DELTA = 1 << 1, /* size is relative to current */ - VIR_STORAGE_VOL_RESIZE_SHRINK = 1 << 2, /* allow decrease in capacity */ + VIR_STORAGE_VOL_RESIZE_ALLOCATE = 1 << 0, /* force allocation of new size (Since: v1.0.0) */ + VIR_STORAGE_VOL_RESIZE_DELTA = 1 << 1, /* size is relative to current (Since: v1.0.0) */ + VIR_STORAGE_VOL_RESIZE_SHRINK = 1 << 2, /* allow decrease in capacity (Since: v1.0.0) */ } virStorageVolResizeFlags; int virStorageVolResize (virStorageVolPtr vol, @@ -425,8 +431,8 @@ int virStoragePoolIsPersistent(virStoragePoolPtr pool); * signature of callback function will be used. */ typedef enum { - VIR_STORAGE_POOL_EVENT_ID_LIFECYCLE = 0, /* virConnectStoragePoolEventLifecycleCallback */ - VIR_STORAGE_POOL_EVENT_ID_REFRESH = 1, /* virConnectStoragePoolEventGenericCallback */ + VIR_STORAGE_POOL_EVENT_ID_LIFECYCLE = 0, /* virConnectStoragePoolEventLifecycleCallback (Since: v2.0.0) */ + VIR_STORAGE_POOL_EVENT_ID_REFRESH = 1, /* virConnectStoragePoolEventGenericCallback (Since: v2.0.0) */ # ifdef VIR_ENUM_SENTINELS VIR_STORAGE_POOL_EVENT_ID_LAST diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h index 57986931fd..5cdcf17dd9 100644 --- a/include/libvirt/virterror.h +++ b/include/libvirt/virterror.h @@ -37,8 +37,8 @@ extern "C" { */ typedef enum { VIR_ERR_NONE = 0, - VIR_ERR_WARNING = 1, /* A simple warning */ - VIR_ERR_ERROR = 2 /* An error */ + VIR_ERR_WARNING = 1, /* A simple warning (Since: v1.0.0) */ + VIR_ERR_ERROR = 2 /* An error (Since: v1.0.0) */ } virErrorLevel; /** @@ -49,94 +49,94 @@ typedef enum { */ typedef enum { VIR_FROM_NONE = 0, - VIR_FROM_XEN = 1, /* Error at Xen hypervisor layer */ - VIR_FROM_XEND = 2, /* Error at connection with xend daemon */ - VIR_FROM_XENSTORE = 3, /* Error at connection with xen store */ - VIR_FROM_SEXPR = 4, /* Error in the S-Expression code */ - - VIR_FROM_XML = 5, /* Error in the XML code */ - VIR_FROM_DOM = 6, /* Error when operating on a domain */ - VIR_FROM_RPC = 7, /* Error in the XML-RPC code */ + VIR_FROM_XEN = 1, /* Error at Xen hypervisor layer (Since: v1.0.0) */ + VIR_FROM_XEND = 2, /* Error at connection with xend daemon (Since: v1.0.0) */ + VIR_FROM_XENSTORE = 3, /* Error at connection with xen store (Since: v1.0.0) */ + VIR_FROM_SEXPR = 4, /* Error in the S-Expression code (Since: v1.0.0) */ + + VIR_FROM_XML = 5, /* Error in the XML code (Since: v1.0.0) */ + VIR_FROM_DOM = 6, /* Error when operating on a domain (Since: v1.0.0) */ + VIR_FROM_RPC = 7, /* Error in the XML-RPC code (Since: v1.0.0) */ VIR_FROM_PROXY = 8, /* Error in the proxy code; unused since - 0.8.6 */ - VIR_FROM_CONF = 9, /* Error in the configuration file handling */ - - VIR_FROM_QEMU = 10, /* Error at the QEMU daemon */ - VIR_FROM_NET = 11, /* Error when operating on a network */ - VIR_FROM_TEST = 12, /* Error from test driver */ - VIR_FROM_REMOTE = 13, /* Error from remote driver */ - VIR_FROM_OPENVZ = 14, /* Error from OpenVZ driver */ - - VIR_FROM_XENXM = 15, /* Error at Xen XM layer */ - VIR_FROM_STATS_LINUX = 16, /* Error in the Linux Stats code */ - VIR_FROM_LXC = 17, /* Error from Linux Container driver */ - VIR_FROM_STORAGE = 18, /* Error from storage driver */ - VIR_FROM_NETWORK = 19, /* Error from network config */ - - VIR_FROM_DOMAIN = 20, /* Error from domain config */ - VIR_FROM_UML = 21, /* Error at the UML driver; unused since 5.0.0 */ - VIR_FROM_NODEDEV = 22, /* Error from node device monitor */ - VIR_FROM_XEN_INOTIFY = 23, /* Error from xen inotify layer */ - VIR_FROM_SECURITY = 24, /* Error from security framework */ - - VIR_FROM_VBOX = 25, /* Error from VirtualBox driver */ - VIR_FROM_INTERFACE = 26, /* Error when operating on an interface */ + 0.8.6 (Since: v1.0.0) */ + VIR_FROM_CONF = 9, /* Error in the configuration file handling (Since: v1.0.0) */ + + VIR_FROM_QEMU = 10, /* Error at the QEMU daemon (Since: v1.0.0) */ + VIR_FROM_NET = 11, /* Error when operating on a network (Since: v1.0.0) */ + VIR_FROM_TEST = 12, /* Error from test driver (Since: v1.0.0) */ + VIR_FROM_REMOTE = 13, /* Error from remote driver (Since: v1.0.0) */ + VIR_FROM_OPENVZ = 14, /* Error from OpenVZ driver (Since: v1.0.0) */ + + VIR_FROM_XENXM = 15, /* Error at Xen XM layer (Since: v1.0.0) */ + VIR_FROM_STATS_LINUX = 16, /* Error in the Linux Stats code (Since: v1.0.0) */ + VIR_FROM_LXC = 17, /* Error from Linux Container driver (Since: v1.0.0) */ + VIR_FROM_STORAGE = 18, /* Error from storage driver (Since: v1.0.0) */ + VIR_FROM_NETWORK = 19, /* Error from network config (Since: v1.0.0) */ + + VIR_FROM_DOMAIN = 20, /* Error from domain config (Since: v1.0.0) */ + VIR_FROM_UML = 21, /* Error at the UML driver; unused since 5.0.0 (Since: v1.0.0) */ + VIR_FROM_NODEDEV = 22, /* Error from node device monitor (Since: v1.0.0) */ + VIR_FROM_XEN_INOTIFY = 23, /* Error from xen inotify layer (Since: v1.0.0) */ + VIR_FROM_SECURITY = 24, /* Error from security framework (Since: v1.0.0) */ + + VIR_FROM_VBOX = 25, /* Error from VirtualBox driver (Since: v1.0.0) */ + VIR_FROM_INTERFACE = 26, /* Error when operating on an interface (Since: v1.0.0) */ VIR_FROM_ONE = 27, /* The OpenNebula driver no longer exists. - Retained for ABI/API compat only */ - VIR_FROM_ESX = 28, /* Error from ESX driver */ - VIR_FROM_PHYP = 29, /* Error from the phyp driver, unused since 6.0.0 */ - - VIR_FROM_SECRET = 30, /* Error from secret storage */ - VIR_FROM_CPU = 31, /* Error from CPU driver */ - VIR_FROM_XENAPI = 32, /* Error from XenAPI */ - VIR_FROM_NWFILTER = 33, /* Error from network filter driver */ - VIR_FROM_HOOK = 34, /* Error from Synchronous hooks */ - - VIR_FROM_DOMAIN_SNAPSHOT = 35,/* Error from domain snapshot */ - VIR_FROM_AUDIT = 36, /* Error from auditing subsystem */ - VIR_FROM_SYSINFO = 37, /* Error from sysinfo/SMBIOS */ - VIR_FROM_STREAMS = 38, /* Error from I/O streams */ - VIR_FROM_VMWARE = 39, /* Error from VMware driver */ - - VIR_FROM_EVENT = 40, /* Error from event loop impl */ - VIR_FROM_LIBXL = 41, /* Error from libxenlight driver */ - VIR_FROM_LOCKING = 42, /* Error from lock manager */ - VIR_FROM_HYPERV = 43, /* Error from Hyper-V driver */ - VIR_FROM_CAPABILITIES = 44, /* Error from capabilities */ - - VIR_FROM_URI = 45, /* Error from URI handling */ - VIR_FROM_AUTH = 46, /* Error from auth handling */ - VIR_FROM_DBUS = 47, /* Error from DBus */ - VIR_FROM_PARALLELS = 48, /* Error from Parallels */ - VIR_FROM_DEVICE = 49, /* Error from Device */ - - VIR_FROM_SSH = 50, /* Error from libssh2 connection transport */ - VIR_FROM_LOCKSPACE = 51, /* Error from lockspace */ - VIR_FROM_INITCTL = 52, /* Error from initctl device communication */ - VIR_FROM_IDENTITY = 53, /* Error from identity code */ - VIR_FROM_CGROUP = 54, /* Error from cgroups */ - - VIR_FROM_ACCESS = 55, /* Error from access control manager */ - VIR_FROM_SYSTEMD = 56, /* Error from systemd code */ - VIR_FROM_BHYVE = 57, /* Error from bhyve driver */ - VIR_FROM_CRYPTO = 58, /* Error from crypto code */ - VIR_FROM_FIREWALL = 59, /* Error from firewall */ - - VIR_FROM_POLKIT = 60, /* Error from polkit code */ - VIR_FROM_THREAD = 61, /* Error from thread utils */ - VIR_FROM_ADMIN = 62, /* Error from admin backend */ - VIR_FROM_LOGGING = 63, /* Error from log manager */ - VIR_FROM_XENXL = 64, /* Error from Xen xl config code */ - - VIR_FROM_PERF = 65, /* Error from perf */ - VIR_FROM_LIBSSH = 66, /* Error from libssh connection transport */ - VIR_FROM_RESCTRL = 67, /* Error from resource control */ - VIR_FROM_FIREWALLD = 68, /* Error from firewalld */ - VIR_FROM_DOMAIN_CHECKPOINT = 69, /* Error from domain checkpoint */ - - VIR_FROM_TPM = 70, /* Error from TPM */ - VIR_FROM_BPF = 71, /* Error from BPF code */ - VIR_FROM_CH = 72, /* Error from Cloud-Hypervisor driver */ + Retained for ABI/API compat only (Since: v1.0.0) */ + VIR_FROM_ESX = 28, /* Error from ESX driver (Since: v1.0.0) */ + VIR_FROM_PHYP = 29, /* Error from the phyp driver, unused since 6.0.0 (Since: v1.0.0) */ + + VIR_FROM_SECRET = 30, /* Error from secret storage (Since: v1.0.0) */ + VIR_FROM_CPU = 31, /* Error from CPU driver (Since: v1.0.0) */ + VIR_FROM_XENAPI = 32, /* Error from XenAPI (Since: v1.0.0) */ + VIR_FROM_NWFILTER = 33, /* Error from network filter driver (Since: v1.0.0) */ + VIR_FROM_HOOK = 34, /* Error from Synchronous hooks (Since: v1.0.0) */ + + VIR_FROM_DOMAIN_SNAPSHOT = 35,/* Error from domain snapshot (Since: v1.0.0) */ + VIR_FROM_AUDIT = 36, /* Error from auditing subsystem (Since: v1.0.0) */ + VIR_FROM_SYSINFO = 37, /* Error from sysinfo/SMBIOS (Since: v1.0.0) */ + VIR_FROM_STREAMS = 38, /* Error from I/O streams (Since: v1.0.0) */ + VIR_FROM_VMWARE = 39, /* Error from VMware driver (Since: v1.0.0) */ + + VIR_FROM_EVENT = 40, /* Error from event loop impl (Since: v1.0.0) */ + VIR_FROM_LIBXL = 41, /* Error from libxenlight driver (Since: v1.0.0) */ + VIR_FROM_LOCKING = 42, /* Error from lock manager (Since: v1.0.0) */ + VIR_FROM_HYPERV = 43, /* Error from Hyper-V driver (Since: v1.0.0) */ + VIR_FROM_CAPABILITIES = 44, /* Error from capabilities (Since: v1.0.0) */ + + VIR_FROM_URI = 45, /* Error from URI handling (Since: v1.0.0) */ + VIR_FROM_AUTH = 46, /* Error from auth handling (Since: v1.0.0) */ + VIR_FROM_DBUS = 47, /* Error from DBus (Since: v1.0.0) */ + VIR_FROM_PARALLELS = 48, /* Error from Parallels (Since: v1.0.0) */ + VIR_FROM_DEVICE = 49, /* Error from Device (Since: v1.0.0) */ + + VIR_FROM_SSH = 50, /* Error from libssh2 connection transport (Since: v1.0.0) */ + VIR_FROM_LOCKSPACE = 51, /* Error from lockspace (Since: v1.0.0) */ + VIR_FROM_INITCTL = 52, /* Error from initctl device communication (Since: v1.0.1) */ + VIR_FROM_IDENTITY = 53, /* Error from identity code (Since: v1.0.4) */ + VIR_FROM_CGROUP = 54, /* Error from cgroups (Since: v1.0.5) */ + + VIR_FROM_ACCESS = 55, /* Error from access control manager (Since: v1.1.0) */ + VIR_FROM_SYSTEMD = 56, /* Error from systemd code (Since: v1.1.1) */ + VIR_FROM_BHYVE = 57, /* Error from bhyve driver (Since: v1.2.2) */ + VIR_FROM_CRYPTO = 58, /* Error from crypto code (Since: v1.2.3) */ + VIR_FROM_FIREWALL = 59, /* Error from firewall (Since: v1.2.4) */ + + VIR_FROM_POLKIT = 60, /* Error from polkit code (Since: v1.2.9) */ + VIR_FROM_THREAD = 61, /* Error from thread utils (Since: v1.2.14) */ + VIR_FROM_ADMIN = 62, /* Error from admin backend (Since: v1.2.17) */ + VIR_FROM_LOGGING = 63, /* Error from log manager (Since: v1.3.0) */ + VIR_FROM_XENXL = 64, /* Error from Xen xl config code (Since: v1.3.2) */ + + VIR_FROM_PERF = 65, /* Error from perf (Since: v1.3.3) */ + VIR_FROM_LIBSSH = 66, /* Error from libssh connection transport (Since: v2.5.0) */ + VIR_FROM_RESCTRL = 67, /* Error from resource control (Since: v3.7.0) */ + VIR_FROM_FIREWALLD = 68, /* Error from firewalld (Since: v5.1.0) */ + VIR_FROM_DOMAIN_CHECKPOINT = 69, /* Error from domain checkpoint (Since: v5.2.0) */ + + VIR_FROM_TPM = 70, /* Error from TPM (Since: v5.6.0) */ + VIR_FROM_BPF = 71, /* Error from BPF code (Since: v5.10.0) */ + VIR_FROM_CH = 72, /* Error from Cloud-Hypervisor driver (Since: v7.5.0) */ # ifdef VIR_ENUM_SENTINELS VIR_ERR_DOMAIN_LAST @@ -208,133 +208,133 @@ struct _virError { */ typedef enum { VIR_ERR_OK = 0, - VIR_ERR_INTERNAL_ERROR = 1, /* internal error */ - VIR_ERR_NO_MEMORY = 2, /* memory allocation failure */ - VIR_ERR_NO_SUPPORT = 3, /* no support for this function */ - VIR_ERR_UNKNOWN_HOST = 4, /* could not resolve hostname */ - VIR_ERR_NO_CONNECT = 5, /* can't connect to hypervisor */ - VIR_ERR_INVALID_CONN = 6, /* invalid connection object */ - VIR_ERR_INVALID_DOMAIN = 7, /* invalid domain object */ - VIR_ERR_INVALID_ARG = 8, /* invalid function argument */ - VIR_ERR_OPERATION_FAILED = 9, /* a command to hypervisor failed */ - VIR_ERR_GET_FAILED = 10, /* a HTTP GET command to failed */ - VIR_ERR_POST_FAILED = 11, /* a HTTP POST command to failed */ - VIR_ERR_HTTP_ERROR = 12, /* unexpected HTTP error code */ - VIR_ERR_SEXPR_SERIAL = 13, /* failure to serialize an S-Expr */ + VIR_ERR_INTERNAL_ERROR = 1, /* internal error (Since: v1.0.0) */ + VIR_ERR_NO_MEMORY = 2, /* memory allocation failure (Since: v1.0.0) */ + VIR_ERR_NO_SUPPORT = 3, /* no support for this function (Since: v1.0.0) */ + VIR_ERR_UNKNOWN_HOST = 4, /* could not resolve hostname (Since: v1.0.0) */ + VIR_ERR_NO_CONNECT = 5, /* can't connect to hypervisor (Since: v1.0.0) */ + VIR_ERR_INVALID_CONN = 6, /* invalid connection object (Since: v1.0.0) */ + VIR_ERR_INVALID_DOMAIN = 7, /* invalid domain object (Since: v1.0.0) */ + VIR_ERR_INVALID_ARG = 8, /* invalid function argument (Since: v1.0.0) */ + VIR_ERR_OPERATION_FAILED = 9, /* a command to hypervisor failed (Since: v1.0.0) */ + VIR_ERR_GET_FAILED = 10, /* a HTTP GET command to failed (Since: v1.0.0) */ + VIR_ERR_POST_FAILED = 11, /* a HTTP POST command to failed (Since: v1.0.0) */ + VIR_ERR_HTTP_ERROR = 12, /* unexpected HTTP error code (Since: v1.0.0) */ + VIR_ERR_SEXPR_SERIAL = 13, /* failure to serialize an S-Expr (Since: v1.0.0) */ VIR_ERR_NO_XEN = 14, /* could not open Xen hypervisor - control */ - VIR_ERR_XEN_CALL = 15, /* failure doing an hypervisor call */ - VIR_ERR_OS_TYPE = 16, /* unknown OS type */ - VIR_ERR_NO_KERNEL = 17, /* missing kernel information */ - VIR_ERR_NO_ROOT = 18, /* missing root device information */ - VIR_ERR_NO_SOURCE = 19, /* missing source device information */ - VIR_ERR_NO_TARGET = 20, /* missing target device information */ - VIR_ERR_NO_NAME = 21, /* missing domain name information */ - VIR_ERR_NO_OS = 22, /* missing domain OS information */ - VIR_ERR_NO_DEVICE = 23, /* missing domain devices information */ - VIR_ERR_NO_XENSTORE = 24, /* could not open Xen Store control */ - VIR_ERR_DRIVER_FULL = 25, /* too many drivers registered */ + control (Since: v1.0.0) */ + VIR_ERR_XEN_CALL = 15, /* failure doing an hypervisor call (Since: v1.0.0) */ + VIR_ERR_OS_TYPE = 16, /* unknown OS type (Since: v1.0.0) */ + VIR_ERR_NO_KERNEL = 17, /* missing kernel information (Since: v1.0.0) */ + VIR_ERR_NO_ROOT = 18, /* missing root device information (Since: v1.0.0) */ + VIR_ERR_NO_SOURCE = 19, /* missing source device information (Since: v1.0.0) */ + VIR_ERR_NO_TARGET = 20, /* missing target device information (Since: v1.0.0) */ + VIR_ERR_NO_NAME = 21, /* missing domain name information (Since: v1.0.0) */ + VIR_ERR_NO_OS = 22, /* missing domain OS information (Since: v1.0.0) */ + VIR_ERR_NO_DEVICE = 23, /* missing domain devices information (Since: v1.0.0) */ + VIR_ERR_NO_XENSTORE = 24, /* could not open Xen Store control (Since: v1.0.0) */ + VIR_ERR_DRIVER_FULL = 25, /* too many drivers registered (Since: v1.0.0) */ VIR_ERR_CALL_FAILED = 26, /* not supported by the drivers - (DEPRECATED) */ + (DEPRECATED) (Since: v1.0.0) */ VIR_ERR_XML_ERROR = 27, /* an XML description is not well - formed or broken */ - VIR_ERR_DOM_EXIST = 28, /* the domain already exist */ + formed or broken (Since: v1.0.0) */ + VIR_ERR_DOM_EXIST = 28, /* the domain already exist (Since: v1.0.0) */ VIR_ERR_OPERATION_DENIED = 29, /* operation forbidden on read-only - connections */ - VIR_ERR_OPEN_FAILED = 30, /* failed to open a conf file */ - VIR_ERR_READ_FAILED = 31, /* failed to read a conf file */ - VIR_ERR_PARSE_FAILED = 32, /* failed to parse a conf file */ + connections (Since: v1.0.0) */ + VIR_ERR_OPEN_FAILED = 30, /* failed to open a conf file (Since: v1.0.0) */ + VIR_ERR_READ_FAILED = 31, /* failed to read a conf file (Since: v1.0.0) */ + VIR_ERR_PARSE_FAILED = 32, /* failed to parse a conf file (Since: v1.0.0) */ VIR_ERR_CONF_SYNTAX = 33, /* failed to parse the syntax of a - conf file */ - VIR_ERR_WRITE_FAILED = 34, /* failed to write a conf file */ - VIR_ERR_XML_DETAIL = 35, /* detail of an XML error */ - VIR_ERR_INVALID_NETWORK = 36, /* invalid network object */ - VIR_ERR_NETWORK_EXIST = 37, /* the network already exist */ - VIR_ERR_SYSTEM_ERROR = 38, /* general system call failure */ - VIR_ERR_RPC = 39, /* some sort of RPC error */ - VIR_ERR_GNUTLS_ERROR = 40, /* error from a GNUTLS call */ - VIR_WAR_NO_NETWORK = 41, /* failed to start network */ + conf file (Since: v1.0.0) */ + VIR_ERR_WRITE_FAILED = 34, /* failed to write a conf file (Since: v1.0.0) */ + VIR_ERR_XML_DETAIL = 35, /* detail of an XML error (Since: v1.0.0) */ + VIR_ERR_INVALID_NETWORK = 36, /* invalid network object (Since: v1.0.0) */ + VIR_ERR_NETWORK_EXIST = 37, /* the network already exist (Since: v1.0.0) */ + VIR_ERR_SYSTEM_ERROR = 38, /* general system call failure (Since: v1.0.0) */ + VIR_ERR_RPC = 39, /* some sort of RPC error (Since: v1.0.0) */ + VIR_ERR_GNUTLS_ERROR = 40, /* error from a GNUTLS call (Since: v1.0.0) */ + VIR_WAR_NO_NETWORK = 41, /* failed to start network (Since: v1.0.0) */ VIR_ERR_NO_DOMAIN = 42, /* domain not found or unexpectedly - disappeared */ - VIR_ERR_NO_NETWORK = 43, /* network not found */ - VIR_ERR_INVALID_MAC = 44, /* invalid MAC address */ - VIR_ERR_AUTH_FAILED = 45, /* authentication failed */ - VIR_ERR_INVALID_STORAGE_POOL = 46, /* invalid storage pool object */ - VIR_ERR_INVALID_STORAGE_VOL = 47, /* invalid storage vol object */ - VIR_WAR_NO_STORAGE = 48, /* failed to start storage */ - VIR_ERR_NO_STORAGE_POOL = 49, /* storage pool not found */ - VIR_ERR_NO_STORAGE_VOL = 50, /* storage volume not found */ - VIR_WAR_NO_NODE = 51, /* failed to start node driver */ - VIR_ERR_INVALID_NODE_DEVICE = 52, /* invalid node device object */ - VIR_ERR_NO_NODE_DEVICE = 53, /* node device not found */ - VIR_ERR_NO_SECURITY_MODEL = 54, /* security model not found */ + disappeared (Since: v1.0.0) */ + VIR_ERR_NO_NETWORK = 43, /* network not found (Since: v1.0.0) */ + VIR_ERR_INVALID_MAC = 44, /* invalid MAC address (Since: v1.0.0) */ + VIR_ERR_AUTH_FAILED = 45, /* authentication failed (Since: v1.0.0) */ + VIR_ERR_INVALID_STORAGE_POOL = 46, /* invalid storage pool object (Since: v1.0.0) */ + VIR_ERR_INVALID_STORAGE_VOL = 47, /* invalid storage vol object (Since: v1.0.0) */ + VIR_WAR_NO_STORAGE = 48, /* failed to start storage (Since: v1.0.0) */ + VIR_ERR_NO_STORAGE_POOL = 49, /* storage pool not found (Since: v1.0.0) */ + VIR_ERR_NO_STORAGE_VOL = 50, /* storage volume not found (Since: v1.0.0) */ + VIR_WAR_NO_NODE = 51, /* failed to start node driver (Since: v1.0.0) */ + VIR_ERR_INVALID_NODE_DEVICE = 52, /* invalid node device object (Since: v1.0.0) */ + VIR_ERR_NO_NODE_DEVICE = 53, /* node device not found (Since: v1.0.0) */ + VIR_ERR_NO_SECURITY_MODEL = 54, /* security model not found (Since: v1.0.0) */ VIR_ERR_OPERATION_INVALID = 55, /* operation is not applicable at this - time */ - VIR_WAR_NO_INTERFACE = 56, /* failed to start interface driver */ - VIR_ERR_NO_INTERFACE = 57, /* interface driver not running */ - VIR_ERR_INVALID_INTERFACE = 58, /* invalid interface object */ + time (Since: v1.0.0) */ + VIR_WAR_NO_INTERFACE = 56, /* failed to start interface driver (Since: v1.0.0) */ + VIR_ERR_NO_INTERFACE = 57, /* interface driver not running (Since: v1.0.0) */ + VIR_ERR_INVALID_INTERFACE = 58, /* invalid interface object (Since: v1.0.0) */ VIR_ERR_MULTIPLE_INTERFACES = 59, /* more than one matching interface - found */ - VIR_WAR_NO_NWFILTER = 60, /* failed to start nwfilter driver */ - VIR_ERR_INVALID_NWFILTER = 61, /* invalid nwfilter object */ - VIR_ERR_NO_NWFILTER = 62, /* nw filter pool not found */ + found (Since: v1.0.0) */ + VIR_WAR_NO_NWFILTER = 60, /* failed to start nwfilter driver (Since: v1.0.0) */ + VIR_ERR_INVALID_NWFILTER = 61, /* invalid nwfilter object (Since: v1.0.0) */ + VIR_ERR_NO_NWFILTER = 62, /* nw filter pool not found (Since: v1.0.0) */ VIR_ERR_BUILD_FIREWALL = 63, /* nw filter pool not found */ - VIR_WAR_NO_SECRET = 64, /* failed to start secret storage */ - VIR_ERR_INVALID_SECRET = 65, /* invalid secret */ - VIR_ERR_NO_SECRET = 66, /* secret not found */ + VIR_WAR_NO_SECRET = 64, /* failed to start secret storage (Since: v1.0.0) */ + VIR_ERR_INVALID_SECRET = 65, /* invalid secret (Since: v1.0.0) */ + VIR_ERR_NO_SECRET = 66, /* secret not found (Since: v1.0.0) */ VIR_ERR_CONFIG_UNSUPPORTED = 67, /* unsupported configuration - construct */ - VIR_ERR_OPERATION_TIMEOUT = 68, /* timeout occurred during operation */ + construct (Since: v1.0.0) */ + VIR_ERR_OPERATION_TIMEOUT = 68, /* timeout occurred during operation (Since: v1.0.0) */ VIR_ERR_MIGRATE_PERSIST_FAILED = 69,/* a migration worked, but making the - VM persist on the dest host failed */ - VIR_ERR_HOOK_SCRIPT_FAILED = 70, /* a synchronous hook script failed */ - VIR_ERR_INVALID_DOMAIN_SNAPSHOT = 71,/* invalid domain snapshot */ - VIR_ERR_NO_DOMAIN_SNAPSHOT = 72, /* domain snapshot not found */ - VIR_ERR_INVALID_STREAM = 73, /* stream pointer not valid */ + VM persist on the dest host failed (Since: v1.0.0) */ + VIR_ERR_HOOK_SCRIPT_FAILED = 70, /* a synchronous hook script failed (Since: v1.0.0) */ + VIR_ERR_INVALID_DOMAIN_SNAPSHOT = 71,/* invalid domain snapshot (Since: v1.0.0) */ + VIR_ERR_NO_DOMAIN_SNAPSHOT = 72, /* domain snapshot not found (Since: v1.0.0) */ + VIR_ERR_INVALID_STREAM = 73, /* stream pointer not valid (Since: v1.0.0) */ VIR_ERR_ARGUMENT_UNSUPPORTED = 74, /* valid API use but unsupported by - the given driver */ - VIR_ERR_STORAGE_PROBE_FAILED = 75, /* storage pool probe failed */ - VIR_ERR_STORAGE_POOL_BUILT = 76, /* storage pool already built */ + the given driver (Since: v1.0.0) */ + VIR_ERR_STORAGE_PROBE_FAILED = 75, /* storage pool probe failed (Since: v1.0.0) */ + VIR_ERR_STORAGE_POOL_BUILT = 76, /* storage pool already built (Since: v1.0.0) */ VIR_ERR_SNAPSHOT_REVERT_RISKY = 77, /* force was not requested for a - risky domain snapshot revert */ + risky domain snapshot revert (Since: v1.0.0) */ VIR_ERR_OPERATION_ABORTED = 78, /* operation on a domain was - canceled/aborted by user */ - VIR_ERR_AUTH_CANCELLED = 79, /* authentication cancelled */ - VIR_ERR_NO_DOMAIN_METADATA = 80, /* The metadata is not present */ - VIR_ERR_MIGRATE_UNSAFE = 81, /* Migration is not safe */ - VIR_ERR_OVERFLOW = 82, /* integer overflow */ - VIR_ERR_BLOCK_COPY_ACTIVE = 83, /* action prevented by block copy job */ + canceled/aborted by user (Since: v1.0.0) */ + VIR_ERR_AUTH_CANCELLED = 79, /* authentication cancelled (Since: v1.0.0) */ + VIR_ERR_NO_DOMAIN_METADATA = 80, /* The metadata is not present (Since: v1.0.0) */ + VIR_ERR_MIGRATE_UNSAFE = 81, /* Migration is not safe (Since: v1.0.0) */ + VIR_ERR_OVERFLOW = 82, /* integer overflow (Since: v1.0.0) */ + VIR_ERR_BLOCK_COPY_ACTIVE = 83, /* action prevented by block copy job (Since: v1.0.0) */ VIR_ERR_OPERATION_UNSUPPORTED = 84, /* The requested operation is not - supported */ - VIR_ERR_SSH = 85, /* error in ssh transport driver */ + supported (Since: v1.0.0) */ + VIR_ERR_SSH = 85, /* error in ssh transport driver (Since: v1.0.0) */ VIR_ERR_AGENT_UNRESPONSIVE = 86, /* guest agent is unresponsive, - not running or not usable */ - VIR_ERR_RESOURCE_BUSY = 87, /* resource is already in use */ + not running or not usable (Since: v1.0.0) */ + VIR_ERR_RESOURCE_BUSY = 87, /* resource is already in use (Since: v1.0.0) */ VIR_ERR_ACCESS_DENIED = 88, /* operation on the object/resource - was denied */ - VIR_ERR_DBUS_SERVICE = 89, /* error from a dbus service */ - VIR_ERR_STORAGE_VOL_EXIST = 90, /* the storage vol already exists */ - VIR_ERR_CPU_INCOMPATIBLE = 91, /* given CPU is incompatible with host CPU */ - VIR_ERR_XML_INVALID_SCHEMA = 92, /* XML document doesn't validate against schema */ - VIR_ERR_MIGRATE_FINISH_OK = 93, /* Finish API succeeded but it is expected to return NULL */ - VIR_ERR_AUTH_UNAVAILABLE = 94, /* authentication unavailable */ - VIR_ERR_NO_SERVER = 95, /* Server was not found */ - VIR_ERR_NO_CLIENT = 96, /* Client was not found */ + was denied (Since: v1.1.0) */ + VIR_ERR_DBUS_SERVICE = 89, /* error from a dbus service (Since: v1.1.1) */ + VIR_ERR_STORAGE_VOL_EXIST = 90, /* the storage vol already exists (Since: v1.1.4) */ + VIR_ERR_CPU_INCOMPATIBLE = 91, /* given CPU is incompatible with host CPU (Since: v1.2.6) */ + VIR_ERR_XML_INVALID_SCHEMA = 92, /* XML document doesn't validate against schema (Since: v1.2.12) */ + VIR_ERR_MIGRATE_FINISH_OK = 93, /* Finish API succeeded but it is expected to return NULL (Since: v1.2.18) */ + VIR_ERR_AUTH_UNAVAILABLE = 94, /* authentication unavailable (Since: v1.3.3) */ + VIR_ERR_NO_SERVER = 95, /* Server was not found (Since: v1.3.3) */ + VIR_ERR_NO_CLIENT = 96, /* Client was not found (Since: v1.3.5) */ VIR_ERR_AGENT_UNSYNCED = 97, /* guest agent replies with wrong id - to guest-sync command (DEPRECATED) */ - VIR_ERR_LIBSSH = 98, /* error in libssh transport driver */ - VIR_ERR_DEVICE_MISSING = 99, /* fail to find the desired device */ - VIR_ERR_INVALID_NWFILTER_BINDING = 100, /* invalid nwfilter binding */ - VIR_ERR_NO_NWFILTER_BINDING = 101, /* no nwfilter binding */ - VIR_ERR_INVALID_DOMAIN_CHECKPOINT = 102, /* invalid domain checkpoint */ - VIR_ERR_NO_DOMAIN_CHECKPOINT = 103, /* domain checkpoint not found */ - VIR_ERR_NO_DOMAIN_BACKUP = 104, /* domain backup job id not found */ - VIR_ERR_INVALID_NETWORK_PORT = 105, /* invalid network port object */ - VIR_ERR_NETWORK_PORT_EXIST = 106, /* the network port already exist */ - VIR_ERR_NO_NETWORK_PORT = 107, /* network port not found */ - VIR_ERR_NO_HOSTNAME = 108, /* no domain's hostname found */ - VIR_ERR_CHECKPOINT_INCONSISTENT = 109, /* checkpoint can't be used */ - VIR_ERR_MULTIPLE_DOMAINS = 110, /* more than one matching domain found */ + to guest-sync command (DEPRECATED) (Since: v2.3.0) */ + VIR_ERR_LIBSSH = 98, /* error in libssh transport driver (Since: v2.5.0) */ + VIR_ERR_DEVICE_MISSING = 99, /* fail to find the desired device (Since: v4.1.0) */ + VIR_ERR_INVALID_NWFILTER_BINDING = 100, /* invalid nwfilter binding (Since: v4.5.0) */ + VIR_ERR_NO_NWFILTER_BINDING = 101, /* no nwfilter binding (Since: v4.5.0) */ + VIR_ERR_INVALID_DOMAIN_CHECKPOINT = 102, /* invalid domain checkpoint (Since: v5.2.0) */ + VIR_ERR_NO_DOMAIN_CHECKPOINT = 103, /* domain checkpoint not found (Since: v5.2.0) */ + VIR_ERR_NO_DOMAIN_BACKUP = 104, /* domain backup job id not found (Since: v5.2.0) */ + VIR_ERR_INVALID_NETWORK_PORT = 105, /* invalid network port object (Since: v5.5.0) */ + VIR_ERR_NETWORK_PORT_EXIST = 106, /* the network port already exist (Since: v5.5.0) */ + VIR_ERR_NO_NETWORK_PORT = 107, /* network port not found (Since: v5.5.0) */ + VIR_ERR_NO_HOSTNAME = 108, /* no domain's hostname found (Since: v6.1.0) */ + VIR_ERR_CHECKPOINT_INCONSISTENT = 109, /* checkpoint can't be used (Since: v6.10.0) */ + VIR_ERR_MULTIPLE_DOMAINS = 110, /* more than one matching domain found (Since: v7.1.0) */ # ifdef VIR_ENUM_SENTINELS VIR_ERR_NUMBER_LAST -- 2.35.1

On Thu, Apr 14, 2022 at 22:47:14 +0200, Victor Toso wrote:
Minor hand adjustments around syntax, not the metadata per se.
Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-domain-checkpoint.h | 28 +- include/libvirt/libvirt-domain-snapshot.h | 60 +- include/libvirt/libvirt-domain.h | 877 +++++++++++--------- include/libvirt/libvirt-host.h | 36 +- include/libvirt/libvirt-interface.h | 4 +- include/libvirt/libvirt-network.h | 50 +- include/libvirt/libvirt-nodedev.h | 54 +- include/libvirt/libvirt-nwfilter.h | 4 +- include/libvirt/libvirt-secret.h | 10 +- include/libvirt/libvirt-storage.h | 96 ++- include/libvirt/virterror.h | 394 ++++----- 11 files changed, 877 insertions(+), 736 deletions(-)
[...]
typedef enum { VIR_DOMAIN_RUNNING_UNKNOWN = 0, - VIR_DOMAIN_RUNNING_BOOTED = 1, /* normal startup from boot */ - VIR_DOMAIN_RUNNING_MIGRATED = 2, /* migrated from another host */ - VIR_DOMAIN_RUNNING_RESTORED = 3, /* restored from a state file */ - VIR_DOMAIN_RUNNING_FROM_SNAPSHOT = 4, /* restored from snapshot */ - VIR_DOMAIN_RUNNING_UNPAUSED = 5, /* returned from paused state */ - VIR_DOMAIN_RUNNING_MIGRATION_CANCELED = 6, /* returned from migration */ - VIR_DOMAIN_RUNNING_SAVE_CANCELED = 7, /* returned from failed save process */ + VIR_DOMAIN_RUNNING_BOOTED = 1, /* normal startup from boot (Since: v1.0.0) */ + VIR_DOMAIN_RUNNING_MIGRATED = 2, /* migrated from another host (Since: v1.0.0) */
Your script doesn't seem to handle well versions prior to v1.0.0. This specific constant was added in commit v0.9.1-133-gd65a924b34 thus it should be 'Since v0.9.2'. I understand that we might not want to deal with too old releases, but in such case we should rather pick a different marker meaning that the symbol was added too long ago. Note that this is definitely not an exhaustive search, just something I've noticed randomly because there were just simply too many symbols refering to v1.0.0 and the particular release was not special in any way, we simply bumped the major version on the 7th anniversary of libvirt.

Hi, On Tue, Apr 19, 2022 at 02:40:05PM +0200, Peter Krempa wrote:
On Thu, Apr 14, 2022 at 22:47:14 +0200, Victor Toso wrote:
Minor hand adjustments around syntax, not the metadata per se.
Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-domain-checkpoint.h | 28 +- include/libvirt/libvirt-domain-snapshot.h | 60 +- include/libvirt/libvirt-domain.h | 877 +++++++++++--------- include/libvirt/libvirt-host.h | 36 +- include/libvirt/libvirt-interface.h | 4 +- include/libvirt/libvirt-network.h | 50 +- include/libvirt/libvirt-nodedev.h | 54 +- include/libvirt/libvirt-nwfilter.h | 4 +- include/libvirt/libvirt-secret.h | 10 +- include/libvirt/libvirt-storage.h | 96 ++- include/libvirt/virterror.h | 394 ++++----- 11 files changed, 877 insertions(+), 736 deletions(-)
[...]
typedef enum { VIR_DOMAIN_RUNNING_UNKNOWN = 0, - VIR_DOMAIN_RUNNING_BOOTED = 1, /* normal startup from boot */ - VIR_DOMAIN_RUNNING_MIGRATED = 2, /* migrated from another host */ - VIR_DOMAIN_RUNNING_RESTORED = 3, /* restored from a state file */ - VIR_DOMAIN_RUNNING_FROM_SNAPSHOT = 4, /* restored from snapshot */ - VIR_DOMAIN_RUNNING_UNPAUSED = 5, /* returned from paused state */ - VIR_DOMAIN_RUNNING_MIGRATION_CANCELED = 6, /* returned from migration */ - VIR_DOMAIN_RUNNING_SAVE_CANCELED = 7, /* returned from failed save process */ + VIR_DOMAIN_RUNNING_BOOTED = 1, /* normal startup from boot (Since: v1.0.0) */ + VIR_DOMAIN_RUNNING_MIGRATED = 2, /* migrated from another host (Since: v1.0.0) */
Your script doesn't seem to handle well versions prior to v1.0.0. This specific constant was added in commit v0.9.1-133-gd65a924b34 thus it should be 'Since v0.9.2'.
I actually followed the suggestion to started with v1.0.0. I can change it to work with the exact tags that it would first appear in libvirt if you think it is necessary. CC'ing Andrea for input.
I understand that we might not want to deal with too old releases, but in such case we should rather pick a different marker meaning that the symbol was added too long ago.
Since v1.0.0 is not wrong if it was introduced before v1.0.0. It is just a criteria for adding the version metadata for too old releases, after the fact.
Note that this is definitely not an exhaustive search, just something I've noticed randomly because there were just simply too many symbols refering to v1.0.0 and the particular release was not special in any way, we simply bumped the major version on the 7th anniversary of libvirt.
The simplest way I can think of to verify is to make another script, that looks in the output XML APIs, get the $version and $name and check if $name is present in $version but *not* in $previous_version. Anything that fails here, would be a valid concern to manually check, that is, apart from the v1.0.0 scenario that you pointed above. Thanks for the review. Cheers, Victor

On Tue, Apr 19, 2022 at 15:17:07 +0200, Victor Toso wrote:
Hi,
On Tue, Apr 19, 2022 at 02:40:05PM +0200, Peter Krempa wrote:
On Thu, Apr 14, 2022 at 22:47:14 +0200, Victor Toso wrote:
Minor hand adjustments around syntax, not the metadata per se.
Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-domain-checkpoint.h | 28 +- include/libvirt/libvirt-domain-snapshot.h | 60 +- include/libvirt/libvirt-domain.h | 877 +++++++++++--------- include/libvirt/libvirt-host.h | 36 +- include/libvirt/libvirt-interface.h | 4 +- include/libvirt/libvirt-network.h | 50 +- include/libvirt/libvirt-nodedev.h | 54 +- include/libvirt/libvirt-nwfilter.h | 4 +- include/libvirt/libvirt-secret.h | 10 +- include/libvirt/libvirt-storage.h | 96 ++- include/libvirt/virterror.h | 394 ++++----- 11 files changed, 877 insertions(+), 736 deletions(-)
[...]
typedef enum { VIR_DOMAIN_RUNNING_UNKNOWN = 0, - VIR_DOMAIN_RUNNING_BOOTED = 1, /* normal startup from boot */ - VIR_DOMAIN_RUNNING_MIGRATED = 2, /* migrated from another host */ - VIR_DOMAIN_RUNNING_RESTORED = 3, /* restored from a state file */ - VIR_DOMAIN_RUNNING_FROM_SNAPSHOT = 4, /* restored from snapshot */ - VIR_DOMAIN_RUNNING_UNPAUSED = 5, /* returned from paused state */ - VIR_DOMAIN_RUNNING_MIGRATION_CANCELED = 6, /* returned from migration */ - VIR_DOMAIN_RUNNING_SAVE_CANCELED = 7, /* returned from failed save process */ + VIR_DOMAIN_RUNNING_BOOTED = 1, /* normal startup from boot (Since: v1.0.0) */ + VIR_DOMAIN_RUNNING_MIGRATED = 2, /* migrated from another host (Since: v1.0.0) */
Your script doesn't seem to handle well versions prior to v1.0.0. This specific constant was added in commit v0.9.1-133-gd65a924b34 thus it should be 'Since v0.9.2'.
I actually followed the suggestion to started with v1.0.0. I can change it to work with the exact tags that it would first appear in libvirt if you think it is necessary. CC'ing Andrea for input.
I have no problem with adding an arbitrary cut-off. It just must be clear that it's from an older version, thus 'Since: v1.0.0' must not be used in such case.
I understand that we might not want to deal with too old releases, but in such case we should rather pick a different marker meaning that the symbol was added too long ago.
Since v1.0.0 is not wrong if it was introduced before v1.0.0. It is just a criteria for adding the version metadata for too old releases, after the fact.
It is not wrong but misleading in the context of other tags where we have the exact version when it was introduced. Thus if you change it to make it obvious that it's from an older version I have no problems with that.

On Tue, Apr 19, 2022 at 03:30:12PM +0200, Peter Krempa wrote:
On Tue, Apr 19, 2022 at 15:17:07 +0200, Victor Toso wrote:
On Tue, Apr 19, 2022 at 02:40:05PM +0200, Peter Krempa wrote:
On Thu, Apr 14, 2022 at 22:47:14 +0200, Victor Toso wrote:
typedef enum { VIR_DOMAIN_RUNNING_UNKNOWN = 0, - VIR_DOMAIN_RUNNING_BOOTED = 1, /* normal startup from boot */ - VIR_DOMAIN_RUNNING_MIGRATED = 2, /* migrated from another host */ - VIR_DOMAIN_RUNNING_RESTORED = 3, /* restored from a state file */ - VIR_DOMAIN_RUNNING_FROM_SNAPSHOT = 4, /* restored from snapshot */ - VIR_DOMAIN_RUNNING_UNPAUSED = 5, /* returned from paused state */ - VIR_DOMAIN_RUNNING_MIGRATION_CANCELED = 6, /* returned from migration */ - VIR_DOMAIN_RUNNING_SAVE_CANCELED = 7, /* returned from failed save process */ + VIR_DOMAIN_RUNNING_BOOTED = 1, /* normal startup from boot (Since: v1.0.0) */ + VIR_DOMAIN_RUNNING_MIGRATED = 2, /* migrated from another host (Since: v1.0.0) */
Your script doesn't seem to handle well versions prior to v1.0.0. This specific constant was added in commit v0.9.1-133-gd65a924b34 thus it should be 'Since v0.9.2'.
I actually followed the suggestion to started with v1.0.0. I can change it to work with the exact tags that it would first appear in libvirt if you think it is necessary. CC'ing Andrea for input.
I have no problem with adding an arbitrary cut-off. It just must be clear that it's from an older version, thus 'Since: v1.0.0' must not be used in such case.
I understand that we might not want to deal with too old releases, but in such case we should rather pick a different marker meaning that the symbol was added too long ago.
Since v1.0.0 is not wrong if it was introduced before v1.0.0. It is just a criteria for adding the version metadata for too old releases, after the fact.
It is not wrong but misleading in the context of other tags where we have the exact version when it was introduced. Thus if you change it to make it obvious that it's from an older version I have no problems with that.
Sorry, I was probably not clear when I initially suggested this :( What I wanted to express was that we could *potentially* avoid showing version information for symbols that were introduced in v1.0.0 and earlier *in the generated HTML documentation* if it turns out that always showing this information results in too much clutter. I agree with Peter that we should record accurate version information in the header files. -- Andrea Bolognani / Red Hat / Virtualization

Hi, On Tue, Apr 19, 2022 at 06:37:19AM -0700, Andrea Bolognani wrote:
On Tue, Apr 19, 2022 at 03:30:12PM +0200, Peter Krempa wrote:
On Tue, Apr 19, 2022 at 15:17:07 +0200, Victor Toso wrote:
On Tue, Apr 19, 2022 at 02:40:05PM +0200, Peter Krempa wrote:
On Thu, Apr 14, 2022 at 22:47:14 +0200, Victor Toso wrote:
typedef enum { VIR_DOMAIN_RUNNING_UNKNOWN = 0, - VIR_DOMAIN_RUNNING_BOOTED = 1, /* normal startup from boot */ - VIR_DOMAIN_RUNNING_MIGRATED = 2, /* migrated from another host */ - VIR_DOMAIN_RUNNING_RESTORED = 3, /* restored from a state file */ - VIR_DOMAIN_RUNNING_FROM_SNAPSHOT = 4, /* restored from snapshot */ - VIR_DOMAIN_RUNNING_UNPAUSED = 5, /* returned from paused state */ - VIR_DOMAIN_RUNNING_MIGRATION_CANCELED = 6, /* returned from migration */ - VIR_DOMAIN_RUNNING_SAVE_CANCELED = 7, /* returned from failed save process */ + VIR_DOMAIN_RUNNING_BOOTED = 1, /* normal startup from boot (Since: v1.0.0) */ + VIR_DOMAIN_RUNNING_MIGRATED = 2, /* migrated from another host (Since: v1.0.0) */
Your script doesn't seem to handle well versions prior to v1.0.0. This specific constant was added in commit v0.9.1-133-gd65a924b34 thus it should be 'Since v0.9.2'.
I actually followed the suggestion to started with v1.0.0. I can change it to work with the exact tags that it would first appear in libvirt if you think it is necessary. CC'ing Andrea for input.
I have no problem with adding an arbitrary cut-off. It just must be clear that it's from an older version, thus 'Since: v1.0.0' must not be used in such case.
I understand that we might not want to deal with too old releases, but in such case we should rather pick a different marker meaning that the symbol was added too long ago.
Since v1.0.0 is not wrong if it was introduced before v1.0.0. It is just a criteria for adding the version metadata for too old releases, after the fact.
It is not wrong but misleading in the context of other tags where we have the exact version when it was introduced. Thus if you change it to make it obvious that it's from an older version I have no problems with that.
Sorry, I was probably not clear when I initially suggested this :(
What I wanted to express was that we could *potentially* avoid showing version information for symbols that were introduced in v1.0.0 and earlier *in the generated HTML documentation* if it turns out that always showing this information results in too much clutter.
I agree with Peter that we should record accurate version information in the header files.
No problem. I'll change to add the correct version for all < 1.0.0. Cheers, Victor

Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-qemu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/libvirt/libvirt-qemu.h b/include/libvirt/libvirt-qemu.h index 98f2ac3823..24bf67998b 100644 --- a/include/libvirt/libvirt-qemu.h +++ b/include/libvirt/libvirt-qemu.h @@ -32,7 +32,7 @@ extern "C" { typedef enum { VIR_DOMAIN_QEMU_MONITOR_COMMAND_DEFAULT = 0, - VIR_DOMAIN_QEMU_MONITOR_COMMAND_HMP = (1 << 0), /* cmd is in HMP */ + VIR_DOMAIN_QEMU_MONITOR_COMMAND_HMP = (1 << 0), /* cmd is in HMP (Since: v1.0.0) */ } virDomainQemuMonitorCommandFlags; int virDomainQemuMonitorCommand(virDomainPtr domain, const char *cmd, @@ -85,10 +85,10 @@ typedef void (*virConnectDomainQemuMonitorEventCallback)(virConnectPtr conn, typedef enum { - /* Event filter is a regex rather than a literal string */ + /* Event filter is a regex rather than a literal string (Since: v1.2.3) */ VIR_CONNECT_DOMAIN_QEMU_MONITOR_EVENT_REGISTER_REGEX = (1 << 0), - /* Event filter is case insensitive */ + /* Event filter is case insensitive (Since: v1.2.3) */ VIR_CONNECT_DOMAIN_QEMU_MONITOR_EVENT_REGISTER_NOCASE = (1 << 1), } virConnectDomainQemuMonitorEventRegisterFlags; -- 2.35.1

Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-admin.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/libvirt/libvirt-admin.h b/include/libvirt/libvirt-admin.h index e414f776e4..0f90ec8cdb 100644 --- a/include/libvirt/libvirt-admin.h +++ b/include/libvirt/libvirt-admin.h @@ -205,9 +205,9 @@ int virAdmClientGetTransport(virAdmClientPtr client); int virAdmClientFree(virAdmClientPtr client); typedef enum { - VIR_CLIENT_TRANS_UNIX = 0, /* connection via UNIX socket */ - VIR_CLIENT_TRANS_TCP, /* connection via unencrypted TCP socket */ - VIR_CLIENT_TRANS_TLS, /* connection via encrypted TCP socket */ + VIR_CLIENT_TRANS_UNIX = 0, /* connection via UNIX socket (Since: v1.3.5) */ + VIR_CLIENT_TRANS_TCP, /* connection via unencrypted TCP socket (Since: v1.3.5) */ + VIR_CLIENT_TRANS_TLS, /* connection via encrypted TCP socket (Since: v1.3.5) */ # ifdef VIR_ENUM_SENTINELS VIR_CLIENT_TRANS_LAST -- 2.35.1

Minor style changes by hand. Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-domain.h | 636 +++++++++++++++++++++++++++++- include/libvirt/libvirt-host.h | 123 ++++++ include/libvirt/libvirt-network.h | 24 ++ include/libvirt/libvirt-nodedev.h | 3 + include/libvirt/libvirt-secret.h | 3 + include/libvirt/libvirt-storage.h | 3 + 6 files changed, 786 insertions(+), 6 deletions(-) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index c3dd4d33c0..4983494a0b 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -313,6 +313,9 @@ typedef enum { * * Macro represents proportional weight of the scheduler used on the * host cpu, when using the posix scheduler, as a ullong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_SCHEDULER_CPU_SHARES "cpu_shares" @@ -321,6 +324,9 @@ typedef enum { * * Macro represents the enforcement period for a quota, in microseconds, * for whole domain, when using the posix scheduler, as a ullong. + * + * Since: v1.3.3 + * */ # define VIR_DOMAIN_SCHEDULER_GLOBAL_PERIOD "global_period" @@ -329,6 +335,9 @@ typedef enum { * * Macro represents the maximum bandwidth to be used within a period for * whole domain, when using the posix scheduler, as an llong. + * + * Since: v1.3.3 + * */ # define VIR_DOMAIN_SCHEDULER_GLOBAL_QUOTA "global_quota" @@ -337,6 +346,9 @@ typedef enum { * * Macro represents the enforcement period for a quota, in microseconds, * for vcpus only, when using the posix scheduler, as a ullong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_SCHEDULER_VCPU_PERIOD "vcpu_period" @@ -345,6 +357,9 @@ typedef enum { * * Macro represents the maximum bandwidth to be used within a period for * vcpus only, when using the posix scheduler, as an llong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_SCHEDULER_VCPU_QUOTA "vcpu_quota" @@ -354,6 +369,9 @@ typedef enum { * Macro represents the enforcement period for a quota in microseconds, * when using the posix scheduler, for all emulator activity not tied to * vcpus, as a ullong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_SCHEDULER_EMULATOR_PERIOD "emulator_period" @@ -363,6 +381,9 @@ typedef enum { * Macro represents the maximum bandwidth to be used within a period for * all emulator activity not tied to vcpus, when using the posix scheduler, * as an llong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_SCHEDULER_EMULATOR_QUOTA "emulator_quota" @@ -371,6 +392,9 @@ typedef enum { * * Macro represents the enforcement period for a quota, in microseconds, * for IOThreads only, when using the posix scheduler, as a ullong. + * + * Since: v2.2.0 + * */ # define VIR_DOMAIN_SCHEDULER_IOTHREAD_PERIOD "iothread_period" @@ -379,6 +403,9 @@ typedef enum { * * Macro represents the maximum bandwidth to be used within a period for * IOThreads only, when using the posix scheduler, as an llong. + * + * Since: v2.2.0 + * */ # define VIR_DOMAIN_SCHEDULER_IOTHREAD_QUOTA "iothread_quota" @@ -387,6 +414,9 @@ typedef enum { * * Macro represents the relative weight, when using the credit * scheduler, as a uint. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_SCHEDULER_WEIGHT "weight" @@ -395,6 +425,9 @@ typedef enum { * * Macro represents the maximum scheduler cap, when using the credit * scheduler, as a uint. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_SCHEDULER_CAP "cap" @@ -403,6 +436,9 @@ typedef enum { * * Macro represents the scheduler reservation value, when using the * allocation scheduler, as an llong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_SCHEDULER_RESERVATION "reservation" @@ -411,6 +447,9 @@ typedef enum { * * Macro represents the scheduler limit value, when using the * allocation scheduler, as an llong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_SCHEDULER_LIMIT "limit" @@ -419,6 +458,9 @@ typedef enum { * * Macro represents the scheduler shares value, when using the * allocation scheduler, as an int. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_SCHEDULER_SHARES "shares" @@ -477,6 +519,9 @@ typedef virDomainBlockStatsStruct *virDomainBlockStatsPtr; * * Macro providing the field length of parameter names when using * virDomainBlockStatsFlags(). + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BLOCK_STATS_FIELD_LENGTH VIR_TYPED_PARAM_FIELD_LENGTH @@ -485,6 +530,9 @@ typedef virDomainBlockStatsStruct *virDomainBlockStatsPtr; * * Macro represents the total number of read bytes of the * block device, as an llong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BLOCK_STATS_READ_BYTES "rd_bytes" @@ -493,6 +541,9 @@ typedef virDomainBlockStatsStruct *virDomainBlockStatsPtr; * * Macro represents the total read requests of the * block device, as an llong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BLOCK_STATS_READ_REQ "rd_operations" @@ -501,6 +552,9 @@ typedef virDomainBlockStatsStruct *virDomainBlockStatsPtr; * * Macro represents the total time spend on cache reads in * nano-seconds of the block device, as an llong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BLOCK_STATS_READ_TOTAL_TIMES "rd_total_times" @@ -509,6 +563,9 @@ typedef virDomainBlockStatsStruct *virDomainBlockStatsPtr; * * Macro represents the total number of write bytes of the * block device, as an llong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BLOCK_STATS_WRITE_BYTES "wr_bytes" @@ -517,6 +574,9 @@ typedef virDomainBlockStatsStruct *virDomainBlockStatsPtr; * * Macro represents the total write requests of the * block device, as an llong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BLOCK_STATS_WRITE_REQ "wr_operations" @@ -525,6 +585,9 @@ typedef virDomainBlockStatsStruct *virDomainBlockStatsPtr; * * Macro represents the total time spend on cache writes in * nano-seconds of the block device, as an llong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BLOCK_STATS_WRITE_TOTAL_TIMES "wr_total_times" @@ -533,6 +596,9 @@ typedef virDomainBlockStatsStruct *virDomainBlockStatsPtr; * * Macro represents the total flush requests of the * block device, as an llong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BLOCK_STATS_FLUSH_REQ "flush_operations" @@ -541,6 +607,9 @@ typedef virDomainBlockStatsStruct *virDomainBlockStatsPtr; * * Macro represents the total time spend on cache flushing in * nano-seconds of the block device, as an llong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BLOCK_STATS_FLUSH_TOTAL_TIMES "flush_total_times" @@ -548,6 +617,9 @@ typedef virDomainBlockStatsStruct *virDomainBlockStatsPtr; * VIR_DOMAIN_BLOCK_STATS_ERRS: * * In Xen this returns the mysterious 'oo_req', as an llong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BLOCK_STATS_ERRS "errs" @@ -969,6 +1041,9 @@ typedef enum { * required to transmit migration data. * * This field may not be used when VIR_MIGRATE_TUNNELLED flag is set. + * + * Since: v1.1.0 + * */ # define VIR_MIGRATE_PARAM_URI "migrate_uri" @@ -979,6 +1054,9 @@ typedef enum { * destination host as VIR_TYPED_PARAM_STRING. Omitting this parameter keeps * the domain name the same. This field is only allowed to be used with * hypervisors that support domain renaming during migration. + * + * Since: v1.1.0 + * */ # define VIR_MIGRATE_PARAM_DEST_NAME "destination_name" @@ -998,6 +1076,9 @@ typedef enum { * Omitting this parameter keeps the original domain configuration. Using this * field with hypervisors that do not support changing domain configuration * during migration will result in a failure. + * + * Since: v1.1.0 + * */ # define VIR_MIGRATE_PARAM_DEST_XML "destination_xml" @@ -1013,6 +1094,9 @@ typedef enum { * Omitting this parameter keeps the original domain persistent configuration. * Using this field with hypervisors that do not support changing domain * configuration during migration will result in a failure. + * + * Since: v1.3.4 + * */ # define VIR_MIGRATE_PARAM_PERSIST_XML "persistent_xml" @@ -1023,6 +1107,9 @@ typedef enum { * be used for migration as VIR_TYPED_PARAM_ULLONG. If set to 0 or omitted, * libvirt will choose a suitable default. Some hypervisors do not support this * feature and will return an error if this field is used and is not 0. + * + * Since: v1.1.0 + * */ # define VIR_MIGRATE_PARAM_BANDWIDTH "bandwidth" @@ -1032,6 +1119,9 @@ typedef enum { * virDomainMigrate* params field: the maximum bandwidth (in MiB/s) that will * be used for post-copy phase of a migration as VIR_TYPED_PARAM_ULLONG. If set * to 0 or omitted, post-copy migration speed will not be limited. + * + * Since: v5.1.0 + * */ # define VIR_MIGRATE_PARAM_BANDWIDTH_POSTCOPY "bandwidth.postcopy" @@ -1053,6 +1143,9 @@ typedef enum { * parameters are "tlsPort" and "tlsSubject". For example, * * spice://target.host.com:1234/?tlsPort=4567 + * + * Since: v1.1.0 + * */ # define VIR_MIGRATE_PARAM_GRAPHICS_URI "graphics_uri" @@ -1064,6 +1157,9 @@ typedef enum { * addresses are accepted as well as hostnames (the resolving is done on * destination). Some hypervisors do not support this feature and will return * an error if this field is used. + * + * Since: v1.1.4 + * */ # define VIR_MIGRATE_PARAM_LISTEN_ADDRESS "listen_address" @@ -1073,6 +1169,9 @@ typedef enum { * virDomainMigrate* params multiple field: The multiple values that list * the block devices to be migrated. At the moment this is only supported * by the QEMU driver but not for the tunnelled migration. + * + * Since: v1.2.17 + * */ # define VIR_MIGRATE_PARAM_MIGRATE_DISKS "migrate_disks" @@ -1083,6 +1182,9 @@ typedef enum { * for incoming disks migration. Type is VIR_TYPED_PARAM_INT. If set to 0 or * omitted, libvirt will choose a suitable default. At the moment this is only * supported by the QEMU driver. + * + * Since: v1.3.3 + * */ # define VIR_MIGRATE_PARAM_DISKS_PORT "disks_port" @@ -1096,6 +1198,9 @@ typedef enum { * currently only supported by the QEMU driver. UNIX URI is only usable if the * management application makes sure that socket created with this name on the * destination will be reachable from the source under the same exact path. + * + * Since: v6.8.0 + * */ # define VIR_MIGRATE_PARAM_DISKS_URI "disks_uri" @@ -1106,6 +1211,9 @@ typedef enum { * compress migration traffic. Supported compression methods: xbzrle, mt. * The parameter may be specified multiple times if more than one method * should be used. + * + * Since: v1.3.4 + * */ # define VIR_MIGRATE_PARAM_COMPRESSION "compression" @@ -1115,6 +1223,9 @@ typedef enum { * virDomainMigrate* params field: the level of compression for multithread * compression as VIR_TYPED_PARAM_INT. Accepted values are in range 0-9. * 0 is no compression, 1 is maximum speed and 9 is maximum compression. + * + * Since: v1.3.4 + * */ # define VIR_MIGRATE_PARAM_COMPRESSION_MT_LEVEL "compression.mt.level" @@ -1123,6 +1234,9 @@ typedef enum { * * virDomainMigrate* params field: the number of compression threads for * multithread compression as VIR_TYPED_PARAM_INT. + * + * Since: v1.3.4 + * */ # define VIR_MIGRATE_PARAM_COMPRESSION_MT_THREADS "compression.mt.threads" @@ -1131,6 +1245,9 @@ typedef enum { * * virDomainMigrate* params field: the number of decompression threads for * multithread compression as VIR_TYPED_PARAM_INT. + * + * Since: v1.3.4 + * */ # define VIR_MIGRATE_PARAM_COMPRESSION_MT_DTHREADS "compression.mt.dthreads" @@ -1139,6 +1256,9 @@ typedef enum { * * virDomainMigrate* params field: the size of page cache for xbzrle * compression as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.3.4 + * */ # define VIR_MIGRATE_PARAM_COMPRESSION_XBZRLE_CACHE "compression.xbzrle.cache" @@ -1148,6 +1268,9 @@ typedef enum { * virDomainMigrate* params field: the initial percentage guest CPUs are * throttled to when auto-convergence decides migration is not converging. * As VIR_TYPED_PARAM_INT. + * + * Since: v2.0.0 + * */ # define VIR_MIGRATE_PARAM_AUTO_CONVERGE_INITIAL "auto_converge.initial" @@ -1158,6 +1281,9 @@ typedef enum { * VIR_MIGRATE_PARAM_AUTO_CONVERGE_INITIAL whenever the hypervisor decides * the current rate is not enough to ensure convergence of the migration. * As VIR_TYPED_PARAM_INT. + * + * Since: v2.0.0 + * */ # define VIR_MIGRATE_PARAM_AUTO_CONVERGE_INCREMENT "auto_converge.increment" @@ -1166,6 +1292,9 @@ typedef enum { * * virDomainMigrate* params field: number of connections used during parallel * migration. As VIR_TYPED_PARAM_INT. + * + * Since: v5.2.0 + * */ # define VIR_MIGRATE_PARAM_PARALLEL_CONNECTIONS "parallel.connections" @@ -1180,6 +1309,9 @@ typedef enum { * the destination hostname and the expected certificate's hostname is known, * this parameter can be used to pass this expected hostname when starting * the migration. + * + * Since: v6.0.0 + * */ # define VIR_MIGRATE_PARAM_TLS_DESTINATION "tls.destination" @@ -1442,18 +1574,27 @@ int virDomainGetState (virDomainPtr domain, * VIR_DOMAIN_CPU_STATS_CPUTIME: * cpu usage (sum of both vcpu and hypervisor usage) in nanoseconds, * as a ullong + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_CPU_STATS_CPUTIME "cpu_time" /** * VIR_DOMAIN_CPU_STATS_USERTIME: * cpu time charged to user instructions in nanoseconds, as a ullong + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_CPU_STATS_USERTIME "user_time" /** * VIR_DOMAIN_CPU_STATS_SYSTEMTIME: * cpu time charged to system instructions in nanoseconds, as a ullong + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_CPU_STATS_SYSTEMTIME "system_time" @@ -1461,6 +1602,9 @@ int virDomainGetState (virDomainPtr domain, * VIR_DOMAIN_CPU_STATS_VCPUTIME: * vcpu usage in nanoseconds (cpu_time excluding hypervisor time), * as a ullong + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_CPU_STATS_VCPUTIME "vcpu_time" @@ -1489,6 +1633,9 @@ char * virDomainGetSchedulerType(virDomainPtr domain, * * Macro for the Blkio tunable weight: it represents the io weight * the guest can use, as a uint. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BLKIO_WEIGHT "weight" @@ -1499,6 +1646,9 @@ char * virDomainGetSchedulerType(virDomainPtr domain, * Macro for the blkio tunable weight_device: it represents the * per-device weight, as a string. The string is parsed as a * series of /path/to/device,weight elements, separated by ','. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BLKIO_DEVICE_WEIGHT "device_weight" @@ -1510,6 +1660,9 @@ char * virDomainGetSchedulerType(virDomainPtr domain, * the number of reading the block device per second, as a string. The * string is parsed as a series of /path/to/device, read_iops elements, * separated by ','. + * + * Since: v1.2.2 + * */ # define VIR_DOMAIN_BLKIO_DEVICE_READ_IOPS "device_read_iops_sec" @@ -1522,6 +1675,9 @@ char * virDomainGetSchedulerType(virDomainPtr domain, * the number of writing the block device per second, as a string. The * string is parsed as a series of /path/to/device, write_iops elements, * separated by ','. + * + * Since: v1.2.2 + * */ # define VIR_DOMAIN_BLKIO_DEVICE_WRITE_IOPS "device_write_iops_sec" @@ -1533,6 +1689,9 @@ char * virDomainGetSchedulerType(virDomainPtr domain, * the bytes of reading the block device per second, as a string. The * string is parsed as a series of /path/to/device, read_bps elements, * separated by ','. + * + * Since: v1.2.2 + * */ # define VIR_DOMAIN_BLKIO_DEVICE_READ_BPS "device_read_bytes_sec" @@ -1544,6 +1703,9 @@ char * virDomainGetSchedulerType(virDomainPtr domain, * the number of reading the block device per second, as a string. The * string is parsed as a series of /path/to/device, write_bps elements, * separated by ','. + * + * Since: v1.2.2 + * */ # define VIR_DOMAIN_BLKIO_DEVICE_WRITE_BPS "device_write_bytes_sec" @@ -1562,6 +1724,9 @@ int virDomainGetBlkioParameters(virDomainPtr domain, * VIR_DOMAIN_MEMORY_PARAM_UNLIMITED: * * Macro providing the virMemoryParameter value that indicates "unlimited" + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_MEMORY_PARAM_UNLIMITED 9007199254740991LL /* = INT64_MAX >> 10 */ @@ -1571,6 +1736,9 @@ int virDomainGetBlkioParameters(virDomainPtr domain, * * Macro for the memory tunable hard_limit: it represents the maximum memory * the guest can use, as a ullong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_MEMORY_HARD_LIMIT "hard_limit" @@ -1580,6 +1748,9 @@ int virDomainGetBlkioParameters(virDomainPtr domain, * * Macro for the memory tunable soft_limit: it represents the memory upper * limit enforced during memory contention, as a ullong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_MEMORY_SOFT_LIMIT "soft_limit" @@ -1589,6 +1760,9 @@ int virDomainGetBlkioParameters(virDomainPtr domain, * * Macro for the memory tunable min_guarantee: it represents the minimum * memory guaranteed to be reserved for the guest, as a ullong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_MEMORY_MIN_GUARANTEE "min_guarantee" @@ -1599,6 +1773,9 @@ int virDomainGetBlkioParameters(virDomainPtr domain, * Macro for the swap tunable swap_hard_limit: it represents the maximum swap * plus memory the guest can use, as a ullong. This limit has to be more than * VIR_DOMAIN_MEMORY_HARD_LIMIT. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT "swap_hard_limit" @@ -1646,6 +1823,9 @@ typedef enum { * * Macro for typed parameter name that lists the numa nodeset of a * domain, as a string. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_NUMA_NODESET "numa_nodeset" @@ -1654,6 +1834,9 @@ typedef enum { * * Macro for typed parameter name that lists the numa mode of a domain, * as an int containing a virDomainNumatuneMemMode value. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_NUMA_MODE "numa_mode" @@ -1776,6 +1959,9 @@ int virDomainInterfaceStats (virDomainPtr dom, * VIR_DOMAIN_BANDWIDTH_IN_AVERAGE: * * Macro represents the inbound average of NIC bandwidth, as a uint. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BANDWIDTH_IN_AVERAGE "inbound.average" @@ -1783,6 +1969,9 @@ int virDomainInterfaceStats (virDomainPtr dom, * VIR_DOMAIN_BANDWIDTH_IN_PEAK: * * Macro represents the inbound peak of NIC bandwidth, as a uint. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BANDWIDTH_IN_PEAK "inbound.peak" @@ -1790,6 +1979,9 @@ int virDomainInterfaceStats (virDomainPtr dom, * VIR_DOMAIN_BANDWIDTH_IN_BURST: * * Macro represents the inbound burst of NIC bandwidth, as a uint. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BANDWIDTH_IN_BURST "inbound.burst" @@ -1797,6 +1989,9 @@ int virDomainInterfaceStats (virDomainPtr dom, * VIR_DOMAIN_BANDWIDTH_IN_FLOOR: * * Macro represents the inbound floor of NIC bandwidth, as a uint. + * + * Since: v1.2.19 + * */ # define VIR_DOMAIN_BANDWIDTH_IN_FLOOR "inbound.floor" @@ -1804,6 +1999,9 @@ int virDomainInterfaceStats (virDomainPtr dom, * VIR_DOMAIN_BANDWIDTH_OUT_AVERAGE: * * Macro represents the outbound average of NIC bandwidth, as a uint. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BANDWIDTH_OUT_AVERAGE "outbound.average" @@ -1811,6 +2009,9 @@ int virDomainInterfaceStats (virDomainPtr dom, * VIR_DOMAIN_BANDWIDTH_OUT_PEAK: * * Macro represents the outbound peak of NIC bandwidth, as a uint. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BANDWIDTH_OUT_PEAK "outbound.peak" @@ -1818,6 +2019,9 @@ int virDomainInterfaceStats (virDomainPtr dom, * VIR_DOMAIN_BANDWIDTH_OUT_BURST: * * Macro represents the outbound burst of NIC bandwidth, as a uint. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BANDWIDTH_OUT_BURST "outbound.burst" @@ -2123,6 +2327,9 @@ int virDomainDelIOThread(virDomainPtr domain, * will cause more CPU time to be allocated the guest. A value set too * small will not provide enough cycles for the guest to process data. * The polling interval is not available for statistical purposes. + * + * Since: v4.10.0 + * */ # define VIR_DOMAIN_IOTHREAD_POLL_MAX_NS "poll_max_ns" @@ -2133,6 +2340,9 @@ int virDomainDelIOThread(virDomainPtr domain, * use to grow its polling interval up to the poll_max_ns value. A value * of 0 (zero) allows the hypervisor to choose its own value. The algorithm * to use for adjustment is hypervisor specific. + * + * Since: v4.10.0 + * */ # define VIR_DOMAIN_IOTHREAD_POLL_GROW "poll_grow" @@ -2144,6 +2354,9 @@ int virDomainDelIOThread(virDomainPtr domain, * the poll_max_ns value. A value of 0 (zero) allows the hypervisor to * choose its own value. The algorithm to use for adjustment is hypervisor * specific. + * + * Since: v4.10.0 + * */ # define VIR_DOMAIN_IOTHREAD_POLL_SHRINK "poll_shrink" @@ -2161,6 +2374,9 @@ int virDomainSetIOThreadParams(virDomainPtr domain, * * This macro is to be used in conjunction with virDomainPinVcpu() API. * It sets the bit (CPU usable) of the related cpu in cpumap. + * + * Since: v1.0.0 + * */ # define VIR_USE_CPU(cpumap, cpu) ((cpumap)[(cpu) / 8] |= (1 << ((cpu) % 8))) @@ -2172,6 +2388,9 @@ int virDomainSetIOThreadParams(virDomainPtr domain, * * This macro is to be used in conjunction with virDomainPinVcpu() API. * It resets the bit (CPU not usable) of the related cpu in cpumap. + * + * Since: v1.0.0 + * */ # define VIR_UNUSE_CPU(cpumap, cpu) ((cpumap)[(cpu) / 8] &= ~(1 << ((cpu) % 8))) @@ -2183,6 +2402,9 @@ int virDomainSetIOThreadParams(virDomainPtr domain, * * This macro can be used in conjunction with virNodeGetCPUMap() API. * It returns non-zero if the bit of the related CPU is set. + * + * Since: v1.0.0 + * */ # define VIR_CPU_USED(cpumap, cpu) ((cpumap)[(cpu) / 8] & (1 << ((cpu) % 8))) @@ -2194,6 +2416,9 @@ int virDomainSetIOThreadParams(virDomainPtr domain, * This macro is to be used in conjunction with virDomainPinVcpu() API. * It returns the length (in bytes) required to store the complete * CPU map between a single virtual & all physical CPUs of a domain. + * + * Since: v1.0.0 + * */ # define VIR_CPU_MAPLEN(cpu) (((cpu) + 7) / 8) @@ -2215,6 +2440,9 @@ int virDomainGetVcpus (virDomainPtr domain, * This macro is to be used in conjunction with virDomainGetVcpus() API. * VIR_CPU_USABLE macro returns a non-zero value (true) if the cpu * is usable by the vcpu, and 0 otherwise. + * + * Since: v1.0.0 + * */ # define VIR_CPU_USABLE(cpumaps, maplen, vcpu, cpu) \ @@ -2233,6 +2461,9 @@ int virDomainGetVcpus (virDomainPtr domain, * virDomainPinVcpu() APIs. VIR_COPY_CPUMAP macro extracts the cpumap of * the specified vcpu from cpumaps array and copies it into cpumap to be used * later by virDomainPinVcpu() API. + * + * Since: v1.0.0 + * */ # define VIR_COPY_CPUMAP(cpumaps, maplen, vcpu, cpumap) \ memcpy(cpumap, VIR_GET_CPUMAP(cpumaps, maplen, vcpu), maplen) @@ -2247,6 +2478,9 @@ int virDomainGetVcpus (virDomainPtr domain, * This macro is to be used in conjunction with virDomainGetVcpus() and * virDomainPinVcpu() APIs. VIR_GET_CPUMAP macro returns a pointer to the * cpumap of the specified vcpu from cpumaps array. + * + * Since: v1.0.0 + * */ # define VIR_GET_CPUMAP(cpumaps, maplen, vcpu) (&((cpumaps)[(vcpu) * (maplen)])) @@ -2337,6 +2571,9 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); * which can be used to measure the usage of cache (bytes) by * applications running on the platform. It corresponds to the * "perf.cmt" field in the *Stats APIs. + * + * Since: v1.3.3 + * */ # define VIR_PERF_PARAM_CMT "cmt" @@ -2347,6 +2584,9 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); * which can be used to monitor total system bandwidth (bytes/s) * from one level of cache to another. It corresponds to the * "perf.mbmt" field in the *Stats APIs. + * + * Since: v1.3.5 + * */ # define VIR_PERF_PARAM_MBMT "mbmt" @@ -2358,6 +2598,9 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); * which can be used to monitor the amount of data (bytes/s) sent * through the memory controller on the socket. It corresponds to * the "perf.mbml" field in the *Stats APIs. + * + * Since: v1.3.5 + * */ # define VIR_PERF_PARAM_MBML "mbml" @@ -2368,6 +2611,9 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); * event which can be used to measure the count of cache misses by * applications running on the platform. It corresponds to the * "perf.cache_misses" field in the *Stats APIs. + * + * Since: v2.3.0 + * */ # define VIR_PERF_PARAM_CACHE_MISSES "cache_misses" @@ -2378,6 +2624,9 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); * perf event which can be used to measure the count of cache hits * by applications running on the platform. It corresponds to the * "perf.cache_references" field in the *Stats APIs. + * + * Since: v2.3.0 + * */ # define VIR_PERF_PARAM_CACHE_REFERENCES "cache_references" @@ -2388,6 +2637,9 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); * event which can be used to measure the count of instructions * by applications running on the platform. It corresponds to the * "perf.instructions" field in the *Stats APIs. + * + * Since: v2.3.0 + * */ # define VIR_PERF_PARAM_INSTRUCTIONS "instructions" @@ -2398,6 +2650,9 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); * describing the total/elapsed cpu cycles. This can be used to measure * how many cpu cycles one instruction needs. * It corresponds to the "perf.cpu_cycles" field in the *Stats APIs. + * + * Since: v2.3.0 + * */ # define VIR_PERF_PARAM_CPU_CYCLES "cpu_cycles" @@ -2408,6 +2663,9 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); * perf event which can be used to measure the count of branch instructions * by applications running on the platform. It corresponds to the * "perf.branch_instructions" field in the *Stats APIs. + * + * Since: v3.0.0 + * */ # define VIR_PERF_PARAM_BRANCH_INSTRUCTIONS "branch_instructions" @@ -2418,6 +2676,9 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); * perf event which can be used to measure the count of branch misses * by applications running on the platform. It corresponds to the * "perf.branch_misses" field in the *Stats APIs. + * + * Since: v3.0.0 + * */ # define VIR_PERF_PARAM_BRANCH_MISSES "branch_misses" @@ -2428,6 +2689,9 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); * perf event which can be used to measure the count of bus cycles * by applications running on the platform. It corresponds to the * "perf.bus_cycles" field in the *Stats APIs. + * + * Since: v3.0.0 + * */ # define VIR_PERF_PARAM_BUS_CYCLES "bus_cycles" @@ -2439,6 +2703,9 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); * in the frontend of the instruction processor pipeline by applications * running on the platform. It corresponds to the * "perf.stalled_cycles_frontend" field in the *Stats APIs. + * + * Since: v3.0.0 + * */ # define VIR_PERF_PARAM_STALLED_CYCLES_FRONTEND "stalled_cycles_frontend" @@ -2450,6 +2717,9 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); * in the backend of the instruction processor pipeline by application * running on the platform. It corresponds to the * "perf.stalled_cycles_backend" field in the *Stats APIs. + * + * Since: v3.0.0 + * */ # define VIR_PERF_PARAM_STALLED_CYCLES_BACKEND "stalled_cycles_backend" @@ -2461,6 +2731,9 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); * cycles not affected by CPU frequency scaling by applications * running on the platform. It corresponds to the * "perf.ref_cpu_cycles" field in the *Stats APIs. + * + * Since: v3.0.0 + * */ # define VIR_PERF_PARAM_REF_CPU_CYCLES "ref_cpu_cycles" @@ -2472,6 +2745,9 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); * clock time by applications running on the platform. It * corresponds to the "perf.cpu_clock" field in the *Stats * APIs. + * + * Since: v3.2.0 + * */ # define VIR_PERF_PARAM_CPU_CLOCK "cpu_clock" @@ -2483,6 +2759,9 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); * clock time by applications running on the platform. It * corresponds to the "perf.task_clock" field in the *Stats * APIs. + * + * Since: v3.2.0 + * */ # define VIR_PERF_PARAM_TASK_CLOCK "task_clock" @@ -2493,6 +2772,9 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); * perf event which can be used to measure the count of page * faults by applications running on the platform. It corresponds * to the "perf.page_faults" field in the *Stats APIs. +* +* Since: v3.2.0 +* */ # define VIR_PERF_PARAM_PAGE_FAULTS "page_faults" @@ -2503,6 +2785,9 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); * perf event which can be used to measure the count of context * switches by applications running on the platform. It corresponds * to the "perf.context_switches" field in the *Stats APIs. + * + * Since: v3.2.0 + * */ # define VIR_PERF_PARAM_CONTEXT_SWITCHES "context_switches" @@ -2513,6 +2798,9 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); * perf event which can be used to measure the count of cpu * migrations by applications running on the platform. It corresponds * to the "perf.cpu_migrations" field in the *Stats APIs. + * + * Since: v3.2.0 + * */ # define VIR_PERF_PARAM_CPU_MIGRATIONS "cpu_migrations" @@ -2523,6 +2811,9 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); * perf event which can be used to measure the count of minor page * faults by applications running on the platform. It corresponds * to the "perf.page_faults_min" field in the *Stats APIs. + * + * Since: v3.2.0 + * */ # define VIR_PERF_PARAM_PAGE_FAULTS_MIN "page_faults_min" @@ -2533,6 +2824,9 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); * perf event which can be used to measure the count of major page * faults by applications running on the platform. It corresponds * to the "perf.page_faults_maj" field in the *Stats APIs. + * + * Since: v3.2.0 + * */ # define VIR_PERF_PARAM_PAGE_FAULTS_MAJ "page_faults_maj" @@ -2543,6 +2837,9 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); * perf event which can be used to measure the count of alignment * faults by applications running on the platform. It corresponds * to the "perf.alignment_faults" field in the *Stats APIs. + * + * Since: v3.2.0 + * */ # define VIR_PERF_PARAM_ALIGNMENT_FAULTS "alignment_faults" @@ -2553,6 +2850,9 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats); * perf event which can be used to measure the count of emulation * faults by applications running on the platform. It corresponds * to the "perf.emulation_faults" field in the *Stats APIs. + * + * Since: v3.2.0 + * */ # define VIR_PERF_PARAM_EMULATION_FAULTS "emulation_faults" @@ -2744,6 +3044,9 @@ typedef enum { * allowing a subsequent change of bandwidth via * virDomainBlockJobSetSpeed(). The actual speed can be determined * with virDomainGetBlockJobInfo(). + * + * Since: v1.2.8 + * */ # define VIR_DOMAIN_BLOCK_COPY_BANDWIDTH "bandwidth" @@ -2755,6 +3058,9 @@ typedef enum { * restrict this to be a power of two or fall within a certain * range. Specifying 0 is the same as omitting this parameter, to * request the hypervisor default. + * + * Since: v1.2.8 + * */ # define VIR_DOMAIN_BLOCK_COPY_GRANULARITY "granularity" @@ -2764,6 +3070,9 @@ typedef enum { * how much data in bytes can be in flight between source and destination, * as an unsigned long long. Specifying 0 is the same as omitting this * parameter, to request the hypervisor default. + * + * Since: v1.2.8 + * */ # define VIR_DOMAIN_BLOCK_COPY_BUF_SIZE "buf-size" @@ -2805,6 +3114,9 @@ int virDomainBlockCommit(virDomainPtr dom, const char *disk, const char *base, * * Macro for the BlockIoTune tunable weight: it represents the total * bytes per second permitted through a block device, as a ullong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_BYTES_SEC "total_bytes_sec" @@ -2813,6 +3125,9 @@ int virDomainBlockCommit(virDomainPtr dom, const char *disk, const char *base, * * Macro for the BlockIoTune tunable weight: it represents the read * bytes per second permitted through a block device, as a ullong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BLOCK_IOTUNE_READ_BYTES_SEC "read_bytes_sec" @@ -2821,6 +3136,9 @@ int virDomainBlockCommit(virDomainPtr dom, const char *disk, const char *base, * * Macro for the BlockIoTune tunable weight: it represents the write * bytes per second permitted through a block device, as a ullong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BLOCK_IOTUNE_WRITE_BYTES_SEC "write_bytes_sec" @@ -2829,6 +3147,9 @@ int virDomainBlockCommit(virDomainPtr dom, const char *disk, const char *base, * * Macro for the BlockIoTune tunable weight: it represents the total * I/O operations per second permitted through a block device, as a ullong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_IOPS_SEC "total_iops_sec" @@ -2837,6 +3158,9 @@ int virDomainBlockCommit(virDomainPtr dom, const char *disk, const char *base, * * Macro for the BlockIoTune tunable weight: it represents the read * I/O operations per second permitted through a block device, as a ullong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BLOCK_IOTUNE_READ_IOPS_SEC "read_iops_sec" @@ -2844,6 +3168,9 @@ int virDomainBlockCommit(virDomainPtr dom, const char *disk, const char *base, * VIR_DOMAIN_BLOCK_IOTUNE_WRITE_IOPS_SEC: * Macro for the BlockIoTune tunable weight: it represents the write * I/O operations per second permitted through a block device, as a ullong. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_BLOCK_IOTUNE_WRITE_IOPS_SEC "write_iops_sec" @@ -2852,6 +3179,9 @@ int virDomainBlockCommit(virDomainPtr dom, const char *disk, const char *base, * * Macro for the BlockIoTune tunable weight: it represents the maximum total * bytes per second permitted through a block device, as a ullong. + * + * Since: v1.2.11 + * */ # define VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_BYTES_SEC_MAX "total_bytes_sec_max" @@ -2860,6 +3190,9 @@ int virDomainBlockCommit(virDomainPtr dom, const char *disk, const char *base, * * Macro for the BlockIoTune tunable weight: it represents the maximum read * bytes per second permitted through a block device, as a ullong. + * + * Since: v1.2.11 + * */ # define VIR_DOMAIN_BLOCK_IOTUNE_READ_BYTES_SEC_MAX "read_bytes_sec_max" @@ -2868,6 +3201,9 @@ int virDomainBlockCommit(virDomainPtr dom, const char *disk, const char *base, * * Macro for the BlockIoTune tunable weight: it represents the maximum write * bytes per second permitted through a block device, as a ullong. + * + * Since: v1.2.11 + * */ # define VIR_DOMAIN_BLOCK_IOTUNE_WRITE_BYTES_SEC_MAX "write_bytes_sec_max" @@ -2876,6 +3212,9 @@ int virDomainBlockCommit(virDomainPtr dom, const char *disk, const char *base, * * Macro for the BlockIoTune tunable weight: it represents the maximum * I/O operations per second permitted through a block device, as a ullong. + * + * Since: v1.2.11 + * */ # define VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_IOPS_SEC_MAX "total_iops_sec_max" @@ -2884,6 +3223,9 @@ int virDomainBlockCommit(virDomainPtr dom, const char *disk, const char *base, * * Macro for the BlockIoTune tunable weight: it represents the maximum read * I/O operations per second permitted through a block device, as a ullong. + * + * Since: v1.2.11 + * */ # define VIR_DOMAIN_BLOCK_IOTUNE_READ_IOPS_SEC_MAX "read_iops_sec_max" @@ -2891,6 +3233,9 @@ int virDomainBlockCommit(virDomainPtr dom, const char *disk, const char *base, * VIR_DOMAIN_BLOCK_IOTUNE_WRITE_IOPS_SEC_MAX: * Macro for the BlockIoTune tunable weight: it represents the maximum write * I/O operations per second permitted through a block device, as a ullong. + * + * Since: v1.2.11 + * */ # define VIR_DOMAIN_BLOCK_IOTUNE_WRITE_IOPS_SEC_MAX "write_iops_sec_max" @@ -2899,6 +3244,9 @@ int virDomainBlockCommit(virDomainPtr dom, const char *disk, const char *base, * * Macro for the BlockIoTune tunable weight: it represents the duration in * seconds for the burst allowed by total_bytes_sec_max, as a ullong. + * + * Since: v2.4.0 + * */ # define VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_BYTES_SEC_MAX_LENGTH "total_bytes_sec_max_length" @@ -2907,6 +3255,9 @@ int virDomainBlockCommit(virDomainPtr dom, const char *disk, const char *base, * * Macro for the BlockIoTune tunable weight: it represents the duration in * seconds for the burst allowed by read_bytes_sec_max, as a ullong. + * + * Since: v2.4.0 + * */ # define VIR_DOMAIN_BLOCK_IOTUNE_READ_BYTES_SEC_MAX_LENGTH "read_bytes_sec_max_length" @@ -2915,6 +3266,9 @@ int virDomainBlockCommit(virDomainPtr dom, const char *disk, const char *base, * * Macro for the BlockIoTune tunable weight: it represents the duration in * seconds for the burst allowed by write_bytes_sec_max, as a ullong. + * + * Since: v2.4.0 + * */ # define VIR_DOMAIN_BLOCK_IOTUNE_WRITE_BYTES_SEC_MAX_LENGTH "write_bytes_sec_max_length" @@ -2923,6 +3277,9 @@ int virDomainBlockCommit(virDomainPtr dom, const char *disk, const char *base, * * Macro for the BlockIoTune tunable weight: it represents the duration in * seconds for the burst allowed by total_iops_sec_max, as a ullong. + * + * Since: v2.4.0 + * */ # define VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_IOPS_SEC_MAX_LENGTH "total_iops_sec_max_length" @@ -2931,6 +3288,9 @@ int virDomainBlockCommit(virDomainPtr dom, const char *disk, const char *base, * * Macro for the BlockIoTune tunable weight: it represents the duration in * seconds for the burst allowed by read_iops_sec_max, as a ullong. + * + * Since: v2.4.0 + * */ # define VIR_DOMAIN_BLOCK_IOTUNE_READ_IOPS_SEC_MAX_LENGTH "read_iops_sec_max_length" @@ -2939,6 +3299,9 @@ int virDomainBlockCommit(virDomainPtr dom, const char *disk, const char *base, * * Macro for the BlockIoTune tunable weight: it represents the duration in * seconds for the burst allowed by write_iops_sec_max, as a ullong. + * + * Since: v2.4.0 + * */ # define VIR_DOMAIN_BLOCK_IOTUNE_WRITE_IOPS_SEC_MAX_LENGTH "write_iops_sec_max_length" @@ -2946,6 +3309,9 @@ int virDomainBlockCommit(virDomainPtr dom, const char *disk, const char *base, * VIR_DOMAIN_BLOCK_IOTUNE_SIZE_IOPS_SEC: * Macro for the BlockIoTune tunable weight: it represents the size * I/O operations per second permitted through a block device, as a ullong. + * + * Since: v1.2.11 + * */ # define VIR_DOMAIN_BLOCK_IOTUNE_SIZE_IOPS_SEC "size_iops_sec" @@ -2953,6 +3319,9 @@ int virDomainBlockCommit(virDomainPtr dom, const char *disk, const char *base, * VIR_DOMAIN_BLOCK_IOTUNE_GROUP_NAME: * Macro for the BlockIoTune tunable weight: it represents a group name to * allow sharing of I/O throttling quota between multiple drives, as a string. + * + * Since: v3.0.0 + * */ # define VIR_DOMAIN_BLOCK_IOTUNE_GROUP_NAME "group_name" @@ -3034,6 +3403,9 @@ typedef enum { * VIR_KEYCODE_SET_RFB: * * Compatibility alias for VIR_KEYCODE_SET_QNUM, which replaced it since 4.2.0. + * + * Since: v1.0.0 + * */ # define VIR_KEYCODE_SET_RFB VIR_KEYCODE_SET_QNUM @@ -3041,6 +3413,9 @@ typedef enum { * VIR_DOMAIN_SEND_KEY_MAX_KEYS: * * Maximum number of keycodes that can be sent in one virDomainSendKey() call. + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_SEND_KEY_MAX_KEYS 16 @@ -3533,6 +3908,9 @@ typedef enum { * virDomainGetJobStats field: the operation which started the job as * VIR_TYPED_PARAM_INT. The values correspond to the items in * virDomainJobOperation enum. + * + * Since: v3.3.0 + * */ # define VIR_DOMAIN_JOB_OPERATION "operation" @@ -3543,6 +3921,9 @@ typedef enum { * job, as VIR_TYPED_PARAM_ULLONG. * * This field corresponds to timeElapsed field in virDomainJobInfo. + * + * Since: v1.0.3 + * */ # define VIR_DOMAIN_JOB_TIME_ELAPSED "time_elapsed" @@ -3553,6 +3934,9 @@ typedef enum { * migration job NOT including the time required to transfer control * flow from the source host to the destination host, * as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.2.15 + * */ # define VIR_DOMAIN_JOB_TIME_ELAPSED_NET "time_elapsed_net" @@ -3563,6 +3947,9 @@ typedef enum { * jobs, as VIR_TYPED_PARAM_ULLONG. * * This field corresponds to timeRemaining field in virDomainJobInfo. + * + * Since: v1.0.3 + * */ # define VIR_DOMAIN_JOB_TIME_REMAINING "time_remaining" @@ -3573,6 +3960,9 @@ typedef enum { * during migration, as VIR_TYPED_PARAM_ULLONG. The real computed downtime * between the time guest CPUs were paused and the time they were resumed * is reported for completed migration. + * + * Since: v1.0.3 + * */ # define VIR_DOMAIN_JOB_DOWNTIME "downtime" @@ -3582,6 +3972,9 @@ typedef enum { * virDomainGetJobStats field: real measured downtime (ms) NOT including * the time required to transfer control flow from the source host to the * destination host, as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.2.15 + * */ # define VIR_DOMAIN_JOB_DOWNTIME_NET "downtime_net" @@ -3591,6 +3984,9 @@ typedef enum { * virDomainGetJobStats field: total time in milliseconds spent preparing * the migration in the 'setup' phase before the iterations begin, as * VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.2.9 + * */ # define VIR_DOMAIN_JOB_SETUP_TIME "setup_time" @@ -3606,6 +4002,9 @@ typedef enum { * VIR_DOMAIN_JOB_DATA_PROCESSED + VIR_DOMAIN_JOB_DATA_REMAINING. * * This field corresponds to dataTotal field in virDomainJobInfo. + * + * Since: v1.0.3 + * */ # define VIR_DOMAIN_JOB_DATA_TOTAL "data_total" @@ -3616,6 +4015,9 @@ typedef enum { * beginning of the job, as VIR_TYPED_PARAM_ULLONG. * * This field corresponds to dataProcessed field in virDomainJobInfo. + * + * Since: v1.0.3 + * */ # define VIR_DOMAIN_JOB_DATA_PROCESSED "data_processed" @@ -3626,6 +4028,9 @@ typedef enum { * transferred, as VIR_TYPED_PARAM_ULLONG. * * This field corresponds to dataRemaining field in virDomainJobInfo. + * + * Since: v1.0.3 + * */ # define VIR_DOMAIN_JOB_DATA_REMAINING "data_remaining" @@ -3636,6 +4041,9 @@ typedef enum { * tracking guest memory progress, as VIR_TYPED_PARAM_ULLONG. * * This field corresponds to memTotal field in virDomainJobInfo. + * + * Since: v1.0.3 + * */ # define VIR_DOMAIN_JOB_MEMORY_TOTAL "memory_total" @@ -3646,6 +4054,9 @@ typedef enum { * tracking guest memory progress, as VIR_TYPED_PARAM_ULLONG. * * This field corresponds to memProcessed field in virDomainJobInfo. + * + * Since: v1.0.3 + * */ # define VIR_DOMAIN_JOB_MEMORY_PROCESSED "memory_processed" @@ -3656,6 +4067,9 @@ typedef enum { * tracking guest memory progress, as VIR_TYPED_PARAM_ULLONG. * * This field corresponds to memRemaining field in virDomainJobInfo. + * + * Since: v1.0.3 + * */ # define VIR_DOMAIN_JOB_MEMORY_REMAINING "memory_remaining" @@ -3668,6 +4082,9 @@ typedef enum { * * The most common example of such pages are zero pages, i.e., pages filled * with zero bytes. + * + * Since: v1.0.3 + * */ # define VIR_DOMAIN_JOB_MEMORY_CONSTANT "memory_constant" @@ -3678,6 +4095,9 @@ typedef enum { * any kind of compression (i.e., pages which were not filled with a constant * byte and which could not be compressed) transferred since the beginning * of the migration job, as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.0.3 + * */ # define VIR_DOMAIN_JOB_MEMORY_NORMAL "memory_normal" @@ -3688,6 +4108,9 @@ typedef enum { * as VIR_TYPED_PARAM_ULLONG. * * See VIR_DOMAIN_JOB_MEMORY_NORMAL for more details. + * + * Since: v1.0.3 + * */ # define VIR_DOMAIN_JOB_MEMORY_NORMAL_BYTES "memory_normal_bytes" @@ -3696,6 +4119,9 @@ typedef enum { * * virDomainGetJobStats field: network throughput used while migrating * memory in Bytes per second, as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.2.9 + * */ # define VIR_DOMAIN_JOB_MEMORY_BPS "memory_bps" @@ -3704,6 +4130,9 @@ typedef enum { * virDomainGetJobStats field: number of memory pages dirtied by the guest * per second, as VIR_TYPED_PARAM_ULLONG. This statistics makes sense only * when live migration is running. + * + * Since: v1.3.1 + * */ # define VIR_DOMAIN_JOB_MEMORY_DIRTY_RATE "memory_dirty_rate" @@ -3715,6 +4144,9 @@ typedef enum { * convert other page based statistics, such as * VIR_DOMAIN_JOB_MEMORY_DIRTY_RATE or VIR_DOMAIN_JOB_COMPRESSION_PAGES * to bytes. + * + * Since: v3.9.0 + * */ # define VIR_DOMAIN_JOB_MEMORY_PAGE_SIZE "memory_page_size" @@ -3726,6 +4158,9 @@ typedef enum { * when memory starts to be transferred and the value is increased by one * every time a new iteration is started to transfer memory pages dirtied * since the last iteration. + * + * Since: v1.3.1 + * */ # define VIR_DOMAIN_JOB_MEMORY_ITERATION "memory_iteration" @@ -3736,6 +4171,9 @@ typedef enum { * destination host during post-copy migration, as VIR_TYPED_PARAM_ULLONG. * This counter is incremented whenever the migrated domain tries to access * a memory page which has not been transferred from the source host yet. + * + * Since: v5.0.0 + * */ # define VIR_DOMAIN_JOB_MEMORY_POSTCOPY_REQS "memory_postcopy_requests" @@ -3746,6 +4184,9 @@ typedef enum { * tracking guest disk progress, as VIR_TYPED_PARAM_ULLONG. * * This field corresponds to fileTotal field in virDomainJobInfo. + * + * Since: v1.0.3 + * */ # define VIR_DOMAIN_JOB_DISK_TOTAL "disk_total" @@ -3756,6 +4197,9 @@ typedef enum { * tracking guest disk progress, as VIR_TYPED_PARAM_ULLONG. * * This field corresponds to fileProcessed field in virDomainJobInfo. + * + * Since: v1.0.3 + * */ # define VIR_DOMAIN_JOB_DISK_PROCESSED "disk_processed" @@ -3766,6 +4210,9 @@ typedef enum { * tracking guest disk progress, as VIR_TYPED_PARAM_ULLONG. * * This field corresponds to fileRemaining field in virDomainJobInfo. + * + * Since: v1.0.3 + * */ # define VIR_DOMAIN_JOB_DISK_REMAINING "disk_remaining" @@ -3774,6 +4221,9 @@ typedef enum { * * virDomainGetJobStats field: network throughput used while migrating * disks in Bytes per second, as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.2.9 + * */ # define VIR_DOMAIN_JOB_DISK_BPS "disk_bps" @@ -3783,6 +4233,9 @@ typedef enum { * virDomainGetJobStats field: size of the cache (in bytes) used for * compressing repeatedly transferred memory pages during live migration, * as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.0.3 + * */ # define VIR_DOMAIN_JOB_COMPRESSION_CACHE "compression_cache" @@ -3791,6 +4244,9 @@ typedef enum { * * virDomainGetJobStats field: number of compressed bytes transferred * since the beginning of migration, as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.0.3 + * */ # define VIR_DOMAIN_JOB_COMPRESSION_BYTES "compression_bytes" @@ -3799,6 +4255,9 @@ typedef enum { * * virDomainGetJobStats field: number of compressed pages transferred * since the beginning of migration, as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.0.3 + * */ # define VIR_DOMAIN_JOB_COMPRESSION_PAGES "compression_pages" @@ -3808,6 +4267,9 @@ typedef enum { * virDomainGetJobStats field: number of repeatedly changing pages that * were not found in compression cache and thus could not be compressed, * as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.0.3 + * */ # define VIR_DOMAIN_JOB_COMPRESSION_CACHE_MISSES "compression_cache_misses" @@ -3818,6 +4280,9 @@ typedef enum { * were found in compression cache but were sent uncompressed because * the result of compression was larger than the original page as a whole, * as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.0.3 + * */ # define VIR_DOMAIN_JOB_COMPRESSION_OVERFLOW "compression_overflow" @@ -3827,6 +4292,9 @@ typedef enum { * virDomainGetJobStats field: current percentage guest CPUs are throttled * to when auto-convergence decided migration was not converging, as * VIR_TYPED_PARAM_INT. + * + * Since: v2.0.0 + * */ # define VIR_DOMAIN_JOB_AUTO_CONVERGE_THROTTLE "auto_converge_throttle" @@ -3835,6 +4303,9 @@ typedef enum { * * virDomainGetJobStats field: Present only in statistics for a completed job. * Successful completion of the job as VIR_TYPED_PARAM_BOOLEAN. + * + * Since: v6.0.0 + * */ # define VIR_DOMAIN_JOB_SUCCESS "success" @@ -3843,6 +4314,9 @@ typedef enum { * * virDomainGetJobStats field: Present only in statistics for a completed job. * Optional error message for a failed job. + * + * Since: v6.3.0 + * */ # define VIR_DOMAIN_JOB_ERRMSG "errmsg" @@ -3851,6 +4325,9 @@ typedef enum { * VIR_DOMAIN_JOB_DISK_TEMP_USED: * virDomainGetJobStats field: current usage of temporary disk space for the * job in bytes as VIR_TYPED_PARAM_ULLONG. + * + * Since: v6.0.0 + * */ # define VIR_DOMAIN_JOB_DISK_TEMP_USED "disk_temp_used" @@ -3858,6 +4335,9 @@ typedef enum { * VIR_DOMAIN_JOB_DISK_TEMP_TOTAL: * virDomainGetJobStats field: possible total temporary disk space for the * job in bytes as VIR_TYPED_PARAM_ULLONG. + * + * Since: v6.0.0 + * */ # define VIR_DOMAIN_JOB_DISK_TEMP_TOTAL "disk_temp_total" @@ -4419,6 +4899,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * Macro represents formatted pinning for one vcpu specified by id which is * appended to the parameter name, for example "cputune.vcpupin1", * as VIR_TYPED_PARAM_STRING. + * + * Since: v1.2.9 + * */ # define VIR_DOMAIN_TUNABLE_CPU_VCPUPIN "cputune.vcpupin%u" @@ -4427,6 +4910,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * Macro represents formatted pinning for emulator process, * as VIR_TYPED_PARAM_STRING. + * + * Since: v1.2.9 + * */ # define VIR_DOMAIN_TUNABLE_CPU_EMULATORPIN "cputune.emulatorpin" @@ -4436,6 +4922,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * Macro represents formatted pinning for one IOThread specified by id which is * appended to the parameter name, for example "cputune.iothreadpin1", * as VIR_TYPED_PARAM_STRING. + * + * Since: v1.2.14 + * */ # define VIR_DOMAIN_TUNABLE_CPU_IOTHREADSPIN "cputune.iothreadpin%u" @@ -4444,6 +4933,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * Macro represents proportional weight of the scheduler used on the * host cpu, when using the posix scheduler, as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.2.9 + * */ # define VIR_DOMAIN_TUNABLE_CPU_CPU_SHARES "cputune.cpu_shares" @@ -4452,6 +4944,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * Macro represents the enforcement period for a quota, in microseconds, * for whole domain, when using the posix scheduler, as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.3.3 + * */ # define VIR_DOMAIN_TUNABLE_CPU_GLOBAL_PERIOD "cputune.global_period" @@ -4460,6 +4955,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * Macro represents the maximum bandwidth to be used within a period for * whole domain, when using the posix scheduler, as VIR_TYPED_PARAM_LLONG. + * + * Since: v1.3.3 + * */ # define VIR_DOMAIN_TUNABLE_CPU_GLOBAL_QUOTA "cputune.global_quota" @@ -4468,6 +4966,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * Macro represents the enforcement period for a quota, in microseconds, * for vcpus only, when using the posix scheduler, as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.2.9 + * */ # define VIR_DOMAIN_TUNABLE_CPU_VCPU_PERIOD "cputune.vcpu_period" @@ -4476,6 +4977,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * Macro represents the maximum bandwidth to be used within a period for * vcpus only, when using the posix scheduler, as VIR_TYPED_PARAM_LLONG. + * + * Since: v1.2.9 + * */ # define VIR_DOMAIN_TUNABLE_CPU_VCPU_QUOTA "cputune.vcpu_quota" @@ -4485,6 +4989,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * Macro represents the enforcement period for a quota in microseconds, * when using the posix scheduler, for all emulator activity not tied to * vcpus, as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.2.9 + * */ # define VIR_DOMAIN_TUNABLE_CPU_EMULATOR_PERIOD "cputune.emulator_period" @@ -4494,6 +5001,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * Macro represents the maximum bandwidth to be used within a period for * all emulator activity not tied to vcpus, when using the posix scheduler, * as an VIR_TYPED_PARAM_LLONG. + * + * Since: v1.2.9 + * */ # define VIR_DOMAIN_TUNABLE_CPU_EMULATOR_QUOTA "cputune.emulator_quota" @@ -4502,6 +5012,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * Macro represents the enforcement period for a quota, in microseconds, for * iothreads only, when using the posix scheduler, as VIR_TYPED_PARAM_ULLONG. + * + * Since: v2.2.0 + * */ # define VIR_DOMAIN_TUNABLE_CPU_IOTHREAD_PERIOD "cputune.iothread_period" @@ -4510,6 +5023,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * Macro represents the maximum bandwidth to be used within a period for * iothreads only, when using the posix scheduler, as VIR_TYPED_PARAM_LLONG. + * + * Since: v2.2.0 + * */ # define VIR_DOMAIN_TUNABLE_CPU_IOTHREAD_QUOTA "cputune.iothread_quota" @@ -4518,6 +5034,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * Macro represents the name of guest disk for which the values are updated, * as VIR_TYPED_PARAM_STRING. + * + * Since: v1.2.9 + * */ # define VIR_DOMAIN_TUNABLE_BLKDEV_DISK "blkdeviotune.disk" @@ -4526,6 +5045,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * Macro represents the total throughput limit in bytes per second, * as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.2.9 + * */ # define VIR_DOMAIN_TUNABLE_BLKDEV_TOTAL_BYTES_SEC "blkdeviotune.total_bytes_sec" @@ -4534,6 +5056,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * Macro represents the read throughput limit in bytes per second, * as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.2.9 + * */ # define VIR_DOMAIN_TUNABLE_BLKDEV_READ_BYTES_SEC "blkdeviotune.read_bytes_sec" @@ -4542,6 +5067,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * Macro represents the write throughput limit in bytes per second, * as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.2.9 + * */ # define VIR_DOMAIN_TUNABLE_BLKDEV_WRITE_BYTES_SEC "blkdeviotune.write_bytes_sec" @@ -4550,6 +5078,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * Macro represents the total I/O operations per second, * as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.2.9 + * */ # define VIR_DOMAIN_TUNABLE_BLKDEV_TOTAL_IOPS_SEC "blkdeviotune.total_iops_sec" @@ -4558,6 +5089,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * Macro represents the read I/O operations per second, * as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.2.9 + * */ # define VIR_DOMAIN_TUNABLE_BLKDEV_READ_IOPS_SEC "blkdeviotune.read_iops_sec" @@ -4566,6 +5100,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * Macro represents the write I/O operations per second, * as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.2.9 + * */ # define VIR_DOMAIN_TUNABLE_BLKDEV_WRITE_IOPS_SEC "blkdeviotune.write_iops_sec" @@ -4574,6 +5111,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * Macro represents the total throughput limit during bursts in * maximum bytes per second, as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.2.11 + * */ # define VIR_DOMAIN_TUNABLE_BLKDEV_TOTAL_BYTES_SEC_MAX "blkdeviotune.total_bytes_sec_max" @@ -4582,6 +5122,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * Macro represents the read throughput limit during bursts in * maximum bytes per second, as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.2.11 + * */ # define VIR_DOMAIN_TUNABLE_BLKDEV_READ_BYTES_SEC_MAX "blkdeviotune.read_bytes_sec_max" @@ -4590,6 +5133,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * Macro represents the write throughput limit during bursts in * maximum bytes per second, as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.2.11 + * */ # define VIR_DOMAIN_TUNABLE_BLKDEV_WRITE_BYTES_SEC_MAX "blkdeviotune.write_bytes_sec_max" @@ -4598,6 +5144,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * Macro represents the total maximum I/O operations per second during bursts, * as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.2.11 + * */ # define VIR_DOMAIN_TUNABLE_BLKDEV_TOTAL_IOPS_SEC_MAX "blkdeviotune.total_iops_sec_max" @@ -4606,6 +5155,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * Macro represents the read maximum I/O operations per second during bursts, * as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.2.11 + * */ # define VIR_DOMAIN_TUNABLE_BLKDEV_READ_IOPS_SEC_MAX "blkdeviotune.read_iops_sec_max" @@ -4614,6 +5166,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * Macro represents the write maximum I/O operations per second during bursts, * as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.2.11 + * */ # define VIR_DOMAIN_TUNABLE_BLKDEV_WRITE_IOPS_SEC_MAX "blkdeviotune.write_iops_sec_max" @@ -4622,6 +5177,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * Macro represents the size maximum I/O operations per second, * as VIR_TYPED_PARAM_ULLONG. + * + * Since: v1.2.11 + * */ # define VIR_DOMAIN_TUNABLE_BLKDEV_SIZE_IOPS_SEC "blkdeviotune.size_iops_sec" @@ -4630,6 +5188,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * Macro represents the group name to be used, * as VIR_TYPED_PARAM_STRING. + * + * Since: v3.0.0 + * */ # define VIR_DOMAIN_TUNABLE_BLKDEV_GROUP_NAME "blkdeviotune.group_name" @@ -4639,6 +5200,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * Macro represents the length in seconds allowed for a burst period * for the blkdeviotune.total_bytes_sec_max, * as VIR_TYPED_PARAM_ULLONG. + * + * Since: v2.4.0 + * */ # define VIR_DOMAIN_TUNABLE_BLKDEV_TOTAL_BYTES_SEC_MAX_LENGTH "blkdeviotune.total_bytes_sec_max_length" @@ -4648,6 +5212,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * Macro represents the length in seconds allowed for a burst period * for the blkdeviotune.read_bytes_sec_max * as VIR_TYPED_PARAM_ULLONG. + * + * Since: v2.4.0 + * */ # define VIR_DOMAIN_TUNABLE_BLKDEV_READ_BYTES_SEC_MAX_LENGTH "blkdeviotune.read_bytes_sec_max_length" @@ -4657,6 +5224,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * Macro represents the length in seconds allowed for a burst period * for the blkdeviotune.write_bytes_sec_max * as VIR_TYPED_PARAM_ULLONG. + * + * Since: v2.4.0 + * */ # define VIR_DOMAIN_TUNABLE_BLKDEV_WRITE_BYTES_SEC_MAX_LENGTH "blkdeviotune.write_bytes_sec_max_length" @@ -4666,6 +5236,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * Macro represents the length in seconds allowed for a burst period * for the blkdeviotune.total_iops_sec_max * as VIR_TYPED_PARAM_ULLONG. + * + * Since: v2.4.0 + * */ # define VIR_DOMAIN_TUNABLE_BLKDEV_TOTAL_IOPS_SEC_MAX_LENGTH "blkdeviotune.total_iops_sec_max_length" @@ -4675,6 +5248,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * Macro represents the length in seconds allowed for a burst period * for the blkdeviotune.read_iops_sec_max * as VIR_TYPED_PARAM_ULLONG. + * + * Since: v2.4.0 + * */ # define VIR_DOMAIN_TUNABLE_BLKDEV_READ_IOPS_SEC_MAX_LENGTH "blkdeviotune.read_iops_sec_max_length" @@ -4684,6 +5260,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * Macro represents the length in seconds allowed for a burst period * for the blkdeviotune.write_iops_sec_max * as VIR_TYPED_PARAM_ULLONG. + * + * Since: v2.4.0 + * */ # define VIR_DOMAIN_TUNABLE_BLKDEV_WRITE_IOPS_SEC_MAX_LENGTH "blkdeviotune.write_iops_sec_max_length" @@ -4836,6 +5415,9 @@ typedef void (*virConnectDomainEventMemoryDeviceSizeChangeCallback)(virConnectPt * * Used to cast the event specific callback into the generic one * for use for virConnectDomainEventRegisterAny() + * + * Since: v1.0.0 + * */ # define VIR_DOMAIN_EVENT_CALLBACK(cb) ((virConnectDomainEventGenericCallback)(cb)) @@ -5021,7 +5603,10 @@ typedef enum { * * Macro providing the field length of virSchedParameter. Provided * for backwards compatibility; VIR_TYPED_PARAM_FIELD_LENGTH is the - * preferred value since 0.9.2. + * preferred value + * + * Since: v0.9.2 + * */ # define VIR_DOMAIN_SCHED_FIELD_LENGTH VIR_TYPED_PARAM_FIELD_LENGTH @@ -5030,7 +5615,10 @@ typedef enum { * * a virSchedParameter is the set of scheduler parameters. * Provided for backwards compatibility; virTypedParameter is the - * preferred alias since 0.9.2. + * preferred alias. + * + * Since: v0.9.2 + * */ # define _virSchedParameter _virTypedParameter typedef struct _virTypedParameter virSchedParameter; @@ -5065,7 +5653,10 @@ typedef enum { * * Macro providing the field length of virBlkioParameter. Provided * for backwards compatibility; VIR_TYPED_PARAM_FIELD_LENGTH is the - * preferred value since 0.9.2. + * preferred value. + * + * Since: v0.9.2 + * */ # define VIR_DOMAIN_BLKIO_FIELD_LENGTH VIR_TYPED_PARAM_FIELD_LENGTH @@ -5074,7 +5665,10 @@ typedef enum { * * a virBlkioParameter is the set of blkio parameters. * Provided for backwards compatibility; virTypedParameter is the - * preferred alias since 0.9.2. + * preferred alias. + * + * Since: v0.9.2 + * */ # define _virBlkioParameter _virTypedParameter typedef struct _virTypedParameter virBlkioParameter; @@ -5109,7 +5703,10 @@ typedef enum { * * Macro providing the field length of virMemoryParameter. Provided * for backwards compatibility; VIR_TYPED_PARAM_FIELD_LENGTH is the - * preferred value since 0.9.2. + * preferred value. + * + * Since: v0.9.2 + * */ # define VIR_DOMAIN_MEMORY_FIELD_LENGTH VIR_TYPED_PARAM_FIELD_LENGTH @@ -5118,7 +5715,10 @@ typedef enum { * * a virMemoryParameter is the set of scheduler parameters. * Provided for backwards compatibility; virTypedParameter is the - * preferred alias since 0.9.2. + * preferred alias. + * + * Since: v0.9.2 + * */ # define _virMemoryParameter _virTypedParameter typedef struct _virTypedParameter virMemoryParameter; @@ -5236,6 +5836,9 @@ int virDomainSetLifecycleAction(virDomainPtr domain, * * Macro represents the launch measurement of the SEV guest, * as VIR_TYPED_PARAM_STRING. + * + * Since: v4.5.0 + * */ # define VIR_DOMAIN_LAUNCH_SECURITY_SEV_MEASUREMENT "sev-measurement" @@ -5245,6 +5848,9 @@ int virDomainSetLifecycleAction(virDomainPtr domain, * * Macro represents the API major version of the SEV host, * as VIR_TYPED_PARAM_UINT. + * + * Since: v8.0.0 + * */ # define VIR_DOMAIN_LAUNCH_SECURITY_SEV_API_MAJOR "sev-api-major" @@ -5253,6 +5859,9 @@ int virDomainSetLifecycleAction(virDomainPtr domain, * * Macro represents the API minor version of the SEV guest, * as VIR_TYPED_PARAM_UINT. + * + * Since: v8.0.0 + * */ # define VIR_DOMAIN_LAUNCH_SECURITY_SEV_API_MINOR "sev-api-minor" @@ -5261,6 +5870,9 @@ int virDomainSetLifecycleAction(virDomainPtr domain, * * Macro represents the build ID of the SEV host, * as VIR_TYPED_PARAM_UINT. + * + * Since: v8.0.0 + * */ # define VIR_DOMAIN_LAUNCH_SECURITY_SEV_BUILD_ID "sev-build-id" @@ -5269,6 +5881,9 @@ int virDomainSetLifecycleAction(virDomainPtr domain, * * Macro represents the policy of the SEV guest, * as VIR_TYPED_PARAM_UINT. + * + * Since: v8.0.0 + * */ # define VIR_DOMAIN_LAUNCH_SECURITY_SEV_POLICY "sev-policy" @@ -5280,6 +5895,9 @@ int virDomainSetLifecycleAction(virDomainPtr domain, * the SEV firmware to recover the plain text of the launch secret. See * section "6.6 LAUNCH_SECRET" in the SEV API specification for a detailed * description of the secret header. + * + * Since: v8.0.0 + * */ # define VIR_DOMAIN_LAUNCH_SECURITY_SEV_SECRET_HEADER "sev-secret-header" @@ -5290,6 +5908,9 @@ int virDomainSetLifecycleAction(virDomainPtr domain, * base64-encoded VIR_TYPED_PARAM_STRING containing an encrypted launch * secret. The secret is created by the domain owner after the SEV launch * measurement is retrieved and verified. + * + * Since: v8.0.0 + * */ # define VIR_DOMAIN_LAUNCH_SECURITY_SEV_SECRET "sev-secret" @@ -5299,6 +5920,9 @@ int virDomainSetLifecycleAction(virDomainPtr domain, * A macro used to represent the physical address within the guest's memory * where the secret will be set, as VIR_TYPED_PARAM_ULLONG. If not specified, * the address will be determined by the hypervisor. + * + * Since: v8.0.0 + * */ # define VIR_DOMAIN_LAUNCH_SECURITY_SEV_SECRET_SET_ADDRESS "sev-secret-set-address" diff --git a/include/libvirt/libvirt-host.h b/include/libvirt/libvirt-host.h index f6a9588568..a31fa2d9ee 100644 --- a/include/libvirt/libvirt-host.h +++ b/include/libvirt/libvirt-host.h @@ -80,6 +80,9 @@ typedef virStream *virStreamPtr; * * Macro providing the maximum length of the virSecurityLabel label string. * Note that this value is based on that used by Labeled NFS. + * + * Since: v1.0.0 + * */ # define VIR_SECURITY_LABEL_BUFLEN (4096 + 1) @@ -108,6 +111,9 @@ typedef virSecurityLabel *virSecurityLabelPtr; * VIR_SECURITY_MODEL_BUFLEN: * * Macro providing the maximum length of the virSecurityModel model string. + * + * Since: v1.0.0 + * */ # define VIR_SECURITY_MODEL_BUFLEN (256 + 1) @@ -115,6 +121,9 @@ typedef virSecurityLabel *virSecurityLabelPtr; * VIR_SECURITY_DOI_BUFLEN: * * Macro providing the maximum length of the virSecurityModel doi string. + * + * Since: v1.0.0 + * */ # define VIR_SECURITY_DOI_BUFLEN (256 + 1) @@ -176,6 +185,9 @@ struct _virNodeInfo { * VIR_NODE_CPU_STATS_FIELD_LENGTH: * * Macro providing the field length of virNodeCPUStats + * + * Since: v1.0.0 + * */ # define VIR_NODE_CPU_STATS_FIELD_LENGTH 80 @@ -193,6 +205,9 @@ typedef enum { * * Macro for the cumulative CPU time which was spent by the kernel, * since the node booting up (in nanoseconds). + * + * Since: v1.0.0 + * */ # define VIR_NODE_CPU_STATS_KERNEL "kernel" @@ -201,6 +216,9 @@ typedef enum { * * The cumulative CPU time which was spent by user processes, * since the node booting up (in nanoseconds). + * + * Since: v1.0.0 + * */ # define VIR_NODE_CPU_STATS_USER "user" @@ -209,6 +227,9 @@ typedef enum { * * The cumulative idle CPU time, * since the node booting up (in nanoseconds). + * + * Since: v1.0.0 + * */ # define VIR_NODE_CPU_STATS_IDLE "idle" @@ -217,6 +238,9 @@ typedef enum { * * The cumulative I/O wait CPU time, * since the node booting up (in nanoseconds). + * + * Since: v1.0.0 + * */ # define VIR_NODE_CPU_STATS_IOWAIT "iowait" @@ -225,6 +249,9 @@ typedef enum { * * The cumulative interrupt CPU time, * since the node booting up (in nanoseconds). + * + * Since: v1.2.2 + * */ # define VIR_NODE_CPU_STATS_INTR "intr" @@ -234,6 +261,9 @@ typedef enum { * The CPU utilization of a node. * The usage value is in percent and 100% represents all CPUs of * the node. + * + * Since: v1.0.0 + * */ # define VIR_NODE_CPU_STATS_UTILIZATION "utilization" @@ -254,6 +284,9 @@ struct _virNodeCPUStats { * VIR_NODE_MEMORY_STATS_FIELD_LENGTH: * * Macro providing the field length of virNodeMemoryStats + * + * Since: v1.0.0 + * */ # define VIR_NODE_MEMORY_STATS_FIELD_LENGTH 80 @@ -271,6 +304,9 @@ typedef enum { * * Macro for the total memory of specified cell: * it represents the maximum memory. + * + * Since: v1.0.0 + * */ # define VIR_NODE_MEMORY_STATS_TOTAL "total" @@ -280,6 +316,9 @@ typedef enum { * Macro for the free memory of specified cell: * On Linux, it includes buffer and cached memory, in case of * VIR_NODE_MEMORY_STATS_ALL_CELLS. + * + * Since: v1.0.0 + * */ # define VIR_NODE_MEMORY_STATS_FREE "free" @@ -288,6 +327,9 @@ typedef enum { * * Macro for the buffer memory: On Linux, it is only returned in case of * VIR_NODE_MEMORY_STATS_ALL_CELLS. + * + * Since: v1.0.0 + * */ # define VIR_NODE_MEMORY_STATS_BUFFERS "buffers" @@ -296,6 +338,9 @@ typedef enum { * * Macro for the cached memory: On Linux, it is only returned in case of * VIR_NODE_MEMORY_STATS_ALL_CELLS. + * + * Since: v1.0.0 + * */ # define VIR_NODE_MEMORY_STATS_CACHED "cached" @@ -317,6 +362,9 @@ struct _virNodeMemoryStats { * * Macro for typed parameter that represents how many present pages * to scan before the shared memory service goes to sleep. + * + * Since: v1.0.0 + * */ # define VIR_NODE_MEMORY_SHARED_PAGES_TO_SCAN "shm_pages_to_scan" @@ -325,6 +373,9 @@ struct _virNodeMemoryStats { * * Macro for typed parameter that represents how many milliseconds * the shared memory service should sleep before next scan. + * + * Since: v1.0.0 + * */ # define VIR_NODE_MEMORY_SHARED_SLEEP_MILLISECS "shm_sleep_millisecs" @@ -333,6 +384,9 @@ struct _virNodeMemoryStats { * * Macro for typed parameter that represents how many the shared * memory pages are being used. + * + * Since: v1.0.0 + * */ # define VIR_NODE_MEMORY_SHARED_PAGES_SHARED "shm_pages_shared" @@ -341,6 +395,9 @@ struct _virNodeMemoryStats { * * Macro for typed parameter that represents how many sites are * sharing the pages i.e. how much saved. + * + * Since: v1.0.0 + * */ # define VIR_NODE_MEMORY_SHARED_PAGES_SHARING "shm_pages_sharing" @@ -349,6 +406,9 @@ struct _virNodeMemoryStats { * * Macro for typed parameter that represents how many pages unique * but repeatedly checked for merging. + * + * Since: v1.0.0 + * */ # define VIR_NODE_MEMORY_SHARED_PAGES_UNSHARED "shm_pages_unshared" @@ -357,6 +417,9 @@ struct _virNodeMemoryStats { * * Macro for typed parameter that represents how many pages changing * too fast to be placed in a tree. + * + * Since: v1.0.0 + * */ # define VIR_NODE_MEMORY_SHARED_PAGES_VOLATILE "shm_pages_volatile" @@ -365,6 +428,9 @@ struct _virNodeMemoryStats { * * Macro for typed parameter that represents how many times all * mergeable areas have been scanned. + * + * Since: v1.0.0 + * */ # define VIR_NODE_MEMORY_SHARED_FULL_SCANS "shm_full_scans" @@ -377,6 +443,9 @@ struct _virNodeMemoryStats { * memory area of same NUMA node are merged; When its value is 1, * pages from all nodes can be merged. Other values are reserved * for future use. + * + * Since: v1.0.0 + * */ # define VIR_NODE_MEMORY_SHARED_MERGE_ACROSS_NODES "shm_merge_across_nodes" @@ -406,6 +475,9 @@ int virNodeGetCPUMap(virConnectPtr conn, * * This macro is to calculate the total number of CPUs supported * but not necessary active in the host. + * + * Since: v1.0.0 + * */ @@ -445,6 +517,9 @@ typedef virNodeMemoryStats *virNodeMemoryStatsPtr; * VIR_NODE_SEV_PDH: * * Macro represents the Platform Diffie-Hellman key, as VIR_TYPED_PARAMS_STRING. + * + * Since: v4.5.0 + * */ # define VIR_NODE_SEV_PDH "pdh" @@ -454,6 +529,9 @@ typedef virNodeMemoryStats *virNodeMemoryStatsPtr; * Macro represents the platform certificate chain that includes the platform * endorsement key (PEK), owner certificate authority (OCD) and chip * endorsement key (CEK), as VIR_TYPED_PARAMS_STRING. + * + * Since: v4.5.0 + * */ # define VIR_NODE_SEV_CERT_CHAIN "cert-chain" @@ -461,6 +539,9 @@ typedef virNodeMemoryStats *virNodeMemoryStatsPtr; * VIR_NODE_SEV_CBITPOS: * * Macro represents the CBit Position used by hypervisor when SEV is enabled. + * + * Since: v4.5.0 + * */ # define VIR_NODE_SEV_CBITPOS "cbitpos" @@ -469,6 +550,9 @@ typedef virNodeMemoryStats *virNodeMemoryStatsPtr; * * Macro represents the number of bits we lose in physical address space * when SEV is enabled in the guest. + * + * Since: v4.5.0 + * */ # define VIR_NODE_SEV_REDUCED_PHYS_BITS "reduced-phys-bits" @@ -477,6 +561,9 @@ typedef virNodeMemoryStats *virNodeMemoryStatsPtr; * * Macro represents the number of SEV guests that can * be run on the host, as a VIR_TYPED_PARAM_UINT. + * + * Since: v8.0.0 + * */ # define VIR_NODE_SEV_MAX_GUESTS "max-guests" @@ -485,6 +572,9 @@ typedef virNodeMemoryStats *virNodeMemoryStatsPtr; * * Macro represents the number of SEV-ES guests that can * be run on the host, as a VIR_TYPED_PARAM_UINT. + * + * Since: v8.0.0 + * */ # define VIR_NODE_SEV_MAX_ES_GUESTS "max-es-guests" @@ -582,6 +672,9 @@ VIR_EXPORT_VAR virConnectAuthPtr virConnectAuthPtrDefault; * * This macro provides the length of the buffer required * for virDomainGetUUID() + * + * Since: v1.0.0 + * */ # define VIR_UUID_BUFLEN (16) @@ -591,6 +684,9 @@ VIR_EXPORT_VAR virConnectAuthPtr virConnectAuthPtrDefault; * * This macro provides the length of the buffer required * for virDomainGetUUIDString() + * + * Since: v1.0.0 + * */ # define VIR_UUID_STRING_BUFLEN (36+1) @@ -617,6 +713,9 @@ int virConnectClose (virConnectPtr conn); * VIR_CONNECT_IDENTITY_USER_NAME: * * The operating system user name as VIR_TYPED_PARAM_STRING. + * + * Since: v5.8.0 + * */ # define VIR_CONNECT_IDENTITY_USER_NAME "user-name" @@ -624,6 +723,9 @@ int virConnectClose (virConnectPtr conn); * VIR_CONNECT_IDENTITY_UNIX_USER_ID: * * The UNIX user ID as VIR_TYPED_PARAM_ULLONG. + * + * Since: v5.8.0 + * */ # define VIR_CONNECT_IDENTITY_UNIX_USER_ID "unix-user-id" @@ -631,6 +733,9 @@ int virConnectClose (virConnectPtr conn); * VIR_CONNECT_IDENTITY_GROUP_NAME: * * The operating system group name as VIR_TYPED_PARAM_STRING. + * + * Since: v5.8.0 + * */ # define VIR_CONNECT_IDENTITY_GROUP_NAME "group-name" @@ -638,6 +743,9 @@ int virConnectClose (virConnectPtr conn); * VIR_CONNECT_IDENTITY_UNIX_GROUP_ID: * * The UNIX group ID as VIR_TYPED_PARAM_ULLONG. + * + * Since: v5.8.0 + * */ # define VIR_CONNECT_IDENTITY_UNIX_GROUP_ID "unix-group-id" @@ -645,6 +753,9 @@ int virConnectClose (virConnectPtr conn); * VIR_CONNECT_IDENTITY_PROCESS_ID: * * The operating system process ID as VIR_TYPED_PARAM_LLONG. + * + * Since: v5.8.0 + * */ # define VIR_CONNECT_IDENTITY_PROCESS_ID "process-id" @@ -656,6 +767,9 @@ int virConnectClose (virConnectPtr conn); * The units the time is measured in vary according to the * host operating system. On Linux this is usually clock * ticks (as reported in /proc/$PID/stat field 22). + * + * Since: v5.8.0 + * */ # define VIR_CONNECT_IDENTITY_PROCESS_TIME "process-time" @@ -663,6 +777,9 @@ int virConnectClose (virConnectPtr conn); * VIR_CONNECT_IDENTITY_SASL_USER_NAME: * * The SASL authenticated username as VIR_TYPED_PARAM_STRING + * + * Since: v5.8.0 + * */ # define VIR_CONNECT_IDENTITY_SASL_USER_NAME "sasl-user-name" @@ -670,6 +787,9 @@ int virConnectClose (virConnectPtr conn); * VIR_CONNECT_IDENTITY_X509_DISTINGUISHED_NAME: * * The TLS x509 certificate distinguished named as VIR_TYPED_PARAM_STRING + * + * Since: v5.8.0 + * */ # define VIR_CONNECT_IDENTITY_X509_DISTINGUISHED_NAME "x509-distinguished-name" @@ -677,6 +797,9 @@ int virConnectClose (virConnectPtr conn); * VIR_CONNECT_IDENTITY_SELINUX_CONTEXT: * * The application's SELinux context as VIR_TYPED_PARAM_STRING. + * + * Since: v5.8.0 + * */ # define VIR_CONNECT_IDENTITY_SELINUX_CONTEXT "selinux-context" diff --git a/include/libvirt/libvirt-network.h b/include/libvirt/libvirt-network.h index 4868a49427..3bf6df34a7 100644 --- a/include/libvirt/libvirt-network.h +++ b/include/libvirt/libvirt-network.h @@ -283,6 +283,9 @@ typedef void (*virConnectNetworkEventLifecycleCallback)(virConnectPtr conn, * * Used to cast the event specific callback into the generic one * for use for virConnectNetworkEventRegisterAny() + * + * Since: v1.2.1 + * */ # define VIR_NETWORK_EVENT_CALLBACK(cb) ((virConnectNetworkEventGenericCallback)(cb)) @@ -402,6 +405,9 @@ virNetworkPortGetUUIDString(virNetworkPortPtr port, * VIR_NETWORK_PORT_BANDWIDTH_IN_AVERAGE: * * Macro represents the inbound average of NIC bandwidth, as a uint. + * + * Since: v5.5.0 + * */ # define VIR_NETWORK_PORT_BANDWIDTH_IN_AVERAGE "inbound.average" @@ -409,6 +415,9 @@ virNetworkPortGetUUIDString(virNetworkPortPtr port, * VIR_NETWORK_PORT_BANDWIDTH_IN_PEAK: * * Macro represents the inbound peak of NIC bandwidth, as a uint. + * + * Since: v5.5.0 + * */ # define VIR_NETWORK_PORT_BANDWIDTH_IN_PEAK "inbound.peak" @@ -416,6 +425,9 @@ virNetworkPortGetUUIDString(virNetworkPortPtr port, * VIR_NETWORK_PORT_BANDWIDTH_IN_BURST: * * Macro represents the inbound burst of NIC bandwidth, as a uint. + * + * Since: v5.5.0 + * */ # define VIR_NETWORK_PORT_BANDWIDTH_IN_BURST "inbound.burst" @@ -423,6 +435,9 @@ virNetworkPortGetUUIDString(virNetworkPortPtr port, * VIR_NETWORK_PORT_BANDWIDTH_IN_FLOOR: * * Macro represents the inbound floor of NIC bandwidth, as a uint. + * + * Since: v5.5.0 + * */ # define VIR_NETWORK_PORT_BANDWIDTH_IN_FLOOR "inbound.floor" @@ -430,6 +445,9 @@ virNetworkPortGetUUIDString(virNetworkPortPtr port, * VIR_NETWORK_PORT_BANDWIDTH_OUT_AVERAGE: * * Macro represents the outbound average of NIC bandwidth, as a uint. + * + * Since: v5.5.0 + * */ # define VIR_NETWORK_PORT_BANDWIDTH_OUT_AVERAGE "outbound.average" @@ -437,6 +455,9 @@ virNetworkPortGetUUIDString(virNetworkPortPtr port, * VIR_NETWORK_PORT_BANDWIDTH_OUT_PEAK: * * Macro represents the outbound peak of NIC bandwidth, as a uint. + * + * Since: v5.5.0 + * */ # define VIR_NETWORK_PORT_BANDWIDTH_OUT_PEAK "outbound.peak" @@ -444,6 +465,9 @@ virNetworkPortGetUUIDString(virNetworkPortPtr port, * VIR_NETWORK_PORT_BANDWIDTH_OUT_BURST: * * Macro represents the outbound burst of NIC bandwidth, as a uint. + * + * Since: v5.5.0 + * */ # define VIR_NETWORK_PORT_BANDWIDTH_OUT_BURST "outbound.burst" diff --git a/include/libvirt/libvirt-nodedev.h b/include/libvirt/libvirt-nodedev.h index de398a1767..589495213c 100644 --- a/include/libvirt/libvirt-nodedev.h +++ b/include/libvirt/libvirt-nodedev.h @@ -156,6 +156,9 @@ int virNodeDeviceIsActive(virNodeDevicePtr dev); * * Used to cast the event specific callback into the generic one * for use for virConnectNodeDeviceEventRegisterAny() + * + * Since: v2.2.0 + * */ # define VIR_NODE_DEVICE_EVENT_CALLBACK(cb)((virConnectNodeDeviceEventGenericCallback)(cb)) diff --git a/include/libvirt/libvirt-secret.h b/include/libvirt/libvirt-secret.h index 6134989369..cd636f14be 100644 --- a/include/libvirt/libvirt-secret.h +++ b/include/libvirt/libvirt-secret.h @@ -120,6 +120,9 @@ int virSecretFree (virSecretPtr secret); * * Used to cast the event specific callback into the generic one * for use for virConnectSecretEventRegisterAny() + * + * Since: v3.0.0 + * */ # define VIR_SECRET_EVENT_CALLBACK(cb)((virConnectSecretEventGenericCallback)(cb)) diff --git a/include/libvirt/libvirt-storage.h b/include/libvirt/libvirt-storage.h index e7265fe772..a0c4dab809 100644 --- a/include/libvirt/libvirt-storage.h +++ b/include/libvirt/libvirt-storage.h @@ -420,6 +420,9 @@ int virStoragePoolIsPersistent(virStoragePoolPtr pool); * * Used to cast the event specific callback into the generic one * for use for virConnectStoragePoolEventRegisterAny() + * + * Since: v2.0.0 + * */ # define VIR_STORAGE_POOL_EVENT_CALLBACK(cb)((virConnectStoragePoolEventGenericCallback)(cb)) -- 2.35.1

Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-admin.h | 60 +++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/include/libvirt/libvirt-admin.h b/include/libvirt/libvirt-admin.h index 0f90ec8cdb..f54aeb0c1d 100644 --- a/include/libvirt/libvirt-admin.h +++ b/include/libvirt/libvirt-admin.h @@ -132,6 +132,9 @@ virAdmServerPtr virAdmConnectLookupServer(virAdmConnectPtr conn, * VIR_THREADPOOL_WORKERS_MIN: * Macro for the threadpool minWorkers limit: represents the bottom limit to * number of active workers in threadpool, as VIR_TYPED_PARAM_UINT. + * + * Since: v1.3.4 + * */ # define VIR_THREADPOOL_WORKERS_MIN "minWorkers" @@ -142,6 +145,9 @@ virAdmServerPtr virAdmConnectLookupServer(virAdmConnectPtr conn, * number of active workers in threadpool, as VIR_TYPED_PARAM_UINT. * The value of this limit has to be greater than VIR_THREADPOOL_WORKERS_MIN * at all times. + * + * Since: v1.3.4 + * */ # define VIR_THREADPOOL_WORKERS_MAX "maxWorkers" @@ -150,6 +156,9 @@ virAdmServerPtr virAdmConnectLookupServer(virAdmConnectPtr conn, * VIR_THREADPOOL_WORKERS_PRIORITY: * Macro for the threadpool nPrioWorkers attribute: represents the current number * of active priority workers in threadpool, as VIR_TYPED_PARAM_UINT. + * + * Since: v1.3.4 + * */ # define VIR_THREADPOOL_WORKERS_PRIORITY "prioWorkers" @@ -161,6 +170,9 @@ virAdmServerPtr virAdmConnectLookupServer(virAdmConnectPtr conn, * * NOTE: This attribute is read-only and any attempt to set it will be denied * by daemon + * + * Since: v1.3.4 + * */ # define VIR_THREADPOOL_WORKERS_FREE "freeWorkers" @@ -172,6 +184,9 @@ virAdmServerPtr virAdmConnectLookupServer(virAdmConnectPtr conn, * * NOTE: This attribute is read-only and any attempt to set it will be denied * by daemon + * + * Since: v1.3.4 + * */ # define VIR_THREADPOOL_WORKERS_CURRENT "nWorkers" @@ -183,6 +198,9 @@ virAdmServerPtr virAdmConnectLookupServer(virAdmConnectPtr conn, * * NOTE: This attribute is read-only and any attempt to set it will be denied * by daemon + * + * Since: v1.3.4 + * */ # define VIR_THREADPOOL_JOB_QUEUE_DEPTH "jobQueueDepth" @@ -233,6 +251,9 @@ virAdmServerLookupClient(virAdmServerPtr srv, * * NOTE: This attribute is read-only and any attempt to set it will be denied * by daemon + * + * Since: v1.3.5 + * */ # define VIR_CLIENT_INFO_READONLY "readonly" @@ -244,6 +265,9 @@ virAdmServerLookupClient(virAdmServerPtr srv, * * NOTE: This attribute is read-only and any attempt to set it will be denied * by daemon + * + * Since: v1.3.5 + * */ # define VIR_CLIENT_INFO_SOCKET_ADDR "sock_addr" @@ -255,6 +279,9 @@ virAdmServerLookupClient(virAdmServerPtr srv, * * NOTE: This attribute is read-only and any attempt to set it will be denied * by daemon + * + * Since: v1.3.5 + * */ # define VIR_CLIENT_INFO_SASL_USER_NAME "sasl_user_name" @@ -267,6 +294,9 @@ virAdmServerLookupClient(virAdmServerPtr srv, * * NOTE: This attribute is read-only and any attempt to set it will be denied * by daemon + * + * Since: v1.3.5 + * */ # define VIR_CLIENT_INFO_X509_DISTINGUISHED_NAME "tls_x509_dname" @@ -279,6 +309,9 @@ virAdmServerLookupClient(virAdmServerPtr srv, * * NOTE: This attribute is read-only and any attempt to set it will be denied * by daemon + * + * Since: v1.3.5 + * */ # define VIR_CLIENT_INFO_UNIX_USER_ID "unix_user_id" @@ -291,6 +324,9 @@ virAdmServerLookupClient(virAdmServerPtr srv, * * NOTE: This attribute is read-only and any attempt to set it will be denied * by daemon + * + * Since: v1.3.5 + * */ # define VIR_CLIENT_INFO_UNIX_USER_NAME "unix_user_name" @@ -303,6 +339,9 @@ virAdmServerLookupClient(virAdmServerPtr srv, * * NOTE: This attribute is read-only and any attempt to set it will be denied * by daemon + * + * Since: v1.3.5 + * */ # define VIR_CLIENT_INFO_UNIX_GROUP_ID "unix_group_id" @@ -315,6 +354,9 @@ virAdmServerLookupClient(virAdmServerPtr srv, * * NOTE: This attribute is read-only and any attempt to set it will be denied * by daemon + * + * Since: v1.3.5 + * */ # define VIR_CLIENT_INFO_UNIX_GROUP_NAME "unix_group_name" @@ -327,6 +369,9 @@ virAdmServerLookupClient(virAdmServerPtr srv, * * NOTE: This attribute is read-only and any attempt to set it will be denied * by daemon + * + * Since: v1.3.5 + * */ # define VIR_CLIENT_INFO_UNIX_PROCESS_ID "unix_process_id" @@ -339,6 +384,9 @@ virAdmServerLookupClient(virAdmServerPtr srv, * * NOTE: This attribute is read-only and any attempt to set it will be denied * by daemon + * + * Since: v1.3.5 + * */ # define VIR_CLIENT_INFO_SELINUX_CONTEXT "selinux_context" @@ -356,6 +404,9 @@ int virAdmClientClose(virAdmClientPtr client, unsigned int flags); * VIR_SERVER_CLIENTS_MAX: * Macro for per-server nclients_max limit: represents the upper limit to * number of clients connected to the server, as uint. + * + * Since: v1.3.5 + * */ # define VIR_SERVER_CLIENTS_MAX "nclients_max" @@ -367,6 +418,9 @@ int virAdmClientClose(virAdmClientPtr client, unsigned int flags); * * NOTE: This attribute is read-only and any attempt to set it will be denied * by daemon + * + * Since: v1.3.5 + * */ # define VIR_SERVER_CLIENTS_CURRENT "nclients" @@ -376,6 +430,9 @@ int virAdmClientClose(virAdmClientPtr client, unsigned int flags); * Macro for per-server nclients_unauth_max limit: represents the upper limit * to number of clients connected to the server, but not authenticated yet, * as VIR_TYPED_PARAM_UINT. + * + * Since: v1.3.5 + * */ # define VIR_SERVER_CLIENTS_UNAUTH_MAX "nclients_unauth_max" @@ -388,6 +445,9 @@ int virAdmClientClose(virAdmClientPtr client, unsigned int flags); * * NOTE: This attribute is read-only and any attempt to set it will be denied * by daemon + * + * Since: v1.3.5 + * */ # define VIR_SERVER_CLIENTS_UNAUTH_CURRENT "nclients_unauth" -- 2.35.1

There were a few style fixes introduced with this commit. With 'style fixes', I mean the docstring enforced/used by scripts/apibuild.py As most of the metadata was generated by a script, it did not seem useful to split the style fixes with those generated by the script. In the end, they are all typedef fixes that are related to appending *Since* metadata. Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-domain-checkpoint.h | 18 +- include/libvirt/libvirt-domain-snapshot.h | 24 +- include/libvirt/libvirt-domain.h | 583 +++++++++++++++++++- include/libvirt/libvirt-event.h | 3 + include/libvirt/libvirt-host.h | 100 +++- include/libvirt/libvirt-interface.h | 13 +- include/libvirt/libvirt-network.h | 50 +- include/libvirt/libvirt-nodedev.h | 22 +- include/libvirt/libvirt-nwfilter.h | 12 + include/libvirt/libvirt-secret.h | 22 +- include/libvirt/libvirt-storage.h | 81 +++ include/libvirt/libvirt-stream.h | 18 + include/libvirt/virterror.h | 12 + 13 files changed, 913 insertions(+), 45 deletions(-) diff --git a/include/libvirt/libvirt-domain-checkpoint.h b/include/libvirt/libvirt-domain-checkpoint.h index a59578b857..1a1631b9cf 100644 --- a/include/libvirt/libvirt-domain-checkpoint.h +++ b/include/libvirt/libvirt-domain-checkpoint.h @@ -34,6 +34,9 @@ * a domain. A checkpoint is useful for tracking which portions of the * domain disks have been altered since a point in time, but by itself does * not allow reverting back to that point in time. + * + * Since: v5.2.0 + * */ typedef struct _virDomainCheckpoint virDomainCheckpoint; @@ -43,6 +46,9 @@ typedef struct _virDomainCheckpoint virDomainCheckpoint; * A virDomainCheckpointPtr is pointer to a virDomainCheckpoint * private structure, and is the type used to reference a domain * checkpoint in the API. + * + * Since: v5.2.0 + * */ typedef virDomainCheckpoint *virDomainCheckpointPtr; @@ -50,6 +56,12 @@ const char *virDomainCheckpointGetName(virDomainCheckpointPtr checkpoint); virDomainPtr virDomainCheckpointGetDomain(virDomainCheckpointPtr checkpoint); virConnectPtr virDomainCheckpointGetConnect(virDomainCheckpointPtr checkpoint); +/** + * virDomainCheckpointCreateFlags: + * + * Since: v5.6.0 + * + */ typedef enum { VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE = (1 << 0), /* Restore or alter metadata (Since: v5.6.0) */ @@ -86,7 +98,11 @@ char *virDomainCheckpointGetXMLDesc(virDomainCheckpointPtr checkpoint, * flag (1<<0) depends on which function it is passed to; but serves * to toggle the per-call default of whether the listing is shallow or * recursive. Remaining bits come in groups; if all bits from a group - * are 0, then that group is not used to filter results. */ + * are 0, then that group is not used to filter results. + * + * Since: v5.6.0 + * + */ typedef enum { VIR_DOMAIN_CHECKPOINT_LIST_ROOTS = (1 << 0), /* Filter by checkpoints with no parents, when diff --git a/include/libvirt/libvirt-domain-snapshot.h b/include/libvirt/libvirt-domain-snapshot.h index 40f7a95441..aa7bfa903a 100644 --- a/include/libvirt/libvirt-domain-snapshot.h +++ b/include/libvirt/libvirt-domain-snapshot.h @@ -34,6 +34,9 @@ * a domain. A snapshot captures the state of the domain at a point in * time, with the intent that the guest can be reverted back to that * state at a later time. + * + * Since: v1.0.0 + * */ typedef struct _virDomainSnapshot virDomainSnapshot; @@ -42,6 +45,9 @@ typedef struct _virDomainSnapshot virDomainSnapshot; * * A virDomainSnapshotPtr is pointer to a virDomainSnapshot private structure, * and is the type used to reference a domain snapshot in the API. + * + * Since: v1.0.0 + * */ typedef virDomainSnapshot *virDomainSnapshotPtr; @@ -49,6 +55,12 @@ const char *virDomainSnapshotGetName(virDomainSnapshotPtr snapshot); virDomainPtr virDomainSnapshotGetDomain(virDomainSnapshotPtr snapshot); virConnectPtr virDomainSnapshotGetConnect(virDomainSnapshotPtr snapshot); +/** + * virDomainSnapshotCreateFlags: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE = (1 << 0), /* Restore or alter metadata (Since: v1.0.0) */ @@ -98,7 +110,11 @@ char *virDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, * of flag (1<<0) depends on which function it is passed to; but serves * to toggle the per-call default of whether the listing is shallow or * recursive. Remaining bits come in groups; if all bits from a group are - * 0, then that group is not used to filter results. */ + * 0, then that group is not used to filter results. + * + * Since: v1.0.0 + * + */ typedef enum { VIR_DOMAIN_SNAPSHOT_LIST_ROOTS = (1 << 0), /* Filter by snapshots with no parents, when @@ -194,6 +210,12 @@ int virDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot, int virDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot, unsigned int flags); +/** + * virDomainSnapshotRevertFlags: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING = 1 << 0, /* Run after revert (Since: v1.0.0) */ VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED = 1 << 1, /* Pause after revert (Since: v1.0.0) */ diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index 4983494a0b..912ed26a56 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -32,6 +32,9 @@ * virDomain: * * a virDomain is a private structure representing a domain. + * + * Since: v1.0.0 + * */ typedef struct _virDomain virDomain; @@ -40,6 +43,9 @@ typedef struct _virDomain virDomain; * * a virDomainPtr is pointer to a virDomain private structure, this is the * type used to reference a domain in the API. + * + * Since: v1.0.0 + * */ typedef virDomain *virDomainPtr; @@ -47,6 +53,9 @@ typedef virDomain *virDomainPtr; * virDomainState: * * A domain may be in different states at a given point in time + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_NOSTATE = 0, /* no state (Since: v1.0.0) */ @@ -69,6 +78,12 @@ typedef enum { # endif } virDomainState; +/** + * virDomainNostateReason: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_DOMAIN_NOSTATE_UNKNOWN = 0, @@ -77,6 +92,12 @@ typedef enum { # endif } virDomainNostateReason; +/** + * virDomainRunningReason: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_DOMAIN_RUNNING_UNKNOWN = 0, VIR_DOMAIN_RUNNING_BOOTED = 1, /* normal startup from boot (Since: v1.0.0) */ @@ -96,6 +117,12 @@ typedef enum { # endif } virDomainRunningReason; +/** + * virDomainBlockedReason: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_DOMAIN_BLOCKED_UNKNOWN = 0, /* the reason is unknown (Since: v1.0.0) */ @@ -104,6 +131,12 @@ typedef enum { # endif } virDomainBlockedReason; +/** + * virDomainPausedReason: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_DOMAIN_PAUSED_UNKNOWN = 0, /* the reason is unknown (Since: v1.0.0) */ VIR_DOMAIN_PAUSED_USER = 1, /* paused on user request (Since: v1.0.0) */ @@ -125,6 +158,12 @@ typedef enum { # endif } virDomainPausedReason; +/** + * virDomainShutdownReason: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_DOMAIN_SHUTDOWN_UNKNOWN = 0, /* the reason is unknown (Since: v1.0.0) */ VIR_DOMAIN_SHUTDOWN_USER = 1, /* shutting down on user request (Since: v1.0.0) */ @@ -134,6 +173,12 @@ typedef enum { # endif } virDomainShutdownReason; +/** + * virDomainShutoffReason: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_DOMAIN_SHUTOFF_UNKNOWN = 0, /* the reason is unknown (Since: v1.0.0) */ VIR_DOMAIN_SHUTOFF_SHUTDOWN = 1, /* normal shutdown (Since: v1.0.0) */ @@ -151,6 +196,12 @@ typedef enum { # endif } virDomainShutoffReason; +/** + * virDomainCrashedReason: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_DOMAIN_CRASHED_UNKNOWN = 0, /* crashed for unknown reason (Since: v1.0.0) */ VIR_DOMAIN_CRASHED_PANICKED = 1, /* domain panicked (Since: v1.1.1) */ @@ -160,6 +211,12 @@ typedef enum { # endif } virDomainCrashedReason; +/** + * virDomainPMSuspendedReason: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_DOMAIN_PMSUSPENDED_UNKNOWN = 0, @@ -168,6 +225,12 @@ typedef enum { # endif } virDomainPMSuspendedReason; +/** + * virDomainPMSuspendedDiskReason: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_DOMAIN_PMSUSPENDED_DISK_UNKNOWN = 0, @@ -180,6 +243,9 @@ typedef enum { * virDomainControlState: * * Current state of a control interface to the domain. + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_CONTROL_OK = 0, /* operational, ready to accept commands (Since: v1.0.0) */ @@ -200,6 +266,9 @@ typedef enum { * virDomainControlErrorReason: * * Reason for the error state. + * + * Since: v1.2.14 + * */ typedef enum { VIR_DOMAIN_CONTROL_ERROR_REASON_NONE = 0, /* server didn't provide a @@ -221,6 +290,9 @@ typedef enum { * * Structure filled in by virDomainGetControlInfo and providing details about * current state of control interface to a domain. + * + * Since: v1.0.0 + * */ typedef struct _virDomainControlInfo virDomainControlInfo; struct _virDomainControlInfo { @@ -236,6 +308,9 @@ struct _virDomainControlInfo { * virDomainControlInfoPtr: * * Pointer to virDomainControlInfo structure. + * + * Since: v1.0.0 + * */ typedef virDomainControlInfo *virDomainControlInfoPtr; @@ -256,6 +331,9 @@ typedef virDomainControlInfo *virDomainControlInfoPtr; * (whether or not it is running). * * These enums should not conflict with those of virTypedParameterFlags. + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_AFFECT_CURRENT = 0, /* Affect current domain state. (Since: v1.0.0) */ @@ -265,12 +343,14 @@ typedef enum { } virDomainModificationImpact; /** - * virDomainInfoPtr: + * virDomainInfo: * * a virDomainInfo is a structure filled by virDomainGetInfo() and extracting * runtime information for a given active Domain + * + * Since: v1.0.0 + * */ - typedef struct _virDomainInfo virDomainInfo; struct _virDomainInfo { @@ -285,6 +365,9 @@ struct _virDomainInfo { * virDomainInfoPtr: * * a virDomainInfoPtr is a pointer to a virDomainInfo structure. + * + * Since: v1.0.0 + * */ typedef virDomainInfo *virDomainInfoPtr; @@ -294,6 +377,9 @@ typedef virDomainInfo *virDomainInfoPtr; * * Flags OR'ed together to provide specific behaviour when creating a * Domain. + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_NONE = 0, /* Default behavior (Since: v1.0.0) */ @@ -487,7 +573,7 @@ int virDomainSetSchedulerParametersFlags (virDomainPtr domain, unsigned int flags); /** - * virDomainBlockStats: + * virDomainBlockStatsStruct: * * Block device stats for virDomainBlockStats. * @@ -495,6 +581,9 @@ int virDomainSetSchedulerParametersFlags (virDomainPtr domain, * that the hypervisor does not support that statistic. * * NB. Here 'long long' means 64 bit integer. + * + * Since: v1.0.0 + * */ typedef struct _virDomainBlockStats virDomainBlockStatsStruct; @@ -510,6 +599,9 @@ struct _virDomainBlockStats { * virDomainBlockStatsPtr: * * A pointer to a virDomainBlockStats structure + * + * Since: v1.0.0 + * */ typedef virDomainBlockStatsStruct *virDomainBlockStatsPtr; @@ -624,7 +716,7 @@ typedef virDomainBlockStatsStruct *virDomainBlockStatsPtr; # define VIR_DOMAIN_BLOCK_STATS_ERRS "errs" /** - * virDomainInterfaceStats: + * virDomainInterfaceStatsStruct: * * Network interface stats for virDomainInterfaceStats. * @@ -632,6 +724,9 @@ typedef virDomainBlockStatsStruct *virDomainBlockStatsPtr; * that the hypervisor does not support that statistic. * * NB. Here 'long long' means 64 bit integer. + * + * Since: v1.0.0 + * */ typedef struct _virDomainInterfaceStats virDomainInterfaceStatsStruct; @@ -650,11 +745,19 @@ struct _virDomainInterfaceStats { * virDomainInterfaceStatsPtr: * * A pointer to a virDomainInterfaceStats structure + * + * Since: v1.0.0 + * */ typedef virDomainInterfaceStatsStruct *virDomainInterfaceStatsPtr; /** + * virDomainMemoryStatTags: + * * Memory Statistics Tags: + * + * Since: v1.0.0 + * */ typedef enum { /* The total amount of data read from swap space (in kB). (Since: v1.0.0) */ @@ -768,6 +871,12 @@ typedef enum { # endif } virDomainMemoryStatTags; +/** + * virDomainMemoryStatStruct: + * + * Since: v1.0.0 + * + */ typedef struct _virDomainMemoryStat virDomainMemoryStatStruct; struct _virDomainMemoryStat { @@ -775,6 +884,12 @@ struct _virDomainMemoryStat { unsigned long long val; }; +/** + * *virDomainMemoryStatPtr: + * + * Since: v1.0.0 + * + */ typedef virDomainMemoryStatStruct *virDomainMemoryStatPtr; @@ -791,6 +906,9 @@ typedef enum { * virDomainCoreDumpFormat: * * Values for specifying different formats of domain core dumps. + * + * Since: v1.2.3 + * */ typedef enum { VIR_DOMAIN_CORE_DUMP_FORMAT_RAW, /* dump guest memory in raw format (Since: v1.2.3) */ @@ -811,7 +929,14 @@ typedef enum { # endif } virDomainCoreDumpFormat; -/* Domain migration flags. */ +/** + * virDomainMigrateFlags: + * + * Domain migration flags. + * + * Since: v1.0.0 + * + */ typedef enum { /* Do not pause the domain during migration. The domain's memory will * be transferred to the destination host while the domain is running. @@ -1361,7 +1486,14 @@ int virDomainMigrateSetCompressionCache(virDomainPtr domain, unsigned long long cacheSize, unsigned int flags); -/* Domain migration speed flags. */ +/** + * virDomainMigrateMaxSpeedFlags: + * + * Domain migration speed flags. + * + * Since: v5.1.0 + * + */ typedef enum { /* Set or get maximum speed of post-copy migration. (Since: v5.1.0) */ VIR_DOMAIN_MIGRATE_MAX_SPEED_POSTCOPY = (1 << 0), @@ -1424,6 +1556,12 @@ virDomainPtr virDomainLookupByUUID (virConnectPtr conn, virDomainPtr virDomainLookupByUUIDString (virConnectPtr conn, const char *uuid); +/** + * virDomainShutdownFlagValues: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_DOMAIN_SHUTDOWN_DEFAULT = 0, /* hypervisor choice (Since: v1.0.0) */ VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN = (1 << 0), /* Send ACPI event (Since: v1.0.0) */ @@ -1437,6 +1575,12 @@ int virDomainShutdown (virDomainPtr domain); int virDomainShutdownFlags (virDomainPtr domain, unsigned int flags); +/** + * virDomainRebootFlagValues: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_DOMAIN_REBOOT_DEFAULT = 0, /* hypervisor choice (Since: v1.0.0) */ VIR_DOMAIN_REBOOT_ACPI_POWER_BTN = (1 << 0), /* Send ACPI event (Since: v1.0.0) */ @@ -1458,6 +1602,9 @@ int virDomainDestroy (virDomainPtr domain); * * Flags used to provide specific behaviour to the * virDomainDestroyFlags() function + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_DESTROY_DEFAULT = 0, /* Default behavior - could lead to data loss!! (Since: v1.0.0) */ @@ -1487,9 +1634,13 @@ int virDomainPMWakeup (virDomainPtr domain, /** * virDomainSaveRestoreFlags: + * * Flags for use in virDomainSaveFlags(), virDomainManagedSave(), * virDomainRestoreFlags(), and virDomainSaveImageDefineXML(). Not all * flags apply to all these functions. + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_SAVE_BYPASS_CACHE = 1 << 0, /* Avoid file system cache pollution (Since: v1.0.0) */ @@ -1788,7 +1939,14 @@ int virDomainGetMemoryParameters(virDomainPtr domain, virTypedParameterPtr params, int *nparams, unsigned int flags); -/* Memory size modification flags. */ +/** + * virDomainMemoryModFlags: + * + * Memory size modification flags. + * + * Since: v1.0.0 + * + */ typedef enum { /* See virDomainModificationImpact for these flags. (Since: v1.0.0) */ VIR_DOMAIN_MEM_CURRENT = VIR_DOMAIN_AFFECT_CURRENT, @@ -1806,6 +1964,9 @@ typedef enum { * virDomainNumatuneMemMode: * Representation of the various modes in the <numatune> element of * a domain. + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_NUMATUNE_MEM_STRICT = 0, @@ -1882,6 +2043,12 @@ char * virDomainGetHostname (virDomainPtr domain, int virDomainGetSecurityLabelList (virDomainPtr domain, virSecurityLabelPtr* seclabels); +/** + * virDomainMetadataType: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_DOMAIN_METADATA_DESCRIPTION = 0, /* Operate on <description> (Since: v1.0.0) */ VIR_DOMAIN_METADATA_TITLE = 1, /* Operate on <title> (Since: v1.0.0) */ @@ -1909,12 +2076,15 @@ virDomainGetMetadata(virDomainPtr domain, /* * XML domain description */ + /** * virDomainXMLFlags: * * Flags available for virDomainGetXMLDesc + * + * Since: v1.0.0 + * */ - typedef enum { VIR_DOMAIN_XML_SECURE = (1 << 0), /* dump security sensitive information too (Since: v1.0.0) */ VIR_DOMAIN_XML_INACTIVE = (1 << 1), /* dump inactive domain information (Since: v1.0.0) */ @@ -1922,6 +2092,12 @@ typedef enum { VIR_DOMAIN_XML_MIGRATABLE = (1 << 3), /* dump XML suitable for migration (Since: v1.0.0) */ } virDomainXMLFlags; +/** + * virDomainSaveImageXMLFlags: + * + * Since: v5.1.0 + * + */ typedef enum { VIR_DOMAIN_SAVE_IMAGE_XML_SECURE = VIR_DOMAIN_XML_SECURE, /* dump security sensitive information too (Since: v5.1.0) */ } virDomainSaveImageXMLFlags; @@ -2047,6 +2223,9 @@ int virDomainBlockPeek (virDomainPtr dom, * virDomainBlockResizeFlags: * * Flags available for virDomainBlockResize(). + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_BLOCK_RESIZE_BYTES = 1 << 0, /* size in bytes instead of KiB (Since: v1.0.0) */ @@ -2080,8 +2259,18 @@ int virDomainBlockResize (virDomainPtr dom, * * capacity: logical size from qcow2 header * * allocation: highest qcow extent written for an active domain * * physical: size of the block device container + * + * Since: v1.0.0 + * */ typedef struct _virDomainBlockInfo virDomainBlockInfo; + +/** + * virDomainBlockInfoPtr: + * + * Since: v1.0.0 + * + */ typedef virDomainBlockInfo *virDomainBlockInfoPtr; struct _virDomainBlockInfo { unsigned long long capacity; /* logical size in bytes of the @@ -2136,6 +2325,12 @@ virDomainPtr virDomainDefineXMLFlags (virConnectPtr conn, unsigned int flags); int virDomainUndefine (virDomainPtr domain); +/** + * virDomainUndefineFlagsValues: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_DOMAIN_UNDEFINE_MANAGED_SAVE = (1 << 0), /* Also remove any managed save (Since: v1.0.0) */ @@ -2165,6 +2360,8 @@ int virConnectListDefinedDomains (virConnectPtr conn, * Flags used to tune which domains are listed by virConnectListAllDomains(). * Note that these flags come in groups; if all bits from a group are 0, * then that group is not used to filter results. + * + * Since: v1.0.0 */ typedef enum { VIR_CONNECT_LIST_DOMAINS_ACTIVE = 1 << 0, @@ -2209,9 +2406,13 @@ int virDomainSetAutostart (virDomainPtr domain, int autostart); /** - * virVcpuInfo: structure for information about a virtual CPU in a domain. + * virVcpuState: + * + * structure for information about a virtual CPU in a domain. + * + * Since: v1.0.0 + * */ - typedef enum { VIR_VCPU_OFFLINE = 0, /* the virtual CPU is offline (Since: v1.0.0) */ VIR_VCPU_RUNNING = 1, /* the virtual CPU is running (Since: v1.0.0) */ @@ -2227,6 +2428,12 @@ typedef enum { VIR_VCPU_INFO_CPU_UNAVAILABLE = -2, /* the hypervisor does not expose real CPU information (Since: v6.10.0) */ } virVcpuHostCpuState; +/** + * virVcpuInfo: + * + * Since: v1.0.0 + * + */ typedef struct _virVcpuInfo virVcpuInfo; struct _virVcpuInfo { unsigned int number; /* virtual CPU number */ @@ -2234,9 +2441,23 @@ struct _virVcpuInfo { unsigned long long cpuTime; /* CPU time used, in nanoseconds */ int cpu; /* real CPU number, or one of the values from virVcpuHostCpuState */ }; + +/** + * *virVcpuInfoPtr: + * + * Since: v1.0.0 + * + */ typedef virVcpuInfo *virVcpuInfoPtr; -/* Flags for controlling virtual CPU hot-plugging. */ +/** + * virDomainVcpuFlags: + * + * Flags for controlling virtual CPU hot-plugging. + * + * Since: v1.0.0 + * + */ typedef enum { /* See virDomainModificationImpact for these flags. (Since: v1.0.0) */ VIR_DOMAIN_VCPU_CURRENT = VIR_DOMAIN_AFFECT_CURRENT, @@ -2284,9 +2505,12 @@ int virDomainGetEmulatorPinInfo (virDomainPtr domain, unsigned int flags); /** - * virIOThreadInfo: + * virDomainIOThreadInfo: * * The data structure for information about all IOThreads in a domain + * + * Since: v1.2.14 + * */ typedef struct _virDomainIOThreadInfo virDomainIOThreadInfo; typedef virDomainIOThreadInfo *virDomainIOThreadInfoPtr; @@ -2485,6 +2709,12 @@ int virDomainGetVcpus (virDomainPtr domain, # define VIR_GET_CPUMAP(cpumaps, maplen, vcpu) (&((cpumaps)[(vcpu) * (maplen)])) +/** + * virDomainDeviceModifyFlags: + * + * Since: v1.0.0 + * + */ typedef enum { /* See virDomainModificationImpact for these flags. (Since: v1.0.0) */ VIR_DOMAIN_DEVICE_MODIFY_CURRENT = VIR_DOMAIN_AFFECT_CURRENT, @@ -2509,6 +2739,12 @@ int virDomainUpdateDeviceFlags(virDomainPtr domain, int virDomainDetachDeviceAlias(virDomainPtr domain, const char *alias, unsigned int flags); +/** + * virDomainStatsRecord: + * + * Since: v1.2.8 + * + */ typedef struct _virDomainStatsRecord virDomainStatsRecord; typedef virDomainStatsRecord *virDomainStatsRecordPtr; struct _virDomainStatsRecord { @@ -2517,6 +2753,12 @@ struct _virDomainStatsRecord { int nparams; }; +/** + * virDomainStatsTypes: + * + * Since: v1.2.8 + * + */ typedef enum { VIR_DOMAIN_STATS_STATE = (1 << 0), /* return domain state (Since: v1.2.8) */ VIR_DOMAIN_STATS_CPU_TOTAL = (1 << 1), /* return domain CPU info (Since: v1.2.9) */ @@ -2873,6 +3115,9 @@ int virDomainSetPerfEvents(virDomainPtr dom, * virDomainBlockJobType: * * Describes various possible block jobs. + * + * Since: v1.0.0 + * */ typedef enum { /* Placeholder (Since: v1.0.0) */ @@ -2923,6 +3168,9 @@ typedef enum { * VIR_DOMAIN_BLOCK_JOB_ABORT_ASYNC: Request only, do not wait for completion * VIR_DOMAIN_BLOCK_JOB_ABORT_PIVOT: Pivot to new file when ending a copy or * active commit job + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_BLOCK_JOB_ABORT_ASYNC = 1 << 0, @@ -2941,6 +3189,12 @@ typedef enum { /* An iterator for monitoring block job operations */ typedef unsigned long long virDomainBlockJobCursor; +/** + * virDomainBlockJobInfo: + * + * Since: v1.0.0 + * + */ typedef struct _virDomainBlockJobInfo virDomainBlockJobInfo; struct _virDomainBlockJobInfo { int type; /* virDomainBlockJobType */ @@ -2955,6 +3209,13 @@ struct _virDomainBlockJobInfo { virDomainBlockJobCursor cur; virDomainBlockJobCursor end; }; + +/** + * *virDomainBlockJobInfoPtr: + * + * Since: v1.0.0 + * + */ typedef virDomainBlockJobInfo *virDomainBlockJobInfoPtr; int virDomainGetBlockJobInfo(virDomainPtr dom, const char *disk, @@ -2984,6 +3245,9 @@ int virDomainBlockPull(virDomainPtr dom, const char *disk, * virDomainBlockRebaseFlags: * * Flags available for virDomainBlockRebase(). + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_BLOCK_REBASE_SHALLOW = 1 << 0, /* Limit copy to top of source @@ -3009,6 +3273,9 @@ int virDomainBlockRebase(virDomainPtr dom, const char *disk, * virDomainBlockCopyFlags: * * Flags available for virDomainBlockCopy(). + * + * Since: v1.2.8 + * */ typedef enum { /* Limit copy to top of source backing chain (Since: v1.2.8) */ @@ -3086,6 +3353,9 @@ int virDomainBlockCopy(virDomainPtr dom, const char *disk, * virDomainBlockCommitFlags: * * Flags available for virDomainBlockCommit(). + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_BLOCK_COMMIT_SHALLOW = 1 << 0, /* NULL base means next backing @@ -3342,6 +3612,9 @@ virDomainGetBlockIoTune(virDomainPtr dom, * virDomainDiskErrorCode: * * Disk I/O error. + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_DISK_ERROR_NONE = 0, /* no error (Since: v1.0.0) */ @@ -3356,8 +3629,17 @@ typedef enum { /** * virDomainDiskError: * + * Since: v1.0.0 + * */ typedef struct _virDomainDiskError virDomainDiskError; + +/** + * *virDomainDiskErrorPtr: + * + * Since: v1.0.0 + * + */ typedef virDomainDiskError *virDomainDiskErrorPtr; struct _virDomainDiskError { @@ -3376,6 +3658,9 @@ int virDomainGetDiskErrors(virDomainPtr dom, * virKeycodeSet: * * Enum to specify which keycode mapping is in use for virDomainSendKey(). + * + * Since: v1.0.0 + * */ typedef enum { VIR_KEYCODE_SET_LINUX = 0, @@ -3426,7 +3711,9 @@ int virDomainSendKey(virDomainPtr domain, int nkeycodes, unsigned int flags); -/* +/** + * virDomainProcessSignal: + * * These just happen to match Linux signal numbers. The numbers * will be mapped to whatever the SIGNUM is in the guest OS in * question by the agent delivering the signal. The names are @@ -3435,6 +3722,9 @@ int virDomainSendKey(virDomainPtr domain, * Do not rely on all values matching Linux though. It is possible * this enum might be extended with new signals which have no * mapping in Linux. + * + * Since: v1.0.1 + * */ typedef enum { VIR_DOMAIN_PROCESS_SIGNAL_NOP = 0, /* No constant in POSIX/Linux (Since: v1.0.1) */ @@ -3535,6 +3825,9 @@ virDomainPtr virDomainCreateLinux (virConnectPtr conn, * virDomainEventType: * * a virDomainEventType is emitted during domain lifecycle events + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_EVENT_DEFINED = 0, @@ -3556,6 +3849,9 @@ typedef enum { * virDomainEventDefinedDetailType: * * Details on the cause of a 'defined' lifecycle event + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_EVENT_DEFINED_ADDED = 0, /* Newly created config file (Since: v1.0.0) */ @@ -3572,6 +3868,9 @@ typedef enum { * virDomainEventUndefinedDetailType: * * Details on the cause of an 'undefined' lifecycle event + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_EVENT_UNDEFINED_REMOVED = 0, /* Deleted the config file (Since: v1.0.0) */ @@ -3586,6 +3885,9 @@ typedef enum { * virDomainEventStartedDetailType: * * Details on the cause of a 'started' lifecycle event + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_EVENT_STARTED_BOOTED = 0, /* Normal startup from boot (Since: v1.0.0) */ @@ -3603,6 +3905,9 @@ typedef enum { * virDomainEventSuspendedDetailType: * * Details on the cause of a 'suspended' lifecycle event + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_EVENT_SUSPENDED_PAUSED = 0, /* Normal suspend due to admin pause (Since: v1.0.0) */ @@ -3624,6 +3929,9 @@ typedef enum { * virDomainEventResumedDetailType: * * Details on the cause of a 'resumed' lifecycle event + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_EVENT_RESUMED_UNPAUSED = 0, /* Normal resume due to admin unpause (Since: v1.0.0) */ @@ -3641,6 +3949,9 @@ typedef enum { * virDomainEventStoppedDetailType: * * Details on the cause of a 'stopped' lifecycle event + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN = 0, /* Normal shutdown (Since: v1.0.0) */ @@ -3661,6 +3972,9 @@ typedef enum { * virDomainEventShutdownDetailType: * * Details on the cause of a 'shutdown' lifecycle event + * + * Since: v1.0.0 + * */ typedef enum { /* Guest finished shutdown sequence (Since: v1.0.0) */ @@ -3686,6 +4000,9 @@ typedef enum { * virDomainEventPMSuspendedDetailType: * * Details on the cause of a 'pmsuspended' lifecycle event + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_EVENT_PMSUSPENDED_MEMORY = 0, /* Guest was PM suspended to memory (Since: v1.0.0) */ @@ -3700,6 +4017,9 @@ typedef enum { * virDomainEventCrashedDetailType: * * Details on the cause of a 'crashed' lifecycle event + * + * Since: v1.1.1 + * */ typedef enum { VIR_DOMAIN_EVENT_CRASHED_PANICKED = 0, /* Guest was panicked (Since: v1.1.1) */ @@ -3714,6 +4034,9 @@ typedef enum { * virDomainMemoryFailureRecipientType: * * Recipient of a memory failure event. + * + * Since: v6.9.0 + * */ typedef enum { /* memory failure at hypersivor memory address space (Since: v6.9.0) */ @@ -3732,6 +4055,9 @@ typedef enum { * virDomainMemoryFailureActionType: * * Action of a memory failure event. + * + * Since: v6.9.0 + * */ typedef enum { /* the memory failure could be ignored. This will only be the case for @@ -3769,6 +4095,12 @@ typedef enum { } virDomainMemoryFailureActionType; +/** + * virDomainMemoryFailureFlags: + * + * Since: v6.9.0 + * + */ typedef enum { /* whether a memory failure event is action-required or action-optional * (e.g. a failure during memory scrub). (Since: v6.9.0) */ @@ -3814,6 +4146,12 @@ int virDomainIsActive(virDomainPtr dom); int virDomainIsPersistent(virDomainPtr dom); int virDomainIsUpdated(virDomainPtr dom); +/** + * virDomainJobType: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_DOMAIN_JOB_NONE = 0, /* No job is active (Since: v1.0.0) */ VIR_DOMAIN_JOB_BOUNDED = 1, /* Job with a finite completion time (Since: v1.0.0) */ @@ -3827,7 +4165,20 @@ typedef enum { # endif } virDomainJobType; +/** + * virDomainJobInfo: + * + * Since: v1.0.0 + * + */ typedef struct _virDomainJobInfo virDomainJobInfo; + +/** + * *virDomainJobInfoPtr: + * + * Since: v1.0.0 + * + */ typedef virDomainJobInfo *virDomainJobInfoPtr; struct _virDomainJobInfo { /* One of virDomainJobType */ @@ -3868,6 +4219,9 @@ struct _virDomainJobInfo { * * Flags OR'ed together to provide specific behavior when querying domain * job statistics. + * + * Since: v1.2.9 + * */ typedef enum { VIR_DOMAIN_JOB_STATS_COMPLETED = 1 << 0, /* return stats of a recently @@ -3885,6 +4239,12 @@ int virDomainGetJobStats(virDomainPtr domain, unsigned int flags); int virDomainAbortJob(virDomainPtr dom); +/** + * virDomainJobOperation: + * + * Since: v3.3.0 + * + */ typedef enum { VIR_DOMAIN_JOB_OPERATION_UNKNOWN = 0, VIR_DOMAIN_JOB_OPERATION_START = 1, @@ -4376,6 +4736,9 @@ typedef void (*virConnectDomainEventRTCChangeCallback)(virConnectPtr conn, * virDomainEventWatchdogAction: * * The action that is to be taken due to the watchdog device firing + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_EVENT_WATCHDOG_NONE = 0, /* No action, watchdog ignored (Since: v1.0.0) */ @@ -4411,6 +4774,9 @@ typedef void (*virConnectDomainEventWatchdogCallback)(virConnectPtr conn, * virDomainEventIOErrorAction: * * The action that is to be taken due to an IO error occurring + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_EVENT_IO_ERROR_NONE = 0, /* No action, IO error ignored (Since: v1.0.0) */ @@ -4474,6 +4840,9 @@ typedef void (*virConnectDomainEventIOErrorReasonCallback)(virConnectPtr conn, * virDomainEventGraphicsPhase: * * The phase of the graphics client connection + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_EVENT_GRAPHICS_CONNECT = 0, /* Initial socket connection established (Since: v1.0.0) */ @@ -4489,6 +4858,9 @@ typedef enum { * virDomainEventGraphicsAddressType: * * The type of address for the connection + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4, /* IPv4 address (Since: v1.0.0) */ @@ -4502,22 +4874,38 @@ typedef enum { /** - * virDomainEventGraphicsAddress: + * _virDomainEventGraphicsAddress: * * The data structure containing connection address details * + * Since: v1.0.0 + * */ struct _virDomainEventGraphicsAddress { int family; /* Address family, virDomainEventGraphicsAddressType */ char *node; /* Address of node (eg IP address, or UNIX path) */ char *service; /* Service name/number (eg TCP port, or NULL) */ }; + +/** + * virDomainEventGraphicsAddress: + * + * Since: v1.0.0 + * + */ typedef struct _virDomainEventGraphicsAddress virDomainEventGraphicsAddress; + +/** + * virDomainEventGraphicsAddressPtr: + * + * Since: v1.0.0 + * + */ typedef virDomainEventGraphicsAddress *virDomainEventGraphicsAddressPtr; /** - * virDomainEventGraphicsSubjectIdentity: + * _virDomainEventGraphicsSubjectIdentity: * * The data structure representing a single identity * @@ -4528,7 +4916,21 @@ struct _virDomainEventGraphicsSubjectIdentity { char *type; /* Type of identity */ char *name; /* Identity value */ }; + +/** + * virDomainEventGraphicsSubjectIdentity: + * + * Since: v1.0.0 + * + */ typedef struct _virDomainEventGraphicsSubjectIdentity virDomainEventGraphicsSubjectIdentity; + +/** + * virDomainEventGraphicsSubjectIdentityPtr: + * + * Since: v1.0.0 + * + */ typedef virDomainEventGraphicsSubjectIdentity *virDomainEventGraphicsSubjectIdentityPtr; @@ -4539,12 +4941,29 @@ typedef virDomainEventGraphicsSubjectIdentity *virDomainEventGraphicsSubjectIden * * A subject will have zero or more identities. The types of * identity differ according to the authentication scheme + * + * Since: v1.0.0 + * */ struct _virDomainEventGraphicsSubject { int nidentity; /* Number of identities in array*/ virDomainEventGraphicsSubjectIdentityPtr identities; /* Array of identities for subject */ }; + +/** + * virDomainEventGraphicsSubject: + * + * Since: v1.0.0 + * + */ typedef struct _virDomainEventGraphicsSubject virDomainEventGraphicsSubject; + +/** + * virDomainEventGraphicsSubjectPtr: + * + * Since: v1.0.0 + * + */ typedef virDomainEventGraphicsSubject *virDomainEventGraphicsSubjectPtr; @@ -4576,6 +4995,9 @@ typedef void (*virConnectDomainEventGraphicsCallback)(virConnectPtr conn, * * Tracks status of a virDomainBlockPull(), virDomainBlockRebase(), * virDomainBlockCopy(), or virDomainBlockCommit() operation + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_BLOCK_JOB_COMPLETED = 0, @@ -4623,6 +5045,9 @@ typedef void (*virConnectDomainEventBlockJobCallback)(virConnectPtr conn, * virConnectDomainEventDiskChangeReason: * * The reason describing why this callback is called + * + * Since: v1.0.0 + * */ typedef enum { /* Removable media changed to empty according to startup policy as source @@ -4675,6 +5100,9 @@ typedef void (*virConnectDomainEventDiskChangeCallback)(virConnectPtr conn, * virDomainEventTrayChangeReason: * * The reason describing why the callback was called + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_EVENT_TRAY_CHANGE_OPEN = 0, @@ -5292,6 +5720,12 @@ typedef void (*virConnectDomainEventTunableCallback)(virConnectPtr conn, void *opaque); +/** + * virConnectDomainEventAgentLifecycleState: + * + * Since: v1.2.11 + * + */ typedef enum { VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_CONNECTED = 1, /* agent connected (Since: v1.2.11) */ VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_DISCONNECTED = 2, /* agent disconnected (Since: v1.2.11) */ @@ -5301,6 +5735,12 @@ typedef enum { # endif } virConnectDomainEventAgentLifecycleState; +/** + * virConnectDomainEventAgentLifecycleReason: + * + * Since: v1.2.11 + * + */ typedef enum { VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_UNKNOWN = 0, /* unknown state change reason (Since: v1.2.11) */ VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_DOMAIN_STARTED = 1, /* state changed due to domain start (Since: v1.2.11) */ @@ -5428,6 +5868,9 @@ typedef void (*virConnectDomainEventMemoryDeviceSizeChangeCallback)(virConnectPt * An enumeration of supported eventId parameters for * virConnectDomainEventRegisterAny(). Each event id determines which * signature of callback function will be used. + * + * Since: v1.0.0 + * */ typedef enum { VIR_DOMAIN_EVENT_ID_LIFECYCLE = 0, /* virConnectDomainEventCallback (Since: v1.0.0) */ @@ -5482,9 +5925,10 @@ int virConnectDomainEventDeregisterAny(virConnectPtr conn, /** - * virDomainConsoleFlags + * virDomainConsoleFlags: + * + * Since: v0.9.10 * - * Since 0.9.10 */ typedef enum { @@ -5501,9 +5945,9 @@ int virDomainOpenConsole(virDomainPtr dom, unsigned int flags); /** - * virDomainChannelFlags + * virDomainChannelFlags: * - * Since 1.0.2 + * Since: v1.0.2 */ typedef enum { VIR_DOMAIN_CHANNEL_FORCE = (1 << 0), /* abort a (possibly) active channel @@ -5516,6 +5960,12 @@ int virDomainOpenChannel(virDomainPtr dom, virStreamPtr st, unsigned int flags); +/** + * virDomainOpenGraphicsFlags: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH = (1 << 0), } virDomainOpenGraphicsFlags; @@ -5551,6 +6001,9 @@ int virDomainFSThaw(virDomainPtr dom, * * The data structure containing mounted file systems within a guset * + * Since: v1.2.11 + * + * */ typedef struct _virDomainFSInfo virDomainFSInfo; typedef virDomainFSInfo *virDomainFSInfoPtr; @@ -5586,8 +6039,10 @@ int virDomainSetTime(virDomainPtr dom, * virSchedParameterType: * * A scheduler parameter field type. Provided for backwards - * compatibility; virTypedParameterType is the preferred enum since - * 0.9.2. + * compatibility; virTypedParameterType is the preferred enum + * + * Since: v0.9.2 + * */ typedef enum { VIR_DOMAIN_SCHED_FIELD_INT = VIR_TYPED_PARAM_INT, @@ -5629,6 +6084,9 @@ typedef struct _virTypedParameter virSchedParameter; * a virSchedParameterPtr is a pointer to a virSchedParameter structure. * Provided for backwards compatibility; virTypedParameterPtr is the * preferred alias since 0.9.2. + * + * Since: v1.0.0 + * */ typedef virSchedParameter *virSchedParameterPtr; @@ -5636,8 +6094,10 @@ typedef virSchedParameter *virSchedParameterPtr; * virBlkioParameterType: * * A blkio parameter field type. Provided for backwards - * compatibility; virTypedParameterType is the preferred enum since - * 0.9.2. + * compatibility; virTypedParameterType is the preferred enum + * + * Since: v0.9.2 + * */ typedef enum { VIR_DOMAIN_BLKIO_PARAM_INT = VIR_TYPED_PARAM_INT, @@ -5678,7 +6138,10 @@ typedef struct _virTypedParameter virBlkioParameter; * * a virBlkioParameterPtr is a pointer to a virBlkioParameter structure. * Provided for backwards compatibility; virTypedParameterPtr is the - * preferred alias since 0.9.2. + * preferred alias. + * + * Since: v0.9.2 + * */ typedef virBlkioParameter *virBlkioParameterPtr; @@ -5686,8 +6149,10 @@ typedef virBlkioParameter *virBlkioParameterPtr; * virMemoryParameterType: * * A memory parameter field type. Provided for backwards - * compatibility; virTypedParameterType is the preferred enum since - * 0.9.2. + * compatibility; virTypedParameterType is the preferred enum + * + * Since: v0.9.2 + * */ typedef enum { VIR_DOMAIN_MEMORY_PARAM_INT = VIR_TYPED_PARAM_INT, @@ -5728,10 +6193,19 @@ typedef struct _virTypedParameter virMemoryParameter; * * a virMemoryParameterPtr is a pointer to a virMemoryParameter structure. * Provided for backwards compatibility; virTypedParameterPtr is the - * preferred alias since 0.9.2. + * preferred alias. + * + * Since: v0.9.2 + * */ typedef virMemoryParameter *virMemoryParameterPtr; +/** + * virDomainInterfaceAddressesSource: + * + * Since: v1.2.14 + * + */ typedef enum { VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LEASE = 0, /* Parse DHCP lease file (Since: v1.2.14) */ VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT = 1, /* Query qemu guest agent (Since: v1.2.14) */ @@ -5742,7 +6216,20 @@ typedef enum { # endif } virDomainInterfaceAddressesSource; +/** + * virDomainIPAddress: + * + * Since: v1.2.14 + * + */ typedef struct _virDomainInterfaceIPAddress virDomainIPAddress; + +/** + * virDomainIPAddressPtr: + * + * Since: v1.2.14 + * + */ typedef virDomainIPAddress *virDomainIPAddressPtr; struct _virDomainInterfaceIPAddress { int type; /* virIPAddrType */ @@ -5750,6 +6237,12 @@ struct _virDomainInterfaceIPAddress { unsigned int prefix; /* IP address prefix */ }; +/** + * virDomainInterface: + * + * Since: v1.0.0 + * + */ typedef struct _virDomainInterface virDomainInterface; typedef virDomainInterface *virDomainInterfacePtr; struct _virDomainInterface { @@ -5799,6 +6292,12 @@ int virDomainSetBlockThreshold(virDomainPtr domain, unsigned long long threshold, unsigned int flags); +/** + * virDomainLifecycle: + * + * Since: v3.9.0 + * + */ typedef enum { VIR_DOMAIN_LIFECYCLE_POWEROFF = 0, VIR_DOMAIN_LIFECYCLE_REBOOT = 1, @@ -5809,6 +6308,12 @@ typedef enum { # endif } virDomainLifecycle; +/** + * virDomainLifecycleAction: + * + * Since: v3.9.0 + * + */ typedef enum { VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY = 0, VIR_DOMAIN_LIFECYCLE_ACTION_RESTART = 1, /* Since: v3.9.0 */ @@ -5936,6 +6441,12 @@ int virDomainSetLaunchSecurityState(virDomainPtr domain, int nparams, unsigned int flags); +/** + * virDomainGuestInfoTypes: + * + * Since: v5.7.0 + * + */ typedef enum { VIR_DOMAIN_GUEST_INFO_USERS = (1 << 0), /* return active users (Since: v5.7.0) */ VIR_DOMAIN_GUEST_INFO_OS = (1 << 1), /* return OS information (Since: v5.7.0) */ @@ -5952,6 +6463,12 @@ int virDomainGetGuestInfo(virDomainPtr domain, int *nparams, unsigned int flags); +/** + * virDomainAgentResponseTimeoutValues: + * + * Since: v5.10.0 + * + */ typedef enum { VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_BLOCK = -2, VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_DEFAULT = -1, @@ -5992,6 +6509,12 @@ int virDomainAuthorizedSSHKeysSet(virDomainPtr domain, unsigned int nkeys, unsigned int flags); +/** + * virDomainMessageType: + * + * Since: v7.1.0 + * + */ typedef enum { VIR_DOMAIN_MESSAGE_DEPRECATION = (1 << 0), VIR_DOMAIN_MESSAGE_TAINTING = (1 << 1), @@ -6005,6 +6528,9 @@ int virDomainGetMessages(virDomainPtr domain, * virDomainDirtyRateStatus: * * Details on the cause of a dirty rate calculation status. + * + * Since: v7.2.0 + * */ typedef enum { VIR_DOMAIN_DIRTYRATE_UNSTARTED = 0, /* the dirtyrate calculation has @@ -6025,6 +6551,9 @@ typedef enum { * Flags OR'ed together to provide specific behaviour when calculating dirty page * rate for a Domain * + * + * Since: v8.1.0 + * */ typedef enum { VIR_DOMAIN_DIRTYRATE_MODE_PAGE_SAMPLING = 0, /* default mode - page-sampling (Since: v8.1.0) */ diff --git a/include/libvirt/libvirt-event.h b/include/libvirt/libvirt-event.h index facdc3a3ec..a5c73dda2a 100644 --- a/include/libvirt/libvirt-event.h +++ b/include/libvirt/libvirt-event.h @@ -34,6 +34,9 @@ * a virEventHandleType is used similar to POLLxxx FD events, but is specific * to libvirt. A client app must translate to, and from POLL events when using * this construct. + * + * Since: v1.0.0 + * */ typedef enum { VIR_EVENT_HANDLE_READABLE = (1 << 0), diff --git a/include/libvirt/libvirt-host.h b/include/libvirt/libvirt-host.h index a31fa2d9ee..a11bfb5f95 100644 --- a/include/libvirt/libvirt-host.h +++ b/include/libvirt/libvirt-host.h @@ -33,6 +33,9 @@ * * a virConnect is a private structure representing a connection to * the Hypervisor. + * + * Since: v1.0.0 + * */ typedef struct _virConnect virConnect; @@ -41,6 +44,9 @@ typedef struct _virConnect virConnect; * * a virConnectPtr is pointer to a virConnect private structure, this is the * type used to reference a connection to the Hypervisor in the API. + * + * Since: v1.0.0 + * */ typedef virConnect *virConnectPtr; @@ -49,6 +55,9 @@ typedef virConnect *virConnectPtr; * * Flags to indicate which system-wide sleep state the host must be * transitioned to. + * + * Since: v1.0.0 + * */ typedef enum { VIR_NODE_SUSPEND_TARGET_MEM = 0, @@ -64,6 +73,9 @@ typedef enum { * virStream: * * a virStream is a private structure representing a data stream. + * + * Since: v1.0.0 + * */ typedef struct _virStream virStream; @@ -72,6 +84,9 @@ typedef struct _virStream virStream; * * a virStreamPtr is pointer to a virStream private structure, this is the * type used to reference a data stream in the API. + * + * Since: v1.0.0 + * */ typedef virStream *virStreamPtr; @@ -92,6 +107,9 @@ typedef virStream *virStreamPtr; * a virSecurityLabel is a structure filled by virDomainGetSecurityLabel(), * providing the security label and associated attributes for the specified * domain. + * + * Since: v1.0.0 + * */ typedef struct _virSecurityLabel virSecurityLabel; @@ -104,6 +122,9 @@ struct _virSecurityLabel { * virSecurityLabelPtr: * * a virSecurityLabelPtr is a pointer to a virSecurityLabel. + * + * Since: v1.0.0 + * */ typedef virSecurityLabel *virSecurityLabelPtr; @@ -133,6 +154,9 @@ typedef virSecurityLabel *virSecurityLabelPtr; * a virSecurityModel is a structure filled by virNodeGetSecurityModel(), * providing the per-hypervisor security model and DOI attributes for the * specified domain. + * + * Since: v1.0.0 + * */ typedef struct _virSecurityModel virSecurityModel; @@ -145,6 +169,9 @@ struct _virSecurityModel { * virSecurityModelPtr: * * a virSecurityModelPtr is a pointer to a virSecurityModel. + * + * Since: v1.0.0 + * */ typedef virSecurityModel *virSecurityModelPtr; @@ -152,7 +179,7 @@ typedef virSecurityModel *virSecurityModelPtr; /* data types related to virNodePtr */ /** - * virNodeInfoPtr: + * virNodeInfo: * * a virNodeInfo is a structure filled by virNodeGetInfo() and providing * the information for the Node. @@ -160,8 +187,9 @@ typedef virSecurityModel *virSecurityModelPtr; * Note that the information in this struct is not guaranteed to be an * accurate relection of the system hardware. See the virNodeGetInfo() * API documentation for further guidance. + * + * Since: v1.0.0 */ - typedef struct _virNodeInfo virNodeInfo; struct _virNodeInfo { @@ -192,9 +220,12 @@ struct _virNodeInfo { # define VIR_NODE_CPU_STATS_FIELD_LENGTH 80 /** - * VIR_NODE_CPU_STATS_ALL_CPUS: + * virNodeGetCPUStatsAllCPUs: * * Value for specifying request for the total CPU time/utilization + * + * Since: v1.0.0 + * */ typedef enum { VIR_NODE_CPU_STATS_ALL_CPUS = -1, @@ -272,6 +303,9 @@ typedef enum { * * a virNodeCPUStats is a structure filled by virNodeGetCPUStats() * providing information about the CPU stats of the node. + * + * Since: v1.0.0 + * */ typedef struct _virNodeCPUStats virNodeCPUStats; @@ -291,9 +325,12 @@ struct _virNodeCPUStats { # define VIR_NODE_MEMORY_STATS_FIELD_LENGTH 80 /** - * VIR_NODE_MEMORY_STATS_ALL_CELLS: + * virNodeGetMemoryStatsAllCells: * * Value for specifying request for the total memory of all cells. + * + * Since: v1.0.0 + * */ typedef enum { VIR_NODE_MEMORY_STATS_ALL_CELLS = -1, @@ -349,6 +386,9 @@ typedef enum { * * a virNodeMemoryStats is a structure filled by virNodeGetMemoryStats() * providing information about the memory of the node. + * + * Since: v1.0.0 + * */ typedef struct _virNodeMemoryStats virNodeMemoryStats; @@ -487,6 +527,9 @@ int virNodeGetCPUMap(virConnectPtr conn, * virNodeInfoPtr: * * a virNodeInfoPtr is a pointer to a virNodeInfo structure. + * + * Since: v1.0.0 + * */ typedef virNodeInfo *virNodeInfoPtr; @@ -495,6 +538,9 @@ typedef virNodeInfo *virNodeInfoPtr; * virNodeCPUStatsPtr: * * a virNodeCPUStatsPtr is a pointer to a virNodeCPUStats structure. + * + * Since: v1.0.0 + * */ typedef virNodeCPUStats *virNodeCPUStatsPtr; @@ -503,6 +549,9 @@ typedef virNodeCPUStats *virNodeCPUStatsPtr; * virNodeMemoryStatsPtr: * * a virNodeMemoryStatsPtr is a pointer to a virNodeMemoryStats structure. + * + * Since: v1.0.0 + * */ typedef virNodeMemoryStats *virNodeMemoryStatsPtr; @@ -584,9 +633,12 @@ int virNodeGetSEVInfo (virConnectPtr conn, unsigned int flags); /** - * virConnectFlags + * virConnectFlags: * * Flags when opening a connection to a hypervisor + * + * Since: v1.0.0 + * */ typedef enum { VIR_CONNECT_RO = (1 << 0), /* A readonly connection (Since: v1.0.0) */ @@ -619,7 +671,20 @@ struct _virConnectCredential { unsigned int resultlen; /* Length of the result */ }; +/** + * virConnectCredential: + * + * Since: v1.0.0 + * + */ typedef struct _virConnectCredential virConnectCredential; + +/** + * virConnectCredentialPtr: + * + * Since: v1.0.0 + * + */ typedef virConnectCredential *virConnectCredentialPtr; @@ -648,8 +713,14 @@ struct _virConnectAuth { void *cbdata; }; - +/** + * virConnectAuth: + * + * Since: v1.0.0 + * + */ typedef struct _virConnectAuth virConnectAuth; + typedef virConnectAuth *virConnectAuthPtr; /* @@ -892,6 +963,12 @@ int virConnectIsAlive(virConnectPtr conn); * CPU specification API */ +/** + * virCPUCompareResult: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_CPU_COMPARE_ERROR = -1, VIR_CPU_COMPARE_INCOMPATIBLE = 0, @@ -903,6 +980,12 @@ typedef enum { # endif } virCPUCompareResult; +/** + * virConnectCompareCPUFlags: + * + * Since: v1.2.6 + * + */ typedef enum { VIR_CONNECT_COMPARE_CPU_FAIL_INCOMPATIBLE = (1 << 0), /* treat incompatible CPUs as failure (Since: v1.2.6) */ @@ -927,9 +1010,12 @@ int virConnectGetCPUModelNames(virConnectPtr conn, unsigned int flags); /** - * virConnectBaselineCPUFlags + * virConnectBaselineCPUFlags: * * Flags when getting XML description of a computed CPU + * + * Since: v1.1.2 + * */ typedef enum { VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES = (1 << 0), /* show all features (Since: v1.1.2) */ diff --git a/include/libvirt/libvirt-interface.h b/include/libvirt/libvirt-interface.h index 289c3d0b07..22a90a6452 100644 --- a/include/libvirt/libvirt-interface.h +++ b/include/libvirt/libvirt-interface.h @@ -31,6 +31,9 @@ * virInterface: * * a virInterface is a private structure representing a virtual interface. + * + * Since: v1.0.0 + * */ typedef struct _virInterface virInterface; @@ -39,6 +42,9 @@ typedef struct _virInterface virInterface; * * a virInterfacePtr is pointer to a virInterface private structure, this is the * type used to reference a virtual interface in the API. + * + * Since: v1.0.0 + * */ typedef virInterface *virInterfacePtr; @@ -53,10 +59,13 @@ int virConnectNumOfDefinedInterfaces (virConnectPtr conn); int virConnectListDefinedInterfaces (virConnectPtr conn, char **const names, int maxnames); -/* - * virConnectListAllInterfaces: +/** + * virConnectListAllInterfacesFlags: * * Flags used to filter the returned interfaces. + * + * Since: v1.0.0 + * */ typedef enum { VIR_CONNECT_LIST_INTERFACES_INACTIVE = 1 << 0, diff --git a/include/libvirt/libvirt-network.h b/include/libvirt/libvirt-network.h index 3bf6df34a7..ab8b34ae1c 100644 --- a/include/libvirt/libvirt-network.h +++ b/include/libvirt/libvirt-network.h @@ -35,6 +35,9 @@ typedef enum { * virNetwork: * * a virNetwork is a private structure representing a virtual network. + * + * Since: v1.0.0 + * */ typedef struct _virNetwork virNetwork; @@ -43,6 +46,9 @@ typedef struct _virNetwork virNetwork; * * a virNetworkPtr is pointer to a virNetwork private structure, this is the * type used to reference a virtual network in the API. + * + * Since: v1.0.0 + * */ typedef virNetwork *virNetworkPtr; @@ -51,6 +57,9 @@ typedef virNetwork *virNetworkPtr; * * a virNetworkPort is a private structure representing a virtual network * port + * + * Since: v5.5.0 + * */ typedef struct _virNetworkPort virNetworkPort; @@ -59,6 +68,9 @@ typedef struct _virNetworkPort virNetworkPort; * * a virNetworkPortPtr is pointer to a virNetworkPort private structure, * this is the type used to reference a virtual network port in the API. + * + * Since: v5.5.0 + * */ typedef virNetworkPort *virNetworkPortPtr; @@ -82,11 +94,14 @@ int virConnectNumOfDefinedNetworks (virConnectPtr conn); int virConnectListDefinedNetworks (virConnectPtr conn, char **const names, int maxnames); -/* - * virConnectListAllNetworks: +/** + * virConnectListAllNetworksFlags: * * Flags used to filter the returned networks. Flags in each group * are exclusive attributes of a network. + * + * Since: v1.0.0 + * */ typedef enum { VIR_CONNECT_LIST_NETWORKS_INACTIVE = 1 << 0, @@ -150,6 +165,8 @@ int virNetworkUndefine (virNetworkPtr network); * describes which type of update to perform on a <network> * definition. * + * Since: v1.0.0 + * */ typedef enum { VIR_NETWORK_UPDATE_COMMAND_NONE = 0, /* (invalid (Since: v1.0.0)) */ @@ -168,6 +185,8 @@ typedef enum { * describes which section of a <network> definition the provided * xml should be applied to. * + * Since: v1.0.0 + * */ typedef enum { VIR_NETWORK_SECTION_NONE = 0, /* (invalid (Since: v1.0.0)) */ @@ -192,6 +211,9 @@ typedef enum { * virNetworkUpdateFlags: * * Flags to control options for virNetworkUpdate() + * + * Since: v1.0.0 + * */ typedef enum { VIR_NETWORK_UPDATE_AFFECT_CURRENT = 0, /* affect live if network is active, @@ -246,6 +268,9 @@ int virNetworkIsPersistent(virNetworkPtr net); * virNetworkEventLifecycleType: * * a virNetworkEventLifecycleType is emitted during network lifecycle events + * + * Since: v1.2.1 + * */ typedef enum { VIR_NETWORK_EVENT_DEFINED = 0, @@ -295,6 +320,9 @@ typedef void (*virConnectNetworkEventLifecycleCallback)(virConnectPtr conn, * An enumeration of supported eventId parameters for * virConnectNetworkEventRegisterAny(). Each event id determines which * signature of callback function will be used. + * + * Since: v1.2.1 + * */ typedef enum { VIR_NETWORK_EVENT_ID_LIFECYCLE = 0, /* virConnectNetworkEventLifecycleCallback (Since: v1.2.1) */ @@ -309,6 +337,12 @@ typedef enum { # endif } virNetworkEventID; +/** + * virIPAddrType: + * + * Since: v1.2.6 + * + */ typedef enum { VIR_IP_ADDR_TYPE_IPV4, VIR_IP_ADDR_TYPE_IPV6, @@ -318,6 +352,12 @@ typedef enum { # endif } virIPAddrType; +/** + * virNetworkDHCPLease: + * + * Since: v1.2.6 + * + */ typedef struct _virNetworkDHCPLease virNetworkDHCPLease; typedef virNetworkDHCPLease *virNetworkDHCPLeasePtr; struct _virNetworkDHCPLease { @@ -375,6 +415,12 @@ virNetworkPortPtr virNetworkPortLookupByUUIDString(virNetworkPtr net, const char *uuidstr); +/** + * virNetworkPortCreateFlags: + * + * Since: v5.5.0 + * + */ typedef enum { VIR_NETWORK_PORT_CREATE_RECLAIM = (1 << 0), /* reclaim existing used resources (Since: v5.5.0) */ VIR_NETWORK_PORT_CREATE_VALIDATE = (1 << 1), /* Validate the XML document against schema (Since: v7.8.0) */ diff --git a/include/libvirt/libvirt-nodedev.h b/include/libvirt/libvirt-nodedev.h index 589495213c..a19821bb75 100644 --- a/include/libvirt/libvirt-nodedev.h +++ b/include/libvirt/libvirt-nodedev.h @@ -32,6 +32,9 @@ * virNodeDevice: * * A virNodeDevice contains a node (host) device details. + * + * Since: v1.0.0 + * */ typedef struct _virNodeDevice virNodeDevice; @@ -43,6 +46,9 @@ typedef struct _virNodeDevice virNodeDevice; * one via virNodeDeviceLookupByName, or virNodeDeviceCreate. Be sure * to call virNodeDeviceFree when done using a virNodeDevicePtr obtained * from any of the above functions to avoid leaking memory. + * + * Since: v1.0.0 + * */ typedef virNodeDevice *virNodeDevicePtr; @@ -57,11 +63,15 @@ int virNodeListDevices (virConnectPtr conn, char **const names, int maxnames, unsigned int flags); -/* - * virConnectListAllNodeDevices: +/** + * virConnectListAllNodeDeviceFlags: * * Flags used to filter either by capability or active state, the - * returned node devices. */ + * returned node devices. + * + * Since: v1.0.0 + * + */ typedef enum { VIR_CONNECT_LIST_NODE_DEVICES_CAP_SYSTEM = 1 << 0, /* System capability (Since: v1.0.0) */ VIR_CONNECT_LIST_NODE_DEVICES_CAP_PCI_DEV = 1 << 1, /* PCI device (Since: v1.0.0) */ @@ -168,6 +178,9 @@ int virNodeDeviceIsActive(virNodeDevicePtr dev); * An enumeration of supported eventId parameters for * virConnectNodeDeviceEventRegisterAny(). Each event id determines which * signature of callback function will be used. + * + * Since: v2.2.0 + * */ typedef enum { VIR_NODE_DEVICE_EVENT_ID_LIFECYCLE = 0, /* virConnectNodeDeviceEventLifecycleCallback (Since: v2.2.0) */ @@ -215,6 +228,9 @@ int virConnectNodeDeviceEventDeregisterAny(virConnectPtr conn, * * a virNodeDeviceEventLifecycleType is emitted during node device * lifecycle events + * + * Since: v2.2.0 + * */ typedef enum { VIR_NODE_DEVICE_EVENT_CREATED = 0, diff --git a/include/libvirt/libvirt-nwfilter.h b/include/libvirt/libvirt-nwfilter.h index aa8872e156..5c78ea9d8b 100644 --- a/include/libvirt/libvirt-nwfilter.h +++ b/include/libvirt/libvirt-nwfilter.h @@ -31,6 +31,9 @@ * virNWFilter: * * a virNWFilter is a private structure representing a network filter + * + * Since: v1.0.0 + * */ typedef struct _virNWFilter virNWFilter; @@ -39,6 +42,9 @@ typedef struct _virNWFilter virNWFilter; * * a virNWFilterPtr is pointer to a virNWFilter private structure, * this is the type used to reference a network filter in the API. + * + * Since: v1.0.0 + * */ typedef virNWFilter *virNWFilterPtr; @@ -47,6 +53,9 @@ typedef virNWFilter *virNWFilterPtr; * * a virNWFilterBinding is a private structure representing a network * filter binding to a port + * + * Since: v4.5.0 + * */ typedef struct _virNWFilterBinding virNWFilterBinding; @@ -56,6 +65,9 @@ typedef struct _virNWFilterBinding virNWFilterBinding; * a virNWFilterBindingPtr is pointer to a virNWFilterBinding private * structure, this is the type used to reference a network filter * port binding in the API. + * + * Since: v4.5.0 + * */ typedef virNWFilterBinding *virNWFilterBindingPtr; diff --git a/include/libvirt/libvirt-secret.h b/include/libvirt/libvirt-secret.h index cd636f14be..9f4f60dcaa 100644 --- a/include/libvirt/libvirt-secret.h +++ b/include/libvirt/libvirt-secret.h @@ -33,10 +33,19 @@ * * A virSecret stores a secret value (e.g. a passphrase or encryption key) * and associated metadata. + * + * Since: v1.0.0 + * */ typedef struct _virSecret virSecret; typedef virSecret *virSecretPtr; +/** + * virSecretUsageType: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_SECRET_USAGE_TYPE_NONE = 0, VIR_SECRET_USAGE_TYPE_VOLUME = 1, @@ -61,11 +70,14 @@ int virConnectListSecrets (virConnectPtr conn, char **uuids, int maxuuids); -/* - * virConnectListAllSecrets: +/** + * virConnectListAllSecretsFlags: * * Flags used to filter the returned secrets. Flags in each group * are exclusive attributes of a secret. + * + * Since: v1.0.0 + * */ typedef enum { VIR_CONNECT_LIST_SECRETS_EPHEMERAL = 1 << 0, /* kept in memory, never @@ -132,6 +144,9 @@ int virSecretFree (virSecretPtr secret); * An enumeration of supported eventId parameters for * virConnectSecretEventRegisterAny(). Each event id determines which * signature of callback function will be used. + * + * Since: v3.0.0 + * */ typedef enum { VIR_SECRET_EVENT_ID_LIFECYCLE = 0, /* virConnectSecretEventLifecycleCallback (Since: v3.0.0) */ @@ -179,6 +194,9 @@ int virConnectSecretEventDeregisterAny(virConnectPtr conn, * * a virSecretEventLifecycleType is emitted during secret * lifecycle events + * + * Since: v3.0.0 + * */ typedef enum { VIR_SECRET_EVENT_DEFINED = 0, diff --git a/include/libvirt/libvirt-storage.h b/include/libvirt/libvirt-storage.h index a0c4dab809..c86b1439b6 100644 --- a/include/libvirt/libvirt-storage.h +++ b/include/libvirt/libvirt-storage.h @@ -32,6 +32,9 @@ * virStoragePool: * * a virStoragePool is a private structure representing a storage pool + * + * Since: v1.0.0 + * */ typedef struct _virStoragePool virStoragePool; @@ -40,10 +43,19 @@ typedef struct _virStoragePool virStoragePool; * * a virStoragePoolPtr is pointer to a virStoragePool private structure, this is the * type used to reference a storage pool in the API. + * + * Since: v1.0.0 + * */ typedef virStoragePool *virStoragePoolPtr; +/** + * virStoragePoolState: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_STORAGE_POOL_INACTIVE = 0, /* Not running (Since: v1.0.0) */ VIR_STORAGE_POOL_BUILDING = 1, /* Initializing pool, not available (Since: v1.0.0) */ @@ -69,6 +81,12 @@ typedef enum { VIR_STORAGE_POOL_DELETE_ZEROED = 1 << 0, /* Clear all data to zeros (slow) (Since: v1.0.0) */ } virStoragePoolDeleteFlags; +/** + * virStoragePoolCreateFlags: + * + * Since: v1.3.1 + * + */ typedef enum { /* Create the pool but do not perform pool build (Since: v1.3.1) */ VIR_STORAGE_POOL_CREATE_NORMAL = 0, @@ -93,6 +111,12 @@ typedef enum { VIR_STORAGE_POOL_CREATE_WITH_BUILD_NO_OVERWRITE = 1 << 2, } virStoragePoolCreateFlags; +/** + * virStoragePoolInfo: + * + * Since: v1.0.0 + * + */ typedef struct _virStoragePoolInfo virStoragePoolInfo; struct _virStoragePoolInfo { @@ -102,6 +126,12 @@ struct _virStoragePoolInfo { unsigned long long available; /* Remaining free space bytes */ }; +/** + * virStoragePoolInfoPtr: + * + * Since: v1.0.0 + * + */ typedef virStoragePoolInfo *virStoragePoolInfoPtr; @@ -109,6 +139,9 @@ typedef virStoragePoolInfo *virStoragePoolInfoPtr; * virStorageVol: * * a virStorageVol is a private structure representing a storage volume + * + * Since: v1.0.0 + * */ typedef struct _virStorageVol virStorageVol; @@ -117,10 +150,19 @@ typedef struct _virStorageVol virStorageVol; * * a virStorageVolPtr is pointer to a virStorageVol private structure, this is the * type used to reference a storage volume in the API. + * + * Since: v1.0.0 + * */ typedef virStorageVol *virStorageVolPtr; +/** + * virStorageVolType: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_STORAGE_VOL_FILE = 0, /* Regular file based volumes (Since: v1.0.0) */ VIR_STORAGE_VOL_BLOCK = 1, /* Block based volumes (Since: v1.0.0) */ @@ -135,12 +177,24 @@ typedef enum { # endif } virStorageVolType; +/** + * virStorageVolDeleteFlags: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_STORAGE_VOL_DELETE_NORMAL = 0, /* Delete metadata only (fast) (Since: v1.0.0) */ VIR_STORAGE_VOL_DELETE_ZEROED = 1 << 0, /* Clear all data to zeros (slow) (Since: v1.0.0) */ VIR_STORAGE_VOL_DELETE_WITH_SNAPSHOTS = 1 << 1, /* Force removal of volume, even if in use (Since: v1.2.21) */ } virStorageVolDeleteFlags; +/** + * virStorageVolWipeAlgorithm: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_STORAGE_VOL_WIPE_ALG_ZERO = 0, /* 1-pass, all zeroes (Since: v1.0.0) */ VIR_STORAGE_VOL_WIPE_ALG_NNSA = 1, /* 4-pass NNSA Policy Letter @@ -173,6 +227,12 @@ typedef enum { # endif } virStorageVolWipeAlgorithm; +/** + * virStorageVolInfoFlags: + * + * Since: v3.0.0 + * + */ typedef enum { VIR_STORAGE_VOL_USE_ALLOCATION = 0, @@ -181,6 +241,12 @@ typedef enum { } virStorageVolInfoFlags; +/** + * virStorageVolInfo: + * + * Since: v1.0.0 + * + */ typedef struct _virStorageVolInfo virStorageVolInfo; struct _virStorageVolInfo { @@ -226,6 +292,9 @@ int virConnectListDefinedStoragePools(virConnectPtr conn, * Flags used to tune pools returned by virConnectListAllStoragePools(). * Note that these flags come in groups; if all bits from a group are 0, * then that group is not used to filter results. + * + * Since: v1.0.0 + * */ typedef enum { VIR_CONNECT_LIST_STORAGE_POOLS_INACTIVE = 1 << 0, @@ -351,6 +420,12 @@ virStorageVolPtr virStorageVolLookupByPath (virConnectPtr conn, const char* virStorageVolGetName (virStorageVolPtr vol); const char* virStorageVolGetKey (virStorageVolPtr vol); +/** + * virStorageVolCreateFlags: + * + * Since: v1.0.1 + * + */ typedef enum { VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA = 1 << 0, VIR_STORAGE_VOL_CREATE_REFLINK = 1 << 1, /* perform a btrfs lightweight copy (Since: v1.2.13) */ @@ -432,6 +507,9 @@ int virStoragePoolIsPersistent(virStoragePoolPtr pool); * An enumeration of supported eventId parameters for * virConnectStoragePoolEventRegisterAny(). Each event id determines which * signature of callback function will be used. + * + * Since: v2.0.0 + * */ typedef enum { VIR_STORAGE_POOL_EVENT_ID_LIFECYCLE = 0, /* virConnectStoragePoolEventLifecycleCallback (Since: v2.0.0) */ @@ -479,6 +557,9 @@ int virConnectStoragePoolEventDeregisterAny(virConnectPtr conn, * * a virStoragePoolEventLifecycleType is emitted during storage pool * lifecycle events + * + * Since: v2.0.0 + * */ typedef enum { VIR_STORAGE_POOL_EVENT_DEFINED = 0, diff --git a/include/libvirt/libvirt-stream.h b/include/libvirt/libvirt-stream.h index 076f9ee8b8..5feb66ac35 100644 --- a/include/libvirt/libvirt-stream.h +++ b/include/libvirt/libvirt-stream.h @@ -28,6 +28,12 @@ # endif +/** + * virStreamFlags: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_STREAM_NONBLOCK = (1 << 0), } virStreamFlags; @@ -44,6 +50,12 @@ int virStreamRecv(virStreamPtr st, char *data, size_t nbytes); +/** + * virStreamRecvFlagsValues: + * + * Since: v3.4.0 + * + */ typedef enum { VIR_STREAM_RECV_STOP_AT_HOLE = (1 << 0), } virStreamRecvFlagsValues; @@ -229,6 +241,12 @@ int virStreamSparseRecvAll(virStreamPtr stream, virStreamSinkHoleFunc holeHandler, void *opaque); +/** + * virStreamEventType: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_STREAM_EVENT_READABLE = (1 << 0), VIR_STREAM_EVENT_WRITABLE = (1 << 1), diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h index 5cdcf17dd9..4feaffd1e3 100644 --- a/include/libvirt/virterror.h +++ b/include/libvirt/virterror.h @@ -34,6 +34,9 @@ extern "C" { * virErrorLevel: * * Indicates the level of an error + * + * Since: v1.0.0 + * */ typedef enum { VIR_ERR_NONE = 0, @@ -46,6 +49,9 @@ typedef enum { * * Indicates where an error may have come from. This should remain * stable, with all additions placed at the end since libvirt 0.1.0. + * + * Since: v1.0.0 + * */ typedef enum { VIR_FROM_NONE = 0, @@ -152,6 +158,9 @@ typedef enum { * The conn, dom and net fields should be used with extreme care. * Reference counts are not incremented so the underlying objects * may be deleted without notice after the error has been delivered. + * + * Since: v1.0.0 + * */ typedef struct _virError virError; @@ -205,6 +214,9 @@ struct _virError { * break; * default: * } + * + * Since: v1.0.0 + * */ typedef enum { VIR_ERR_OK = 0, -- 2.35.1

With style fixes. Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-qemu.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/libvirt/libvirt-qemu.h b/include/libvirt/libvirt-qemu.h index 24bf67998b..838b6e9caf 100644 --- a/include/libvirt/libvirt-qemu.h +++ b/include/libvirt/libvirt-qemu.h @@ -50,6 +50,12 @@ virDomainPtr virDomainQemuAttach(virConnectPtr domain, unsigned int pid_value, unsigned int flags); +/** + * virDomainQemuAgentCommandTimeoutValues: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_DOMAIN_QEMU_AGENT_COMMAND_MIN = VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_BLOCK, VIR_DOMAIN_QEMU_AGENT_COMMAND_BLOCK = VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_BLOCK, @@ -84,6 +90,12 @@ typedef void (*virConnectDomainQemuMonitorEventCallback)(virConnectPtr conn, void *opaque); +/** + * virConnectDomainQemuMonitorEventRegisterFlags: + * + * Since: v1.2.3 + * + */ typedef enum { /* Event filter is a regex rather than a literal string (Since: v1.2.3) */ VIR_CONNECT_DOMAIN_QEMU_MONITOR_EVENT_REGISTER_REGEX = (1 << 0), -- 2.35.1

With style fixes. Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-admin.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/include/libvirt/libvirt-admin.h b/include/libvirt/libvirt-admin.h index f54aeb0c1d..2bfb45145d 100644 --- a/include/libvirt/libvirt-admin.h +++ b/include/libvirt/libvirt-admin.h @@ -37,6 +37,9 @@ extern "C" { * * a virAdmConnect is a private structure representing a connection to * libvirt daemon. + * + * Since: v1.2.17 + * */ typedef struct _virAdmConnect virAdmConnect; @@ -45,6 +48,9 @@ typedef struct _virAdmConnect virAdmConnect; * * a virAdmServer is a private structure and client-side representation of * a remote server object + * + * Since: v1.3.2 + * */ typedef struct _virAdmServer virAdmServer; @@ -53,6 +59,9 @@ typedef struct _virAdmServer virAdmServer; * * a virAdmClient is a private structure and client-side representation of * a remote server's client object (as server sees clients connected to it) + * + * Since: v1.3.5 + * */ typedef struct _virAdmClient virAdmClient; @@ -62,6 +71,9 @@ typedef struct _virAdmClient virAdmClient; * a virAdmConnectPtr is pointer to a virAdmConnect private structure, * this is the type used to reference a connection to the daemon * in the API. + * + * Since: v1.2.17 + * */ typedef virAdmConnect *virAdmConnectPtr; @@ -71,6 +83,9 @@ typedef virAdmConnect *virAdmConnectPtr; * a virAdmServerPtr is a pointer to a virAdmServer structure, * this is the type used to reference client-side representation of a * remote server object throughout all the APIs. + * + * Since: v1.3.2 + * */ typedef virAdmServer *virAdmServerPtr; @@ -80,6 +95,9 @@ typedef virAdmServer *virAdmServerPtr; * a virAdmClientPtr is a pointer to a virAdmClient structure, * this is the type used to reference client-side representation of a * client object throughout all the APIs. + * + * Since: v1.3.5 + * */ typedef virAdmClient *virAdmClientPtr; @@ -222,6 +240,12 @@ long long virAdmClientGetTimestamp(virAdmClientPtr client); int virAdmClientGetTransport(virAdmClientPtr client); int virAdmClientFree(virAdmClientPtr client); +/** + * virClientTransport: + * + * Since: v1.3.5 + * + */ typedef enum { VIR_CLIENT_TRANS_UNIX = 0, /* connection via UNIX socket (Since: v1.3.5) */ VIR_CLIENT_TRANS_TCP, /* connection via unencrypted TCP socket (Since: v1.3.5) */ -- 2.35.1

Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-domain.h | 75 ++++ include/libvirt/libvirt-event.h | 24 ++ include/libvirt/libvirt-host.h | 6 + include/libvirt/libvirt-network.h | 6 + include/libvirt/libvirt-nodedev.h | 6 + include/libvirt/libvirt-secret.h | 6 + include/libvirt/libvirt-storage.h | 6 + include/libvirt/libvirt-stream.h | 18 + include/libvirt/virterror.h | 3 + src/libvirt-domain-checkpoint.c | 36 ++ src/libvirt-domain-snapshot.c | 63 ++++ src/libvirt-domain.c | 554 +++++++++++++++++++++++++++++- src/libvirt-host.c | 102 ++++++ src/libvirt-interface.c | 63 ++++ src/libvirt-network.c | 123 +++++++ src/libvirt-nodedev.c | 81 +++++ src/libvirt-nwfilter.c | 63 ++++ src/libvirt-secret.c | 60 ++++ src/libvirt-storage.c | 168 +++++++++ src/libvirt-stream.c | 51 +++ src/libvirt.c | 18 + src/util/virerror.c | 45 +++ src/util/virevent.c | 27 ++ 23 files changed, 1603 insertions(+), 1 deletion(-) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index 912ed26a56..8d04a0b989 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -4126,6 +4126,9 @@ typedef enum { * A callback function to be registered, and called when a domain event occurs * * Returns 0 (the return value is currently ignored) + * + * Since: v1.0.0 + * */ typedef int (*virConnectDomainEventCallback)(virConnectPtr conn, virDomainPtr dom, @@ -4712,6 +4715,9 @@ typedef enum { * have a customization with extra parameters, often with @opaque being * passed in a different parameter position; use VIR_DOMAIN_EVENT_CALLBACK() * when registering an appropriate handler. + * + * Since: v1.0.0 + * */ typedef void (*virConnectDomainEventGenericCallback)(virConnectPtr conn, virDomainPtr dom, @@ -4726,6 +4732,9 @@ typedef void (*virConnectDomainEventGenericCallback)(virConnectPtr conn, * * The callback signature to use when registering for an event of type * VIR_DOMAIN_EVENT_ID_RTC_CHANGE with virConnectDomainEventRegisterAny() + * + * Since: v1.0.0 + * */ typedef void (*virConnectDomainEventRTCChangeCallback)(virConnectPtr conn, virDomainPtr dom, @@ -4764,6 +4773,9 @@ typedef enum { * The callback signature to use when registering for an event of type * VIR_DOMAIN_EVENT_ID_WATCHDOG with virConnectDomainEventRegisterAny() * + * Since: v1.0.0 + * + * */ typedef void (*virConnectDomainEventWatchdogCallback)(virConnectPtr conn, virDomainPtr dom, @@ -4800,6 +4812,9 @@ typedef enum { * * The callback signature to use when registering for an event of type * VIR_DOMAIN_EVENT_ID_IO_ERROR with virConnectDomainEventRegisterAny() + * + * Since: v1.0.0 + * */ typedef void (*virConnectDomainEventIOErrorCallback)(virConnectPtr conn, virDomainPtr dom, @@ -4827,6 +4842,9 @@ typedef void (*virConnectDomainEventIOErrorCallback)(virConnectPtr conn, * Otherwise, @reason will be "", although future strings may be added * if determination of other error types becomes possible. * + * Since: v1.0.0 + * + * */ typedef void (*virConnectDomainEventIOErrorReasonCallback)(virConnectPtr conn, virDomainPtr dom, @@ -4980,6 +4998,9 @@ typedef virDomainEventGraphicsSubject *virDomainEventGraphicsSubjectPtr; * * The callback signature to use when registering for an event of type * VIR_DOMAIN_EVENT_ID_GRAPHICS with virConnectDomainEventRegisterAny() + * + * Since: v1.0.0 + * */ typedef void (*virConnectDomainEventGraphicsCallback)(virConnectPtr conn, virDomainPtr dom, @@ -5033,6 +5054,9 @@ typedef enum { * was registered using the newer type of VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2, * then @disk will contain the device target shorthand (the <target * dev='...'/> sub-element, such as "vda"). + * + * Since: v1.0.0 + * */ typedef void (*virConnectDomainEventBlockJobCallback)(virConnectPtr conn, virDomainPtr dom, @@ -5087,6 +5111,9 @@ typedef enum { * * The callback signature to use when registering for an event of type * VIR_DOMAIN_EVENT_ID_DISK_CHANGE with virConnectDomainEventRegisterAny() + * + * Since: v1.0.0 + * */ typedef void (*virConnectDomainEventDiskChangeCallback)(virConnectPtr conn, virDomainPtr dom, @@ -5125,6 +5152,9 @@ typedef enum { * * The callback signature to use when registering for an event of type * VIR_DOMAIN_EVENT_ID_TRAY_CHANGE with virConnectDomainEventRegisterAny() + * + * Since: v1.0.0 + * */ typedef void (*virConnectDomainEventTrayChangeCallback)(virConnectPtr conn, virDomainPtr dom, @@ -5144,6 +5174,9 @@ typedef void (*virConnectDomainEventTrayChangeCallback)(virConnectPtr conn, * * The callback signature to use when registering for an event of type * VIR_DOMAIN_EVENT_ID_PMWAKEUP with virConnectDomainEventRegisterAny() + * + * Since: v1.0.0 + * */ typedef void (*virConnectDomainEventPMWakeupCallback)(virConnectPtr conn, virDomainPtr dom, @@ -5162,6 +5195,9 @@ typedef void (*virConnectDomainEventPMWakeupCallback)(virConnectPtr conn, * * The callback signature to use when registering for an event of type * VIR_DOMAIN_EVENT_ID_PMSUSPEND with virConnectDomainEventRegisterAny() + * + * Since: v1.0.0 + * */ typedef void (*virConnectDomainEventPMSuspendCallback)(virConnectPtr conn, virDomainPtr dom, @@ -5178,6 +5214,9 @@ typedef void (*virConnectDomainEventPMSuspendCallback)(virConnectPtr conn, * * The callback signature to use when registering for an event of type * VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE with virConnectDomainEventRegisterAny() + * + * Since: v1.0.0 + * */ typedef void (*virConnectDomainEventBalloonChangeCallback)(virConnectPtr conn, virDomainPtr dom, @@ -5196,6 +5235,9 @@ typedef void (*virConnectDomainEventBalloonChangeCallback)(virConnectPtr conn, * * The callback signature to use when registering for an event of type * VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK with virConnectDomainEventRegisterAny() + * + * Since: v1.0.0 + * */ typedef void (*virConnectDomainEventPMSuspendDiskCallback)(virConnectPtr conn, virDomainPtr dom, @@ -5213,6 +5255,9 @@ typedef void (*virConnectDomainEventPMSuspendDiskCallback)(virConnectPtr conn, * * The callback signature to use when registering for an event of type * VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED with virConnectDomainEventRegisterAny() + * + * Since: v1.1.1 + * */ typedef void (*virConnectDomainEventDeviceRemovedCallback)(virConnectPtr conn, virDomainPtr dom, @@ -5230,6 +5275,9 @@ typedef void (*virConnectDomainEventDeviceRemovedCallback)(virConnectPtr conn, * * The callback signature to use when registering for an event of type * VIR_DOMAIN_EVENT_ID_DEVICE_ADDED with virConnectDomainEventRegisterAny() + * + * Since: v1.2.15 + * */ typedef void (*virConnectDomainEventDeviceAddedCallback)(virConnectPtr conn, virDomainPtr dom, @@ -5249,6 +5297,9 @@ typedef void (*virConnectDomainEventDeviceAddedCallback)(virConnectPtr conn, * The callback signature to use when registering for an event of type * VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED with * virConnectDomainEventRegisterAny(). + * + * Since: v1.3.4 + * */ typedef void (*virConnectDomainEventDeviceRemovalFailedCallback)(virConnectPtr conn, virDomainPtr dom, @@ -5267,6 +5318,9 @@ typedef void (*virConnectDomainEventDeviceRemovalFailedCallback)(virConnectPtr c * * The callback signature to use when registering for an event of type * VIR_DOMAIN_EVENT_ID_METADATA_CHANGE with virConnectDomainEventRegisterAny(). + * + * Since: v3.0.0 + * */ typedef void (*virConnectDomainEventMetadataChangeCallback)(virConnectPtr conn, virDomainPtr dom, @@ -5290,6 +5344,9 @@ typedef void (*virConnectDomainEventMetadataChangeCallback)(virConnectPtr conn, * The callback signature to use when registering for an event of type * VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION with * virConnectDomainEventRegisterAny(). + * + * Since: v1.3.2 + * */ typedef void (*virConnectDomainEventMigrationIterationCallback)(virConnectPtr conn, virDomainPtr dom, @@ -5314,6 +5371,9 @@ typedef void (*virConnectDomainEventMigrationIterationCallback)(virConnectPtr co * The callback signature to use when registering for an event of type * VIR_DOMAIN_EVENT_ID_JOB_COMPLETED with * virConnectDomainEventRegisterAny(). + * + * Since: v1.3.3 + * */ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, virDomainPtr dom, @@ -5712,6 +5772,9 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn, * * The callback signature to use when registering for an event of type * VIR_DOMAIN_EVENT_ID_TUNABLE with virConnectDomainEventRegisterAny() + * + * Since: v1.2.9 + * */ typedef void (*virConnectDomainEventTunableCallback)(virConnectPtr conn, virDomainPtr dom, @@ -5764,6 +5827,9 @@ typedef enum { * * The callback signature to use when registering for an event of type * VIR_DOMAIN_EVENT_ID_AGENT_LIFECYCLE with virConnectDomainEventRegisterAny() + * + * Since: v1.2.11 + * */ typedef void (*virConnectDomainEventAgentLifecycleCallback)(virConnectPtr conn, virDomainPtr dom, @@ -5793,6 +5859,9 @@ typedef void (*virConnectDomainEventAgentLifecycleCallback)(virConnectPtr conn, * * The callback signature to use when registering for an event of type * VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD with virConnectDomainEventRegisterAny() + * + * Since: v3.2.0 + * */ typedef void (*virConnectDomainEventBlockThresholdCallback)(virConnectPtr conn, virDomainPtr dom, @@ -5818,6 +5887,9 @@ typedef void (*virConnectDomainEventBlockThresholdCallback)(virConnectPtr conn, * * The callback signature to use when registering for an event of type * VIR_DOMAIN_EVENT_ID_MEMORY_FAILURE with virConnectDomainEventRegisterAny() + * + * Since: v6.9.0 + * */ typedef void (*virConnectDomainEventMemoryFailureCallback)(virConnectPtr conn, virDomainPtr dom, @@ -5842,6 +5914,9 @@ typedef void (*virConnectDomainEventMemoryFailureCallback)(virConnectPtr conn, * The callback signature to use when registering for an event of type * VIR_DOMAIN_EVENT_ID_MEMORY_DEVICE_SIZE_CHANGE with * virConnectDomainEventRegisterAny(). + * + * Since: v7.9.0 + * */ typedef void (*virConnectDomainEventMemoryDeviceSizeChangeCallback)(virConnectPtr conn, virDomainPtr dom, diff --git a/include/libvirt/libvirt-event.h b/include/libvirt/libvirt-event.h index a5c73dda2a..078439f3d6 100644 --- a/include/libvirt/libvirt-event.h +++ b/include/libvirt/libvirt-event.h @@ -55,6 +55,9 @@ typedef enum { * * Callback for receiving file handle events. The callback will * be invoked once for each event which is pending. + * + * Since: v1.0.0 + * */ typedef void (*virEventHandleCallback)(int watch, int fd, int events, void *opaque); @@ -82,6 +85,9 @@ typedef void (*virEventHandleCallback)(int watch, int fd, int events, void *opaq * * Returns -1 if the file handle cannot be registered, otherwise a handle * watch number to be used for updating and unregistering for events + * + * Since: v1.0.0 + * */ typedef int (*virEventAddHandleFunc)(int fd, int event, virEventHandleCallback cb, @@ -95,6 +101,9 @@ typedef int (*virEventAddHandleFunc)(int fd, int event, * * Part of the EventImpl, this user-provided callback is notified when * events to listen on change + * + * Since: v1.0.0 + * */ typedef void (*virEventUpdateHandleFunc)(int watch, int event); @@ -110,6 +119,9 @@ typedef void (*virEventUpdateHandleFunc)(int watch, int event); * function call, when it is safe to release the user data. * * Returns -1 if the file handle was not registered, 0 upon success + * + * Since: v1.0.0 + * */ typedef int (*virEventRemoveHandleFunc)(int watch); @@ -120,6 +132,9 @@ typedef int (*virEventRemoveHandleFunc)(int watch); * @opaque: user data registered with handle * * callback for receiving timer events + * + * Since: v1.0.0 + * */ typedef void (*virEventTimeoutCallback)(int timer, void *opaque); @@ -138,6 +153,9 @@ typedef void (*virEventTimeoutCallback)(int timer, void *opaque); * this purpose. * * Returns a timer value + * + * Since: v1.0.0 + * */ typedef int (*virEventAddTimeoutFunc)(int timeout, virEventTimeoutCallback cb, @@ -151,6 +169,9 @@ typedef int (*virEventAddTimeoutFunc)(int timeout, * * Part of the EventImpl, this user-defined callback updates an * event timeout. + * + * Since: v1.0.0 + * */ typedef void (*virEventUpdateTimeoutFunc)(int timer, int timeout); @@ -165,6 +186,9 @@ typedef void (*virEventUpdateTimeoutFunc)(int timer, int timeout); * function call, when it is safe to release the user data. * * Returns 0 on success, -1 on failure + * + * Since: v1.0.0 + * */ typedef int (*virEventRemoveTimeoutFunc)(int timer); diff --git a/include/libvirt/libvirt-host.h b/include/libvirt/libvirt-host.h index a11bfb5f95..d366cc903e 100644 --- a/include/libvirt/libvirt-host.h +++ b/include/libvirt/libvirt-host.h @@ -700,6 +700,9 @@ typedef virConnectCredential *virConnectCredentialPtr; * If an interaction cannot be filled, fill in NULL and 0. * * Returns 0 if all interactions were filled, or -1 upon error + * + * Since: v1.0.0 + * */ typedef int (*virConnectAuthCallbackPtr)(virConnectCredentialPtr cred, unsigned int ncred, @@ -901,6 +904,9 @@ int virConnectSetKeepAlive(virConnectPtr conn, * * A callback function to be registered, and called when the connection * is closed. + * + * Since: v1.0.0 + * */ typedef void (*virConnectCloseFunc)(virConnectPtr conn, int reason, diff --git a/include/libvirt/libvirt-network.h b/include/libvirt/libvirt-network.h index ab8b34ae1c..0457771fb7 100644 --- a/include/libvirt/libvirt-network.h +++ b/include/libvirt/libvirt-network.h @@ -296,6 +296,9 @@ typedef enum { * * The callback signature to use when registering for an event of type * VIR_NETWORK_EVENT_ID_LIFECYCLE with virConnectNetworkEventRegisterAny() + * + * Since: v1.2.1 + * */ typedef void (*virConnectNetworkEventLifecycleCallback)(virConnectPtr conn, virNetworkPtr net, @@ -390,6 +393,9 @@ int virNetworkGetDHCPLeases(virNetworkPtr network, * have a customization with extra parameters, often with @opaque being * passed in a different parameter position; use VIR_NETWORK_EVENT_CALLBACK() * when registering an appropriate handler. + * + * Since: v1.2.1 + * */ typedef void (*virConnectNetworkEventGenericCallback)(virConnectPtr conn, virNetworkPtr net, diff --git a/include/libvirt/libvirt-nodedev.h b/include/libvirt/libvirt-nodedev.h index a19821bb75..4d05237cbe 100644 --- a/include/libvirt/libvirt-nodedev.h +++ b/include/libvirt/libvirt-nodedev.h @@ -207,6 +207,9 @@ typedef enum { * have a customization with extra parameters, often with @opaque being * passed in a different parameter position; use * VIR_NODE_DEVICE_EVENT_CALLBACK() when registering an appropriate handler. + * + * Since: v2.2.0 + * */ typedef void (*virConnectNodeDeviceEventGenericCallback)(virConnectPtr conn, virNodeDevicePtr dev, @@ -257,6 +260,9 @@ typedef enum { * The callback signature to use when registering for an event of type * VIR_NODE_DEVICE_EVENT_ID_LIFECYCLE with * virConnectNodeDeviceEventRegisterAny() + * + * Since: v2.2.0 + * */ typedef void (*virConnectNodeDeviceEventLifecycleCallback)(virConnectPtr conn, virNodeDevicePtr dev, diff --git a/include/libvirt/libvirt-secret.h b/include/libvirt/libvirt-secret.h index 9f4f60dcaa..1f0fc41c0c 100644 --- a/include/libvirt/libvirt-secret.h +++ b/include/libvirt/libvirt-secret.h @@ -173,6 +173,9 @@ typedef enum { * have a customization with extra parameters, often with @opaque being * passed in a different parameter position; use * VIR_SECRET_EVENT_CALLBACK() when registering an appropriate handler. + * + * Since: v3.0.0 + * */ typedef void (*virConnectSecretEventGenericCallback)(virConnectPtr conn, virSecretPtr secret, @@ -221,6 +224,9 @@ typedef enum { * The callback signature to use when registering for an event of type * VIR_SECRET_EVENT_ID_LIFECYCLE with * virConnectSecretEventRegisterAny() + * + * Since: v3.0.0 + * */ typedef void (*virConnectSecretEventLifecycleCallback)(virConnectPtr conn, virSecretPtr secret, diff --git a/include/libvirt/libvirt-storage.h b/include/libvirt/libvirt-storage.h index c86b1439b6..8f0352237c 100644 --- a/include/libvirt/libvirt-storage.h +++ b/include/libvirt/libvirt-storage.h @@ -536,6 +536,9 @@ typedef enum { * have a customization with extra parameters, often with @opaque being * passed in a different parameter position; use * VIR_STORAGE_POOL_EVENT_CALLBACK() when registering an appropriate handler. + * + * Since: v2.0.0 + * */ typedef void (*virConnectStoragePoolEventGenericCallback)(virConnectPtr conn, virStoragePoolPtr pool, @@ -588,6 +591,9 @@ typedef enum { * The callback signature to use when registering for an event of type * VIR_STORAGE_POOL_EVENT_ID_LIFECYCLE with * virConnectStoragePoolEventRegisterAny() + * + * Since: v2.0.0 + * */ typedef void (*virConnectStoragePoolEventLifecycleCallback)(virConnectPtr conn, virStoragePoolPtr pool, diff --git a/include/libvirt/libvirt-stream.h b/include/libvirt/libvirt-stream.h index 5feb66ac35..1850b06684 100644 --- a/include/libvirt/libvirt-stream.h +++ b/include/libvirt/libvirt-stream.h @@ -100,6 +100,9 @@ int virStreamRecvHole(virStreamPtr, * * Returns the number of bytes filled, 0 upon end * of file, or -1 upon error + * + * Since: v1.0.0 + * */ typedef int (*virStreamSourceFunc)(virStreamPtr st, char *data, @@ -138,6 +141,9 @@ int virStreamSendAll(virStreamPtr st, * * Returns 0 on success, * -1 upon error + * + * Since: v3.4.0 + * */ typedef int (*virStreamSourceHoleFunc)(virStreamPtr st, int *inData, @@ -164,6 +170,9 @@ typedef int (*virStreamSourceHoleFunc)(virStreamPtr st, * * Returns 0 on success, * -1 upon error. + * + * Since: v3.4.0 + * */ typedef int (*virStreamSourceSkipFunc)(virStreamPtr st, long long length, @@ -201,6 +210,9 @@ int virStreamSparseSendAll(virStreamPtr st, * * Returns the number of bytes consumed or -1 upon * error + * + * Since: v1.0.0 + * */ typedef int (*virStreamSinkFunc)(virStreamPtr st, const char *data, @@ -231,6 +243,9 @@ int virStreamRecvAll(virStreamPtr st, * * Returns 0 on success, * -1 upon error + * + * Since: v3.4.0 + * */ typedef int (*virStreamSinkHoleFunc)(virStreamPtr st, long long length, @@ -264,6 +279,9 @@ typedef enum { * * Callback for receiving stream events. The callback will * be invoked once for each event which is pending. + * + * Since: v1.0.0 + * */ typedef void (*virStreamEventCallback)(virStreamPtr stream, int events, void *opaque); diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h index 4feaffd1e3..76b20e410c 100644 --- a/include/libvirt/virterror.h +++ b/include/libvirt/virterror.h @@ -359,6 +359,9 @@ typedef enum { * @error: the error being raised. * * Signature of a function to use when there is an error raised by the library. + * + * Since: v1.0.0 + * */ typedef void (*virErrorFunc) (void *userData, virErrorPtr error); diff --git a/src/libvirt-domain-checkpoint.c b/src/libvirt-domain-checkpoint.c index 58ee26857d..37a895e771 100644 --- a/src/libvirt-domain-checkpoint.c +++ b/src/libvirt-domain-checkpoint.c @@ -35,6 +35,9 @@ VIR_LOG_INIT("libvirt.domain-checkpoint"); * * Returns a pointer to the name or NULL, the string need not be deallocated * as its lifetime will be the same as the checkpoint object. + * + * Since: v5.6.0 + * */ const char * virDomainCheckpointGetName(virDomainCheckpointPtr checkpoint) @@ -58,6 +61,9 @@ virDomainCheckpointGetName(virDomainCheckpointPtr checkpoint) * call. * * Returns the domain or NULL. + * + * Since: v5.6.0 + * */ virDomainPtr virDomainCheckpointGetDomain(virDomainCheckpointPtr checkpoint) @@ -81,6 +87,9 @@ virDomainCheckpointGetDomain(virDomainCheckpointPtr checkpoint) * call. * * Returns the connection or NULL. + * + * Since: v5.6.0 + * */ virConnectPtr virDomainCheckpointGetConnect(virDomainCheckpointPtr checkpoint) @@ -138,6 +147,9 @@ virDomainCheckpointGetConnect(virDomainCheckpointPtr checkpoint) * * Returns an (opaque) new virDomainCheckpointPtr on success or NULL * on failure. + * + * Since: v5.6.0 + * */ virDomainCheckpointPtr virDomainCheckpointCreateXML(virDomainPtr domain, @@ -207,6 +219,9 @@ virDomainCheckpointCreateXML(virDomainPtr domain, * * Returns a 0 terminated UTF-8 encoded XML instance or NULL in case * of error. The caller must free() the returned value. + * + * Since: v5.6.0 + * */ char * virDomainCheckpointGetXMLDesc(virDomainCheckpointPtr checkpoint, @@ -281,6 +296,9 @@ virDomainCheckpointGetXMLDesc(virDomainCheckpointPtr checkpoint, * included in the return count, to make iteration easier. The caller is * responsible for calling virDomainCheckpointFree() on each array element, * then calling free() on @checkpoints. + * + * Since: v5.6.0 + * */ int virDomainListAllCheckpoints(virDomainPtr domain, @@ -348,6 +366,9 @@ virDomainListAllCheckpoints(virDomainPtr domain, * in the return count, to make iteration easier. The caller is responsible * for calling virDomainCheckpointFree() on each array element, then calling * free() on @children. + * + * Since: v5.6.0 + * */ int virDomainCheckpointListAllChildren(virDomainCheckpointPtr checkpoint, @@ -394,6 +415,9 @@ virDomainCheckpointListAllChildren(virDomainCheckpointPtr checkpoint, * Returns a domain checkpoint object or NULL in case of failure. If the * domain checkpoint cannot be found, then the VIR_ERR_NO_DOMAIN_CHECKPOINT * error is raised. + * + * Since: v5.6.0 + * */ virDomainCheckpointPtr virDomainCheckpointLookupByName(virDomainPtr domain, @@ -440,6 +464,9 @@ virDomainCheckpointLookupByName(virDomainPtr domain, * Returns a domain checkpoint object or NULL in case of failure. If the * given checkpoint is a root (no parent), then the VIR_ERR_NO_DOMAIN_CHECKPOINT * error is raised. + * + * Since: v5.6.0 + * */ virDomainCheckpointPtr virDomainCheckpointGetParent(virDomainCheckpointPtr checkpoint, @@ -493,6 +520,9 @@ virDomainCheckpointGetParent(virDomainCheckpointPtr checkpoint, * silently ignored. * * Returns 0 on success, -1 on error. + * + * Since: v5.6.0 + * */ int virDomainCheckpointDelete(virDomainCheckpointPtr checkpoint, @@ -543,6 +573,9 @@ virDomainCheckpointDelete(virDomainCheckpointPtr checkpoint, * increment the reference count. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v5.6.0 + * */ int virDomainCheckpointRef(virDomainCheckpointPtr checkpoint) @@ -566,6 +599,9 @@ virDomainCheckpointRef(virDomainCheckpointPtr checkpoint) * The data structure is freed and should not be used thereafter. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v5.6.0 + * */ int virDomainCheckpointFree(virDomainCheckpointPtr checkpoint) diff --git a/src/libvirt-domain-snapshot.c b/src/libvirt-domain-snapshot.c index 69845918a2..f91111e283 100644 --- a/src/libvirt-domain-snapshot.c +++ b/src/libvirt-domain-snapshot.c @@ -35,6 +35,9 @@ VIR_LOG_INIT("libvirt.domain-snapshot"); * * Returns a pointer to the name or NULL, the string need not be deallocated * as its lifetime will be the same as the snapshot object. + * + * Since: v1.0.0 + * */ const char * virDomainSnapshotGetName(virDomainSnapshotPtr snapshot) @@ -58,6 +61,9 @@ virDomainSnapshotGetName(virDomainSnapshotPtr snapshot) * call. * * Returns the domain or NULL. + * + * Since: v1.0.0 + * */ virDomainPtr virDomainSnapshotGetDomain(virDomainSnapshotPtr snapshot) @@ -81,6 +87,9 @@ virDomainSnapshotGetDomain(virDomainSnapshotPtr snapshot) * call. * * Returns the connection or NULL. + * + * Since: v1.0.0 + * */ virConnectPtr virDomainSnapshotGetConnect(virDomainSnapshotPtr snapshot) @@ -213,6 +222,9 @@ virDomainSnapshotGetConnect(virDomainSnapshotPtr snapshot) * * Returns an (opaque) new virDomainSnapshotPtr on success or NULL on * failure. + * + * Since: v1.0.0 + * */ virDomainSnapshotPtr virDomainSnapshotCreateXML(virDomainPtr domain, @@ -271,6 +283,9 @@ virDomainSnapshotCreateXML(virDomainPtr domain, * * Returns a 0 terminated UTF-8 encoded XML instance or NULL in case * of error. The caller must free() the returned value. + * + * Since: v1.0.0 + * */ char * virDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, @@ -324,6 +339,9 @@ virDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, * virDomainListAllSnapshots(). * * Returns the number of domain snapshots found or -1 in case of error. + * + * Since: v1.0.0 + * */ int virDomainSnapshotNum(virDomainPtr domain, unsigned int flags) @@ -388,6 +406,9 @@ virDomainSnapshotNum(virDomainPtr domain, unsigned int flags) * * Returns the number of domain snapshots found or -1 in case of error. * The caller is responsible to call free() for each member of the array. + * + * Since: v1.0.0 + * */ int virDomainSnapshotListNames(virDomainPtr domain, char **names, int nameslen, @@ -476,6 +497,9 @@ virDomainSnapshotListNames(virDomainPtr domain, char **names, int nameslen, * in the return count, to make iteration easier. The caller is responsible * for calling virDomainSnapshotFree() on each array element, then calling * free() on @snaps. + * + * Since: v1.0.0 + * */ int virDomainListAllSnapshots(virDomainPtr domain, virDomainSnapshotPtr **snaps, @@ -525,6 +549,9 @@ virDomainListAllSnapshots(virDomainPtr domain, virDomainSnapshotPtr **snaps, * virDomainSnapshotListAllChildren(). * * Returns the number of domain snapshots found or -1 in case of error. + * + * Since: v1.0.0 + * */ int virDomainSnapshotNumChildren(virDomainSnapshotPtr snapshot, unsigned int flags) @@ -591,6 +618,9 @@ virDomainSnapshotNumChildren(virDomainSnapshotPtr snapshot, unsigned int flags) * * Returns the number of domain snapshots found or -1 in case of error. * The caller is responsible to call free() for each member of the array. + * + * Since: v1.0.0 + * */ int virDomainSnapshotListChildrenNames(virDomainSnapshotPtr snapshot, @@ -662,6 +692,9 @@ virDomainSnapshotListChildrenNames(virDomainSnapshotPtr snapshot, * in the return count, to make iteration easier. The caller is responsible * for calling virDomainSnapshotFree() on each array element, then calling * free() on @snaps. + * + * Since: v1.0.0 + * */ int virDomainSnapshotListAllChildren(virDomainSnapshotPtr snapshot, @@ -706,6 +739,9 @@ virDomainSnapshotListAllChildren(virDomainSnapshotPtr snapshot, * Returns a domain snapshot object or NULL in case of failure. If the * domain snapshot cannot be found, then the VIR_ERR_NO_DOMAIN_SNAPSHOT * error is raised. + * + * Since: v1.0.0 + * */ virDomainSnapshotPtr virDomainSnapshotLookupByName(virDomainPtr domain, @@ -746,6 +782,9 @@ virDomainSnapshotLookupByName(virDomainPtr domain, * Determine if the domain has a current snapshot. * * Returns 1 if such snapshot exists, 0 if it doesn't, -1 on error. + * + * Since: v1.0.0 + * */ int virDomainHasCurrentSnapshot(virDomainPtr domain, unsigned int flags) @@ -786,6 +825,9 @@ virDomainHasCurrentSnapshot(virDomainPtr domain, unsigned int flags) * Returns a domain snapshot object or NULL in case of failure. If the * current domain snapshot cannot be found, then the VIR_ERR_NO_DOMAIN_SNAPSHOT * error is raised. + * + * Since: v1.0.0 + * */ virDomainSnapshotPtr virDomainSnapshotCurrent(virDomainPtr domain, @@ -828,6 +870,9 @@ virDomainSnapshotCurrent(virDomainPtr domain, * Returns a domain snapshot object or NULL in case of failure. If the * given snapshot is a root (no parent), then the VIR_ERR_NO_DOMAIN_SNAPSHOT * error is raised. + * + * Since: v1.0.0 + * */ virDomainSnapshotPtr virDomainSnapshotGetParent(virDomainSnapshotPtr snapshot, @@ -866,6 +911,9 @@ virDomainSnapshotGetParent(virDomainSnapshotPtr snapshot, * also virDomainHasCurrentSnapshot(). * * Returns 1 if current, 0 if not current, or -1 on error. + * + * Since: v1.0.0 + * */ int virDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot, @@ -905,6 +953,9 @@ virDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot, * * Returns 1 if the snapshot has metadata, 0 if the snapshot exists without * help from libvirt, or -1 on error. + * + * Since: v1.0.0 + * */ int virDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot, @@ -984,6 +1035,9 @@ virDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot, * NVRAM from the pristine template. * * Returns 0 if the creation is successful, -1 on error. + * + * Since: v1.0.0 + * */ int virDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, @@ -1041,6 +1095,9 @@ virDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, * * Returns 0 if the selected snapshot(s) were successfully deleted, * -1 on error. + * + * Since: v1.0.0 + * */ int virDomainSnapshotDelete(virDomainSnapshotPtr snapshot, @@ -1091,6 +1148,9 @@ virDomainSnapshotDelete(virDomainSnapshotPtr snapshot, * increment the reference count. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainSnapshotRef(virDomainSnapshotPtr snapshot) @@ -1114,6 +1174,9 @@ virDomainSnapshotRef(virDomainSnapshotPtr snapshot) * The data structure is freed and should not be used thereafter. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainSnapshotFree(virDomainSnapshotPtr snapshot) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index cbd7902d2d..b9c0a65cfa 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -49,6 +49,9 @@ VIR_LOG_INIT("libvirt.domain"); * call to virConnectNumOfDomains() and this call; you are only guaranteed * that all currently active domains were listed if the return is less * than @maxids. + * + * Since: v1.0.0 + * */ int virConnectListDomains(virConnectPtr conn, int *ids, int maxids) @@ -82,6 +85,9 @@ virConnectListDomains(virConnectPtr conn, int *ids, int maxids) * Provides the number of active domains. * * Returns the number of domain found or -1 in case of error + * + * Since: v1.0.0 + * */ int virConnectNumOfDomains(virConnectPtr conn) @@ -115,6 +121,9 @@ virConnectNumOfDomains(virConnectPtr conn) * call. * * Returns the virConnectPtr or NULL in case of failure. + * + * Since: v1.0.0 + * */ virConnectPtr virDomainGetConnect(virDomainPtr dom) @@ -162,6 +171,9 @@ virDomainGetConnect(virDomainPtr dom) * domain object is no longer needed. * * Returns a new domain object or NULL in case of failure + * + * Since: v1.0.0 + * */ virDomainPtr virDomainCreateXML(virConnectPtr conn, const char *xmlDesc, @@ -228,6 +240,9 @@ virDomainCreateXML(virConnectPtr conn, const char *xmlDesc, * domain object is no longer needed. * * Returns a new domain object or NULL in case of failure + * + * Since: v1.1.1 + * */ virDomainPtr virDomainCreateXMLWithFiles(virConnectPtr conn, const char *xmlDesc, @@ -284,6 +299,9 @@ virDomainCreateXMLWithFiles(virConnectPtr conn, const char *xmlDesc, * This existing name will be left indefinitely for API compatibility. * * Returns a new domain object or NULL in case of failure + * + * Since: v1.0.0 + * */ virDomainPtr virDomainCreateLinux(virConnectPtr conn, const char *xmlDesc, @@ -307,6 +325,9 @@ virDomainCreateLinux(virConnectPtr conn, const char *xmlDesc, * * Returns a new domain object or NULL in case of failure. If the * domain cannot be found, then VIR_ERR_NO_DOMAIN error is raised. + * + * Since: v1.0.0 + * */ virDomainPtr virDomainLookupByID(virConnectPtr conn, int id) @@ -346,6 +367,9 @@ virDomainLookupByID(virConnectPtr conn, int id) * * Returns a new domain object or NULL in case of failure. If the * domain cannot be found, then VIR_ERR_NO_DOMAIN error is raised. + * + * Since: v1.0.0 + * */ virDomainPtr virDomainLookupByUUID(virConnectPtr conn, const unsigned char *uuid) @@ -422,6 +446,9 @@ virDomainLookupByUUIDString(virConnectPtr conn, const char *uuidstr) * * Returns a new domain object or NULL in case of failure. If the * domain cannot be found, then VIR_ERR_NO_DOMAIN error is raised. + * + * Since: v1.0.0 + * */ virDomainPtr virDomainLookupByName(virConnectPtr conn, const char *name) @@ -472,6 +499,9 @@ virDomainLookupByName(virConnectPtr conn, const char *name) * be deleted when the domain quits. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainDestroy(virDomainPtr domain) @@ -537,6 +567,9 @@ virDomainDestroy(virDomainPtr domain) * * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainDestroyFlags(virDomainPtr domain, @@ -577,6 +610,9 @@ virDomainDestroyFlags(virDomainPtr domain, * The data structure is freed and should not be used thereafter. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainFree(virDomainPtr domain) @@ -608,6 +644,9 @@ virDomainFree(virDomainPtr domain) * the reference count. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainRef(virDomainPtr domain) @@ -636,6 +675,9 @@ virDomainRef(virDomainPtr domain) * special state like VIR_DOMAIN_PMSUSPENDED. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainSuspend(virDomainPtr domain) @@ -678,6 +720,9 @@ virDomainSuspend(virDomainPtr domain) * special state like VIR_DOMAIN_PMSUSPENDED. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainResume(virDomainPtr domain) @@ -734,6 +779,9 @@ virDomainResume(virDomainPtr domain) * * Returns: 0 on success, * -1 on failure. + * + * Since: v1.0.0 + * */ int virDomainPMSuspendForDuration(virDomainPtr dom, @@ -781,6 +829,9 @@ virDomainPMSuspendForDuration(virDomainPtr dom, * * Returns: 0 on success, * -1 on failure. + * + * Since: v1.0.0 + * */ int virDomainPMWakeup(virDomainPtr dom, @@ -828,6 +879,9 @@ virDomainPMWakeup(virDomainPtr dom, * and virDomainSaveImageDefineXML(). * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainSave(virDomainPtr domain, const char *to) @@ -910,6 +964,9 @@ virDomainSave(virDomainPtr domain, const char *to) * to stop the block job first. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainSaveFlags(virDomainPtr domain, const char *to, @@ -970,6 +1027,9 @@ virDomainSaveFlags(virDomainPtr domain, const char *to, * See virDomainRestoreFlags() for more control. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainRestore(virConnectPtr conn, const char *from) @@ -1042,6 +1102,9 @@ virDomainRestore(virConnectPtr conn, const char *from) * pristine template. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainRestoreFlags(virConnectPtr conn, const char *from, const char *dxml, @@ -1104,6 +1167,9 @@ virDomainRestoreFlags(virConnectPtr conn, const char *from, const char *dxml, * * Returns a 0 terminated UTF-8 encoded XML instance, or NULL in case of * error. The caller must free() the returned value. + * + * Since: v1.0.0 + * */ char * virDomainSaveImageGetXMLDesc(virConnectPtr conn, const char *file, @@ -1172,6 +1238,9 @@ virDomainSaveImageGetXMLDesc(virConnectPtr conn, const char *file, * exclusive. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainSaveImageDefineXML(virConnectPtr conn, const char *file, @@ -1246,6 +1315,9 @@ virDomainSaveImageDefineXML(virConnectPtr conn, const char *file, * For more control over the output format, see virDomainCoreDumpWithFormat(). * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainCoreDump(virDomainPtr domain, const char *to, unsigned int flags) @@ -1322,6 +1394,9 @@ virDomainCoreDump(virDomainPtr domain, const char *to, unsigned int flags) * pressure on file system cache, but also risks slowing saves to NFS. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.2.3 + * */ int virDomainCoreDumpWithFormat(virDomainPtr domain, const char *to, @@ -1401,6 +1476,9 @@ virDomainCoreDumpWithFormat(virDomainPtr domain, const char *to, * * Returns a string representing the mime-type of the image format, or * NULL upon error. The caller must free() the returned value. + * + * Since: v1.0.0 + * */ char * virDomainScreenshot(virDomainPtr domain, @@ -1460,6 +1538,9 @@ virDomainScreenshot(virDomainPtr domain, * be deleted when the domain quits. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainShutdown(virDomainPtr domain) @@ -1520,6 +1601,9 @@ virDomainShutdown(virDomainPtr domain) * must have <channel> configured. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainShutdownFlags(virDomainPtr domain, unsigned int flags) @@ -1578,6 +1662,9 @@ virDomainShutdownFlags(virDomainPtr domain, unsigned int flags) * to a plain shutdown on the destination. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainReboot(virDomainPtr domain, unsigned int flags) @@ -1622,6 +1709,9 @@ virDomainReboot(virDomainPtr domain, unsigned int flags) * guest OS shutdown. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainReset(virDomainPtr domain, unsigned int flags) @@ -1661,6 +1751,9 @@ virDomainReset(virDomainPtr domain, unsigned int flags) * * Returns a pointer to the name or NULL, the string need not be deallocated * its lifetime will be the same as the domain object. + * + * Since: v1.0.0 + * */ const char * virDomainGetName(virDomainPtr domain) @@ -1683,6 +1776,9 @@ virDomainGetName(virDomainPtr domain) * Get the UUID for a domain * * Returns -1 in case of error, 0 in case of success + * + * Since: v1.0.0 + * */ int virDomainGetUUID(virDomainPtr domain, unsigned char *uuid) @@ -1713,6 +1809,9 @@ virDomainGetUUID(virDomainPtr domain, unsigned char *uuid) * UUID see RFC4122. * * Returns -1 in case of error, 0 in case of success + * + * Since: v1.0.0 + * */ int virDomainGetUUIDString(virDomainPtr domain, char *buf) @@ -1740,6 +1839,9 @@ virDomainGetUUIDString(virDomainPtr domain, char *buf) * Get the hypervisor ID number for the domain * * Returns the domain ID number or (unsigned int) -1 in case of error + * + * Since: v1.0.0 + * */ unsigned int virDomainGetID(virDomainPtr domain) @@ -1762,6 +1864,9 @@ virDomainGetID(virDomainPtr domain) * * Returns the new string or NULL in case of error, the string must be * freed by the caller. + * + * Since: v1.0.0 + * */ char * virDomainGetOSType(virDomainPtr domain) @@ -1801,6 +1906,9 @@ virDomainGetOSType(virDomainPtr domain) * * Returns the memory size in kibibytes (blocks of 1024 bytes), or 0 in * case of error. + * + * Since: v1.0.0 + * */ unsigned long virDomainGetMaxMemory(virDomainPtr domain) @@ -1850,6 +1958,9 @@ virDomainGetMaxMemory(virDomainPtr domain) * virDomainSetMemoryFlags(). * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainSetMaxMemory(virDomainPtr domain, unsigned long memory) @@ -1903,6 +2014,9 @@ virDomainSetMaxMemory(virDomainPtr domain, unsigned long memory) * virDomainSetMemoryFlags(). * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainSetMemory(virDomainPtr domain, unsigned long memory) @@ -1965,6 +2079,9 @@ virDomainSetMemory(virDomainPtr domain, unsigned long memory) * Not all hypervisors can support all flag combinations. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainSetMemoryFlags(virDomainPtr domain, unsigned long memory, @@ -2025,6 +2142,9 @@ virDomainSetMemoryFlags(virDomainPtr domain, unsigned long memory, * Not all hypervisors can support all flag combinations. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.1.1 + * */ int virDomainSetMemoryStatsPeriod(virDomainPtr domain, int period, @@ -2075,6 +2195,9 @@ virDomainSetMemoryStatsPeriod(virDomainPtr domain, int period, * VIR_DOMAIN_MEMORY_PARAM_UNLIMITED. * * Returns -1 in case of error, 0 in case of success. + * + * Since: v1.0.0 + * */ int virDomainSetMemoryParameters(virDomainPtr domain, @@ -2149,6 +2272,9 @@ virDomainSetMemoryParameters(virDomainPtr domain, * expects the caller to allocate the @params. * * Returns -1 in case of error, 0 in case of success. + * + * Since: v1.0.0 + * */ int virDomainGetMemoryParameters(virDomainPtr domain, @@ -2216,6 +2342,9 @@ virDomainGetMemoryParameters(virDomainPtr domain, * Changing persistent configuration does not pose such limitations. * * Returns -1 in case of error, 0 in case of success. + * + * Since: v1.0.0 + * */ int virDomainSetNumaParameters(virDomainPtr domain, @@ -2281,6 +2410,9 @@ virDomainSetNumaParameters(virDomainPtr domain, * expects the caller to allocate the @params. * * Returns -1 in case of error, 0 in case of success. + * + * Since: v1.0.0 + * */ int virDomainGetNumaParameters(virDomainPtr domain, @@ -2338,6 +2470,9 @@ virDomainGetNumaParameters(virDomainPtr domain, * This function may require privileged access to the hypervisor. * * Returns -1 in case of error, 0 in case of success. + * + * Since: v1.0.0 + * */ int virDomainSetBlkioParameters(virDomainPtr domain, @@ -2403,6 +2538,9 @@ virDomainSetBlkioParameters(virDomainPtr domain, * expects the caller to allocate the @params. * * Returns -1 in case of error, 0 in case of success. + * + * Since: v1.0.0 + * */ int virDomainGetBlkioParameters(virDomainPtr domain, @@ -2461,6 +2599,9 @@ virDomainGetBlkioParameters(virDomainPtr domain, * can be extracted. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info) @@ -2507,6 +2648,9 @@ virDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info) * which led to the state. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainGetState(virDomainPtr domain, @@ -2550,6 +2694,9 @@ virDomainGetState(virDomainPtr domain, * Extract details about current state of control interface to a domain. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainGetControlInfo(virDomainPtr domain, @@ -2611,6 +2758,9 @@ virDomainGetControlInfo(virDomainPtr domain, * * Returns a 0 terminated UTF-8 encoded XML instance, or NULL in case * of error. The caller must free() the returned value. + * + * Since: v1.0.0 + * */ char * virDomainGetXMLDesc(virDomainPtr domain, unsigned int flags) @@ -2660,6 +2810,9 @@ virDomainGetXMLDesc(virDomainPtr domain, unsigned int flags) * * Returns a 0 terminated UTF-8 encoded XML instance, or NULL in case * of error. The caller must free() the returned value. + * + * Since: v1.0.0 + * */ char * virConnectDomainXMLFromNative(virConnectPtr conn, @@ -2710,6 +2863,9 @@ virConnectDomainXMLFromNative(virConnectPtr conn, * * Returns a 0 terminated UTF-8 encoded native config datafile, or * NULL in case of error. The caller must free() the returned value. + * + * Since: v1.0.0 + * */ char * virConnectDomainXMLToNative(virConnectPtr conn, @@ -3563,6 +3719,9 @@ virDomainMigrateUnmanaged(virDomainPtr domain, * Returns the new domain object if the migration was successful, * or NULL in case of error. Note that the new domain object * exists in the scope of the destination connection (dconn). + * + * Since: v1.0.0 + * */ virDomainPtr virDomainMigrate(virDomainPtr domain, @@ -3759,6 +3918,9 @@ virDomainMigrate(virDomainPtr domain, * Returns the new domain object if the migration was successful, * or NULL in case of error. Note that the new domain object * exists in the scope of the destination connection (dconn). + * + * Since: v1.0.0 + * */ virDomainPtr virDomainMigrate2(virDomainPtr domain, @@ -3968,6 +4130,9 @@ virDomainMigrate2(virDomainPtr domain, * Returns the new domain object if the migration was successful, * or NULL in case of error. Note that the new domain object * exists in the scope of the destination connection (dconn). + * + * Since: v1.1.0 + * */ virDomainPtr virDomainMigrate3(virDomainPtr domain, @@ -4256,6 +4421,9 @@ int virDomainMigrateUnmanagedCheckCompat(virDomainPtr domain, * corresponds to VIR_MIGRATE_PARAM_URI of virDomainMigrateToURI3. * * Returns 0 if the migration succeeded, -1 upon error. + * + * Since: v1.0.0 + * */ int virDomainMigrateToURI(virDomainPtr domain, @@ -4332,6 +4500,9 @@ virDomainMigrateToURI(virDomainPtr domain, * virDomainMigrateToURI3. * * Returns 0 if the migration succeeded, -1 upon error. + * + * Since: v1.0.0 + * */ int virDomainMigrateToURI2(virDomainPtr domain, @@ -4412,6 +4583,9 @@ virDomainMigrateToURI2(virDomainPtr domain, * different types of hypervisor. * * Returns 0 if the migration succeeded, -1 upon error. + * + * Since: v1.1.0 + * */ int virDomainMigrateToURI3(virDomainPtr domain, @@ -5281,6 +5455,9 @@ virDomainMigrateConfirm3Params(virDomainPtr domain, * Get the scheduler type and the number of scheduler parameters. * * Returns NULL in case of error. The caller must free the returned string. + * + * Since: v1.0.0 + * */ char * virDomainGetSchedulerType(virDomainPtr domain, int *nparams) @@ -5329,6 +5506,9 @@ virDomainGetSchedulerType(virDomainPtr domain, int *nparams) * virDomainGetSchedulerParametersFlags(). * * Returns -1 in case of error, 0 in case of success. + * + * Since: v1.0.0 + * */ int virDomainGetSchedulerParameters(virDomainPtr domain, @@ -5394,6 +5574,9 @@ virDomainGetSchedulerParameters(virDomainPtr domain, * } * * Returns -1 in case of error, 0 in case of success. + * + * Since: v1.0.0 + * */ int virDomainGetSchedulerParametersFlags(virDomainPtr domain, @@ -5458,6 +5641,9 @@ virDomainGetSchedulerParametersFlags(virDomainPtr domain, * virDomainSetSchedulerParametersFlags. * * Returns -1 in case of error, 0 in case of success. + * + * Since: v1.0.0 + * */ int virDomainSetSchedulerParameters(virDomainPtr domain, @@ -5512,6 +5698,9 @@ virDomainSetSchedulerParameters(virDomainPtr domain, * flags are supported. * * Returns -1 in case of error, 0 in case of success. + * + * Since: v1.0.0 + * */ int virDomainSetSchedulerParametersFlags(virDomainPtr domain, @@ -5583,6 +5772,9 @@ virDomainSetSchedulerParametersFlags(virDomainPtr domain, * that particular statistic. * * Returns: 0 in case of success or -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainBlockStats(virDomainPtr dom, const char *disk, @@ -5660,6 +5852,9 @@ virDomainBlockStats(virDomainPtr dom, const char *disk, * again. See virDomainGetMemoryParameters() for more details. * * Returns -1 in case of error, 0 in case of success. + * + * Since: v1.0.0 + * */ int virDomainBlockStatsFlags(virDomainPtr dom, @@ -5729,6 +5924,9 @@ virDomainBlockStatsFlags(virDomainPtr dom, * The returned stats are from domain's point of view. * * Returns: 0 in case of success or -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainInterfaceStats(virDomainPtr dom, const char *device, @@ -5789,6 +5987,9 @@ virDomainInterfaceStats(virDomainPtr dom, const char *device, * This function may require privileged access to the hypervisor. * * Returns -1 in case of error, 0 in case of success. + * + * Since: v1.0.0 + * */ int virDomainSetInterfaceParameters(virDomainPtr domain, @@ -5857,6 +6058,9 @@ virDomainSetInterfaceParameters(virDomainPtr domain, * expects the caller to allocate the @params. * * Returns -1 in case of error, 0 in case of success. + * + * Since: v1.0.0 + * */ int virDomainGetInterfaceParameters(virDomainPtr domain, @@ -5947,6 +6151,9 @@ virDomainGetInterfaceParameters(virDomainPtr domain, * The number of failed huge page allocations from inside the domain * * Returns: The number of stats provided or -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainMemoryStats(virDomainPtr dom, virDomainMemoryStatPtr stats, @@ -6026,6 +6233,9 @@ virDomainMemoryStats(virDomainPtr dom, virDomainMemoryStatPtr stats, * Now large requests up to 16M byte are supported. * * Returns: 0 in case of success or -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainBlockPeek(virDomainPtr dom, @@ -6095,6 +6305,9 @@ virDomainBlockPeek(virDomainPtr dom, * hypervisor. * * Returns: 0 in case of success or -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainBlockResize(virDomainPtr dom, @@ -6163,6 +6376,9 @@ virDomainBlockResize(virDomainPtr dom, * Now large requests up to 16M byte are supported. * * Returns: 0 in case of success or -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainMemoryPeek(virDomainPtr dom, @@ -6299,6 +6515,9 @@ virDomainMemoryPeek(virDomainPtr dom, * ... * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainGetBlockInfo(virDomainPtr domain, const char *disk, @@ -6349,6 +6568,9 @@ virDomainGetBlockInfo(virDomainPtr domain, const char *disk, * domain object is no longer needed. * * Returns NULL in case of error, a pointer to the domain otherwise + * + * Since: v1.0.0 + * */ virDomainPtr virDomainDefineXML(virConnectPtr conn, const char *xml) @@ -6392,6 +6614,9 @@ virDomainDefineXML(virConnectPtr conn, const char *xml) * domain object is no longer needed. * * Returns NULL in case of error, a pointer to the domain otherwise + * + * Since: v1.2.12 + * */ virDomainPtr virDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags) @@ -6435,6 +6660,9 @@ virDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags) * will fail. See virDomainUndefineFlags() for more control. * * Returns 0 in case of success, -1 in case of error + * + * Since: v1.0.0 + * */ int virDomainUndefine(virDomainPtr domain) @@ -6504,6 +6732,9 @@ virDomainUndefine(virDomainPtr domain) * VIR_DOMAIN_UNDEFINE_NVRAM is specified to remove the nvram file. * * Returns 0 in case of success, -1 in case of error + * + * Since: v1.0.0 + * */ int virDomainUndefineFlags(virDomainPtr domain, @@ -6543,6 +6774,9 @@ virDomainUndefineFlags(virDomainPtr domain, * Provides the number of defined but inactive domains. * * Returns the number of domain found or -1 in case of error + * + * Since: v1.0.0 + * */ int virConnectNumOfDefinedDomains(virConnectPtr conn) @@ -6586,6 +6820,9 @@ virConnectNumOfDefinedDomains(virConnectPtr conn) * a call to virConnectNumOfDefinedDomains() and this call; you are only * guaranteed that all currently defined domains were listed if the return * is less than @maxids. The client must call free() on each returned name. + * + * Since: v1.0.0 + * */ int virConnectListDefinedDomains(virConnectPtr conn, char **const names, @@ -6685,6 +6922,9 @@ virConnectListDefinedDomains(virConnectPtr conn, char **const names, * extra allocated element set to NULL but not included in the return count, to * make iteration easier. The caller is responsible for calling virDomainFree() * on each array element, then calling free() on @domains. + * + * Since: v1.0.0 + * */ int virConnectListAllDomains(virConnectPtr conn, @@ -6726,6 +6966,9 @@ virConnectListAllDomains(virConnectPtr conn, * control, see virDomainCreateWithFlags(). * * Returns 0 in case of success, -1 in case of error + * + * Since: v1.0.0 + * */ int virDomainCreate(virDomainPtr domain) @@ -6794,6 +7037,9 @@ virDomainCreate(virDomainPtr domain) * pristine template. * * Returns 0 in case of success, -1 in case of error + * + * Since: v1.0.0 + * */ int virDomainCreateWithFlags(virDomainPtr domain, unsigned int flags) @@ -6870,6 +7116,9 @@ virDomainCreateWithFlags(virDomainPtr domain, unsigned int flags) * pristine template. * * Returns 0 in case of success, -1 in case of error + * + * Since: v1.1.1 + * */ int virDomainCreateWithFiles(virDomainPtr domain, unsigned int nfiles, @@ -6927,6 +7176,9 @@ virDomainCreateWithFiles(virDomainPtr domain, unsigned int nfiles, * machine boots. * * Returns -1 in case of error, 0 in case of success + * + * Since: v1.0.0 + * */ int virDomainGetAutostart(virDomainPtr domain, @@ -6968,6 +7220,9 @@ virDomainGetAutostart(virDomainPtr domain, * when the host machine boots. * * Returns -1 in case of error, 0 in case of success + * + * Since: v1.0.0 + * */ int virDomainSetAutostart(virDomainPtr domain, @@ -7008,6 +7263,9 @@ virDomainSetAutostart(virDomainPtr domain, * Send NMI to the guest * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainInjectNMI(virDomainPtr domain, unsigned int flags) @@ -7050,6 +7308,9 @@ virDomainInjectNMI(virDomainPtr domain, unsigned int flags) * Send key(s) to the guest. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainSendKey(virDomainPtr domain, @@ -7135,6 +7396,9 @@ virDomainSendKey(virDomainPtr domain, * the container/guest. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.1 + * */ int virDomainSendProcessSignal(virDomainPtr domain, @@ -7192,6 +7456,9 @@ virDomainSendProcessSignal(virDomainPtr domain, * use virDomainSetVcpusFlags(). * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainSetVcpus(virDomainPtr domain, unsigned int nvcpus) @@ -7263,6 +7530,9 @@ virDomainSetVcpus(virDomainPtr domain, unsigned int nvcpus) * Not all hypervisors can support all flag combinations. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainSetVcpusFlags(virDomainPtr domain, unsigned int nvcpus, @@ -7332,6 +7602,9 @@ virDomainSetVcpusFlags(virDomainPtr domain, unsigned int nvcpus, * on live domains. Guest agent may be needed for this flag to be available. * * Returns the number of vCPUs in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainGetVcpusFlags(virDomainPtr domain, unsigned int flags) @@ -7388,6 +7661,9 @@ virDomainGetVcpusFlags(virDomainPtr domain, unsigned int flags) * so can only be called on an active domain. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainPinVcpu(virDomainPtr domain, unsigned int vcpu, @@ -7455,6 +7731,9 @@ virDomainPinVcpu(virDomainPtr domain, unsigned int vcpu, * * Returns 0 in case of success, -1 in case of failure. * + * Since: v1.0.0 + * + * */ int virDomainPinVcpuFlags(virDomainPtr domain, unsigned int vcpu, @@ -7513,6 +7792,9 @@ virDomainPinVcpuFlags(virDomainPtr domain, unsigned int vcpu, * * Returns the number of virtual CPUs in case of success, * -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainGetVcpuPinInfo(virDomainPtr domain, int ncpumaps, @@ -7590,6 +7872,9 @@ virDomainGetVcpuPinInfo(virDomainPtr domain, int ncpumaps, * * Returns 0 in case of success, -1 in case of failure. * + * Since: v1.0.0 + * + * */ int virDomainPinEmulator(virDomainPtr domain, unsigned char *cpumap, @@ -7645,6 +7930,9 @@ virDomainPinEmulator(virDomainPtr domain, unsigned char *cpumap, * Returns 1 in case of success, * 0 in case of no emulator threads are pined to pcpus, * -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainGetEmulatorPinInfo(virDomainPtr domain, unsigned char *cpumap, @@ -7710,6 +7998,9 @@ virDomainGetEmulatorPinInfo(virDomainPtr domain, unsigned char *cpumap, * an inactive domain. * * Returns the number of info filled in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainGetVcpus(virDomainPtr domain, virVcpuInfoPtr info, int maxinfo, @@ -7769,6 +8060,9 @@ virDomainGetVcpus(virDomainPtr domain, virVcpuInfoPtr info, int maxinfo, * guest was booted with. For more details, see virDomainGetVcpusFlags(). * * Returns the maximum of virtual CPU or -1 in case of error. + * + * Since: v1.0.0 + * */ int virDomainGetMaxVcpus(virDomainPtr domain) @@ -7813,6 +8107,9 @@ virDomainGetMaxVcpus(virDomainPtr domain) * On success, the array of information is stored into @info. The caller is * responsible for calling virDomainIOThreadInfoFree() on each array element, * then calling free() on @info. On error, @info is set to NULL. + * + * Since: v1.2.14 + * */ int virDomainGetIOThreadInfo(virDomainPtr dom, @@ -7852,6 +8149,9 @@ virDomainGetIOThreadInfo(virDomainPtr dom, * @info: pointer to a virDomainIOThreadInfo object * * Frees the memory used by @info. + * + * Since: v1.2.14 + * */ void virDomainIOThreadInfoFree(virDomainIOThreadInfoPtr info) @@ -7895,6 +8195,9 @@ virDomainIOThreadInfoFree(virDomainIOThreadInfoPtr info) * See also virDomainGetIOThreadInfo for querying this information. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.2.14 + * */ int virDomainPinIOThread(virDomainPtr domain, @@ -7959,6 +8262,9 @@ virDomainPinIOThread(virDomainPtr domain, * just live or both live and persistent state is changed. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.2.15 + * */ int virDomainAddIOThread(virDomainPtr domain, @@ -8018,6 +8324,9 @@ virDomainAddIOThread(virDomainPtr domain, * just live or both live and persistent state is changed. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.2.15 + * */ int virDomainDelIOThread(virDomainPtr domain, @@ -8079,6 +8388,9 @@ virDomainDelIOThread(virDomainPtr domain, * This function requires privileged access to the hypervisor. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v4.10.0 + * */ int virDomainSetIOThreadParams(virDomainPtr domain, @@ -8132,6 +8444,9 @@ virDomainSetIOThreadParams(virDomainPtr domain, * string if the domain is not running under a security model. * * Returns 0 in case of success, -1 in case of failure + * + * Since: v1.0.0 + * */ int virDomainGetSecurityLabel(virDomainPtr domain, virSecurityLabelPtr seclabel) @@ -8174,6 +8489,9 @@ virDomainGetSecurityLabel(virDomainPtr domain, virSecurityLabelPtr seclabel) * string if the domain is not running under a security model. * * Returns number of elements in @seclabels on success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainGetSecurityLabelList(virDomainPtr domain, @@ -8236,6 +8554,9 @@ virDomainGetSecurityLabelList(virDomainPtr domain, * or both will be modified. * * Returns 0 on success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainSetMetadata(virDomainPtr domain, @@ -8321,6 +8642,9 @@ virDomainSetMetadata(virDomainPtr domain, * * Returns the metadata string on success (caller must free), * or NULL in case of failure. + * + * Since: v1.0.0 + * */ char * virDomainGetMetadata(virDomainPtr domain, @@ -8388,6 +8712,9 @@ virDomainGetMetadata(virDomainPtr domain, * persistent domain definition. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainAttachDevice(virDomainPtr domain, const char *xml) @@ -8447,6 +8774,9 @@ virDomainAttachDevice(virDomainPtr domain, const char *xml) * persistent domain definition. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainAttachDeviceFlags(virDomainPtr domain, @@ -8491,6 +8821,9 @@ virDomainAttachDeviceFlags(virDomainPtr domain, * See virDomainDetachDeviceFlags() for more details. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainDetachDevice(virDomainPtr domain, const char *xml) @@ -8573,6 +8906,9 @@ virDomainDetachDevice(virDomainPtr domain, const char *xml) * may lead to unexpected results. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainDetachDeviceFlags(virDomainPtr domain, @@ -8637,6 +8973,9 @@ virDomainDetachDeviceFlags(virDomainPtr domain, * domain XML with only the disk path changed. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainUpdateDeviceFlags(virDomainPtr domain, @@ -8691,6 +9030,9 @@ virDomainUpdateDeviceFlags(virDomainPtr domain, * device removal. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v4.4.0 + * */ int virDomainDetachDeviceAlias(virDomainPtr domain, @@ -8751,6 +9093,9 @@ virDomainDetachDeviceAlias(virDomainPtr domain, * Returns 0 on success, -1 on failure. Older versions of some hypervisors * sometimes returned a positive number on success, but without any reliable * semantics on what that number represents. + * + * Since: v1.0.0 + * */ int virConnectDomainEventRegister(virConnectPtr conn, @@ -8794,6 +9139,9 @@ virConnectDomainEventRegister(virConnectPtr conn, * Returns 0 on success, -1 on failure. Older versions of some hypervisors * sometimes returned a positive number on success, but without any reliable * semantics on what that number represents. + * + * Since: v1.0.0 + * */ int virConnectDomainEventDeregister(virConnectPtr conn, @@ -8828,6 +9176,9 @@ virConnectDomainEventDeregister(virConnectPtr conn, * Determine if the domain is currently running * * Returns 1 if running, 0 if inactive, -1 on error + * + * Since: v1.0.0 + * */ int virDomainIsActive(virDomainPtr dom) @@ -8861,6 +9212,9 @@ virDomainIsActive(virDomainPtr dom) * which means it will still exist after shutting down * * Returns 1 if persistent, 0 if transient, -1 on error + * + * Since: v1.0.0 + * */ int virDomainIsPersistent(virDomainPtr dom) @@ -8901,6 +9255,9 @@ virDomainIsPersistent(virDomainPtr dom) * advised to change these after the rename was successful. * * Returns 0 if successfully renamed, -1 on error + * + * Since: v1.2.19 + * */ int virDomainRename(virDomainPtr dom, @@ -8934,6 +9291,9 @@ virDomainRename(virDomainPtr dom, * Determine if the domain has been updated. * * Returns 1 if updated, 0 if not, -1 on error + * + * Since: v1.0.0 + * */ int virDomainIsUpdated(virDomainPtr dom) @@ -8971,6 +9331,9 @@ virDomainIsUpdated(virDomainPtr dom) * to virDomainGetJobStats(). * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainGetJobInfo(virDomainPtr domain, virDomainJobInfoPtr info) @@ -9035,6 +9398,9 @@ virDomainGetJobInfo(virDomainPtr domain, virDomainJobInfoPtr info) * source host in case of a migration job). * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.3 + * */ int virDomainGetJobStats(virDomainPtr domain, @@ -9087,6 +9453,9 @@ virDomainGetJobStats(virDomainPtr domain, * for more details). * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virDomainAbortJob(virDomainPtr domain) @@ -9129,6 +9498,9 @@ virDomainAbortJob(virDomainPtr domain) * being live-migrated as a reaction to migration progress. * * Returns 0 in case of success, -1 otherwise. + * + * Since: v1.0.0 + * */ int virDomainMigrateSetMaxDowntime(virDomainPtr domain, @@ -9170,6 +9542,9 @@ virDomainMigrateSetMaxDowntime(virDomainPtr domain, * at the end of live migration. * * Returns 0 in case of success, -1 otherwise. + * + * Since: v3.7.0 + * */ int virDomainMigrateGetMaxDowntime(virDomainPtr domain, @@ -9210,6 +9585,9 @@ virDomainMigrateGetMaxDowntime(virDomainPtr domain, * transferred memory pages during live migration. * * Returns 0 in case of success, -1 otherwise. + * + * Since: v1.0.3 + * */ int virDomainMigrateGetCompressionCache(virDomainPtr domain, @@ -9254,6 +9632,9 @@ virDomainMigrateGetCompressionCache(virDomainPtr domain, * virDomainGetJobStats. * * Returns 0 in case of success, -1 otherwise. + * + * Since: v1.0.3 + * */ int virDomainMigrateSetCompressionCache(virDomainPtr domain, @@ -9298,6 +9679,9 @@ virDomainMigrateSetCompressionCache(virDomainPtr domain, * phase of the migration. * * Returns 0 in case of success, -1 otherwise. + * + * Since: v1.0.0 + * */ int virDomainMigrateSetMaxSpeed(virDomainPtr domain, @@ -9341,6 +9725,9 @@ virDomainMigrateSetMaxSpeed(virDomainPtr domain, * migration. * * Returns 0 in case of success, -1 otherwise. + * + * Since: v1.0.0 + * */ int virDomainMigrateGetMaxSpeed(virDomainPtr domain, @@ -9434,6 +9821,9 @@ virDomainMigrateGetMaxSpeed(virDomainPtr domain, * migration and there's no domain to run virDomainGetJobStats on). * * Returns 0 in case of success, -1 otherwise. + * + * Since: v1.3.3 + * */ int virDomainMigrateStartPostCopy(virDomainPtr domain, @@ -9497,6 +9887,9 @@ virDomainMigrateStartPostCopy(virDomainPtr domain, * be passed to the virConnectDomainEventDeregisterAny() method. * * Returns a callback identifier on success, -1 on failure. + * + * Since: v1.0.0 + * */ int virConnectDomainEventRegisterAny(virConnectPtr conn, @@ -9555,7 +9948,10 @@ virConnectDomainEventRegisterAny(virConnectPtr conn, * * Returns 0 on success, -1 on failure. Older versions of some hypervisors * sometimes returned a positive number on success, but without any reliable - * semantics on what that number represents. */ + * semantics on what that number represents. + * + * Since: v1.0.0 + * */ int virConnectDomainEventDeregisterAny(virConnectPtr conn, int callbackID) @@ -9610,6 +10006,9 @@ virConnectDomainEventDeregisterAny(virConnectPtr conn, * flags are mutually exclusive. * * Returns 0 in case of success or -1 in case of failure + * + * Since: v1.0.0 + * */ int virDomainManagedSave(virDomainPtr dom, unsigned int flags) @@ -9657,6 +10056,9 @@ virDomainManagedSave(virDomainPtr dom, unsigned int flags) * * Returns 0 if no image is present, 1 if an image is present, and * -1 in case of error + * + * Since: v1.0.0 + * */ int virDomainHasManagedSaveImage(virDomainPtr dom, unsigned int flags) @@ -9695,6 +10097,9 @@ virDomainHasManagedSaveImage(virDomainPtr dom, unsigned int flags) * Remove any managed save image for this domain. * * Returns 0 in case of success, and -1 in case of error + * + * Since: v1.0.0 + * */ int virDomainManagedSaveRemove(virDomainPtr dom, unsigned int flags) @@ -9741,6 +10146,9 @@ virDomainManagedSaveRemove(virDomainPtr dom, unsigned int flags) * * Returns a 0 terminated UTF-8 encoded XML instance, or NULL in case of * error. The caller must free() the returned value. + * + * Since: v3.7.0 + * */ char * virDomainManagedSaveGetXMLDesc(virDomainPtr domain, unsigned int flags) @@ -9799,6 +10207,9 @@ virDomainManagedSaveGetXMLDesc(virDomainPtr domain, unsigned int flags) * exclusive. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v3.7.0 + * */ int virDomainManagedSaveDefineXML(virDomainPtr domain, const char *dxml, @@ -9864,6 +10275,9 @@ virDomainManagedSaveDefineXML(virDomainPtr domain, const char *dxml, * versions, it is up to the client to ensure mutual exclusion. * * Returns 0 if the console was opened, -1 on error + * + * Since: v1.0.0 + * */ int virDomainOpenConsole(virDomainPtr dom, @@ -9928,6 +10342,9 @@ virDomainOpenConsole(virDomainPtr dom, * other client prior to opening this channel. * * Returns 0 if the channel was opened, -1 on error + * + * Since: v1.0.2 + * */ int virDomainOpenChannel(virDomainPtr dom, @@ -9985,6 +10402,9 @@ virDomainOpenChannel(virDomainPtr dom, * Linux perf events are performance analyzing tool in Linux. * * Returns -1 in case of failure, 0 in case of success. + * + * Since: v1.3.3 + * */ int virDomainGetPerfEvents(virDomainPtr domain, virTypedParameterPtr *params, @@ -10035,6 +10455,9 @@ int virDomainGetPerfEvents(virDomainPtr domain, * Linux perf events are performance analyzing tool in Linux. * * Returns -1 in case of error, 0 in case of success. + * + * Since: v1.3.3 + * */ int virDomainSetPerfEvents(virDomainPtr domain, virTypedParameterPtr params, @@ -10118,6 +10541,9 @@ int virDomainSetPerfEvents(virDomainPtr domain, * beginning of the first phase. * * Returns -1 in case of failure, 0 when successful. + * + * Since: v1.0.0 + * */ int virDomainBlockJobAbort(virDomainPtr dom, const char *disk, @@ -10195,6 +10621,9 @@ virDomainBlockJobAbort(virDomainPtr dom, const char *disk, * space required for the backup. * * Returns -1 in case of failure, 0 when nothing found, 1 when info was found. + * + * Since: v1.0.0 + * */ int virDomainGetBlockJobInfo(virDomainPtr dom, const char *disk, @@ -10258,6 +10687,9 @@ virDomainGetBlockJobInfo(virDomainPtr dom, const char *disk, * elements within //domain/devices/disk. * * Returns -1 in case of failure, 0 when successful. + * + * Since: v1.0.0 + * */ int virDomainBlockJobSetSpeed(virDomainPtr dom, const char *disk, @@ -10332,6 +10764,9 @@ virDomainBlockJobSetSpeed(virDomainPtr dom, const char *disk, * This is shorthand for virDomainBlockRebase() with a NULL base. * * Returns 0 if the operation has started, -1 on failure. + * + * Since: v1.0.0 + * */ int virDomainBlockPull(virDomainPtr dom, const char *disk, @@ -10476,6 +10911,9 @@ virDomainBlockPull(virDomainPtr dom, const char *disk, * to the source format or probed from the reused file. * * Returns 0 if the operation has started, -1 on failure. + * + * Since: v1.0.0 + * */ int virDomainBlockRebase(virDomainPtr dom, const char *disk, @@ -10606,6 +11044,9 @@ virDomainBlockRebase(virDomainPtr dom, const char *disk, * is not a local file, and the possibility of additional tuning parameters. * * Returns 0 if the operation has started, -1 on failure. + * + * Since: v1.2.8 + * */ int virDomainBlockCopy(virDomainPtr dom, const char *disk, @@ -10752,6 +11193,9 @@ virDomainBlockCopy(virDomainPtr dom, const char *disk, * virDomainGetBlockJobInfo(). * * Returns 0 if the operation has started, -1 on failure. + * + * Since: v1.0.0 + * */ int virDomainBlockCommit(virDomainPtr dom, const char *disk, @@ -10811,6 +11255,9 @@ virDomainBlockCommit(virDomainPtr dom, const char *disk, * to use this method over a TCP connection will always fail * * Returns 0 on success, -1 on failure + * + * Since: v1.0.0 + * */ int virDomainOpenGraphics(virDomainPtr dom, @@ -10891,6 +11338,9 @@ virDomainOpenGraphics(virDomainPtr dom, * to use this method over a TCP connection will always fail. * * Returns an fd on success, -1 on failure + * + * Since: v1.2.8 + * */ int virDomainOpenGraphicsFD(virDomainPtr dom, @@ -10952,6 +11402,9 @@ virDomainOpenGraphicsFD(virDomainPtr dom, * within //domain/devices/disk. * * Returns -1 in case of error, 0 in case of success. + * + * Since: v1.0.0 + * */ int virDomainSetBlockIoTune(virDomainPtr dom, @@ -11027,6 +11480,9 @@ virDomainSetBlockIoTune(virDomainPtr dom, * unless @nparams is 0 on input. * * Returns -1 in case of error, 0 in case of success. + * + * Since: v1.0.0 + * */ int virDomainGetBlockIoTune(virDomainPtr dom, @@ -11156,6 +11612,9 @@ virDomainGetBlockIoTune(virDomainPtr dom, * skipped elements if @nparams is too large, and tail elements if * @ncpus is too large). The caller is responsible for freeing any * returned string parameters. + * + * Since: v1.0.0 + * */ int virDomainGetCPUStats(virDomainPtr domain, @@ -11256,6 +11715,9 @@ virDomainGetCPUStats(virDomainPtr domain, * * Returns number of disks with errors filled in the @errors array or -1 on * error. + * + * Since: v1.0.0 + * */ int virDomainGetDiskErrors(virDomainPtr dom, @@ -11301,6 +11763,9 @@ virDomainGetDiskErrors(virDomainPtr dom, * * Returns the hostname which must be freed by the caller, or * NULL if there was an error. + * + * Since: v1.0.0 + * */ char * virDomainGetHostname(virDomainPtr domain, unsigned int flags) @@ -11350,6 +11815,9 @@ virDomainGetHostname(virDomainPtr domain, unsigned int flags) * If @minimum is not zero, the command may fail. * * Returns 0 on success, -1 otherwise. + * + * Since: v1.0.1 + * */ int virDomainFSTrim(virDomainPtr dom, @@ -11394,6 +11862,9 @@ virDomainFSTrim(virDomainPtr dom, * support mountpoints argument), @mountpoints may need to be NULL. * * Returns the number of frozen filesystems on success, -1 otherwise. + * + * Since: v1.2.5 + * */ int virDomainFSFreeze(virDomainPtr dom, @@ -11437,6 +11908,9 @@ virDomainFSFreeze(virDomainPtr dom, * In some drivers (e.g. QEMU driver), @mountpoints may need to be NULL. * * Returns the number of thawed filesystems on success, -1 otherwise. + * + * Since: v1.2.5 + * */ int virDomainFSThaw(virDomainPtr dom, @@ -11482,6 +11956,9 @@ virDomainFSThaw(virDomainPtr dom, * be configured and running in order to run this API. * * Returns 0 on success, -1 otherwise. + * + * Since: v1.2.5 + * */ int virDomainGetTime(virDomainPtr dom, @@ -11532,6 +12009,9 @@ virDomainGetTime(virDomainPtr dom, * be configured and running in order to be able to run this API. * * Returns 0 on success, -1 otherwise. + * + * Since: v1.2.5 + * */ int virDomainSetTime(virDomainPtr dom, @@ -11578,6 +12058,9 @@ virDomainSetTime(virDomainPtr dom, * be configured and running in order to be able to run this API. * * Returns 0 on success, -1 otherwise. + * + * Since: v1.2.16 + * */ int virDomainSetUserPassword(virDomainPtr dom, @@ -11628,6 +12111,9 @@ virDomainSetUserPassword(virDomainPtr dom, * * Returns NULL in case of error or an XML string * defining the capabilities. + * + * Since: v1.2.7 + * */ char * virConnectGetDomainCapabilities(virConnectPtr conn, @@ -12034,6 +12520,9 @@ virConnectGetDomainCapabilities(virConnectPtr conn, * Returns the count of returned statistics structures on success, -1 on error. * The requested data are returned in the @retStats parameter. The returned * array should be freed by the caller. See virDomainStatsRecordListFree. + * + * Since: v1.2.8 + * */ int virConnectGetAllDomainStats(virConnectPtr conn, @@ -12113,6 +12602,9 @@ virConnectGetAllDomainStats(virConnectPtr conn, * array should be freed by the caller. See virDomainStatsRecordListFree. * Note that the count of returned stats may be less than the domain count * provided via @doms. + * + * Since: v1.2.8 + * */ int virDomainListGetStats(virDomainPtr *doms, @@ -12180,6 +12672,9 @@ virDomainListGetStats(virDomainPtr *doms, * * Convenience function to free a list of domain stats returned by * virDomainListGetStats and virConnectGetAllDomainStats. + * + * Since: v1.2.8 + * */ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats) @@ -12212,6 +12707,9 @@ virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats) * On success, the array of the information is stored into @info. The caller is * responsible for calling virDomainFSInfoFree() on each array element, then * calling free() on @info. On error, @info is set to NULL. + * + * Since: v1.2.11 + * */ int virDomainGetFSInfo(virDomainPtr dom, @@ -12247,6 +12745,9 @@ virDomainGetFSInfo(virDomainPtr dom, * @info: pointer to a FSInfo object * * Frees all the memory occupied by @info. + * + * Since: v1.2.11 + * */ void virDomainFSInfoFree(virDomainFSInfoPtr info) @@ -12339,6 +12840,9 @@ virDomainFSInfoFree(virDomainFSInfoPtr info) * free(ifaces); * * Returns the number of interfaces on success, -1 in case of error. + * + * Since: v1.2.14 + * */ int virDomainInterfaceAddresses(virDomainPtr dom, @@ -12380,6 +12884,9 @@ virDomainInterfaceAddresses(virDomainPtr dom, * Free the interface object. The data structure is * freed and should not be used thereafter. If @iface * is NULL, then this method has no effect. + * + * Since: v1.2.14 + * */ void virDomainInterfaceFree(virDomainInterfacePtr iface) @@ -12423,6 +12930,9 @@ virDomainInterfaceFree(virDomainInterfacePtr iface) * virTypedParamsFree to free memory returned in @params. * * Returns 0 on success, -1 on error. + * + * Since: v2.0.0 + * */ int virDomainGetGuestVcpus(virDomainPtr domain, @@ -12481,6 +12991,9 @@ virDomainGetGuestVcpus(virDomainPtr domain, * low-level features a S3 sleep. * * Returns 0 on success, -1 on error. + * + * Since: v2.0.0 + * */ int virDomainSetGuestVcpus(virDomainPtr domain, @@ -12530,6 +13043,9 @@ virDomainSetGuestVcpus(virDomainPtr domain, * Note that OSes and hypervisors may require vCPU 0 to stay online. * * Returns 0 on success, -1 on error. + * + * Since: v3.1.0 + * */ int virDomainSetVcpu(virDomainPtr domain, @@ -12682,6 +13198,9 @@ virDomainSetVcpu(virDomainPtr domain, * virTypedParamsFree to free memory returned in @params. * * Returns 0 on success, -1 on error. + * + * Since: v5.7.0 + * */ int virDomainGetGuestInfo(virDomainPtr domain, unsigned int types, @@ -12756,6 +13275,9 @@ int virDomainGetGuestInfo(virDomainPtr domain, * tools to grow it without the need for polling of the data. * * Returns 0 if the operation has started, -1 on failure. + * + * Since: v3.2.0 + * */ int virDomainSetBlockThreshold(virDomainPtr domain, @@ -12805,6 +13327,9 @@ virDomainSetBlockThreshold(virDomainPtr domain, * any action for running domain. * * Returns 0 on success, -1 on failure. + * + * Since: v3.9.0 + * */ int virDomainSetLifecycleAction(virDomainPtr domain, unsigned int type, @@ -12860,6 +13385,9 @@ int virDomainSetLifecycleAction(virDomainPtr domain, * return the launch measurement. * * Returns -1 in case of failure, 0 in case of success. + * + * Since: v4.5.0 + * */ int virDomainGetLaunchSecurityInfo(virDomainPtr domain, virTypedParameterPtr *params, @@ -12926,6 +13454,9 @@ int virDomainGetLaunchSecurityInfo(virDomainPtr domain, * launch security parameters. * * Returns -1 in case of failure, 0 in case of success. + * + * Since: v8.0.0 + * */ int virDomainSetLaunchSecurityState(virDomainPtr domain, virTypedParameterPtr params, @@ -12983,6 +13514,9 @@ int virDomainSetLaunchSecurityState(virDomainPtr domain, * positive value: wait for @timeout seconds * * Returns 0 on success, -1 on failure + * + * Since: v5.10.0 + * */ int virDomainAgentSetResponseTimeout(virDomainPtr domain, @@ -13079,6 +13613,9 @@ virDomainAgentSetResponseTimeout(virDomainPtr domain, * formats if checkpoints are not involved. * * Returns 0 on success or -1 on failure. + * + * Since: v6.0.0 + * */ int virDomainBackupBegin(virDomainPtr domain, @@ -13129,6 +13666,9 @@ virDomainBackupBegin(virDomainPtr domain, * * Returns a NUL-terminated UTF-8 encoded XML instance or NULL in * case of error. The caller must free() the returned value. + * + * Since: v6.0.0 + * */ char * virDomainBackupGetXMLDesc(virDomainPtr domain, @@ -13178,6 +13718,9 @@ virDomainBackupGetXMLDesc(virDomainPtr domain, * * Returns: number of keys stored in @keys, * -1 otherwise. + * + * Since: v6.10.0 + * */ int virDomainAuthorizedSSHKeysGet(virDomainPtr domain, @@ -13246,6 +13789,9 @@ virDomainAuthorizedSSHKeysGet(virDomainPtr domain, * * Returns: 0 on success, * -1 otherwise. + * + * Since: v6.10.0 + * */ int virDomainAuthorizedSSHKeysSet(virDomainPtr domain, @@ -13314,6 +13860,9 @@ virDomainAuthorizedSSHKeysSet(virDomainPtr domain, * * Returns: number of messages stored in @msgs, * -1 otherwise. + * + * Since: v7.1.0 + * */ int virDomainGetMessages(virDomainPtr domain, @@ -13356,6 +13905,9 @@ virDomainGetMessages(virDomainPtr domain, * virConnectGetAllDomainStats. * * Returns 0 in case of success, -1 otherwise. + * + * Since: v7.2.0 + * */ int virDomainStartDirtyRateCalc(virDomainPtr domain, diff --git a/src/libvirt-host.c b/src/libvirt-host.c index 8e680cb9f9..acdc489ae3 100644 --- a/src/libvirt-host.c +++ b/src/libvirt-host.c @@ -47,6 +47,9 @@ VIR_LOG_INIT("libvirt.host"); * the reference count. * * Returns 0 in case of success, -1 in case of failure + * + * Since: v1.0.0 + * */ int virConnectRef(virConnectPtr conn) @@ -85,6 +88,9 @@ virConnectRef(virConnectPtr conn) * on a connection if the application is not trustworthy. * * Returns: 0 if the identity change was accepted, -1 on error + * + * Since: v5.8.0 + * */ int virConnectSetIdentity(virConnectPtr conn, @@ -149,6 +155,9 @@ virConnectSupportsFeature(virConnectPtr conn, int feature) * hypervisor, use virConnectGetCapabilities(). * * Returns NULL in case of error, a static zero terminated string otherwise. + * + * Since: v1.0.0 + * */ const char * virConnectGetType(virConnectPtr conn) @@ -180,6 +189,9 @@ virConnectGetType(virConnectPtr conn) * Returns -1 in case of error, 0 otherwise. if the version can't be * extracted by lack of capacities returns 0 and @hvVer is 0, otherwise * @hvVer value is major * 1,000,000 + minor * 1,000 + release + * + * Since: v1.0.0 + * */ int virConnectGetVersion(virConnectPtr conn, unsigned long *hvVer) @@ -216,6 +228,9 @@ virConnectGetVersion(virConnectPtr conn, unsigned long *hvVer) * * Returns -1 in case of failure, 0 otherwise, and values for @libVer have * the format major * 1,000,000 + minor * 1,000 + release. + * + * Since: v1.0.0 + * */ int virConnectGetLibVersion(virConnectPtr conn, unsigned long *libVer) @@ -256,6 +271,9 @@ virConnectGetLibVersion(virConnectPtr conn, unsigned long *libVer) * * Returns the hostname which must be freed by the caller, or * NULL if there was an error. + * + * Since: v1.0.0 + * */ char * virConnectGetHostname(virConnectPtr conn) @@ -295,6 +313,9 @@ virConnectGetHostname(virConnectPtr conn) * * Returns the URI string which must be freed by the caller, or * NULL if there was an error. + * + * Since: v1.0.0 + * */ char * virConnectGetURI(virConnectPtr conn) @@ -329,6 +350,9 @@ virConnectGetURI(virConnectPtr conn) * * Returns the XML string which must be freed by the caller, or * NULL if there was an error. + * + * Since: v1.0.0 + * */ char * virConnectGetSysinfo(virConnectPtr conn, unsigned int flags) @@ -367,6 +391,9 @@ virConnectGetSysinfo(virConnectPtr conn, unsigned int flags) * for "<vcpu max='...'>" in its output instead. * * Returns the maximum of virtual CPU or -1 in case of error. + * + * Since: v1.0.0 + * */ int virConnectGetMaxVcpus(virConnectPtr conn, @@ -416,6 +443,9 @@ virConnectGetMaxVcpus(virConnectPtr conn, * in a more accurate representation. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info) @@ -452,6 +482,9 @@ virNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info) * Returns NULL in case of error, or an XML string * defining the capabilities. * The client must free the returned string after use. + * + * Since: v1.0.0 + * */ char * virConnectGetCapabilities(virConnectPtr conn) @@ -532,6 +565,9 @@ virConnectGetCapabilities(virConnectPtr conn) * represents all CPUs on the server. * * Returns -1 in case of error, 0 in case of success. + * + * Since: v1.0.0 + * */ int virNodeGetCPUStats(virConnectPtr conn, @@ -619,6 +655,9 @@ virNodeGetCPUStats(virConnectPtr conn, * The cached memory usage.(KB) * * Returns -1 in case of error, 0 in case of success. + * + * Since: v1.0.0 + * */ int virNodeGetMemoryStats(virConnectPtr conn, @@ -666,6 +705,9 @@ virNodeGetMemoryStats(virConnectPtr conn, * function the returned value is in bytes. Divide by 1024 as necessary. * * Returns the available free memory in bytes or 0 in case of error + * + * Since: v1.0.0 + * */ unsigned long long virNodeGetFreeMemory(virConnectPtr conn) @@ -712,6 +754,9 @@ virNodeGetFreeMemory(virConnectPtr conn) * Returns 0 on success (i.e., the node will be suspended after a short * delay), -1 on failure (the operation is not supported, or an attempted * suspend is already underway). + * + * Since: v1.0.0 + * */ int virNodeSuspendForDuration(virConnectPtr conn, @@ -765,6 +810,9 @@ virNodeSuspendForDuration(virConnectPtr conn, * example. * * Returns 0 in case of success, and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virNodeGetMemoryParameters(virConnectPtr conn, @@ -829,6 +877,9 @@ virNodeGetMemoryParameters(virConnectPtr conn, * This function may require privileged access to the hypervisor. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virNodeSetMemoryParameters(virConnectPtr conn, @@ -877,6 +928,9 @@ virNodeSetMemoryParameters(virConnectPtr conn, * string if the driver has not activated a security model. * * Returns 0 in case of success, -1 in case of failure + * + * Since: v1.0.0 + * */ int virNodeGetSecurityModel(virConnectPtr conn, virSecurityModelPtr secmodel) @@ -920,6 +974,9 @@ virNodeGetSecurityModel(virConnectPtr conn, virSecurityModelPtr secmodel) * whichever is smaller. * * Returns the number of entries filled in freeMems, or -1 in case of error. + * + * Since: v1.0.0 + * */ int virNodeGetCellsFreeMemory(virConnectPtr conn, unsigned long long *freeMems, @@ -958,6 +1015,9 @@ virNodeGetCellsFreeMemory(virConnectPtr conn, unsigned long long *freeMems, * Determine if the connection to the hypervisor is encrypted * * Returns 1 if encrypted, 0 if not encrypted, -1 on error + * + * Since: v1.0.0 + * */ int virConnectIsEncrypted(virConnectPtr conn) @@ -993,6 +1053,9 @@ virConnectIsEncrypted(virConnectPtr conn) * to eavesdropping (eg a UNIX domain socket, or pipe) * * Returns 1 if secure, 0 if not secure, -1 on error + * + * Since: v1.0.0 + * */ int virConnectIsSecure(virConnectPtr conn) @@ -1035,6 +1098,9 @@ virConnectIsSecure(virConnectPtr conn) * (instead of VIR_CPU_COMPARE_INCOMPATIBLE) and the error will use the * VIR_ERR_CPU_INCOMPATIBLE code with a message providing more details about * the incompatibility. + * + * Since: v1.0.0 + * */ int virConnectCompareCPU(virConnectPtr conn, @@ -1091,6 +1157,9 @@ virConnectCompareCPU(virConnectPtr conn, * VIR_CPU_COMPARE_INCOMPATIBLE) and the error will use the * VIR_ERR_CPU_INCOMPATIBLE code with a message providing more details about * the incompatibility. + * + * Since: v4.4.0 + * */ int virConnectCompareHypervisorCPU(virConnectPtr conn, @@ -1153,6 +1222,9 @@ virConnectCompareHypervisorCPU(virConnectPtr conn, * * Returns -1 on error, number of elements in @models on success (0 means * libvirt accepts any CPU model). + * + * Since: v1.1.3 + * */ int virConnectGetCPUModelNames(virConnectPtr conn, const char *arch, char ***models, @@ -1209,6 +1281,9 @@ virConnectGetCPUModelNames(virConnectPtr conn, const char *arch, char ***models, * CPU will not include features that block migration. * * Returns XML description of the computed CPU (caller frees) or NULL on error. + * + * Since: v1.0.0 + * */ char * virConnectBaselineCPU(virConnectPtr conn, @@ -1278,6 +1353,9 @@ virConnectBaselineCPU(virConnectPtr conn, * CPU will not include features that block migration. * * Returns XML description of the computed CPU (caller frees) or NULL on error. + * + * Since: v4.4.0 + * */ char * virConnectBaselineHypervisorCPU(virConnectPtr conn, @@ -1351,6 +1429,9 @@ virConnectBaselineHypervisorCPU(virConnectPtr conn, * * Returns -1 on error, 0 on success, 1 when remote party doesn't support * keepalive messages. + * + * Since: v1.0.0 + * */ int virConnectSetKeepAlive(virConnectPtr conn, @@ -1388,6 +1469,9 @@ virConnectSetKeepAlive(virConnectPtr conn, * over a channel (TCP or UNIX socket) which is not closed. * * Returns 1 if alive, 0 if dead, -1 on error + * + * Since: v1.0.0 + * */ int virConnectIsAlive(virConnectPtr conn) @@ -1434,6 +1518,9 @@ virConnectIsAlive(virConnectPtr conn) * context. * * Returns 0 on success, -1 on error + * + * Since: v1.0.0 + * */ int virConnectRegisterCloseCallback(virConnectPtr conn, @@ -1471,6 +1558,9 @@ virConnectRegisterCloseCallback(virConnectPtr conn, * registration, it will be invoked * * Returns 0 on success, -1 on error + * + * Since: v1.0.0 + * */ int virConnectUnregisterCloseCallback(virConnectPtr conn, @@ -1513,6 +1603,9 @@ virConnectUnregisterCloseCallback(virConnectPtr conn, * * Returns number of CPUs present on the host node, * or -1 if there was an error. + * + * Since: v1.0.0 + * */ int virNodeGetCPUMap(virConnectPtr conn, @@ -1599,6 +1692,9 @@ virNodeGetCPUMap(virConnectPtr conn, * Page size=1073741824 count=0 bytes=0 * * Returns: the number of entries filled in @counts or -1 in case of error. + * + * Since: v1.2.6 + * */ int virNodeGetFreePages(virConnectPtr conn, @@ -1669,6 +1765,9 @@ virNodeGetFreePages(virConnectPtr conn, * * Returns: the number of nodes successfully adjusted or -1 in * case of an error. + * + * Since: v1.2.9 + * */ int virNodeAllocPages(virConnectPtr conn, @@ -1722,6 +1821,9 @@ virNodeAllocPages(virConnectPtr conn, * responsible for freeing @params. * * Returns 0 in case of success, and -1 in case of failure. + * + * Since: v4.5.0 + * */ int virNodeGetSEVInfo(virConnectPtr conn, diff --git a/src/libvirt-interface.c b/src/libvirt-interface.c index e4e8178ba9..240530fc13 100644 --- a/src/libvirt-interface.c +++ b/src/libvirt-interface.c @@ -36,6 +36,9 @@ VIR_LOG_INIT("libvirt.interface"); * call. * * Returns the virConnectPtr or NULL in case of failure. + * + * Since: v1.0.0 + * */ virConnectPtr virInterfaceGetConnect(virInterfacePtr iface) @@ -76,6 +79,9 @@ virInterfaceGetConnect(virInterfacePtr iface) * extra allocated element set to NULL but not included in the return count, * to make iteration easier. The caller is responsible for calling * virStorageInterfaceFree() on each array element, then calling free() on @ifaces. + * + * Since: v1.0.0 + * */ int virConnectListAllInterfaces(virConnectPtr conn, @@ -115,6 +121,9 @@ virConnectListAllInterfaces(virConnectPtr conn, * Provides the number of active interfaces on the physical host. * * Returns the number of active interfaces found or -1 in case of error + * + * Since: v1.0.0 + * */ int virConnectNumOfInterfaces(virConnectPtr conn) @@ -158,6 +167,9 @@ virConnectNumOfInterfaces(virConnectPtr conn) * to virConnectNumOfInterfaces() and this call; you are only guaranteed that * all currently active interfaces were listed if the return is less than * @maxnames. The client must call free() on each returned name. + * + * Since: v1.0.0 + * */ int virConnectListInterfaces(virConnectPtr conn, char **const names, int maxnames) @@ -193,6 +205,9 @@ virConnectListInterfaces(virConnectPtr conn, char **const names, int maxnames) * Provides the number of defined (inactive) interfaces on the physical host. * * Returns the number of defined interface found or -1 in case of error + * + * Since: v1.0.0 + * */ int virConnectNumOfDefinedInterfaces(virConnectPtr conn) @@ -236,6 +251,9 @@ virConnectNumOfDefinedInterfaces(virConnectPtr conn) * a call to virConnectNumOfDefinedInterfaces() and this call; you are only * guaranteed that all currently defined interfaces were listed if the return * is less than @maxnames. The client must call free() on each returned name. + * + * Since: v1.0.0 + * */ int virConnectListDefinedInterfaces(virConnectPtr conn, @@ -278,6 +296,9 @@ virConnectListDefinedInterfaces(virConnectPtr conn, * * Returns a new interface object or NULL in case of failure. If the * interface cannot be found, then VIR_ERR_NO_INTERFACE error is raised. + * + * Since: v1.0.0 + * */ virInterfacePtr virInterfaceLookupByName(virConnectPtr conn, const char *name) @@ -317,6 +338,9 @@ virInterfaceLookupByName(virConnectPtr conn, const char *name) * * Returns a new interface object or NULL in case of failure. If the * interface cannot be found, then VIR_ERR_NO_INTERFACE error is raised. + * + * Since: v1.0.0 + * */ virInterfacePtr virInterfaceLookupByMACString(virConnectPtr conn, const char *macstr) @@ -352,6 +376,9 @@ virInterfaceLookupByMACString(virConnectPtr conn, const char *macstr) * * Returns a pointer to the name or NULL, the string need not be deallocated * its lifetime will be the same as the interface object. + * + * Since: v1.0.0 + * */ const char * virInterfaceGetName(virInterfacePtr iface) @@ -376,6 +403,9 @@ virInterfaceGetName(virInterfacePtr iface) * Returns a pointer to the MAC address (in null-terminated ASCII * format) or NULL, the string need not be deallocated its lifetime * will be the same as the interface object. + * + * Since: v1.0.0 + * */ const char * virInterfaceGetMACString(virInterfacePtr iface) @@ -407,6 +437,9 @@ virInterfaceGetMACString(virInterfacePtr iface) * * Returns a 0 terminated UTF-8 encoded XML instance, or NULL in case * of error. The caller must free() the returned value. + * + * Since: v1.0.0 + * */ char * virInterfaceGetXMLDesc(virInterfacePtr iface, unsigned int flags) @@ -458,6 +491,9 @@ virInterfaceGetXMLDesc(virInterfacePtr iface, unsigned int flags) * interface object is no longer needed. * * Returns NULL in case of error, a pointer to the interface otherwise + * + * Since: v1.0.0 + * */ virInterfacePtr virInterfaceDefineXML(virConnectPtr conn, const char *xml, unsigned int flags) @@ -504,6 +540,9 @@ virInterfaceDefineXML(virConnectPtr conn, const char *xml, unsigned int flags) * during the next reboot of the system running libvirtd. * * Returns 0 in case of success, -1 in case of error + * + * Since: v1.0.0 + * */ int virInterfaceUndefine(virInterfacePtr iface) @@ -547,6 +586,9 @@ virInterfaceUndefine(virInterfacePtr iface) * undefined) if virInterfaceChangeRollback() is called. * * Returns 0 in case of success, -1 in case of error + * + * Since: v1.0.0 + * */ int virInterfaceCreate(virInterfacePtr iface, unsigned int flags) @@ -594,6 +636,9 @@ virInterfaceCreate(virInterfacePtr iface, unsigned int flags) * interface definition will also bring the interface back up. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virInterfaceDestroy(virInterfacePtr iface, unsigned int flags) @@ -640,6 +685,9 @@ virInterfaceDestroy(virInterfacePtr iface, unsigned int flags) * the reference count. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virInterfaceRef(virInterfacePtr iface) @@ -663,6 +711,9 @@ virInterfaceRef(virInterfacePtr iface) * The data structure is freed and should not be used thereafter. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virInterfaceFree(virInterfacePtr iface) @@ -694,6 +745,9 @@ virInterfaceFree(virInterfacePtr iface) * VIR_ERR_INVALID_OPERATION will be logged. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virInterfaceChangeBegin(virConnectPtr conn, unsigned int flags) @@ -734,6 +788,9 @@ virInterfaceChangeBegin(virConnectPtr conn, unsigned int flags) * will be logged. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virInterfaceChangeCommit(virConnectPtr conn, unsigned int flags) @@ -774,6 +831,9 @@ virInterfaceChangeCommit(virConnectPtr conn, unsigned int flags) * will be logged. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virInterfaceChangeRollback(virConnectPtr conn, unsigned int flags) @@ -809,6 +869,9 @@ virInterfaceChangeRollback(virConnectPtr conn, unsigned int flags) * Determine if the interface is currently running * * Returns 1 if running, 0 if inactive, -1 on error + * + * Since: v1.0.0 + * */ int virInterfaceIsActive(virInterfacePtr iface) diff --git a/src/libvirt-network.c b/src/libvirt-network.c index 883dd40f6b..eae005e91f 100644 --- a/src/libvirt-network.c +++ b/src/libvirt-network.c @@ -38,6 +38,9 @@ VIR_LOG_INIT("libvirt.network"); * call. * * Returns the virConnectPtr or NULL in case of failure. + * + * Since: v1.0.0 + * */ virConnectPtr virNetworkGetConnect(virNetworkPtr net) @@ -86,6 +89,9 @@ virNetworkGetConnect(virNetworkPtr net) * extra allocated element set to NULL but not included in the return count, * to make iteration easier. The caller is responsible for calling * virNetworkFree() on each array element, then calling free() on @nets. + * + * Since: v1.0.0 + * */ int virConnectListAllNetworks(virConnectPtr conn, @@ -125,6 +131,9 @@ virConnectListAllNetworks(virConnectPtr conn, * Provides the number of active networks. * * Returns the number of network found or -1 in case of error + * + * Since: v1.0.0 + * */ int virConnectNumOfNetworks(virConnectPtr conn) @@ -167,6 +176,9 @@ virConnectNumOfNetworks(virConnectPtr conn) * to virConnectNumOfNetworks() and this call; you are only guaranteed that * all currently active networks were listed if the return is less than * @maxnames. The client must call free() on each returned name. + * + * Since: v1.0.0 + * */ int virConnectListNetworks(virConnectPtr conn, char **const names, int maxnames) @@ -202,6 +214,9 @@ virConnectListNetworks(virConnectPtr conn, char **const names, int maxnames) * Provides the number of inactive networks. * * Returns the number of networks found or -1 in case of error + * + * Since: v1.0.0 + * */ int virConnectNumOfDefinedNetworks(virConnectPtr conn) @@ -244,6 +259,9 @@ virConnectNumOfDefinedNetworks(virConnectPtr conn) * a call to virConnectNumOfDefinedNetworks() and this call; you are only * guaranteed that all currently defined networks were listed if the return * is less than @maxnames. The client must call free() on each returned name. + * + * Since: v1.0.0 + * */ int virConnectListDefinedNetworks(virConnectPtr conn, char **const names, @@ -285,6 +303,9 @@ virConnectListDefinedNetworks(virConnectPtr conn, char **const names, * * Returns a new network object or NULL in case of failure. If the * network cannot be found, then VIR_ERR_NO_NETWORK error is raised. + * + * Since: v1.0.0 + * */ virNetworkPtr virNetworkLookupByName(virConnectPtr conn, const char *name) @@ -324,6 +345,9 @@ virNetworkLookupByName(virConnectPtr conn, const char *name) * * Returns a new network object or NULL in case of failure. If the * network cannot be found, then VIR_ERR_NO_NETWORK error is raised. + * + * Since: v1.0.0 + * */ virNetworkPtr virNetworkLookupByUUID(virConnectPtr conn, const unsigned char *uuid) @@ -360,6 +384,9 @@ virNetworkLookupByUUID(virConnectPtr conn, const unsigned char *uuid) * * Returns a new network object or NULL in case of failure. If the * network cannot be found, then VIR_ERR_NO_NETWORK error is raised. + * + * Since: v1.0.0 + * */ virNetworkPtr virNetworkLookupByUUIDString(virConnectPtr conn, const char *uuidstr) @@ -399,6 +426,9 @@ virNetworkLookupByUUIDString(virConnectPtr conn, const char *uuidstr) * network object is no longer needed. * * Returns a new network object or NULL in case of failure + * + * Since: v1.0.0 + * */ virNetworkPtr virNetworkCreateXML(virConnectPtr conn, const char *xmlDesc) @@ -480,6 +510,9 @@ virNetworkCreateXMLFlags(virConnectPtr conn, const char *xmlDesc, unsigned int f * network object is no longer needed. * * Returns NULL in case of error, a pointer to the network otherwise + * + * Since: v1.0.0 + * */ virNetworkPtr virNetworkDefineXML(virConnectPtr conn, const char *xml) @@ -556,6 +589,9 @@ virNetworkDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags * Undefine a network but does not stop it if it is running * * Returns 0 in case of success, -1 in case of error + * + * Since: v1.0.0 + * */ int virNetworkUndefine(virNetworkPtr network) @@ -670,6 +706,9 @@ virNetworkUpdate(virNetworkPtr network, * moves from the defined to the running networks pools. * * Returns 0 in case of success, -1 in case of error + * + * Since: v1.0.0 + * */ int virNetworkCreate(virNetworkPtr network) @@ -710,6 +749,9 @@ virNetworkCreate(virNetworkPtr network) * This function may require privileged access * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virNetworkDestroy(virNetworkPtr network) @@ -748,6 +790,9 @@ virNetworkDestroy(virNetworkPtr network) * The data structure is freed and should not be used thereafter. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virNetworkFree(virNetworkPtr network) @@ -779,6 +824,9 @@ virNetworkFree(virNetworkPtr network) * the reference count. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virNetworkRef(virNetworkPtr network) @@ -802,6 +850,9 @@ virNetworkRef(virNetworkPtr network) * * Returns a pointer to the name or NULL, the string need not be deallocated * its lifetime will be the same as the network object. + * + * Since: v1.0.0 + * */ const char * virNetworkGetName(virNetworkPtr network) @@ -824,6 +875,9 @@ virNetworkGetName(virNetworkPtr network) * Get the UUID for a network * * Returns -1 in case of error, 0 in case of success + * + * Since: v1.0.0 + * */ int virNetworkGetUUID(virNetworkPtr network, unsigned char *uuid) @@ -854,6 +908,9 @@ virNetworkGetUUID(virNetworkPtr network, unsigned char *uuid) * UUID see RFC4122. * * Returns -1 in case of error, 0 in case of success + * + * Since: v1.0.0 + * */ int virNetworkGetUUIDString(virNetworkPtr network, char *buf) @@ -889,6 +946,9 @@ virNetworkGetUUIDString(virNetworkPtr network, char *buf) * * Returns a 0 terminated UTF-8 encoded XML instance, or NULL in case * of error. The caller must free() the returned value. + * + * Since: v1.0.0 + * */ char * virNetworkGetXMLDesc(virNetworkPtr network, unsigned int flags) @@ -926,6 +986,9 @@ virNetworkGetXMLDesc(virNetworkPtr network, unsigned int flags) * * Returns a 0 terminated interface name, or NULL in case of * error. The caller must free() the returned value. + * + * Since: v1.0.0 + * */ char * virNetworkGetBridgeName(virNetworkPtr network) @@ -964,6 +1027,9 @@ virNetworkGetBridgeName(virNetworkPtr network) * machine boots. * * Returns -1 in case of error, 0 in case of success + * + * Since: v1.0.0 + * */ int virNetworkGetAutostart(virNetworkPtr network, @@ -1004,6 +1070,9 @@ virNetworkGetAutostart(virNetworkPtr network, * when the host machine boots. * * Returns -1 in case of error, 0 in case of success + * + * Since: v1.0.0 + * */ int virNetworkSetAutostart(virNetworkPtr network, @@ -1042,6 +1111,9 @@ virNetworkSetAutostart(virNetworkPtr network, * Determine if the network is currently running * * Returns 1 if running, 0 if inactive, -1 on error + * + * Since: v1.0.0 + * */ int virNetworkIsActive(virNetworkPtr net) @@ -1075,6 +1147,9 @@ virNetworkIsActive(virNetworkPtr net) * which means it will still exist after shutting down * * Returns 1 if persistent, 0 if transient, -1 on error + * + * Since: v1.0.0 + * */ int virNetworkIsPersistent(virNetworkPtr net) @@ -1134,6 +1209,9 @@ virNetworkIsPersistent(virNetworkPtr net) * be passed to the virConnectNetworkEventDeregisterAny() method. * * Returns a callback identifier on success, -1 on failure. + * + * Since: v1.2.1 + * */ int virConnectNetworkEventRegisterAny(virConnectPtr conn, @@ -1195,6 +1273,9 @@ virConnectNetworkEventRegisterAny(virConnectPtr conn, * value obtained from a previous virConnectNetworkEventRegisterAny() method. * * Returns 0 on success, -1 on failure + * + * Since: v1.2.1 + * */ int virConnectNetworkEventDeregisterAny(virConnectPtr conn, @@ -1297,6 +1378,9 @@ virConnectNetworkEventDeregisterAny(virConnectPtr conn, * Returns the number of leases found or -1 and sets @leases to NULL in * case of error. * + * Since: v1.2.6 + * + * */ int virNetworkGetDHCPLeases(virNetworkPtr network, @@ -1338,6 +1422,9 @@ virNetworkGetDHCPLeases(virNetworkPtr network, * @lease: pointer to a leases object * * Frees all the memory occupied by @lease. + * + * Since: v1.2.6 + * */ void virNetworkDHCPLeaseFree(virNetworkDHCPLeasePtr lease) @@ -1366,6 +1453,9 @@ virNetworkDHCPLeaseFree(virNetworkDHCPLeasePtr lease) * * Returns a new network port object or NULL in case of failure. If the * network port cannot be found, then VIR_ERR_NO_NETWORK_PORT error is raised. + * + * Since: v5.5.0 + * */ virNetworkPortPtr virNetworkPortLookupByUUID(virNetworkPtr net, @@ -1403,6 +1493,9 @@ virNetworkPortLookupByUUID(virNetworkPtr net, * * Returns a new network port object or NULL in case of failure. If the * network port cannot be found, then VIR_ERR_NO_NETWORK_PORT error is raised. + * + * Since: v5.5.0 + * */ virNetworkPortPtr virNetworkPortLookupByUUIDString(virNetworkPtr net, @@ -1443,6 +1536,9 @@ virNetworkPortLookupByUUIDString(virNetworkPtr net, * includes bandwidth parameters. * * Returns -1 in case of error, 0 in case of success. + * + * Since: v5.5.0 + * */ int virNetworkPortSetParameters(virNetworkPortPtr port, @@ -1491,6 +1587,9 @@ virNetworkPortSetParameters(virNetworkPortPtr port, * on success. * * Returns -1 in case of error, 0 in case of success. + * + * Since: v5.5.0 + * */ int virNetworkPortGetParameters(virNetworkPortPtr port, @@ -1535,6 +1634,9 @@ virNetworkPortGetParameters(virNetworkPortPtr port, * network port object is no longer needed. * * Returns a new network port object or NULL in case of failure + * + * Since: v5.5.0 + * */ virNetworkPortPtr virNetworkPortCreateXML(virNetworkPtr net, @@ -1573,6 +1675,9 @@ virNetworkPortCreateXML(virNetworkPtr net, * call. * * Returns the virNetworkPtr or NULL in case of failure. + * + * Since: v5.5.0 + * */ virNetworkPtr virNetworkPortGetNetwork(virNetworkPortPtr port) @@ -1597,6 +1702,9 @@ virNetworkPortGetNetwork(virNetworkPortPtr port) * * Returns a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. * the caller must free() the returned value. + * + * Since: v5.5.0 + * */ char * virNetworkPortGetXMLDesc(virNetworkPortPtr port, @@ -1634,6 +1742,9 @@ virNetworkPortGetXMLDesc(virNetworkPortPtr port, * Get the UUID for a network port * * Returns -1 in case of error, 0 in case of success + * + * Since: v5.5.0 + * */ int virNetworkPortGetUUID(virNetworkPortPtr port, @@ -1697,6 +1808,9 @@ virNetworkPortGetUUIDString(virNetworkPortPtr port, * port. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v5.5.0 + * */ int virNetworkPortDelete(virNetworkPortPtr port, @@ -1745,6 +1859,9 @@ virNetworkPortDelete(virNetworkPortPtr port, * in the return count, to make iteration easier. The caller is responsible * for calling virNetworkPortFree() on each array element, then calling * free() on @ports. + * + * Since: v5.5.0 + * */ int virNetworkListAllPorts(virNetworkPtr network, @@ -1782,6 +1899,9 @@ virNetworkListAllPorts(virNetworkPtr network, * The data structure is freed and should not be used thereafter. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v5.5.0 + * */ int virNetworkPortFree(virNetworkPortPtr port) @@ -1813,6 +1933,9 @@ virNetworkPortFree(virNetworkPortPtr port) * the reference count. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v5.5.0 + * */ int virNetworkPortRef(virNetworkPortPtr port) diff --git a/src/libvirt-nodedev.c b/src/libvirt-nodedev.c index 3695b39270..b069e32433 100644 --- a/src/libvirt-nodedev.c +++ b/src/libvirt-nodedev.c @@ -40,6 +40,9 @@ VIR_LOG_INIT("libvirt.nodedev"); * will be restricted to devices with the specified capability * * Returns the number of node devices or -1 in case of error + * + * Since: v1.0.0 + * */ int virNodeNumOfDevices(virConnectPtr conn, const char *cap, unsigned int flags) @@ -86,6 +89,9 @@ virNodeNumOfDevices(virConnectPtr conn, const char *cap, unsigned int flags) * count, to make iteration easier. The caller is responsible for calling * virNodeDeviceFree() on each array element, then calling free() on * @devices. + * + * Since: v1.0.0 + * */ int virConnectListAllNodeDevices(virConnectPtr conn, @@ -135,6 +141,9 @@ virConnectListAllNodeDevices(virConnectPtr conn, * will be restricted to devices with the specified capability * * Returns the number of node devices found or -1 in case of error + * + * Since: v1.0.0 + * */ int virNodeListDevices(virConnectPtr conn, @@ -178,6 +187,9 @@ virNodeListDevices(virConnectPtr conn, * node device object is no longer needed. * * Returns a virNodeDevicePtr if found, NULL otherwise. + * + * Since: v1.0.0 + * */ virNodeDevicePtr virNodeDeviceLookupByName(virConnectPtr conn, const char *name) @@ -218,6 +230,9 @@ virNodeDeviceLookupByName(virConnectPtr conn, const char *name) * node device object is no longer needed. * * Returns a virNodeDevicePtr if found, NULL otherwise. + * + * Since: v1.0.3 + * */ virNodeDevicePtr virNodeDeviceLookupSCSIHostByWWN(virConnectPtr conn, @@ -260,6 +275,9 @@ virNodeDeviceLookupSCSIHostByWWN(virConnectPtr conn, * the device. * * Returns the XML document, or NULL on error + * + * Since: v1.0.0 + * */ char * virNodeDeviceGetXMLDesc(virNodeDevicePtr dev, unsigned int flags) @@ -293,6 +311,9 @@ virNodeDeviceGetXMLDesc(virNodeDevicePtr dev, unsigned int flags) * Just return the device name * * Returns the device name or NULL in case of error + * + * Since: v1.0.0 + * */ const char * virNodeDeviceGetName(virNodeDevicePtr dev) @@ -315,6 +336,9 @@ virNodeDeviceGetName(virNodeDevicePtr dev) * * Returns the name of the device's parent, or NULL if an * error occurred or when the device has no parent. + * + * Since: v1.0.0 + * */ const char * virNodeDeviceGetParent(virNodeDevicePtr dev) @@ -346,6 +370,9 @@ virNodeDeviceGetParent(virNodeDevicePtr dev) * * Returns the number of capabilities supported by the device or -1 * in case of error. + * + * Since: v1.0.0 + * */ int virNodeDeviceNumOfCaps(virNodeDevicePtr dev) @@ -382,6 +409,9 @@ virNodeDeviceNumOfCaps(virNodeDevicePtr dev) * * Returns the number of capability names listed in @names or -1 * in case of error. + * + * Since: v1.0.0 + * */ int virNodeDeviceListCaps(virNodeDevicePtr dev, @@ -421,6 +451,9 @@ virNodeDeviceListCaps(virNodeDevicePtr dev, * this was the last reference. * * Returns the 0 for success, -1 for error. + * + * Since: v1.0.0 + * */ int virNodeDeviceFree(virNodeDevicePtr dev) @@ -452,6 +485,9 @@ virNodeDeviceFree(virNodeDevicePtr dev) * the reference count. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virNodeDeviceRef(virNodeDevicePtr dev) @@ -490,6 +526,9 @@ virNodeDeviceRef(virNodeDevicePtr dev) * API should be used instead. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virNodeDeviceDettach(virNodeDevicePtr dev) @@ -543,6 +582,9 @@ virNodeDeviceDettach(virNodeDevicePtr dev) * to the node using the virNodeDeviceReAttach() method. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.5 + * */ int virNodeDeviceDetachFlags(virNodeDevicePtr dev, @@ -588,6 +630,9 @@ virNodeDeviceDetachFlags(virNodeDevicePtr dev, * If the device is currently in use by a guest, this method may fail. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virNodeDeviceReAttach(virNodeDevicePtr dev) @@ -631,6 +676,9 @@ virNodeDeviceReAttach(virNodeDevicePtr dev) * this function may fail. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virNodeDeviceReset(virNodeDevicePtr dev) @@ -671,6 +719,9 @@ virNodeDeviceReset(virNodeDevicePtr dev) * node device object is no longer needed. * * Returns a node device object if successful, NULL in case of failure + * + * Since: v1.0.0 + * */ virNodeDevicePtr virNodeDeviceCreateXML(virConnectPtr conn, @@ -710,6 +761,9 @@ virNodeDeviceCreateXML(virConnectPtr conn, * may require privileged access. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virNodeDeviceDestroy(virNodeDevicePtr dev) @@ -750,6 +804,9 @@ virNodeDeviceDestroy(virNodeDevicePtr dev) * node device object is no longer needed. * * Returns a node device object if successful, NULL in case of failure + * + * Since: v7.3.0 + * */ virNodeDevicePtr virNodeDeviceDefineXML(virConnectPtr conn, @@ -789,6 +846,9 @@ virNodeDeviceDefineXML(virConnectPtr conn, * operating system. This function may require privileged access. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v7.3.0 + * */ int virNodeDeviceUndefine(virNodeDevicePtr dev, @@ -826,6 +886,9 @@ virNodeDeviceUndefine(virNodeDevicePtr dev, * Start a defined node device: * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v7.3.0 + * */ int virNodeDeviceCreate(virNodeDevicePtr dev, @@ -889,6 +952,9 @@ virNodeDeviceCreate(virNodeDevicePtr dev, * be passed to the virConnectNodeDeviceEventDeregisterAny() method. * * Returns a callback identifier on success, -1 on failure. + * + * Since: v2.2.0 + * */ int virConnectNodeDeviceEventRegisterAny(virConnectPtr conn, @@ -953,6 +1019,9 @@ virConnectNodeDeviceEventRegisterAny(virConnectPtr conn, * value obtained from a previous virConnectNodeDeviceEventRegisterAny() method. * * Returns 0 on success, -1 on failure. + * + * Since: v2.2.0 + * */ int virConnectNodeDeviceEventDeregisterAny(virConnectPtr conn, @@ -990,6 +1059,9 @@ virConnectNodeDeviceEventDeregisterAny(virConnectPtr conn, * boots or the parent device becomes available. * * Returns -1 in case of error, 0 in case of success + * + * Since: v7.8.0 + * */ int virNodeDeviceSetAutostart(virNodeDevicePtr dev, @@ -1029,6 +1101,9 @@ virNodeDeviceSetAutostart(virNodeDevicePtr dev, * becomes available. * * Returns -1 in case of error, 0 in case of success + * + * Since: v7.8.0 + * */ int virNodeDeviceGetAutostart(virNodeDevicePtr dev, @@ -1065,6 +1140,9 @@ virNodeDeviceGetAutostart(virNodeDevicePtr dev, * which means it will still exist after shutting down * * Returns 1 if persistent, 0 if transient, -1 on error + * + * Since: v7.8.0 + * */ int virNodeDeviceIsPersistent(virNodeDevicePtr dev) @@ -1098,6 +1176,9 @@ virNodeDeviceIsPersistent(virNodeDevicePtr dev) * Determine if the node device is currently active * * Returns 1 if active, 0 if inactive, -1 on error + * + * Since: v7.8.0 + * */ int virNodeDeviceIsActive(virNodeDevicePtr dev) { diff --git a/src/libvirt-nwfilter.c b/src/libvirt-nwfilter.c index 73b061152e..1204d2fdbe 100644 --- a/src/libvirt-nwfilter.c +++ b/src/libvirt-nwfilter.c @@ -35,6 +35,9 @@ VIR_LOG_INIT("libvirt.nwfilter"); * Provides the number of nwfilters. * * Returns the number of nwfilters found or -1 in case of error + * + * Since: v1.0.0 + * */ int virConnectNumOfNWFilters(virConnectPtr conn) @@ -77,6 +80,9 @@ virConnectNumOfNWFilters(virConnectPtr conn) * have an extra allocated element set to NULL but not included in the return count, * to make iteration easier. The caller is responsible for calling * virNWFilterFree() on each array element, then calling free() on @filters. + * + * Since: v1.0.0 + * */ int virConnectListAllNWFilters(virConnectPtr conn, @@ -121,6 +127,9 @@ virConnectListAllNWFilters(virConnectPtr conn, * virConnectListAllNWFilters(). * * Returns the number of network filters found or -1 in case of error + * + * Since: v1.0.0 + * */ int virConnectListNWFilters(virConnectPtr conn, char **const names, int maxnames) @@ -161,6 +170,9 @@ virConnectListNWFilters(virConnectPtr conn, char **const names, int maxnames) * * Returns a new nwfilter object or NULL in case of failure. If the * network filter cannot be found, then VIR_ERR_NO_NWFILTER error is raised. + * + * Since: v1.0.0 + * */ virNWFilterPtr virNWFilterLookupByName(virConnectPtr conn, const char *name) @@ -200,6 +212,9 @@ virNWFilterLookupByName(virConnectPtr conn, const char *name) * * Returns a new nwfilter object or NULL in case of failure. If the * nwfdilter cannot be found, then VIR_ERR_NO_NWFILTER error is raised. + * + * Since: v1.0.0 + * */ virNWFilterPtr virNWFilterLookupByUUID(virConnectPtr conn, const unsigned char *uuid) @@ -239,6 +254,9 @@ virNWFilterLookupByUUID(virConnectPtr conn, const unsigned char *uuid) * * Returns a new nwfilter object or NULL in case of failure. If the * nwfilter cannot be found, then VIR_ERR_NO_NWFILTER error is raised. + * + * Since: v1.0.0 + * */ virNWFilterPtr virNWFilterLookupByUUIDString(virConnectPtr conn, const char *uuidstr) @@ -274,6 +292,9 @@ virNWFilterLookupByUUIDString(virConnectPtr conn, const char *uuidstr) * The data structure is freed and should not be used thereafter. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virNWFilterFree(virNWFilterPtr nwfilter) @@ -297,6 +318,9 @@ virNWFilterFree(virNWFilterPtr nwfilter) * * Returns a pointer to the name or NULL, the string need not be deallocated * its lifetime will be the same as the nwfilter object. + * + * Since: v1.0.0 + * */ const char * virNWFilterGetName(virNWFilterPtr nwfilter) @@ -319,6 +343,9 @@ virNWFilterGetName(virNWFilterPtr nwfilter) * Get the UUID for a network filter * * Returns -1 in case of error, 0 in case of success + * + * Since: v1.0.0 + * */ int virNWFilterGetUUID(virNWFilterPtr nwfilter, unsigned char *uuid) @@ -349,6 +376,9 @@ virNWFilterGetUUID(virNWFilterPtr nwfilter, unsigned char *uuid) * UUID see RFC4122. * * Returns -1 in case of error, 0 in case of success + * + * Since: v1.0.0 + * */ int virNWFilterGetUUIDString(virNWFilterPtr nwfilter, char *buf) @@ -381,6 +411,9 @@ virNWFilterGetUUIDString(virNWFilterPtr nwfilter, char *buf) * nwfilter object is no longer needed. * * Returns a new nwfilter object or NULL in case of failure + * + * Since: v1.0.0 + * */ virNWFilterPtr virNWFilterDefineXML(virConnectPtr conn, const char *xmlDesc) @@ -459,6 +492,9 @@ virNWFilterDefineXMLFlags(virConnectPtr conn, const char *xmlDesc, unsigned int * associated virNWFilterPtr object. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v1.0.0 + * */ int virNWFilterUndefine(virNWFilterPtr nwfilter) @@ -499,6 +535,9 @@ virNWFilterUndefine(virNWFilterPtr nwfilter) * * Returns a 0 terminated UTF-8 encoded XML instance, or NULL in case * of error. The caller must free() the returned value. + * + * Since: v1.0.0 + * */ char * virNWFilterGetXMLDesc(virNWFilterPtr nwfilter, unsigned int flags) @@ -543,6 +582,9 @@ virNWFilterGetXMLDesc(virNWFilterPtr nwfilter, unsigned int flags) * the reference count. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virNWFilterRef(virNWFilterPtr nwfilter) @@ -620,6 +662,9 @@ virConnectListAllNWFilterBindings(virConnectPtr conn, * Returns a new binding object or NULL in case of failure. If the * network filter cannot be found, then VIR_ERR_NO_NWFILTER_BINDING * error is raised. + * + * Since: v4.5.0 + * */ virNWFilterBindingPtr virNWFilterBindingLookupByPortDev(virConnectPtr conn, const char *portdev) @@ -655,6 +700,9 @@ virNWFilterBindingLookupByPortDev(virConnectPtr conn, const char *portdev) * The data structure is freed and should not be used thereafter. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v4.5.0 + * */ int virNWFilterBindingFree(virNWFilterBindingPtr binding) @@ -678,6 +726,9 @@ virNWFilterBindingFree(virNWFilterBindingPtr binding) * * Returns a pointer to the name or NULL, the string need not be deallocated * its lifetime will be the same as the binding object. + * + * Since: v4.5.0 + * */ const char * virNWFilterBindingGetPortDev(virNWFilterBindingPtr binding) @@ -700,6 +751,9 @@ virNWFilterBindingGetPortDev(virNWFilterBindingPtr binding) * * Returns a pointer to the name or NULL, the string need not be deallocated * its lifetime will be the same as the binding object. + * + * Since: v4.5.0 + * */ const char * virNWFilterBindingGetFilterName(virNWFilterBindingPtr binding) @@ -734,6 +788,9 @@ virNWFilterBindingGetFilterName(virNWFilterBindingPtr binding) * binding object is no longer needed. * * Returns a new binding object or NULL in case of failure + * + * Since: v4.5.0 + * */ virNWFilterBindingPtr virNWFilterBindingCreateXML(virConnectPtr conn, const char *xml, unsigned int flags) @@ -775,6 +832,9 @@ virNWFilterBindingCreateXML(virConnectPtr conn, const char *xml, unsigned int fl * would be accomplished by using virNWFilterBindingCreateXML. * * Returns 0 in case of success and -1 in case of failure. + * + * Since: v4.5.0 + * */ int virNWFilterBindingDelete(virNWFilterBindingPtr binding) @@ -859,6 +919,9 @@ virNWFilterBindingGetXMLDesc(virNWFilterBindingPtr binding, unsigned int flags) * the reference count. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v4.5.0 + * */ int virNWFilterBindingRef(virNWFilterBindingPtr binding) diff --git a/src/libvirt-secret.c b/src/libvirt-secret.c index d2a3a4bd9d..67909f890f 100644 --- a/src/libvirt-secret.c +++ b/src/libvirt-secret.c @@ -35,6 +35,9 @@ VIR_LOG_INIT("libvirt.secret"); * counter on the connection is not increased by this call. * * Returns the virConnectPtr or NULL in case of failure. + * + * Since: v1.0.0 + * */ virConnectPtr virSecretGetConnect(virSecretPtr secret) @@ -56,6 +59,9 @@ virSecretGetConnect(virSecretPtr secret) * Fetch number of currently defined secrets. * * Returns the number currently defined secrets. + * + * Since: v1.0.0 + * */ int virConnectNumOfSecrets(virConnectPtr conn) @@ -116,6 +122,9 @@ virConnectNumOfSecrets(virConnectPtr conn) * have an extra allocated element set to NULL but not included in the return count, * to make iteration easier. The caller is responsible for calling * virSecretFree() on each array element, then calling free() on @secrets. + * + * Since: v1.0.0 + * */ int virConnectListAllSecrets(virConnectPtr conn, @@ -160,6 +169,9 @@ virConnectListAllSecrets(virConnectPtr conn, * virConnectListAllSecrets(). * * Returns the number of UUIDs provided in the array, or -1 on failure. + * + * Since: v1.0.0 + * */ int virConnectListSecrets(virConnectPtr conn, char **uuids, int maxuuids) @@ -202,6 +214,9 @@ virConnectListSecrets(virConnectPtr conn, char **uuids, int maxuuids) * * Returns a new secret object or NULL in case of failure. If the * secret cannot be found, then VIR_ERR_NO_SECRET error is raised. + * + * Since: v1.0.0 + * */ virSecretPtr virSecretLookupByUUID(virConnectPtr conn, const unsigned char *uuid) @@ -243,6 +258,9 @@ virSecretLookupByUUID(virConnectPtr conn, const unsigned char *uuid) * * Returns a new secret object or NULL in case of failure. If the * secret cannot be found, then VIR_ERR_NO_SECRET error is raised. + * + * Since: v1.0.0 + * */ virSecretPtr virSecretLookupByUUIDString(virConnectPtr conn, const char *uuidstr) @@ -285,6 +303,9 @@ virSecretLookupByUUIDString(virConnectPtr conn, const char *uuidstr) * * Returns a new secret object or NULL in case of failure. If the * secret cannot be found, then VIR_ERR_NO_SECRET error is raised. + * + * Since: v1.0.0 + * */ virSecretPtr virSecretLookupByUsage(virConnectPtr conn, @@ -332,6 +353,9 @@ virSecretLookupByUsage(virConnectPtr conn, * secret object is no longer needed. * * Returns a secret on success, NULL on failure. + * + * Since: v1.0.0 + * */ virSecretPtr virSecretDefineXML(virConnectPtr conn, const char *xml, unsigned int flags) @@ -370,6 +394,9 @@ virSecretDefineXML(virConnectPtr conn, const char *xml, unsigned int flags) * * Returns 0 on success with the uuid buffer being filled, or * -1 upon failure. + * + * Since: v1.0.0 + * */ int virSecretGetUUID(virSecretPtr secret, unsigned char *uuid) @@ -400,6 +427,9 @@ virSecretGetUUID(virSecretPtr secret, unsigned char *uuid) * UUID see RFC4122. * * Returns -1 in case of error, 0 in case of success + * + * Since: v1.0.0 + * */ int virSecretGetUUIDString(virSecretPtr secret, char *buf) @@ -432,6 +462,9 @@ virSecretGetUUIDString(virSecretPtr secret, char *buf) * * Returns a positive integer identifying the type of object, * or -1 upon error. + * + * Since: v1.0.0 + * */ int virSecretGetUsageType(virSecretPtr secret) @@ -461,6 +494,9 @@ virSecretGetUsageType(virSecretPtr secret) * * Returns a string identifying the object using the secret, * or NULL upon error + * + * Since: v1.0.0 + * */ const char * virSecretGetUsageID(virSecretPtr secret) @@ -484,6 +520,9 @@ virSecretGetUsageID(virSecretPtr secret) * * Returns the XML document on success, NULL on failure. The caller must * free() the XML. + * + * Since: v1.0.0 + * */ char * virSecretGetXMLDesc(virSecretPtr secret, unsigned int flags) @@ -524,6 +563,9 @@ virSecretGetXMLDesc(virSecretPtr secret, unsigned int flags) * Sets the value of a secret. * * Returns 0 on success, -1 on failure. + * + * Since: v1.0.0 + * */ int virSecretSetValue(virSecretPtr secret, const unsigned char *value, @@ -569,6 +611,9 @@ virSecretSetValue(virSecretPtr secret, const unsigned char *value, * * Returns the secret value on success, NULL on failure. The caller must * free() the secret value. + * + * Since: v1.0.0 + * */ unsigned char * virSecretGetValue(virSecretPtr secret, size_t *value_size, unsigned int flags) @@ -610,6 +655,9 @@ virSecretGetValue(virSecretPtr secret, size_t *value_size, unsigned int flags) * virSecretPtr object. * * Returns 0 on success, -1 on failure. + * + * Since: v1.0.0 + * */ int virSecretUndefine(virSecretPtr secret) @@ -657,6 +705,9 @@ virSecretUndefine(virSecretPtr secret) * increment the reference count. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virSecretRef(virSecretPtr secret) @@ -679,6 +730,9 @@ virSecretRef(virSecretPtr secret) * Release the secret handle. The underlying secret continues to exist. * * Returns 0 on success, or -1 on error + * + * Since: v1.0.0 + * */ int virSecretFree(virSecretPtr secret) @@ -728,6 +782,9 @@ virSecretFree(virSecretPtr secret) * be passed to the virConnectSecretEventDeregisterAny() method. * * Returns a callback identifier on success, -1 on failure. + * + * Since: v3.0.0 + * */ int virConnectSecretEventRegisterAny(virConnectPtr conn, @@ -794,6 +851,9 @@ virConnectSecretEventRegisterAny(virConnectPtr conn, * value obtained from a previous virConnectSecretEventRegisterAny() method. * * Returns 0 on success, -1 on failure. + * + * Since: v3.0.0 + * */ int virConnectSecretEventDeregisterAny(virConnectPtr conn, diff --git a/src/libvirt-storage.c b/src/libvirt-storage.c index cbc522b300..33b7ff8c39 100644 --- a/src/libvirt-storage.c +++ b/src/libvirt-storage.c @@ -37,6 +37,9 @@ VIR_LOG_INIT("libvirt.storage"); * call. * * Returns the virConnectPtr or NULL in case of failure. + * + * Since: v1.0.0 + * */ virConnectPtr virStoragePoolGetConnect(virStoragePoolPtr pool) @@ -104,6 +107,9 @@ virStoragePoolGetConnect(virStoragePoolPtr pool) * in the return count, to make iteration easier. The caller is responsible * for calling virStoragePoolFree() on each array element, then calling * free() on @pools. + * + * Since: v1.0.0 + * */ int virConnectListAllStoragePools(virConnectPtr conn, @@ -143,6 +149,9 @@ virConnectListAllStoragePools(virConnectPtr conn, * Provides the number of active storage pools * * Returns the number of pools found, or -1 on error + * + * Since: v1.0.0 + * */ int virConnectNumOfStoragePools(virConnectPtr conn) @@ -187,6 +196,9 @@ virConnectNumOfStoragePools(virConnectPtr conn) * virConnectNumOfStoragePools() and this call; you are only guaranteed * that all currently active pools were listed if the return is less than * @maxnames. The client must call free() on each returned name. + * + * Since: v1.0.0 + * */ int virConnectListStoragePools(virConnectPtr conn, @@ -224,6 +236,9 @@ virConnectListStoragePools(virConnectPtr conn, * Provides the number of inactive storage pools * * Returns the number of pools found, or -1 on error + * + * Since: v1.0.0 + * */ int virConnectNumOfDefinedStoragePools(virConnectPtr conn) @@ -268,6 +283,9 @@ virConnectNumOfDefinedStoragePools(virConnectPtr conn) * a call to virConnectNumOfDefinedStoragePools() and this call; you are only * guaranteed that all currently defined pools were listed if the return * is less than @maxnames. The client must call free() on each returned name. + * + * Since: v1.0.0 + * */ int virConnectListDefinedStoragePools(virConnectPtr conn, @@ -318,6 +336,9 @@ virConnectListDefinedStoragePools(virConnectPtr conn, * Returns an xml document consisting of a SourceList element * containing a source document appropriate to the given pool * type for each discovered source. + * + * Since: v1.0.0 + * */ char * virConnectFindStoragePoolSources(virConnectPtr conn, @@ -361,6 +382,9 @@ virConnectFindStoragePoolSources(virConnectPtr conn, * storage pool object is no longer needed. * * Returns a virStoragePoolPtr object, or NULL if no matching pool is found + * + * Since: v1.0.0 + * */ virStoragePoolPtr virStoragePoolLookupByName(virConnectPtr conn, @@ -400,6 +424,9 @@ virStoragePoolLookupByName(virConnectPtr conn, * storage pool object is no longer needed. * * Returns a virStoragePoolPtr object, or NULL if no matching pool is found + * + * Since: v1.0.0 + * */ virStoragePoolPtr virStoragePoolLookupByUUID(virConnectPtr conn, @@ -477,6 +504,9 @@ virStoragePoolLookupByUUIDString(virConnectPtr conn, * storage pool object is no longer needed. * * Returns a virStoragePoolPtr object, or NULL if no matching pool is found + * + * Since: v1.0.0 + * */ virStoragePoolPtr virStoragePoolLookupByVolume(virStorageVolPtr vol) @@ -516,6 +546,9 @@ virStoragePoolLookupByVolume(virStorageVolPtr vol) * storage pool object is no longer needed. * * Returns a virStoragePoolPtr object, or NULL if no matching pool is found + * + * Since: v4.1.0 + * */ virStoragePoolPtr virStoragePoolLookupByTargetPath(virConnectPtr conn, @@ -557,6 +590,9 @@ virStoragePoolLookupByTargetPath(virConnectPtr conn, * storage pool object is no longer needed. * * Returns a virStoragePoolPtr object, or NULL if creation failed + * + * Since: v1.0.0 + * */ virStoragePoolPtr virStoragePoolCreateXML(virConnectPtr conn, @@ -600,6 +636,9 @@ virStoragePoolCreateXML(virConnectPtr conn, * storage pool object is no longer needed. * * Returns a virStoragePoolPtr object, or NULL if creation failed + * + * Since: v1.0.0 + * */ virStoragePoolPtr virStoragePoolDefineXML(virConnectPtr conn, @@ -641,6 +680,9 @@ virStoragePoolDefineXML(virConnectPtr conn, * Build the underlying storage pool * * Returns 0 on success, or -1 upon failure + * + * Since: v1.0.0 + * */ int virStoragePoolBuild(virStoragePoolPtr pool, @@ -679,6 +721,9 @@ virStoragePoolBuild(virStoragePoolPtr pool, * Undefine an inactive storage pool * * Returns 0 on success, -1 on failure + * + * Since: v1.0.0 + * */ int virStoragePoolUndefine(virStoragePoolPtr pool) @@ -717,6 +762,9 @@ virStoragePoolUndefine(virStoragePoolPtr pool) * Starts an inactive storage pool * * Returns 0 on success, or -1 if it could not be started + * + * Since: v1.0.0 + * */ int virStoragePoolCreate(virStoragePoolPtr pool, @@ -759,6 +807,9 @@ virStoragePoolCreate(virStoragePoolPtr pool, * the associated virStoragePoolPtr object. * * Returns 0 on success, or -1 if it could not be destroyed + * + * Since: v1.0.0 + * */ int virStoragePoolDestroy(virStoragePoolPtr pool) @@ -799,6 +850,9 @@ virStoragePoolDestroy(virStoragePoolPtr pool) * itself is not free'd. * * Returns 0 on success, or -1 if it could not be obliterate + * + * Since: v1.0.0 + * */ int virStoragePoolDelete(virStoragePoolPtr pool, @@ -838,6 +892,9 @@ virStoragePoolDelete(virStoragePoolPtr pool, * it. Does not change the state of the pool on the host. * * Returns 0 on success, or -1 if it could not be free'd. + * + * Since: v1.0.0 + * */ int virStoragePoolFree(virStoragePoolPtr pool) @@ -870,6 +927,9 @@ virStoragePoolFree(virStoragePoolPtr pool) * the reference count. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virStoragePoolRef(virStoragePoolPtr pool) @@ -895,6 +955,9 @@ virStoragePoolRef(virStoragePoolPtr pool) * new devices at the OS layer * * Returns 0 if the volume list was refreshed, -1 on failure + * + * Since: v1.0.0 + * */ int virStoragePoolRefresh(virStoragePoolPtr pool, @@ -933,6 +996,9 @@ virStoragePoolRefresh(virStoragePoolPtr pool, * Fetch the locally unique name of the storage pool * * Returns the name of the pool, or NULL on error + * + * Since: v1.0.0 + * */ const char* virStoragePoolGetName(virStoragePoolPtr pool) @@ -955,6 +1021,9 @@ virStoragePoolGetName(virStoragePoolPtr pool) * Fetch the globally unique ID of the storage pool * * Returns 0 on success, or -1 on error; + * + * Since: v1.0.0 + * */ int virStoragePoolGetUUID(virStoragePoolPtr pool, @@ -985,6 +1054,9 @@ virStoragePoolGetUUID(virStoragePoolPtr pool, * Fetch the globally unique ID of the storage pool as a string * * Returns 0 on success, or -1 on error; + * + * Since: v1.0.0 + * */ int virStoragePoolGetUUIDString(virStoragePoolPtr pool, @@ -1015,6 +1087,9 @@ virStoragePoolGetUUIDString(virStoragePoolPtr pool, * such as free space / usage summary * * Returns 0 on success, or -1 on failure. + * + * Since: v1.0.0 + * */ int virStoragePoolGetInfo(virStoragePoolPtr pool, @@ -1059,6 +1134,9 @@ virStoragePoolGetInfo(virStoragePoolPtr pool, * into the virStoragePoolCreateXML method. * * Returns a XML document (caller frees), or NULL on error + * + * Since: v1.0.0 + * */ char * virStoragePoolGetXMLDesc(virStoragePoolPtr pool, @@ -1097,6 +1175,9 @@ virStoragePoolGetXMLDesc(virStoragePoolPtr pool, * whether the pool is automatically started at boot time * * Returns 0 on success, -1 on failure + * + * Since: v1.0.0 + * */ int virStoragePoolGetAutostart(virStoragePoolPtr pool, @@ -1137,6 +1218,9 @@ virStoragePoolGetAutostart(virStoragePoolPtr pool, * when the host machine boots. * * Returns 0 on success, -1 on failure + * + * Since: v1.0.0 + * */ int virStoragePoolSetAutostart(virStoragePoolPtr pool, @@ -1185,6 +1269,9 @@ virStoragePoolSetAutostart(virStoragePoolPtr pool, * in the return count, to make iteration easier. The caller is responsible * for calling virStorageVolFree() on each array element, then calling * free() on @vols. + * + * Since: v1.0.0 + * */ int virStoragePoolListAllVolumes(virStoragePoolPtr pool, @@ -1221,6 +1308,9 @@ virStoragePoolListAllVolumes(virStoragePoolPtr pool, * Fetch the number of storage volumes within a pool * * Returns the number of storage pools, or -1 on failure + * + * Since: v1.0.0 + * */ int virStoragePoolNumOfVolumes(virStoragePoolPtr pool) @@ -1260,6 +1350,9 @@ virStoragePoolNumOfVolumes(virStoragePoolPtr pool) * virStoragePoolListAllVolumes(). * * Returns the number of names fetched, or -1 on error + * + * Since: v1.0.0 + * */ int virStoragePoolListVolumes(virStoragePoolPtr pool, @@ -1299,6 +1392,9 @@ virStoragePoolListVolumes(virStoragePoolPtr pool, * call. * * Returns the virConnectPtr or NULL in case of failure. + * + * Since: v1.0.0 + * */ virConnectPtr virStorageVolGetConnect(virStorageVolPtr vol) @@ -1325,6 +1421,9 @@ virStorageVolGetConnect(virStorageVolPtr vol) * storage volume object is no longer needed. * * Returns a storage volume, or NULL if not found / error + * + * Since: v1.0.0 + * */ virStorageVolPtr virStorageVolLookupByName(virStoragePoolPtr pool, @@ -1365,6 +1464,9 @@ virStorageVolLookupByName(virStoragePoolPtr pool, * storage volume object is no longer needed. * * Returns a storage volume, or NULL if not found / error + * + * Since: v1.0.0 + * */ virStorageVolPtr virStorageVolLookupByKey(virConnectPtr conn, @@ -1405,6 +1507,9 @@ virStorageVolLookupByKey(virConnectPtr conn, * storage volume object is no longer needed. * * Returns a storage volume, or NULL if not found / error + * + * Since: v1.0.0 + * */ virStorageVolPtr virStorageVolLookupByPath(virConnectPtr conn, @@ -1441,6 +1546,9 @@ virStorageVolLookupByPath(virConnectPtr conn, * within the scope of a pool * * Returns the volume name, or NULL on error + * + * Since: v1.0.0 + * */ const char* virStorageVolGetName(virStorageVolPtr vol) @@ -1464,6 +1572,9 @@ virStorageVolGetName(virStorageVolPtr vol) * key no matter what host it is accessed from * * Returns the volume key, or NULL on error + * + * Since: v1.0.0 + * */ const char* virStorageVolGetKey(virStorageVolPtr vol) @@ -1497,6 +1608,9 @@ virStorageVolGetKey(virStorageVolPtr vol) * storage volume object is no longer needed. * * Returns the storage volume, or NULL on error + * + * Since: v1.0.0 + * */ virStorageVolPtr virStorageVolCreateXML(virStoragePoolPtr pool, @@ -1548,6 +1662,9 @@ virStorageVolCreateXML(virStoragePoolPtr pool, * storage volume object is no longer needed. * * Returns the storage volume, or NULL on error + * + * Since: v1.0.0 + * */ virStorageVolPtr virStorageVolCreateXMLFrom(virStoragePoolPtr pool, @@ -1612,6 +1729,9 @@ virStorageVolCreateXMLFrom(virStoragePoolPtr pool, * another active stream is writing to the storage volume. * * Returns 0, or -1 upon error. + * + * Since: v1.0.0 + * */ int virStorageVolDownload(virStorageVolPtr vol, @@ -1695,6 +1815,9 @@ virStorageVolDownload(virStorageVolPtr vol, * capacity, and allocation. * * Returns 0, or -1 upon error. + * + * Since: v1.0.0 + * */ int virStorageVolUpload(virStorageVolPtr vol, @@ -1748,6 +1871,9 @@ virStorageVolUpload(virStorageVolPtr vol, * Delete the storage volume from the pool * * Returns 0 on success, or -1 on error + * + * Since: v1.0.0 + * */ int virStorageVolDelete(virStorageVolPtr vol, @@ -1797,6 +1923,9 @@ virStorageVolDelete(virStorageVolPtr vol, * network file systems are known to be problematic. * * Returns 0 on success, or -1 on error + * + * Since: v1.0.0 + * */ int virStorageVolWipe(virStorageVolPtr vol, @@ -1843,6 +1972,9 @@ virStorageVolWipe(virStorageVolPtr vol, * problematic. * * Returns 0 on success, or -1 on error. + * + * Since: v1.0.0 + * */ int virStorageVolWipePattern(virStorageVolPtr vol, @@ -1883,6 +2015,9 @@ virStorageVolWipePattern(virStorageVolPtr vol, * storage volume continues to exist. * * Returns 0 on success, or -1 on error + * + * Since: v1.0.0 + * */ int virStorageVolFree(virStorageVolPtr vol) @@ -1914,6 +2049,9 @@ virStorageVolFree(virStorageVolPtr vol) * the reference count. * * Returns 0 in case of success, -1 in case of failure. + * + * Since: v1.0.0 + * */ int virStorageVolRef(virStorageVolPtr vol) @@ -1938,6 +2076,9 @@ virStorageVolRef(virStorageVolPtr vol) * volume such as its current allocation * * Returns 0 on success, or -1 on failure + * + * Since: v1.0.0 + * */ int virStorageVolGetInfo(virStorageVolPtr vol, @@ -1988,6 +2129,9 @@ virStorageVolGetInfo(virStorageVolPtr vol, * as is the case with qcow2 files. * * Returns 0 on success, or -1 on failure + * + * Since: v3.0.0 + * */ int virStorageVolGetInfoFlags(virStorageVolPtr vol, @@ -2032,6 +2176,9 @@ virStorageVolGetInfoFlags(virStorageVolPtr vol, * the storage volume * * Returns the XML document, or NULL on error + * + * Since: v1.0.0 + * */ char * virStorageVolGetXMLDesc(virStorageVolPtr vol, @@ -2073,6 +2220,9 @@ virStorageVolGetXMLDesc(virStorageVolPtr vol, * * Returns the storage volume path, or NULL on error. The * caller must free() the returned path after use. + * + * Since: v1.0.0 + * */ char * virStorageVolGetPath(virStorageVolPtr vol) @@ -2134,6 +2284,9 @@ virStorageVolGetPath(virStorageVolPtr vol) * than the current size. * * Returns 0 on success, or -1 on error. + * + * Since: v1.0.0 + * */ int virStorageVolResize(virStorageVolPtr vol, @@ -2183,6 +2336,9 @@ virStorageVolResize(virStorageVolPtr vol, * Determine if the storage pool is currently running * * Returns 1 if running, 0 if inactive, -1 on error + * + * Since: v1.0.0 + * */ int virStoragePoolIsActive(virStoragePoolPtr pool) @@ -2216,6 +2372,9 @@ virStoragePoolIsActive(virStoragePoolPtr pool) * which means it will still exist after shutting down * * Returns 1 if persistent, 0 if transient, -1 on error + * + * Since: v1.0.0 + * */ int virStoragePoolIsPersistent(virStoragePoolPtr pool) @@ -2274,6 +2433,9 @@ virStoragePoolIsPersistent(virStoragePoolPtr pool) * be passed to the virConnectStoragePoolEventDeregisterAny() method. * * Returns a callback identifier on success, -1 on failure. + * + * Since: v2.0.0 + * */ int virConnectStoragePoolEventRegisterAny(virConnectPtr conn, @@ -2337,6 +2499,9 @@ virConnectStoragePoolEventRegisterAny(virConnectPtr conn, * value obtained from a previous virConnectStoragePoolEventRegisterAny() method. * * Returns 0 on success, -1 on failure + * + * Since: v2.0.0 + * */ int virConnectStoragePoolEventDeregisterAny(virConnectPtr conn, @@ -2376,6 +2541,9 @@ virConnectStoragePoolEventDeregisterAny(virConnectPtr conn, * are supported along with the file/disk formats for each pool. * * Returns NULL in case of error or an XML string defining the capabilities. + * + * Since: v5.2.0 + * */ char * virConnectGetStoragePoolCapabilities(virConnectPtr conn, diff --git a/src/libvirt-stream.c b/src/libvirt-stream.c index 80dbc83a59..a3779ef1c7 100644 --- a/src/libvirt-stream.c +++ b/src/libvirt-stream.c @@ -52,6 +52,9 @@ VIR_LOG_INIT("libvirt.stream"); * VIR_STREAM_NONBLOCK for flags, otherwise pass 0. * * Returns the new stream, or NULL upon error + * + * Since: v1.0.0 + * */ virStreamPtr virStreamNew(virConnectPtr conn, @@ -85,6 +88,9 @@ virStreamNew(virConnectPtr conn, * the caller no longer needs the reference to this object. * * Returns 0 in case of success, -1 in case of failure + * + * Since: v1.0.0 + * */ int virStreamRef(virStreamPtr stream) @@ -163,6 +169,9 @@ virStreamRef(virStreamPtr stream) * * Returns -2 if the outgoing transmit buffers are full & * the stream is marked as non-blocking. + * + * Since: v1.0.0 + * */ int virStreamSend(virStreamPtr stream, @@ -258,6 +267,9 @@ virStreamSend(virStreamPtr stream, * * Returns -2 if there is no data pending to be read & the * stream is marked as non-blocking. + * + * Since: v1.0.0 + * */ int virStreamRecv(virStreamPtr stream, @@ -345,6 +357,9 @@ virStreamRecv(virStreamPtr stream, * * Returns -3 if there is a hole in stream and caller requested * to stop at a hole. + * + * Since: v3.4.0 + * */ int virStreamRecvFlags(virStreamPtr stream, @@ -412,6 +427,9 @@ virStreamRecvFlags(virStreamPtr stream, * * Returns 0 on success, * -1 error + * + * Since: v3.4.0 + * */ int virStreamSendHole(virStreamPtr stream, @@ -455,6 +473,9 @@ virStreamSendHole(virStreamPtr stream, * * Returns 0 on success, * -1 on error or when there's currently no hole in the stream + * + * Since: v3.4.0 + * */ int virStreamRecvHole(virStreamPtr stream, @@ -577,6 +598,9 @@ virStreamInData(virStreamPtr stream, * Returns -1 upon any error, with virStreamAbort() already * having been called, so the caller need only call * virStreamFree(). + * + * Since: v1.0.0 + * */ int virStreamSendAll(virStreamPtr stream, @@ -706,6 +730,9 @@ virStreamSendAll(virStreamPtr stream, * Returns -1 upon any error, with virStreamAbort() already * having been called, so the caller need only call * virStreamFree(). + * + * Since: v3.4.0 + * */ int virStreamSparseSendAll(virStreamPtr stream, virStreamSourceFunc handler, @@ -845,6 +872,9 @@ int virStreamSparseSendAll(virStreamPtr stream, * Returns -1 upon any error, with virStreamAbort() already * having been called, so the caller need only call * virStreamFree() + * + * Since: v1.0.0 + * */ int virStreamRecvAll(virStreamPtr stream, @@ -958,6 +988,9 @@ virStreamRecvAll(virStreamPtr stream, * * Returns -1 upon any error, with virStreamAbort() already * having been called, so the caller need only call virStreamFree(). + * + * Since: v3.4.0 + * */ int virStreamSparseRecvAll(virStreamPtr stream, @@ -1051,6 +1084,9 @@ virStreamSparseRecvAll(virStreamPtr stream, * to integrate into an event loop * * Returns 0 on success, -1 upon error + * + * Since: v1.0.0 + * */ int virStreamEventAddCallback(virStreamPtr stream, @@ -1094,6 +1130,9 @@ virStreamEventAddCallback(virStreamPtr stream, * is guaranteed to succeed if a callback is already registered * * Returns 0 on success, -1 if no callback is registered + * + * Since: v1.0.0 + * */ int virStreamEventUpdateCallback(virStreamPtr stream, @@ -1129,6 +1168,9 @@ virStreamEventUpdateCallback(virStreamPtr stream, * Remove an event callback from the stream * * Returns 0 on success, -1 on error + * + * Since: v1.0.0 + * */ int virStreamEventRemoveCallback(virStreamPtr stream) @@ -1173,6 +1215,9 @@ virStreamEventRemoveCallback(virStreamPtr stream) * beforehand. * * Returns 0 on success, -1 upon error + * + * Since: v1.0.0 + * */ int virStreamFinish(virStreamPtr stream) @@ -1215,6 +1260,9 @@ virStreamFinish(virStreamPtr stream) * beforehand. * * Returns 0 on success, -1 upon error + * + * Since: v1.0.0 + * */ int virStreamAbort(virStreamPtr stream) @@ -1259,6 +1307,9 @@ virStreamAbort(virStreamPtr stream) * the virStreamAbort function should be called first. * * Returns 0 upon success, or -1 on error + * + * Since: v1.0.0 + * */ int virStreamFree(virStreamPtr stream) diff --git a/src/libvirt.c b/src/libvirt.c index 6cda75d1ca..a2c6360489 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -296,6 +296,9 @@ virGlobalInit(void) * connection attempt. * * Returns 0 in case of success, -1 in case of error + * + * Since: v1.0.0 + * */ int virInitialize(void) @@ -797,6 +800,9 @@ virStateStop(void) * * Returns -1 in case of failure, 0 otherwise, and values for @libVer and * @typeVer have the format major * 1,000,000 + minor * 1,000 + release. + * + * Since: v1.0.0 + * */ int virGetVersion(unsigned long *libVer, const char *type G_GNUC_UNUSED, @@ -1185,6 +1191,9 @@ virConnectOpenInternal(const char *name, * is no longer needed. * * Returns a pointer to the hypervisor connection or NULL in case of error + * + * Since: v1.0.0 + * */ virConnectPtr virConnectOpen(const char *name) @@ -1218,6 +1227,9 @@ virConnectOpen(const char *name) * URIs are documented at https://libvirt.org/uri.html * * Returns a pointer to the hypervisor connection or NULL in case of error + * + * Since: v1.0.0 + * */ virConnectPtr virConnectOpenReadOnly(const char *name) @@ -1252,6 +1264,9 @@ virConnectOpenReadOnly(const char *name) * URIs are documented at https://libvirt.org/uri.html * * Returns a pointer to the hypervisor connection or NULL in case of error + * + * Since: v1.0.0 + * */ virConnectPtr virConnectOpenAuth(const char *name, @@ -1300,6 +1315,9 @@ virConnectOpenAuth(const char *name, * value if some other object still has a temporary reference to the * connection, but the application should not try to further use a * connection after the virConnectClose that matches the initial open. + * + * Since: v1.0.0 + * */ int virConnectClose(virConnectPtr conn) diff --git a/src/util/virerror.c b/src/util/virerror.c index e864a50fba..5687c2aaa3 100644 --- a/src/util/virerror.c +++ b/src/util/virerror.c @@ -254,6 +254,9 @@ virLastErrorObject(void) * threads can safely access this concurrently. * * Returns a pointer to the last error or NULL if none occurred. + * + * Since: v1.0.0 + * */ virErrorPtr virGetLastError(void) @@ -271,6 +274,9 @@ virGetLastError(void) * Get the most recent error code (enum virErrorNumber). * * Returns the most recent error code, or VIR_ERR_OK if none is set. + * + * Since: v4.5.0 + * */ int virGetLastErrorCode(void) @@ -289,6 +295,9 @@ virGetLastErrorCode(void) * * Returns a numerical value of the most recent error's origin, or VIR_FROM_NONE * if none is set. + * + * Since: v4.5.0 + * */ int virGetLastErrorDomain(void) @@ -307,6 +316,9 @@ virGetLastErrorDomain(void) * * Returns the most recent error message string in this * thread, or a generic message if none is set + * + * Since: v1.0.6 + * */ const char * virGetLastErrorMessage(void) @@ -361,6 +373,9 @@ virSetError(virErrorPtr newerr) * One will need to free the result with virResetError() * * Returns error code or -1 in case of parameter error. + * + * Since: v1.0.0 + * */ int virCopyLastError(virErrorPtr to) @@ -392,6 +407,9 @@ virCopyLastError(virErrorPtr to) * Returns a pointer to the copied error or NULL if allocation failed. * It is the caller's responsibility to free the error with * virFreeError(). + * + * Since: v1.0.0 + * */ virErrorPtr virSaveLastError(void) @@ -455,6 +473,9 @@ virErrorRestore(virErrorPtr *savederr) * @err: pointer to the virError to clean up * * Reset the error being pointed to + * + * Since: v1.0.0 + * */ void virResetError(virErrorPtr err) @@ -473,6 +494,9 @@ virResetError(virErrorPtr err) * @err: error to free * * Resets and frees the given error. + * + * Since: v1.0.0 + * */ void virFreeError(virErrorPtr err) @@ -489,6 +513,9 @@ virFreeError(virErrorPtr err) * The error object is kept in thread local storage, so separate * threads can safely access this concurrently, only resetting * their own error object. + * + * Since: v1.0.0 + * */ void virResetLastError(void) @@ -519,6 +546,9 @@ virResetLastError(void) * remains for backwards compatibility. * * Returns a pointer to the last error or NULL if none occurred. + * + * Since: v1.0.0 + * */ virErrorPtr virConnGetLastError(virConnectPtr conn) @@ -553,6 +583,9 @@ virConnGetLastError(virConnectPtr conn) * * Returns 0 if no error was found and the error code otherwise and -1 in case * of parameter error. + * + * Since: v1.0.0 + * */ int virConnCopyLastError(virConnectPtr conn, virErrorPtr to) @@ -579,6 +612,9 @@ virConnCopyLastError(virConnectPtr conn, virErrorPtr to) * threads can safely access this concurrently. * * Reset the last error caught on that connection + * + * Since: v1.0.0 + * */ void virConnResetLastError(virConnectPtr conn) @@ -598,6 +634,9 @@ virConnResetLastError(virConnectPtr conn) * Set a library global error handling function, if @handler is NULL, * it will reset to default printing on stderr. The error raised there * are those for which no handler at the connection level could caught. + * + * Since: v1.0.0 + * */ void virSetErrorFunc(void *userData, virErrorFunc handler) @@ -615,6 +654,9 @@ virSetErrorFunc(void *userData, virErrorFunc handler) * Set a connection error handling function, if @handler is NULL * it will reset to default which is to pass error back to the global * library handler. + * + * Since: v1.0.0 + * */ void virConnSetErrorFunc(virConnectPtr conn, void *userData, @@ -633,6 +675,9 @@ virConnSetErrorFunc(virConnectPtr conn, void *userData, * @err: pointer to the error. * * Default routine reporting an error to stderr. + * + * Since: v1.0.0 + * */ void virDefaultErrorFunc(virErrorPtr err) diff --git a/src/util/virevent.c b/src/util/virevent.c index f6eb806faf..9fe751abb2 100644 --- a/src/util/virevent.c +++ b/src/util/virevent.c @@ -69,6 +69,9 @@ static virEventRemoveTimeoutFunc removeTimeoutImpl; * * Returns -1 if the file handle cannot be registered, otherwise a handle * watch number to be used for updating and unregistering for events. + * + * Since: v1.0.0 + * */ int virEventAddHandle(int fd, @@ -94,6 +97,9 @@ virEventAddHandle(int fd, * virEventRegisterImpl() or virEventRegisterDefaultImpl(). * * Will not fail if fd exists. + * + * Since: v1.0.0 + * */ void virEventUpdateHandle(int watch, int events) @@ -112,6 +118,9 @@ virEventUpdateHandle(int watch, int events) * virEventRegisterImpl() or virEventRegisterDefaultImpl(). * * Returns -1 if the file handle was not registered, 0 upon success. + * + * Since: v1.0.0 + * */ int virEventRemoveHandle(int watch) @@ -139,6 +148,9 @@ virEventRemoveHandle(int watch) * * Returns -1 if the timer cannot be registered, a positive * integer timer id upon success. + * + * Since: v1.0.0 + * */ int virEventAddTimeout(int timeout, @@ -166,6 +178,9 @@ virEventAddTimeout(int timeout, * to zero will cause it to fire on every event loop iteration. * * Will not fail if timer exists. + * + * Since: v1.0.0 + * */ void virEventUpdateTimeout(int timer, int timeout) @@ -184,6 +199,9 @@ virEventUpdateTimeout(int timer, int timeout) * virEventRegisterImpl() or virEventRegisterDefaultImpl(). * * Returns -1 if the timer was not registered, 0 upon success. + * + * Since: v1.0.0 + * */ int virEventRemoveTimeout(int timer) @@ -232,6 +250,9 @@ virEventRemoveTimeout(int timer) * virConnectClose on all open connections, so it is not safe * to stop running the event loop immediately after closing * the connection. + * + * Since: v1.0.0 + * */ void virEventRegisterImpl(virEventAddHandleFunc addHandle, virEventUpdateHandleFunc updateHandle, @@ -300,6 +321,9 @@ int virEventRequireImpl(void) * virEventAddHandle() or virConnectDomainEventRegisterAny(). * * Returns 0 on success, -1 on failure. + * + * Since: v1.0.0 + * */ int virEventRegisterDefaultImpl(void) { @@ -335,6 +359,9 @@ int virEventRegisterDefaultImpl(void) * } * * Returns 0 on success, -1 on failure. + * + * Since: v1.0.0 + * */ int virEventRunDefaultImpl(void) { -- 2.35.1

Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-qemu.h | 3 +++ src/libvirt-qemu.c | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/include/libvirt/libvirt-qemu.h b/include/libvirt/libvirt-qemu.h index 838b6e9caf..b85e77f5b1 100644 --- a/include/libvirt/libvirt-qemu.h +++ b/include/libvirt/libvirt-qemu.h @@ -80,6 +80,9 @@ char *virDomainQemuAgentCommand(virDomainPtr domain, const char *cmd, * * The callback signature to use when registering for a qemu monitor * event with virConnectDomainQemuMonitorEventRegister(). + * + * Since: v1.2.3 + * */ typedef void (*virConnectDomainQemuMonitorEventCallback)(virConnectPtr conn, virDomainPtr dom, diff --git a/src/libvirt-qemu.c b/src/libvirt-qemu.c index 896aba2f0b..4d0f1f1cca 100644 --- a/src/libvirt-qemu.c +++ b/src/libvirt-qemu.c @@ -61,6 +61,9 @@ VIR_LOG_INIT("libvirt-qemu"); * * Returns 0 in case of success, -1 in case of failure * + * Since: v1.0.0 + * + * */ int virDomainQemuMonitorCommand(virDomainPtr domain, const char *cmd, @@ -131,6 +134,9 @@ virDomainQemuMonitorCommand(virDomainPtr domain, const char *cmd, * @cmd, and the caller must free this string. * * Returns 0 in case of success, -1 in case of failure + * + * Since: v8.2.0 + * */ int virDomainQemuMonitorCommandWithFiles(virDomainPtr domain, @@ -216,6 +222,9 @@ virDomainQemuMonitorCommandWithFiles(virDomainPtr domain, * normally (provided the above requirements were honored). * * Returns a new domain object on success, NULL otherwise + * + * Since: v1.0.0 + * */ virDomainPtr virDomainQemuAttach(virConnectPtr conn, @@ -272,6 +281,9 @@ virDomainQemuAttach(virConnectPtr conn, * positive value: wait for @timeout seconds * * Returns strings if success, NULL in failure. + * + * Since: v1.0.0 + * */ char * virDomainQemuAgentCommand(virDomainPtr domain, @@ -350,6 +362,9 @@ virDomainQemuAgentCommand(virDomainPtr domain, * be passed to the virConnectDomainQemuMonitorEventDeregister() method. * * Returns a callback identifier on success, -1 on failure + * + * Since: v1.2.3 + * */ int virConnectDomainQemuMonitorEventRegister(virConnectPtr conn, @@ -404,6 +419,9 @@ virConnectDomainQemuMonitorEventRegister(virConnectPtr conn, * method. * * Returns 0 on success, -1 on failure + * + * Since: v1.2.3 + * */ int virConnectDomainQemuMonitorEventDeregister(virConnectPtr conn, -- 2.35.1

Signed-off-by: Victor Toso <victortoso@redhat.com> --- src/libvirt-lxc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/libvirt-lxc.c b/src/libvirt-lxc.c index 2a271b74f0..14a2f2a6ec 100644 --- a/src/libvirt-lxc.c +++ b/src/libvirt-lxc.c @@ -59,6 +59,9 @@ VIR_LOG_INIT("libvirt-lxc"); * the setns() system call. * * Returns the number of opened file descriptors, or -1 on error + * + * Since: v1.0.2 + * */ int virDomainLxcOpenNamespace(virDomainPtr domain, @@ -115,6 +118,9 @@ virDomainLxcOpenNamespace(virDomainPtr domain, * the caller to switch back to its current namespace later * * Returns 0 on success, -1 on error + * + * Since: v1.0.2 + * */ int virDomainLxcEnterNamespace(virDomainPtr domain, @@ -182,6 +188,9 @@ virDomainLxcEnterNamespace(virDomainPtr domain, * exec() has yet been performed. * * Returns 0 on success, -1 on error + * + * Since: v1.0.4 + * */ int virDomainLxcEnterSecurityLabel(virSecurityModelPtr model, @@ -283,6 +292,9 @@ virDomainLxcEnterSecurityLabel(virSecurityModelPtr model, * with the container @domain. * * Returns 0 on success, -1 on error + * + * Since: v2.0.0 + * */ int virDomainLxcEnterCGroup(virDomainPtr domain, unsigned int flags) -- 2.35.1

Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-admin.h | 3 ++ src/admin/libvirt-admin.c | 93 +++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) diff --git a/include/libvirt/libvirt-admin.h b/include/libvirt/libvirt-admin.h index 2bfb45145d..f2cb528524 100644 --- a/include/libvirt/libvirt-admin.h +++ b/include/libvirt/libvirt-admin.h @@ -126,6 +126,9 @@ int virAdmConnectGetLibVersion(virAdmConnectPtr conn, * @opaque: opaque client data * * A callback to be registered, in case a connection was closed. + * + * Since: v1.3.1 + * */ typedef void (*virAdmConnectCloseFunc)(virAdmConnectPtr conn, int reason, diff --git a/src/admin/libvirt-admin.c b/src/admin/libvirt-admin.c index 01546a7bc2..35470c866e 100644 --- a/src/admin/libvirt-admin.c +++ b/src/admin/libvirt-admin.c @@ -84,6 +84,9 @@ virAdmGlobalInit(void) * necessary for the application to call virAdmInitialize. * * Returns 0 in case of success, -1 in case of error + * + * Since: v2.0.0 + * */ int virAdmInitialize(void) @@ -200,6 +203,9 @@ virAdmGetDefaultURI(virConf *conf, char **uristr) * Opens connection to admin interface of the daemon. * * Returns @virAdmConnectPtr object or NULL on error + * + * Since: v1.2.17 + * */ virAdmConnectPtr virAdmConnectOpen(const char *name, unsigned int flags) @@ -284,6 +290,9 @@ virAdmConnectOpen(const char *name, unsigned int flags) * some other object still has a temporary reference to the connection, but the * application should not try to further use a connection after the * virAdmConnectClose that matches the initial open. + * + * Since: v1.2.17 + * */ int virAdmConnectClose(virAdmConnectPtr conn) @@ -319,6 +328,9 @@ virAdmConnectClose(virAdmConnectPtr conn) * would increment the reference count. * * Returns 0 in case of success, -1 in case of failure + * + * Since: v1.2.17 + * */ int virAdmConnectRef(virAdmConnectPtr conn) @@ -346,6 +358,9 @@ virAdmConnectRef(virAdmConnectPtr conn) * instead. * * Returns 0 on success, -1 in case of an error. + * + * Since: v1.3.0 + * */ int virAdmGetVersion(unsigned long long *libVer) @@ -377,6 +392,9 @@ virAdmGetVersion(unsigned long long *libVer) * * Returns 1, if the connection is alive, 0 if there isn't an existing * connection at all or the channel has already been closed, or -1 on error. + * + * Since: v1.3.1 + * */ int virAdmConnectIsAlive(virAdmConnectPtr conn) @@ -411,6 +429,9 @@ virAdmConnectIsAlive(virAdmConnectPtr conn) * * Returns an URI string related to the connection or NULL in case of an error. * Caller is responsible for freeing the string. + * + * Since: v1.3.1 + * */ char * virAdmConnectGetURI(virAdmConnectPtr conn) @@ -445,6 +466,9 @@ virAdmConnectGetURI(virAdmConnectPtr conn) * context. * * Returns 0 on success, -1 on error + * + * Since: v1.3.1 + * */ int virAdmConnectRegisterCloseCallback(virAdmConnectPtr conn, virAdmConnectCloseFunc cb, @@ -498,6 +522,9 @@ int virAdmConnectRegisterCloseCallback(virAdmConnectPtr conn, * registration, it will be invoked. * * Returns 0 on success, -1 on error + * + * Since: v1.3.1 + * */ int virAdmConnectUnregisterCloseCallback(virAdmConnectPtr conn, virAdmConnectCloseFunc cb) @@ -528,6 +555,9 @@ int virAdmConnectUnregisterCloseCallback(virAdmConnectPtr conn, * major * 1,000,000 + minor * 1,000 + release. * * Returns 0 on success, -1 on failure and @libVer follows this format: + * + * Since: v1.3.1 + * */ int virAdmConnectGetLibVersion(virAdmConnectPtr conn, unsigned long long *libVer) @@ -556,6 +586,9 @@ int virAdmConnectGetLibVersion(virAdmConnectPtr conn, * * Returns a pointer to the name or NULL. The string doesn't need to be * deallocated since its lifetime will be the same as the server object. + * + * Since: v1.3.2 + * */ const char * virAdmServerGetName(virAdmServerPtr srv) @@ -576,6 +609,9 @@ virAdmServerGetName(virAdmServerPtr srv) * The data structure is freed and should not be used thereafter. * * Returns 0 on success, -1 on failure. + * + * Since: v1.3.2 + * */ int virAdmServerFree(virAdmServerPtr srv) { @@ -599,6 +635,9 @@ int virAdmServerFree(virAdmServerPtr srv) * Get client's unique numeric ID. * * Returns numeric value used for client's ID or -1 in case of an error. + * + * Since: v1.3.5 + * */ unsigned long long virAdmClientGetID(virAdmClientPtr client) @@ -622,6 +661,9 @@ virAdmClientGetID(virAdmClientPtr client) * Returns client's connection timestamp (seconds from epoch in UTC) or 0 * (epoch time) if libvirt doesn't have any information about client's * connection time, or -1 in case of an error. + * + * Since: v1.3.5 + * */ long long virAdmClientGetTimestamp(virAdmClientPtr client) @@ -647,6 +689,9 @@ virAdmClientGetTimestamp(virAdmClientPtr client) * * Returns integer representation of the connection transport used by @client * (this will be one of virClientTransport) or -1 in case of an error. + * + * Since: v1.3.5 + * */ int virAdmClientGetTransport(virAdmClientPtr client) @@ -666,6 +711,9 @@ virAdmClientGetTransport(virAdmClientPtr client) * structure is freed and should not be used thereafter. * * Returns 0 in success, -1 on failure. + * + * Since: v1.3.5 + * */ int virAdmClientFree(virAdmClientPtr client) { @@ -697,6 +745,9 @@ int virAdmClientFree(virAdmClientPtr client) * this extra element from the final count. * Caller is responsible to call virAdmServerFree() on each list element, * followed by freeing @servers. + * + * Since: v1.3.2 + * */ int virAdmConnectListServers(virAdmConnectPtr conn, @@ -735,6 +786,9 @@ virAdmConnectListServers(virAdmConnectPtr conn, * * Returns the requested server or NULL in case of failure. If the * server cannot be found, then VIR_ERR_NO_SERVER error is raised. + * + * Since: v1.3.3 + * */ virAdmServerPtr virAdmConnectLookupServer(virAdmConnectPtr conn, @@ -776,6 +830,9 @@ virAdmConnectLookupServer(virAdmConnectPtr conn, * VIR_THREADPOOL_WORKERS_CURRENT * * Returns 0 on success, -1 in case of an error. + * + * Since: v1.3.4 + * */ int virAdmServerGetThreadPoolParameters(virAdmServerPtr srv, @@ -815,6 +872,9 @@ virAdmServerGetThreadPoolParameters(virAdmServerPtr srv, * failure. * * Returns 0 on success, -1 in case of an error. + * + * Since: v1.3.4 + * */ int virAdmServerSetThreadPoolParameters(virAdmServerPtr srv, @@ -856,6 +916,9 @@ virAdmServerSetThreadPoolParameters(virAdmServerPtr srv, * excluding this extra element from the final count. * Caller is responsible to call virAdmClientFree() on each list element, * followed by freeing @clients. + * + * Since: v1.3.5 + * */ int virAdmServerListClients(virAdmServerPtr srv, @@ -894,6 +957,9 @@ virAdmServerListClients(virAdmServerPtr srv, * * Returns the requested client or NULL in case of failure. If the * client could not be found, then VIR_ERR_NO_CLIENT error is raised. + * + * Since: v1.3.5 + * */ virAdmClientPtr virAdmServerLookupClient(virAdmServerPtr srv, @@ -940,6 +1006,9 @@ virAdmServerLookupClient(virAdmServerPtr srv, * * Returns 0 if the information has been successfully retrieved or -1 in case * of an error. + * + * Since: v1.3.5 + * */ int virAdmClientGetInfo(virAdmClientPtr client, @@ -974,6 +1043,9 @@ virAdmClientGetInfo(virAdmClientPtr client, * * Returns 0 if the daemon's connection with @client was closed successfully * or -1 in case of an error. + * + * Since: v1.3.5 + * */ int virAdmClientClose(virAdmClientPtr client, unsigned int flags) @@ -1011,6 +1083,9 @@ int virAdmClientClose(virAdmClientPtr client, * * Returns 0 on success, allocating @params to size returned in @nparams, or * -1 in case of an error. Caller is responsible for deallocating @params. + * + * Since: v1.3.5 + * */ int virAdmServerGetClientLimits(virAdmServerPtr srv, @@ -1051,6 +1126,9 @@ virAdmServerGetClientLimits(virAdmServerPtr srv, * * Returns 0 if the limits have been changed successfully or -1 in case of an * error. + * + * Since: v1.3.5 + * */ int virAdmServerSetClientLimits(virAdmServerPtr srv, @@ -1089,6 +1167,9 @@ virAdmServerSetClientLimits(virAdmServerPtr srv, * * Returns 0 if the TLS files have been updated successfully or -1 in case of an * error. + * + * Since: v6.2.0 + * */ int virAdmServerUpdateTlsFiles(virAdmServerPtr srv, @@ -1127,6 +1208,9 @@ virAdmServerUpdateTlsFiles(virAdmServerPtr srv, * caller. Caller is also responsible for freeing @outputs correctly. * * Returns the count of outputs in @outputs, or -1 in case of an error. + * + * Since: v3.0.0 + * */ int virAdmConnectGetLoggingOutputs(virAdmConnectPtr conn, @@ -1168,6 +1252,9 @@ virAdmConnectGetLoggingOutputs(virAdmConnectPtr conn, * * Returns the number of filters returned in @filters, or -1 in case of * an error. + * + * Since: v3.0.0 + * */ int virAdmConnectGetLoggingFilters(virAdmConnectPtr conn, @@ -1208,6 +1295,9 @@ virAdmConnectGetLoggingFilters(virAdmConnectPtr conn, * * Returns 0 if the new output or the set of outputs has been defined * successfully, or -1 in case of an error. + * + * Since: v3.0.0 + * */ int virAdmConnectSetLoggingOutputs(virAdmConnectPtr conn, @@ -1246,6 +1336,9 @@ virAdmConnectSetLoggingOutputs(virAdmConnectPtr conn, * * Returns 0 if the new filter or the set of filters has been defined * successfully, or -1 in case of an error. + * + * Since: v3.0.0 + * */ int virAdmConnectSetLoggingFilters(virAdmConnectPtr conn, -- 2.35.1

This commit finishes the script work and adds docstring to types that are not documented.
From this commit onwards, all exported typedefs are versioned. Further commits will enforce that it stays like that with new additions.
Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-domain-checkpoint.h | 16 ++- include/libvirt/libvirt-domain-snapshot.h | 16 ++- include/libvirt/libvirt-domain.h | 147 ++++++++++++++++++-- include/libvirt/libvirt-host.h | 20 ++- include/libvirt/libvirt-interface.h | 12 ++ include/libvirt/libvirt-network.h | 27 +++- include/libvirt/libvirt-nwfilter.h | 13 +- include/libvirt/libvirt-qemu.h | 6 + include/libvirt/libvirt-secret.h | 14 +- include/libvirt/libvirt-storage.h | 52 ++++++- include/libvirt/virterror.h | 7 + 11 files changed, 303 insertions(+), 27 deletions(-) diff --git a/include/libvirt/libvirt-domain-checkpoint.h b/include/libvirt/libvirt-domain-checkpoint.h index 1a1631b9cf..5a53717175 100644 --- a/include/libvirt/libvirt-domain-checkpoint.h +++ b/include/libvirt/libvirt-domain-checkpoint.h @@ -77,7 +77,12 @@ typedef enum { virDomainCheckpointPtr virDomainCheckpointCreateXML(virDomainPtr domain, const char *xmlDesc, unsigned int flags); - +/** + * virDomainCheckpointXMLFlags: + * + * Since: v5.6.0 + * + */ typedef enum { VIR_DOMAIN_CHECKPOINT_XML_SECURE = (1 << 0), /* Include sensitive data (Since: v5.6.0) */ VIR_DOMAIN_CHECKPOINT_XML_NO_DOMAIN = (1 << 1), /* Suppress <domain> @@ -139,7 +144,14 @@ virDomainCheckpointPtr virDomainCheckpointLookupByName(virDomainPtr domain, virDomainCheckpointPtr virDomainCheckpointGetParent(virDomainCheckpointPtr checkpoint, unsigned int flags); -/* Delete a checkpoint */ +/** + * virDomainCheckpointDeleteFlags: + * + * Delete a checkpoint + * + * Since: v5.6.0 + * + */ typedef enum { VIR_DOMAIN_CHECKPOINT_DELETE_CHILDREN = (1 << 0), /* Also delete children (Since: v5.6.0) */ VIR_DOMAIN_CHECKPOINT_DELETE_METADATA_ONLY = (1 << 1), /* Delete just metadata (Since: v5.6.0) */ diff --git a/include/libvirt/libvirt-domain-snapshot.h b/include/libvirt/libvirt-domain-snapshot.h index aa7bfa903a..9cbbcb5650 100644 --- a/include/libvirt/libvirt-domain-snapshot.h +++ b/include/libvirt/libvirt-domain-snapshot.h @@ -91,7 +91,12 @@ typedef enum { virDomainSnapshotPtr virDomainSnapshotCreateXML(virDomainPtr domain, const char *xmlDesc, unsigned int flags); - +/** + * virDomainSnapshotXMLFlags: + * + * Since: v5.1.0 + * + */ typedef enum { VIR_DOMAIN_SNAPSHOT_XML_SECURE = VIR_DOMAIN_XML_SECURE, /* dump security sensitive information too (Since: v5.1.0) */ } virDomainSnapshotXMLFlags; @@ -230,7 +235,14 @@ typedef enum { int virDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, unsigned int flags); -/* Delete a snapshot */ +/** + * virDomainSnapshotDeleteFlags: + * + * Delete a snapshot + * + * Since: v1.0.0 + * + */ typedef enum { VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN = (1 << 0), /* Also delete children (Since: v1.0.0) */ VIR_DOMAIN_SNAPSHOT_DELETE_METADATA_ONLY = (1 << 1), /* Delete just metadata (Since: v1.0.0) */ diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index 8d04a0b989..77c6e6f3a7 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -885,7 +885,7 @@ struct _virDomainMemoryStat { }; /** - * *virDomainMemoryStatPtr: + * virDomainMemoryStatPtr: * * Since: v1.0.0 * @@ -893,7 +893,14 @@ struct _virDomainMemoryStat { typedef virDomainMemoryStatStruct *virDomainMemoryStatPtr; -/* Domain core dump flags. */ +/** + * virDomainCoreDumpFlags: + * + * Domain core dump flags. + * + * Since: v1.0.0 + * + */ typedef enum { VIR_DUMP_CRASH = (1 << 0), /* crash after dump (Since: v1.0.0) */ VIR_DUMP_LIVE = (1 << 1), /* live dump (Since: v1.0.0) */ @@ -2032,7 +2039,12 @@ int virDomainSetMemoryStatsPeriod (virDomainPtr domain, int virDomainGetMaxVcpus (virDomainPtr domain); int virDomainGetSecurityLabel (virDomainPtr domain, virSecurityLabelPtr seclabel); - +/** + * virDomainGetHostnameFlags: + * + * Since: v6.1.0 + * + */ typedef enum { VIR_DOMAIN_GET_HOSTNAME_LEASE = (1 << 0), /* Parse DHCP lease file (Since: v6.1.0) */ VIR_DOMAIN_GET_HOSTNAME_AGENT = (1 << 1), /* Query qemu guest agent (Since: v6.1.0) */ @@ -2297,8 +2309,14 @@ int virDomainMemoryStats (virDomainPtr dom, unsigned int nr_stats, unsigned int flags); -/* Memory peeking flags. */ - +/** + * virDomainMemoryFlags: + * + * Memory peeking flags. + * + * Since: v1.0.0 + * + */ typedef enum { VIR_MEMORY_VIRTUAL = 1 << 0, /* addresses are virtual addresses (Since: v1.0.0) */ VIR_MEMORY_PHYSICAL = 1 << 1, /* addresses are physical addresses (Since: v1.0.0) */ @@ -2310,6 +2328,12 @@ int virDomainMemoryPeek (virDomainPtr dom, void *buffer, unsigned int flags); +/** + * virDomainDefineFlags: + * + * Since: v1.2.12 + * + */ typedef enum { VIR_DOMAIN_DEFINE_VALIDATE = (1 << 0), /* Validate the XML document against schema (Since: v1.2.12) */ } virDomainDefineFlags; @@ -2423,6 +2447,12 @@ typedef enum { # endif } virVcpuState; +/** + * virVcpuHostCpuState: + * + * Since: v6.10.0 + * + */ typedef enum { VIR_VCPU_INFO_CPU_OFFLINE = -1, /* the vCPU is offline (Since: v6.10.0) */ VIR_VCPU_INFO_CPU_UNAVAILABLE = -2, /* the hypervisor does not expose real CPU information (Since: v6.10.0) */ @@ -2443,7 +2473,7 @@ struct _virVcpuInfo { }; /** - * *virVcpuInfoPtr: + * virVcpuInfoPtr: * * Since: v1.0.0 * @@ -2513,6 +2543,14 @@ int virDomainGetEmulatorPinInfo (virDomainPtr domain, * */ typedef struct _virDomainIOThreadInfo virDomainIOThreadInfo; + + +/** + * virDomainIOThreadInfoPtr: + * + * Since: v1.2.14 + * + */ typedef virDomainIOThreadInfo *virDomainIOThreadInfoPtr; struct _virDomainIOThreadInfo { unsigned int iothread_id; /* IOThread ID */ @@ -2746,6 +2784,13 @@ int virDomainDetachDeviceAlias(virDomainPtr domain, * */ typedef struct _virDomainStatsRecord virDomainStatsRecord; + +/** + * virDomainStatsRecordPtr: + * + * Since: v1.2.8 + * + */ typedef virDomainStatsRecord *virDomainStatsRecordPtr; struct _virDomainStatsRecord { virDomainPtr dom; @@ -2772,6 +2817,12 @@ typedef enum { VIR_DOMAIN_STATS_DIRTYRATE = (1 << 9), /* return domain dirty rate info (Since: v7.2.0) */ } virDomainStatsTypes; +/** + * virConnectGetAllDomainStatsFlags: + * + * Since: v1.2.8 + * + */ typedef enum { VIR_CONNECT_GET_ALL_DOMAINS_STATS_ACTIVE = VIR_CONNECT_LIST_DOMAINS_ACTIVE, VIR_CONNECT_GET_ALL_DOMAINS_STATS_INACTIVE = VIR_CONNECT_LIST_DOMAINS_INACTIVE, @@ -3180,13 +3231,27 @@ typedef enum { int virDomainBlockJobAbort(virDomainPtr dom, const char *disk, unsigned int flags); -/* Flags for use with virDomainGetBlockJobInfo */ +/** + * virDomainBlockJobInfoFlags: + * + * Flags for use with virDomainGetBlockJobInfo + * + * Since: v1.2.9 + * + */ typedef enum { VIR_DOMAIN_BLOCK_JOB_INFO_BANDWIDTH_BYTES = 1 << 0, /* bandwidth in bytes/s instead of MiB/s (Since: v1.2.9) */ } virDomainBlockJobInfoFlags; -/* An iterator for monitoring block job operations */ +/** + * virDomainBlockJobCursor: + * + * An iterator for monitoring block job operations + * + * Since: v1.0.0 + * + */ typedef unsigned long long virDomainBlockJobCursor; /** @@ -3211,7 +3276,7 @@ struct _virDomainBlockJobInfo { }; /** - * *virDomainBlockJobInfoPtr: + * virDomainBlockJobInfoPtr: * * Since: v1.0.0 * @@ -3222,7 +3287,14 @@ int virDomainGetBlockJobInfo(virDomainPtr dom, const char *disk, virDomainBlockJobInfoPtr info, unsigned int flags); -/* Flags for use with virDomainBlockJobSetSpeed */ +/** + * virDomainBlockJobSetSpeedFlags: + * + * Flags for use with virDomainBlockJobSetSpeed + * + * Since: v1.2.9 + * + */ typedef enum { VIR_DOMAIN_BLOCK_JOB_SPEED_BANDWIDTH_BYTES = 1 << 0, /* bandwidth in bytes/s instead of MiB/s (Since: v1.2.9) */ @@ -3231,8 +3303,15 @@ typedef enum { int virDomainBlockJobSetSpeed(virDomainPtr dom, const char *disk, unsigned long bandwidth, unsigned int flags); -/* Flags for use with virDomainBlockPull (values chosen to be a subset - * of the flags for virDomainBlockRebase) */ +/** + * virDomainBlockPullFlags: + * + * Flags for use with virDomainBlockPull (values chosen to be a subset of the + * flags for virDomainBlockRebase) + * + * Since: v1.2.9 + * + */ typedef enum { VIR_DOMAIN_BLOCK_PULL_BANDWIDTH_BYTES = 1 << 6, /* bandwidth in bytes/s instead of MiB/s (Since: v1.2.9) */ @@ -3635,7 +3714,7 @@ typedef enum { typedef struct _virDomainDiskError virDomainDiskError; /** - * *virDomainDiskErrorPtr: + * virDomainDiskErrorPtr: * * Since: v1.0.0 * @@ -4177,7 +4256,7 @@ typedef enum { typedef struct _virDomainJobInfo virDomainJobInfo; /** - * *virDomainJobInfoPtr: + * virDomainJobInfoPtr: * * Since: v1.0.0 * @@ -6081,7 +6160,15 @@ int virDomainFSThaw(virDomainPtr dom, * */ typedef struct _virDomainFSInfo virDomainFSInfo; + +/** + * virDomainFSInfoPtr: + * + * Since: v1.2.11 + * + */ typedef virDomainFSInfo *virDomainFSInfoPtr; + struct _virDomainFSInfo { char *mountpoint; /* path to mount point */ char *name; /* device name in the guest (e.g. "sda1") */ @@ -6100,7 +6187,12 @@ int virDomainGetTime(virDomainPtr dom, long long *seconds, unsigned int *nseconds, unsigned int flags); - +/** + * virDomainSetTimeFlags: + * + * Since: v1.2.5 + * + */ typedef enum { VIR_DOMAIN_TIME_SYNC = (1 << 0), /* Re-sync domain time from domain's RTC (Since: v1.2.5) */ } virDomainSetTimeFlags; @@ -6319,6 +6411,13 @@ struct _virDomainInterfaceIPAddress { * */ typedef struct _virDomainInterface virDomainInterface; + +/** + * virDomainInterfacePtr: + * + * Since: v1.2.14 + * + */ typedef virDomainInterface *virDomainInterfacePtr; struct _virDomainInterface { char *name; /* interface name */ @@ -6334,6 +6433,12 @@ int virDomainInterfaceAddresses(virDomainPtr dom, void virDomainInterfaceFree(virDomainInterfacePtr iface); +/** + * virDomainSetUserPasswordFlags: + * + * Since: v1.2.16 + * + */ typedef enum { VIR_DOMAIN_PASSWORD_ENCRYPTED = 1 << 0, /* the password is already encrypted (Since: v1.2.16) */ } virDomainSetUserPasswordFlags; @@ -6554,6 +6659,12 @@ int virDomainAgentSetResponseTimeout(virDomainPtr domain, int timeout, unsigned int flags); +/** + * virDomainBackupBeginFlags: + * + * Since: v6.0.0 + * + */ typedef enum { VIR_DOMAIN_BACKUP_BEGIN_REUSE_EXTERNAL = (1 << 0), /* reuse separately provided images (Since: v6.0.0) */ @@ -6572,6 +6683,12 @@ int virDomainAuthorizedSSHKeysGet(virDomainPtr domain, char ***keys, unsigned int flags); +/** + * virDomainAuthorizedSSHKeysSetFlags: + * + * Since: v6.10.0 + * + */ typedef enum { VIR_DOMAIN_AUTHORIZED_SSH_KEYS_SET_APPEND = (1 << 0), /* don't truncate file, just append (Since: v6.10.0) */ VIR_DOMAIN_AUTHORIZED_SSH_KEYS_SET_REMOVE = (1 << 1), /* remove keys, instead of adding them (Since: v6.10.0) */ diff --git a/include/libvirt/libvirt-host.h b/include/libvirt/libvirt-host.h index d366cc903e..74d3583bd7 100644 --- a/include/libvirt/libvirt-host.h +++ b/include/libvirt/libvirt-host.h @@ -645,7 +645,12 @@ typedef enum { VIR_CONNECT_NO_ALIASES = (1 << 1), /* Don't try to resolve URI aliases (Since: v1.0.0) */ } virConnectFlags; - +/** + * virConnectCredentialType: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_CRED_USERNAME = 1, /* Identity to act as (Since: v1.0.0) */ VIR_CRED_AUTHNAME = 2, /* Identify to authorize as (Since: v1.0.0) */ @@ -724,6 +729,12 @@ struct _virConnectAuth { */ typedef struct _virConnectAuth virConnectAuth; +/** + * virConnectAuthPtr: + * + * Since: v1.0.0 + * + */ typedef virConnectAuth *virConnectAuthPtr; /* @@ -1049,7 +1060,12 @@ int virNodeGetFreePages(virConnectPtr conn, unsigned int cellcount, unsigned long long *counts, unsigned int flags); - +/** + * virNodeAllocPagesFlags: + * + * Since: v1.2.9 + * + */ typedef enum { VIR_NODE_ALLOC_PAGES_ADD = 0, /* Add @pageCounts to the pages pool. This can be used only to size up the pool. (Since: v1.2.9) */ diff --git a/include/libvirt/libvirt-interface.h b/include/libvirt/libvirt-interface.h index 22a90a6452..bf7e915432 100644 --- a/include/libvirt/libvirt-interface.h +++ b/include/libvirt/libvirt-interface.h @@ -84,10 +84,22 @@ virInterfacePtr virInterfaceLookupByMACString (virConnectPtr conn, const char* virInterfaceGetName (virInterfacePtr iface); const char* virInterfaceGetMACString (virInterfacePtr iface); +/** + * virInterfaceXMLFlags: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_INTERFACE_XML_INACTIVE = 1 << 0 /* dump inactive interface information (Since: v1.0.0) */ } virInterfaceXMLFlags; +/** + * virInterfaceDefineFlags: + * + * Since: v7.7.0 + * + */ typedef enum { VIR_INTERFACE_DEFINE_VALIDATE = 1 << 0, /* Validate the XML document against schema (Since: v7.7.0) */ } virInterfaceDefineFlags; diff --git a/include/libvirt/libvirt-network.h b/include/libvirt/libvirt-network.h index 0457771fb7..953a11e8f3 100644 --- a/include/libvirt/libvirt-network.h +++ b/include/libvirt/libvirt-network.h @@ -27,6 +27,12 @@ # error "Don't include this file directly, only use libvirt/libvirt.h" # endif +/** + * virNetworkXMLFlags: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_NETWORK_XML_INACTIVE = (1 << 0), /* dump inactive network information (Since: v1.0.0) */ } virNetworkXMLFlags; @@ -127,7 +133,12 @@ virNetworkPtr virNetworkLookupByUUID (virConnectPtr conn, const unsigned char *uuid); virNetworkPtr virNetworkLookupByUUIDString (virConnectPtr conn, const char *uuid); - +/** + * virNetworkCreateFlags: + * + * Since: v7.8.0 + * + */ typedef enum { VIR_NETWORK_CREATE_VALIDATE = 1 << 0, /* Validate the XML document against schema (Since: v7.8.0) */ } virNetworkCreateFlags; @@ -140,7 +151,12 @@ virNetworkPtr virNetworkCreateXML (virConnectPtr conn, virNetworkPtr virNetworkCreateXMLFlags(virConnectPtr conn, const char *xmlDesc, unsigned int flags); - +/** + * virNetworkDefineFlags: + * + * Since: v7.7.0 + * + */ typedef enum { VIR_NETWORK_DEFINE_VALIDATE = 1 << 0, /* Validate the XML document against schema (Since: v7.7.0) */ } virNetworkDefineFlags; @@ -362,6 +378,13 @@ typedef enum { * */ typedef struct _virNetworkDHCPLease virNetworkDHCPLease; + +/** + * virNetworkDHCPLeasePtr: + * + * Since: v1.2.6 + * + */ typedef virNetworkDHCPLease *virNetworkDHCPLeasePtr; struct _virNetworkDHCPLease { char *iface; /* Network interface name */ diff --git a/include/libvirt/libvirt-nwfilter.h b/include/libvirt/libvirt-nwfilter.h index 5c78ea9d8b..8497d85f48 100644 --- a/include/libvirt/libvirt-nwfilter.h +++ b/include/libvirt/libvirt-nwfilter.h @@ -91,7 +91,12 @@ virNWFilterPtr virNWFilterLookupByUUID (virConnectPtr conn, const unsigned char *uuid); virNWFilterPtr virNWFilterLookupByUUIDString (virConnectPtr conn, const char *uuid); - +/** + * virNWFilterDefineFlags: + * + * Since: v7.7.0 + * + */ typedef enum { VIR_NWFILTER_DEFINE_VALIDATE = 1 << 0, /* Validate the XML document against schema (Since: v7.7.0) */ } virNWFilterDefineFlags; @@ -120,6 +125,12 @@ int virNWFilterFree (virNWFilterPtr nwfilter); * NWFilter information */ +/** + * virNWFilterBindingCreateFlags: + * + * Since: v7.8.0 + * + */ typedef enum { VIR_NWFILTER_BINDING_CREATE_VALIDATE = 1 << 0, /* Validate the XML document against schema (Since: v7.8.0) */ } virNWFilterBindingCreateFlags; diff --git a/include/libvirt/libvirt-qemu.h b/include/libvirt/libvirt-qemu.h index b85e77f5b1..e4c74d72c6 100644 --- a/include/libvirt/libvirt-qemu.h +++ b/include/libvirt/libvirt-qemu.h @@ -30,6 +30,12 @@ extern "C" { # endif +/** + * virDomainQemuMonitorCommandFlags: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_DOMAIN_QEMU_MONITOR_COMMAND_DEFAULT = 0, VIR_DOMAIN_QEMU_MONITOR_COMMAND_HMP = (1 << 0), /* cmd is in HMP (Since: v1.0.0) */ diff --git a/include/libvirt/libvirt-secret.h b/include/libvirt/libvirt-secret.h index 1f0fc41c0c..a33cbc8779 100644 --- a/include/libvirt/libvirt-secret.h +++ b/include/libvirt/libvirt-secret.h @@ -38,6 +38,13 @@ * */ typedef struct _virSecret virSecret; + +/** + * virSecretPtr: + * + * Since: v1.0.0 + * + */ typedef virSecret *virSecretPtr; /** @@ -100,7 +107,12 @@ virSecretPtr virSecretLookupByUUIDString(virConnectPtr conn, virSecretPtr virSecretLookupByUsage(virConnectPtr conn, int usageType, const char *usageID); - +/** + * virSecretDefineFlags: + * + * Since: v7.7.0 + * + */ typedef enum { VIR_SECRET_DEFINE_VALIDATE = 1 << 0, /* Validate the XML document against schema (Since: v7.7.0) */ } virSecretDefineFlags; diff --git a/include/libvirt/libvirt-storage.h b/include/libvirt/libvirt-storage.h index 8f0352237c..3ce8ca92d6 100644 --- a/include/libvirt/libvirt-storage.h +++ b/include/libvirt/libvirt-storage.h @@ -68,6 +68,12 @@ typedef enum { # endif } virStoragePoolState; +/** + * virStoragePoolBuildFlags: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_STORAGE_POOL_BUILD_NEW = 0, /* Regular build from scratch (Since: v1.0.0) */ VIR_STORAGE_POOL_BUILD_REPAIR = (1 << 0), /* Repair / reinitialize (Since: v1.0.0) */ @@ -76,6 +82,12 @@ typedef enum { VIR_STORAGE_POOL_BUILD_OVERWRITE = (1 << 3), /* Overwrite data (Since: v1.0.0) */ } virStoragePoolBuildFlags; +/** + * virStoragePoolDeleteFlags: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_STORAGE_POOL_DELETE_NORMAL = 0, /* Delete metadata only (fast) (Since: v1.0.0) */ VIR_STORAGE_POOL_DELETE_ZEROED = 1 << 0, /* Clear all data to zeros (slow) (Since: v1.0.0) */ @@ -255,8 +267,21 @@ struct _virStorageVolInfo { unsigned long long allocation; /* Current allocation bytes */ }; + +/** + * virStorageVolInfoPtr: + * + * Since: v1.0.0 + * + */ typedef virStorageVolInfo *virStorageVolInfoPtr; +/** + * virStorageXMLFlags: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_STORAGE_XML_INACTIVE = (1 << 0), /* dump inactive pool/volume information (Since: v1.0.0) */ } virStorageXMLFlags; @@ -346,7 +371,12 @@ virStoragePoolPtr virStoragePoolLookupByUUIDString(virConnectPtr conn, virStoragePoolPtr virStoragePoolLookupByVolume (virStorageVolPtr vol); virStoragePoolPtr virStoragePoolLookupByTargetPath(virConnectPtr conn, const char *path); - +/** + * virStoragePoolDefineFlags: + * + * Since: v7.7.0 + * + */ typedef enum { VIR_STORAGE_POOL_DEFINE_VALIDATE = 1 << 0, /* Validate the XML document against schema (Since: v7.7.0) */ } virStoragePoolDefineFlags; @@ -438,7 +468,12 @@ virStorageVolPtr virStorageVolCreateXMLFrom (virStoragePoolPtr pool, const char *xmldesc, virStorageVolPtr clonevol, unsigned int flags); - +/** + * virStorageVolDownloadFlags: + * + * Since: v3.4.0 + * + */ typedef enum { VIR_STORAGE_VOL_DOWNLOAD_SPARSE_STREAM = 1 << 0, /* Use sparse stream (Since: v3.4.0) */ } virStorageVolDownloadFlags; @@ -448,6 +483,13 @@ int virStorageVolDownload (virStorageVolPtr vol, unsigned long long offset, unsigned long long length, unsigned int flags); + +/** + * virStorageVolUploadFlags: + * + * Since: v3.4.0 + * + */ typedef enum { VIR_STORAGE_VOL_UPLOAD_SPARSE_STREAM = 1 << 0, /* Use sparse stream (Since: v3.4.0) */ } virStorageVolUploadFlags; @@ -477,6 +519,12 @@ char * virStorageVolGetXMLDesc (virStorageVolPtr pool, char * virStorageVolGetPath (virStorageVolPtr vol); +/** + * virStorageVolResizeFlags: + * + * Since: v1.0.0 + * + */ typedef enum { VIR_STORAGE_VOL_RESIZE_ALLOCATE = 1 << 0, /* force allocation of new size (Since: v1.0.0) */ VIR_STORAGE_VOL_RESIZE_DELTA = 1 << 1, /* size is relative to current (Since: v1.0.0) */ diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h index 76b20e410c..aa47d59ba1 100644 --- a/include/libvirt/virterror.h +++ b/include/libvirt/virterror.h @@ -164,6 +164,13 @@ typedef enum { */ typedef struct _virError virError; + +/** + * virErrorPtr: + * + * Since: v1.0.0 + * + */ typedef virError *virErrorPtr; struct _virError { int code; /* The error code, a virErrorNumber */ -- 2.35.1

This commit finishes the script work and adds docstring to types that are not documented.
From this commit onwards, all exported functions are versioned. Further commits will enforce that it stays like that with new additions.
Signed-off-by: Victor Toso <victortoso@redhat.com> --- src/libvirt-domain.c | 3 +++ src/libvirt-network.c | 12 ++++++++++++ src/libvirt-nwfilter.c | 9 +++++++++ src/libvirt-storage.c | 3 +++ 4 files changed, 27 insertions(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index b9c0a65cfa..76b4b7e67d 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -409,6 +409,9 @@ virDomainLookupByUUID(virConnectPtr conn, const unsigned char *uuid) * * Returns a new domain object or NULL in case of failure. If the * domain cannot be found, then VIR_ERR_NO_DOMAIN error is raised. + * + * Since: v1.0.0 + * */ virDomainPtr virDomainLookupByUUIDString(virConnectPtr conn, const char *uuidstr) diff --git a/src/libvirt-network.c b/src/libvirt-network.c index eae005e91f..e03f1f0910 100644 --- a/src/libvirt-network.c +++ b/src/libvirt-network.c @@ -470,6 +470,9 @@ virNetworkCreateXML(virConnectPtr conn, const char *xmlDesc) * network object is no longer needed. * * Returns a new network object or NULL in case of failure + * + * Since: v7.8.0 + * */ virNetworkPtr virNetworkCreateXMLFlags(virConnectPtr conn, const char *xmlDesc, unsigned int flags) @@ -554,6 +557,9 @@ virNetworkDefineXML(virConnectPtr conn, const char *xml) * network object is no longer needed. * * Returns NULL in case of error, a pointer to the network otherwise + * + * Since: v7.7.0 + * */ virNetworkPtr virNetworkDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags) @@ -640,6 +646,9 @@ virNetworkUndefine(virNetworkPtr network) * running state, its persistent configuration, or both. * * Returns 0 in case of success, -1 in case of error + * + * Since: v1.0.0 + * */ int virNetworkUpdate(virNetworkPtr network, @@ -1776,6 +1785,9 @@ virNetworkPortGetUUID(virNetworkPortPtr port, * UUID see RFC4122. * * Returns -1 in case of error, 0 in case of success + * + * Since: v5.5.0 + * */ int virNetworkPortGetUUIDString(virNetworkPortPtr port, diff --git a/src/libvirt-nwfilter.c b/src/libvirt-nwfilter.c index 1204d2fdbe..17eed96c0a 100644 --- a/src/libvirt-nwfilter.c +++ b/src/libvirt-nwfilter.c @@ -455,6 +455,9 @@ virNWFilterDefineXML(virConnectPtr conn, const char *xmlDesc) * nwfilter object is no longer needed. * * Returns a new nwfilter object or NULL in case of failure + * + * Since: v7.7.0 + * */ virNWFilterPtr virNWFilterDefineXMLFlags(virConnectPtr conn, const char *xmlDesc, unsigned int flags) @@ -616,6 +619,9 @@ virNWFilterRef(virNWFilterPtr nwfilter) * have an extra allocated element set to NULL but not included in the return count, * to make iteration easier. The caller is responsible for calling * virNWFilterFree() on each array element, then calling free() on @filters. + * + * Since: v4.5.0 + * */ int virConnectListAllNWFilterBindings(virConnectPtr conn, @@ -875,6 +881,9 @@ virNWFilterBindingDelete(virNWFilterBindingPtr binding) * * Returns a 0 terminated UTF-8 encoded XML instance, or NULL in case * of error. The caller must free() the returned value. + * + * Since: v4.5.0 + * */ char * virNWFilterBindingGetXMLDesc(virNWFilterBindingPtr binding, unsigned int flags) diff --git a/src/libvirt-storage.c b/src/libvirt-storage.c index 33b7ff8c39..bf819d9268 100644 --- a/src/libvirt-storage.c +++ b/src/libvirt-storage.c @@ -466,6 +466,9 @@ virStoragePoolLookupByUUID(virConnectPtr conn, * storage pool object is no longer needed. * * Returns a virStoragePoolPtr object, or NULL if no matching pool is found + * + * Since: v1.0.0 + * */ virStoragePoolPtr virStoragePoolLookupByUUIDString(virConnectPtr conn, -- 2.35.1

This commit finishes the script work and adds docstring to types that are not documented.
From this commit onwards, all exported typedefs are versioned. Further commits will enforce that it stays like that with new additions.
Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-admin.h | 2 +- include/libvirt/libvirt-domain.h | 310 +++++++++++++++------------- include/libvirt/libvirt-event.h | 8 +- include/libvirt/libvirt-host.h | 22 +- include/libvirt/libvirt-interface.h | 4 +- include/libvirt/libvirt-network.h | 38 ++-- include/libvirt/libvirt-nodedev.h | 12 +- include/libvirt/libvirt-qemu.h | 12 +- include/libvirt/libvirt-secret.h | 26 ++- include/libvirt/libvirt-storage.h | 24 ++- include/libvirt/libvirt-stream.h | 12 +- include/libvirt/virterror.h | 12 +- 12 files changed, 253 insertions(+), 229 deletions(-) diff --git a/include/libvirt/libvirt-admin.h b/include/libvirt/libvirt-admin.h index f2cb528524..5945fc172c 100644 --- a/include/libvirt/libvirt-admin.h +++ b/include/libvirt/libvirt-admin.h @@ -255,7 +255,7 @@ typedef enum { VIR_CLIENT_TRANS_TLS, /* connection via encrypted TCP socket (Since: v1.3.5) */ # ifdef VIR_ENUM_SENTINELS - VIR_CLIENT_TRANS_LAST + VIR_CLIENT_TRANS_LAST /* (Since: v1.3.5) */ # endif } virClientTransport; diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index 77c6e6f3a7..9163c9dcab 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -74,6 +74,8 @@ typedef enum { * NB: this enum value will increase over time as new states are * added to the libvirt API. It reflects the last state supported * by this version of the libvirt API. + * + * Since: v1.0.0 */ # endif } virDomainState; @@ -85,10 +87,10 @@ typedef enum { * */ typedef enum { - VIR_DOMAIN_NOSTATE_UNKNOWN = 0, + VIR_DOMAIN_NOSTATE_UNKNOWN = 0, /* (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_NOSTATE_LAST + VIR_DOMAIN_NOSTATE_LAST /* (Since: v1.0.0) */ # endif } virDomainNostateReason; @@ -99,7 +101,7 @@ typedef enum { * */ typedef enum { - VIR_DOMAIN_RUNNING_UNKNOWN = 0, + VIR_DOMAIN_RUNNING_UNKNOWN = 0, /* (Since: v1.0.0) */ VIR_DOMAIN_RUNNING_BOOTED = 1, /* normal startup from boot (Since: v1.0.0) */ VIR_DOMAIN_RUNNING_MIGRATED = 2, /* migrated from another host (Since: v1.0.0) */ VIR_DOMAIN_RUNNING_RESTORED = 3, /* restored from a state file (Since: v1.0.0) */ @@ -113,7 +115,7 @@ typedef enum { VIR_DOMAIN_RUNNING_POSTCOPY = 10, /* running in post-copy migration mode (Since: v1.3.3) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_RUNNING_LAST + VIR_DOMAIN_RUNNING_LAST /* (Since: v1.0.0) */ # endif } virDomainRunningReason; @@ -127,7 +129,7 @@ typedef enum { VIR_DOMAIN_BLOCKED_UNKNOWN = 0, /* the reason is unknown (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_BLOCKED_LAST + VIR_DOMAIN_BLOCKED_LAST /* (Since: v1.0.0) */ # endif } virDomainBlockedReason; @@ -154,7 +156,7 @@ typedef enum { VIR_DOMAIN_PAUSED_POSTCOPY_FAILED = 13, /* paused after failed post-copy (Since: v1.3.3) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_PAUSED_LAST + VIR_DOMAIN_PAUSED_LAST /* (Since: v1.0.0) */ # endif } virDomainPausedReason; @@ -169,7 +171,7 @@ typedef enum { VIR_DOMAIN_SHUTDOWN_USER = 1, /* shutting down on user request (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_SHUTDOWN_LAST + VIR_DOMAIN_SHUTDOWN_LAST /* (Since: v1.0.0) */ # endif } virDomainShutdownReason; @@ -192,7 +194,7 @@ typedef enum { VIR_DOMAIN_SHUTOFF_DAEMON = 8, /* daemon decides to kill domain during reconnection processing (Since: v4.10.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_SHUTOFF_LAST + VIR_DOMAIN_SHUTOFF_LAST /* (Since: v1.0.0) */ # endif } virDomainShutoffReason; @@ -207,7 +209,7 @@ typedef enum { VIR_DOMAIN_CRASHED_PANICKED = 1, /* domain panicked (Since: v1.1.1) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_CRASHED_LAST + VIR_DOMAIN_CRASHED_LAST /* (Since: v1.0.0) */ # endif } virDomainCrashedReason; @@ -218,10 +220,10 @@ typedef enum { * */ typedef enum { - VIR_DOMAIN_PMSUSPENDED_UNKNOWN = 0, + VIR_DOMAIN_PMSUSPENDED_UNKNOWN = 0, /* (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_PMSUSPENDED_LAST + VIR_DOMAIN_PMSUSPENDED_LAST /* (Since: v1.0.0) */ # endif } virDomainPMSuspendedReason; @@ -232,10 +234,10 @@ typedef enum { * */ typedef enum { - VIR_DOMAIN_PMSUSPENDED_DISK_UNKNOWN = 0, + VIR_DOMAIN_PMSUSPENDED_DISK_UNKNOWN = 0, /* (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_PMSUSPENDED_DISK_LAST + VIR_DOMAIN_PMSUSPENDED_DISK_LAST /* (Since: v1.0.0) */ # endif } virDomainPMSuspendedDiskReason; @@ -258,7 +260,7 @@ typedef enum { in the details field (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_CONTROL_LAST + VIR_DOMAIN_CONTROL_LAST /* (Since: v1.0.0) */ # endif } virDomainControlState; @@ -281,7 +283,7 @@ typedef enum { internal failure in libvirt (Since: v1.2.14) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_CONTROL_ERROR_REASON_LAST + VIR_DOMAIN_CONTROL_ERROR_REASON_LAST /* (Since: v1.2.14) */ # endif } virDomainControlErrorReason; @@ -775,6 +777,10 @@ typedef enum { * */ VIR_DOMAIN_MEMORY_STAT_MAJOR_FAULT = 2, + + /* + * Since: v1.0.0 + */ VIR_DOMAIN_MEMORY_STAT_MINOR_FAULT = 3, /* @@ -867,7 +873,7 @@ typedef enum { VIR_DOMAIN_MEMORY_STAT_NR = 13, # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_MEMORY_STAT_LAST = VIR_DOMAIN_MEMORY_STAT_NR + VIR_DOMAIN_MEMORY_STAT_LAST = VIR_DOMAIN_MEMORY_STAT_NR /* (Since: v1.0.0) */ # endif } virDomainMemoryStatTags; @@ -932,6 +938,8 @@ typedef enum { * NB: this enum value will increase over time as new formats are * added to the libvirt API. It reflects the last format supported * by this version of the libvirt API. + * + * Since: v1.2.3 */ # endif } virDomainCoreDumpFormat; @@ -1976,10 +1984,10 @@ typedef enum { * */ typedef enum { - VIR_DOMAIN_NUMATUNE_MEM_STRICT = 0, - VIR_DOMAIN_NUMATUNE_MEM_PREFERRED = 1, - VIR_DOMAIN_NUMATUNE_MEM_INTERLEAVE = 2, - VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE = 3, + VIR_DOMAIN_NUMATUNE_MEM_STRICT = 0, /* (Since: v1.0.0) */ + VIR_DOMAIN_NUMATUNE_MEM_PREFERRED = 1, /* (Since: v1.0.0) */ + VIR_DOMAIN_NUMATUNE_MEM_INTERLEAVE = 2, /* (Since: v1.0.0) */ + VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE = 3, /* (Since: v7.3.0) */ # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_NUMATUNE_MEM_LAST /* This constant is subject to change (Since: v1.0.0) */ @@ -2067,7 +2075,7 @@ typedef enum { VIR_DOMAIN_METADATA_ELEMENT = 2, /* Operate on <metadata> (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_METADATA_LAST + VIR_DOMAIN_METADATA_LAST /* (Since: v1.0.0) */ # endif } virDomainMetadataType; @@ -2388,28 +2396,28 @@ int virConnectListDefinedDomains (virConnectPtr conn, * Since: v1.0.0 */ typedef enum { - VIR_CONNECT_LIST_DOMAINS_ACTIVE = 1 << 0, - VIR_CONNECT_LIST_DOMAINS_INACTIVE = 1 << 1, + VIR_CONNECT_LIST_DOMAINS_ACTIVE = 1 << 0, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_DOMAINS_INACTIVE = 1 << 1, /* (Since: v1.0.0) */ - VIR_CONNECT_LIST_DOMAINS_PERSISTENT = 1 << 2, - VIR_CONNECT_LIST_DOMAINS_TRANSIENT = 1 << 3, + VIR_CONNECT_LIST_DOMAINS_PERSISTENT = 1 << 2, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_DOMAINS_TRANSIENT = 1 << 3, /* (Since: v1.0.0) */ - VIR_CONNECT_LIST_DOMAINS_RUNNING = 1 << 4, - VIR_CONNECT_LIST_DOMAINS_PAUSED = 1 << 5, - VIR_CONNECT_LIST_DOMAINS_SHUTOFF = 1 << 6, - VIR_CONNECT_LIST_DOMAINS_OTHER = 1 << 7, + VIR_CONNECT_LIST_DOMAINS_RUNNING = 1 << 4, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_DOMAINS_PAUSED = 1 << 5, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_DOMAINS_SHUTOFF = 1 << 6, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_DOMAINS_OTHER = 1 << 7, /* (Since: v1.0.0) */ - VIR_CONNECT_LIST_DOMAINS_MANAGEDSAVE = 1 << 8, - VIR_CONNECT_LIST_DOMAINS_NO_MANAGEDSAVE = 1 << 9, + VIR_CONNECT_LIST_DOMAINS_MANAGEDSAVE = 1 << 8, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_DOMAINS_NO_MANAGEDSAVE = 1 << 9, /* (Since: v1.0.0) */ - VIR_CONNECT_LIST_DOMAINS_AUTOSTART = 1 << 10, - VIR_CONNECT_LIST_DOMAINS_NO_AUTOSTART = 1 << 11, + VIR_CONNECT_LIST_DOMAINS_AUTOSTART = 1 << 10, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_DOMAINS_NO_AUTOSTART = 1 << 11, /* (Since: v1.0.0) */ - VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOT = 1 << 12, - VIR_CONNECT_LIST_DOMAINS_NO_SNAPSHOT = 1 << 13, + VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOT = 1 << 12, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_DOMAINS_NO_SNAPSHOT = 1 << 13, /* (Since: v1.0.0) */ - VIR_CONNECT_LIST_DOMAINS_HAS_CHECKPOINT = 1 << 14, - VIR_CONNECT_LIST_DOMAINS_NO_CHECKPOINT = 1 << 15, + VIR_CONNECT_LIST_DOMAINS_HAS_CHECKPOINT = 1 << 14, /* (Since: v5.6.0) */ + VIR_CONNECT_LIST_DOMAINS_NO_CHECKPOINT = 1 << 15, /* (Since: v5.6.0) */ } virConnectListAllDomainsFlags; int virConnectListAllDomains (virConnectPtr conn, @@ -2443,7 +2451,7 @@ typedef enum { VIR_VCPU_BLOCKED = 2, /* the virtual CPU is blocked on resource (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_VCPU_LAST + VIR_VCPU_LAST /* (Since: v1.0.0) */ # endif } virVcpuState; @@ -2824,16 +2832,16 @@ typedef enum { * */ typedef enum { - VIR_CONNECT_GET_ALL_DOMAINS_STATS_ACTIVE = VIR_CONNECT_LIST_DOMAINS_ACTIVE, - VIR_CONNECT_GET_ALL_DOMAINS_STATS_INACTIVE = VIR_CONNECT_LIST_DOMAINS_INACTIVE, + VIR_CONNECT_GET_ALL_DOMAINS_STATS_ACTIVE = VIR_CONNECT_LIST_DOMAINS_ACTIVE, /* (Since: v1.2.8) */ + VIR_CONNECT_GET_ALL_DOMAINS_STATS_INACTIVE = VIR_CONNECT_LIST_DOMAINS_INACTIVE, /* (Since: v1.2.8) */ - VIR_CONNECT_GET_ALL_DOMAINS_STATS_PERSISTENT = VIR_CONNECT_LIST_DOMAINS_PERSISTENT, - VIR_CONNECT_GET_ALL_DOMAINS_STATS_TRANSIENT = VIR_CONNECT_LIST_DOMAINS_TRANSIENT, + VIR_CONNECT_GET_ALL_DOMAINS_STATS_PERSISTENT = VIR_CONNECT_LIST_DOMAINS_PERSISTENT, /* (Since: v1.2.8) */ + VIR_CONNECT_GET_ALL_DOMAINS_STATS_TRANSIENT = VIR_CONNECT_LIST_DOMAINS_TRANSIENT, /* (Since: v1.2.8) */ - VIR_CONNECT_GET_ALL_DOMAINS_STATS_RUNNING = VIR_CONNECT_LIST_DOMAINS_RUNNING, - VIR_CONNECT_GET_ALL_DOMAINS_STATS_PAUSED = VIR_CONNECT_LIST_DOMAINS_PAUSED, - VIR_CONNECT_GET_ALL_DOMAINS_STATS_SHUTOFF = VIR_CONNECT_LIST_DOMAINS_SHUTOFF, - VIR_CONNECT_GET_ALL_DOMAINS_STATS_OTHER = VIR_CONNECT_LIST_DOMAINS_OTHER, + VIR_CONNECT_GET_ALL_DOMAINS_STATS_RUNNING = VIR_CONNECT_LIST_DOMAINS_RUNNING, /* (Since: v1.2.8) */ + VIR_CONNECT_GET_ALL_DOMAINS_STATS_PAUSED = VIR_CONNECT_LIST_DOMAINS_PAUSED, /* (Since: v1.2.8) */ + VIR_CONNECT_GET_ALL_DOMAINS_STATS_SHUTOFF = VIR_CONNECT_LIST_DOMAINS_SHUTOFF, /* (Since: v1.2.8) */ + VIR_CONNECT_GET_ALL_DOMAINS_STATS_OTHER = VIR_CONNECT_LIST_DOMAINS_OTHER, /* (Since: v1.2.8) */ VIR_CONNECT_GET_ALL_DOMAINS_STATS_NOWAIT = 1 << 29, /* report statistics that can be obtained immediately without any blocking (Since: v4.5.0) */ @@ -3209,7 +3217,7 @@ typedef enum { VIR_DOMAIN_BLOCK_JOB_TYPE_BACKUP = 5, # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_BLOCK_JOB_TYPE_LAST + VIR_DOMAIN_BLOCK_JOB_TYPE_LAST /* (Since: v1.0.0) */ # endif } virDomainBlockJobType; @@ -3224,8 +3232,8 @@ typedef enum { * */ typedef enum { - VIR_DOMAIN_BLOCK_JOB_ABORT_ASYNC = 1 << 0, - VIR_DOMAIN_BLOCK_JOB_ABORT_PIVOT = 1 << 1, + VIR_DOMAIN_BLOCK_JOB_ABORT_ASYNC = 1 << 0, /* (Since: v1.0.0) */ + VIR_DOMAIN_BLOCK_JOB_ABORT_PIVOT = 1 << 1, /* (Since: v1.0.0) */ } virDomainBlockJobAbortFlags; int virDomainBlockJobAbort(virDomainPtr dom, const char *disk, @@ -3701,7 +3709,7 @@ typedef enum { VIR_DOMAIN_DISK_ERROR_NO_SPACE = 2, /* no space left on the device (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_DISK_ERROR_LAST + VIR_DOMAIN_DISK_ERROR_LAST /* (Since: v1.0.0) */ # endif } virDomainDiskErrorCode; @@ -3742,16 +3750,16 @@ int virDomainGetDiskErrors(virDomainPtr dom, * */ typedef enum { - VIR_KEYCODE_SET_LINUX = 0, - VIR_KEYCODE_SET_XT = 1, - VIR_KEYCODE_SET_ATSET1 = 2, - VIR_KEYCODE_SET_ATSET2 = 3, - VIR_KEYCODE_SET_ATSET3 = 4, - VIR_KEYCODE_SET_OSX = 5, - VIR_KEYCODE_SET_XT_KBD = 6, - VIR_KEYCODE_SET_USB = 7, - VIR_KEYCODE_SET_WIN32 = 8, - VIR_KEYCODE_SET_QNUM = 9, + VIR_KEYCODE_SET_LINUX = 0, /* (Since: v1.0.0) */ + VIR_KEYCODE_SET_XT = 1, /* (Since: v1.0.0) */ + VIR_KEYCODE_SET_ATSET1 = 2, /* (Since: v1.0.0) */ + VIR_KEYCODE_SET_ATSET2 = 3, /* (Since: v1.0.0) */ + VIR_KEYCODE_SET_ATSET3 = 4, /* (Since: v1.0.0) */ + VIR_KEYCODE_SET_OSX = 5, /* (Since: v1.0.0) */ + VIR_KEYCODE_SET_XT_KBD = 6, /* (Since: v1.0.0) */ + VIR_KEYCODE_SET_USB = 7, /* (Since: v1.0.0) */ + VIR_KEYCODE_SET_WIN32 = 8, /* (Since: v1.0.0) */ + VIR_KEYCODE_SET_QNUM = 9, /* (Since: v4.2.0) */ # ifdef VIR_ENUM_SENTINELS VIR_KEYCODE_SET_LAST @@ -3759,6 +3767,8 @@ typedef enum { * NB: this enum value will increase over time as new keycode sets are * added to the libvirt API. It reflects the last keycode set supported * by this version of the libvirt API. + * + * Since: v1.0.0 */ # endif } virKeycodeSet; @@ -3842,9 +3852,9 @@ typedef enum { VIR_DOMAIN_PROCESS_SIGNAL_PWR = 30, /* Not in POSIX (SIGPWR on Linux) (Since: v1.0.1) */ VIR_DOMAIN_PROCESS_SIGNAL_SYS = 31, /* SIGSYS (also known as SIGUNUSED on Linux) (Since: v1.0.1) */ VIR_DOMAIN_PROCESS_SIGNAL_RT0 = 32, /* SIGRTMIN (Since: v1.0.1) */ - VIR_DOMAIN_PROCESS_SIGNAL_RT1 = 33, /* SIGRTMIN + 1 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT2 = 34, /* SIGRTMIN + 2 */ - VIR_DOMAIN_PROCESS_SIGNAL_RT3 = 35, /* SIGRTMIN + 3 */ + VIR_DOMAIN_PROCESS_SIGNAL_RT1 = 33, /* SIGRTMIN + 1 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT2 = 34, /* SIGRTMIN + 2 (Since: v1.0.1) */ + VIR_DOMAIN_PROCESS_SIGNAL_RT3 = 35, /* SIGRTMIN + 3 (Since: v1.0.1) */ VIR_DOMAIN_PROCESS_SIGNAL_RT4 = 36, /* SIGRTMIN + 4 (Since: v1.0.1) */ VIR_DOMAIN_PROCESS_SIGNAL_RT5 = 37, /* SIGRTMIN + 5 (Since: v1.0.1) */ VIR_DOMAIN_PROCESS_SIGNAL_RT6 = 38, /* SIGRTMIN + 6 (Since: v1.0.1) */ @@ -3879,7 +3889,7 @@ typedef enum { VIR_DOMAIN_PROCESS_SIGNAL_RT32 = 64, /* SIGRTMIN + 32 / SIGRTMAX (Since: v1.0.1) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_PROCESS_SIGNAL_LAST + VIR_DOMAIN_PROCESS_SIGNAL_LAST /* (Since: v1.0.0) */ # endif } virDomainProcessSignal; @@ -3909,18 +3919,18 @@ virDomainPtr virDomainCreateLinux (virConnectPtr conn, * */ typedef enum { - VIR_DOMAIN_EVENT_DEFINED = 0, - VIR_DOMAIN_EVENT_UNDEFINED = 1, - VIR_DOMAIN_EVENT_STARTED = 2, - VIR_DOMAIN_EVENT_SUSPENDED = 3, - VIR_DOMAIN_EVENT_RESUMED = 4, - VIR_DOMAIN_EVENT_STOPPED = 5, - VIR_DOMAIN_EVENT_SHUTDOWN = 6, - VIR_DOMAIN_EVENT_PMSUSPENDED = 7, - VIR_DOMAIN_EVENT_CRASHED = 8, + VIR_DOMAIN_EVENT_DEFINED = 0, /* (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_UNDEFINED = 1, /* (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_STARTED = 2, /* (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_SUSPENDED = 3, /* (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_RESUMED = 4, /* (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_STOPPED = 5, /* (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_SHUTDOWN = 6, /* (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_PMSUSPENDED = 7, /* (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_CRASHED = 8, /* (Since: v1.1.1) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_EVENT_LAST + VIR_DOMAIN_EVENT_LAST /* (Since: v1.0.0) */ # endif } virDomainEventType; @@ -3939,7 +3949,7 @@ typedef enum { VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT = 3, /* Config was restored from a snapshot (Since: v1.3.3) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_EVENT_DEFINED_LAST + VIR_DOMAIN_EVENT_DEFINED_LAST /* (Since: v1.0.0) */ # endif } virDomainEventDefinedDetailType; @@ -3956,7 +3966,7 @@ typedef enum { VIR_DOMAIN_EVENT_UNDEFINED_RENAMED = 1, /* Domain was renamed (Since: v1.2.19) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_EVENT_UNDEFINED_LAST + VIR_DOMAIN_EVENT_UNDEFINED_LAST /* (Since: v1.0.0) */ # endif } virDomainEventUndefinedDetailType; @@ -3976,7 +3986,7 @@ typedef enum { VIR_DOMAIN_EVENT_STARTED_WAKEUP = 4, /* Started due to wakeup event (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_EVENT_STARTED_LAST + VIR_DOMAIN_EVENT_STARTED_LAST /* (Since: v1.0.0) */ # endif } virDomainEventStartedDetailType; @@ -4000,7 +4010,7 @@ typedef enum { VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY_FAILED = 8, /* suspended after failed post-copy (Since: v1.3.3) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_EVENT_SUSPENDED_LAST + VIR_DOMAIN_EVENT_SUSPENDED_LAST /* (Since: v1.0.0) */ # endif } virDomainEventSuspendedDetailType; @@ -4020,7 +4030,7 @@ typedef enum { running in post-copy mode (Since: v1.3.3) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_EVENT_RESUMED_LAST + VIR_DOMAIN_EVENT_RESUMED_LAST /* (Since: v1.0.0) */ # endif } virDomainEventResumedDetailType; @@ -4042,7 +4052,7 @@ typedef enum { VIR_DOMAIN_EVENT_STOPPED_FROM_SNAPSHOT = 6, /* offline snapshot loaded (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_EVENT_STOPPED_LAST + VIR_DOMAIN_EVENT_STOPPED_LAST /* (Since: v1.0.0) */ # endif } virDomainEventStoppedDetailType; @@ -4071,7 +4081,7 @@ typedef enum { VIR_DOMAIN_EVENT_SHUTDOWN_HOST = 2, # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_EVENT_SHUTDOWN_LAST + VIR_DOMAIN_EVENT_SHUTDOWN_LAST /* (Since: v1.0.0) */ # endif } virDomainEventShutdownDetailType; @@ -4088,7 +4098,7 @@ typedef enum { VIR_DOMAIN_EVENT_PMSUSPENDED_DISK = 1, /* Guest was PM suspended to disk (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_EVENT_PMSUSPENDED_LAST + VIR_DOMAIN_EVENT_PMSUSPENDED_LAST /* (Since: v1.0.0) */ # endif } virDomainEventPMSuspendedDetailType; @@ -4105,7 +4115,7 @@ typedef enum { VIR_DOMAIN_EVENT_CRASHED_CRASHLOADED = 1, /* Guest was crashloaded (Since: v6.1.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_EVENT_CRASHED_LAST + VIR_DOMAIN_EVENT_CRASHED_LAST /* (Since: v1.1.1) */ # endif } virDomainEventCrashedDetailType; @@ -4125,7 +4135,7 @@ typedef enum { VIR_DOMAIN_EVENT_MEMORY_FAILURE_RECIPIENT_GUEST = 1, # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_EVENT_MEMORY_FAILURE_RECIPIENT_LAST + VIR_DOMAIN_EVENT_MEMORY_FAILURE_RECIPIENT_LAST /* (Since: v6.9.0) */ # endif } virDomainMemoryFailureRecipientType; @@ -4169,7 +4179,7 @@ typedef enum { VIR_DOMAIN_EVENT_MEMORY_FAILURE_ACTION_RESET = 3, # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_EVENT_MEMORY_FAILURE_ACTION_LAST + VIR_DOMAIN_EVENT_MEMORY_FAILURE_ACTION_LAST /* (Since: v6.9.0) */ # endif } virDomainMemoryFailureActionType; @@ -4243,7 +4253,7 @@ typedef enum { VIR_DOMAIN_JOB_CANCELLED = 5, /* Job was aborted, but isn't cleaned up (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_JOB_LAST + VIR_DOMAIN_JOB_LAST /* (Since: v1.0.0) */ # endif } virDomainJobType; @@ -4328,19 +4338,19 @@ int virDomainAbortJob(virDomainPtr dom); * */ typedef enum { - VIR_DOMAIN_JOB_OPERATION_UNKNOWN = 0, - VIR_DOMAIN_JOB_OPERATION_START = 1, - VIR_DOMAIN_JOB_OPERATION_SAVE = 2, - VIR_DOMAIN_JOB_OPERATION_RESTORE = 3, - VIR_DOMAIN_JOB_OPERATION_MIGRATION_IN = 4, - VIR_DOMAIN_JOB_OPERATION_MIGRATION_OUT = 5, - VIR_DOMAIN_JOB_OPERATION_SNAPSHOT = 6, /* Since: v3.3.0 */ - VIR_DOMAIN_JOB_OPERATION_SNAPSHOT_REVERT = 7, - VIR_DOMAIN_JOB_OPERATION_DUMP = 8, - VIR_DOMAIN_JOB_OPERATION_BACKUP = 9, + VIR_DOMAIN_JOB_OPERATION_UNKNOWN = 0, /* (Since: v3.3.0) */ + VIR_DOMAIN_JOB_OPERATION_START = 1, /* (Since: v3.3.0) */ + VIR_DOMAIN_JOB_OPERATION_SAVE = 2, /* (Since: v3.3.0) */ + VIR_DOMAIN_JOB_OPERATION_RESTORE = 3, /* (Since: v3.3.0) */ + VIR_DOMAIN_JOB_OPERATION_MIGRATION_IN = 4, /* (Since: v3.3.0) */ + VIR_DOMAIN_JOB_OPERATION_MIGRATION_OUT = 5, /* (Since: v3.3.0) */ + VIR_DOMAIN_JOB_OPERATION_SNAPSHOT = 6, /* (Since: v3.3.0) */ + VIR_DOMAIN_JOB_OPERATION_SNAPSHOT_REVERT = 7, /* (Since: v3.3.0) */ + VIR_DOMAIN_JOB_OPERATION_DUMP = 8, /* (Since: v3.3.0) */ + VIR_DOMAIN_JOB_OPERATION_BACKUP = 9, /* (Since: v6.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_JOB_OPERATION_LAST + VIR_DOMAIN_JOB_OPERATION_LAST /* (Since: v3.3.0) */ # endif } virDomainJobOperation; @@ -4838,7 +4848,7 @@ typedef enum { VIR_DOMAIN_EVENT_WATCHDOG_INJECTNMI,/* Inject a non-maskable interrupt into guest (Since: v1.2.17) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_EVENT_WATCHDOG_LAST + VIR_DOMAIN_EVENT_WATCHDOG_LAST /* (Since: v1.0.0) */ # endif } virDomainEventWatchdogAction; @@ -4875,7 +4885,7 @@ typedef enum { VIR_DOMAIN_EVENT_IO_ERROR_REPORT, /* IO error reported to guest OS (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_EVENT_IO_ERROR_LAST + VIR_DOMAIN_EVENT_IO_ERROR_LAST /* (Since: v1.0.0) */ # endif } virDomainEventIOErrorAction; @@ -4947,7 +4957,7 @@ typedef enum { VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT, /* Final socket disconnection (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_EVENT_GRAPHICS_LAST + VIR_DOMAIN_EVENT_GRAPHICS_LAST /* (Since: v1.0.0) */ # endif } virDomainEventGraphicsPhase; @@ -4965,7 +4975,7 @@ typedef enum { VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_UNIX, /* UNIX socket path (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_LAST + VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_LAST /* (Since: v1.0.0) */ # endif } virDomainEventGraphicsAddressType; @@ -5100,13 +5110,13 @@ typedef void (*virConnectDomainEventGraphicsCallback)(virConnectPtr conn, * */ typedef enum { - VIR_DOMAIN_BLOCK_JOB_COMPLETED = 0, - VIR_DOMAIN_BLOCK_JOB_FAILED = 1, - VIR_DOMAIN_BLOCK_JOB_CANCELED = 2, - VIR_DOMAIN_BLOCK_JOB_READY = 3, + VIR_DOMAIN_BLOCK_JOB_COMPLETED = 0, /* (Since: v1.0.0) */ + VIR_DOMAIN_BLOCK_JOB_FAILED = 1, /* (Since: v1.0.0) */ + VIR_DOMAIN_BLOCK_JOB_CANCELED = 2, /* (Since: v1.0.0) */ + VIR_DOMAIN_BLOCK_JOB_READY = 3, /* (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_BLOCK_JOB_LAST + VIR_DOMAIN_BLOCK_JOB_LAST /* (Since: v1.0.0) */ # endif } virConnectDomainEventBlockJobStatus; @@ -5168,7 +5178,7 @@ typedef enum { VIR_DOMAIN_EVENT_DISK_DROP_MISSING_ON_START = 1, # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_EVENT_DISK_CHANGE_LAST + VIR_DOMAIN_EVENT_DISK_CHANGE_LAST /* (Since: v1.0.0) */ # endif } virConnectDomainEventDiskChangeReason; @@ -5211,11 +5221,11 @@ typedef void (*virConnectDomainEventDiskChangeCallback)(virConnectPtr conn, * */ typedef enum { - VIR_DOMAIN_EVENT_TRAY_CHANGE_OPEN = 0, - VIR_DOMAIN_EVENT_TRAY_CHANGE_CLOSE, + VIR_DOMAIN_EVENT_TRAY_CHANGE_OPEN = 0, /* (Since: v1.0.0) */ + VIR_DOMAIN_EVENT_TRAY_CHANGE_CLOSE, /* (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_EVENT_TRAY_CHANGE_LAST + VIR_DOMAIN_EVENT_TRAY_CHANGE_LAST /* (Since: v1.0.0) */ # endif } virDomainEventTrayChangeReason; @@ -5873,7 +5883,7 @@ typedef enum { VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_DISCONNECTED = 2, /* agent disconnected (Since: v1.2.11) */ # ifdef VIR_ENUM_SENTINELS - VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_LAST + VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_LAST /* (Since: v1.2.11) */ # endif } virConnectDomainEventAgentLifecycleState; @@ -5889,7 +5899,7 @@ typedef enum { VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_CHANNEL = 2, /* channel state changed (Since: v1.2.11) */ # ifdef VIR_ENUM_SENTINELS - VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_LAST + VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_LAST /* (Since: v1.2.11) */ # endif } virConnectDomainEventAgentLifecycleReason; @@ -6061,6 +6071,8 @@ typedef enum { * NB: this enum value will increase over time as new events are * added to the libvirt API. It reflects the last event ID supported * by this version of the libvirt API. + * + * Since: v1.0.0 */ # endif } virDomainEventID; @@ -6121,7 +6133,7 @@ int virDomainOpenChannel(virDomainPtr dom, * */ typedef enum { - VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH = (1 << 0), + VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH = (1 << 0), /* (Since: v1.0.0) */ } virDomainOpenGraphicsFlags; int virDomainOpenGraphics(virDomainPtr dom, @@ -6212,12 +6224,12 @@ int virDomainSetTime(virDomainPtr dom, * */ typedef enum { - VIR_DOMAIN_SCHED_FIELD_INT = VIR_TYPED_PARAM_INT, - VIR_DOMAIN_SCHED_FIELD_UINT = VIR_TYPED_PARAM_UINT, - VIR_DOMAIN_SCHED_FIELD_LLONG = VIR_TYPED_PARAM_LLONG, - VIR_DOMAIN_SCHED_FIELD_ULLONG = VIR_TYPED_PARAM_ULLONG, - VIR_DOMAIN_SCHED_FIELD_DOUBLE = VIR_TYPED_PARAM_DOUBLE, - VIR_DOMAIN_SCHED_FIELD_BOOLEAN = VIR_TYPED_PARAM_BOOLEAN, + VIR_DOMAIN_SCHED_FIELD_INT = VIR_TYPED_PARAM_INT, /* (Since: v1.0.0) */ + VIR_DOMAIN_SCHED_FIELD_UINT = VIR_TYPED_PARAM_UINT, /* (Since: v1.0.0) */ + VIR_DOMAIN_SCHED_FIELD_LLONG = VIR_TYPED_PARAM_LLONG, /* (Since: v1.0.0) */ + VIR_DOMAIN_SCHED_FIELD_ULLONG = VIR_TYPED_PARAM_ULLONG, /* (Since: v1.0.0) */ + VIR_DOMAIN_SCHED_FIELD_DOUBLE = VIR_TYPED_PARAM_DOUBLE, /* (Since: v1.0.0) */ + VIR_DOMAIN_SCHED_FIELD_BOOLEAN = VIR_TYPED_PARAM_BOOLEAN, /* (Since: v1.0.0) */ } virSchedParameterType; /** @@ -6267,12 +6279,12 @@ typedef virSchedParameter *virSchedParameterPtr; * */ typedef enum { - VIR_DOMAIN_BLKIO_PARAM_INT = VIR_TYPED_PARAM_INT, - VIR_DOMAIN_BLKIO_PARAM_UINT = VIR_TYPED_PARAM_UINT, - VIR_DOMAIN_BLKIO_PARAM_LLONG = VIR_TYPED_PARAM_LLONG, - VIR_DOMAIN_BLKIO_PARAM_ULLONG = VIR_TYPED_PARAM_ULLONG, - VIR_DOMAIN_BLKIO_PARAM_DOUBLE = VIR_TYPED_PARAM_DOUBLE, - VIR_DOMAIN_BLKIO_PARAM_BOOLEAN = VIR_TYPED_PARAM_BOOLEAN, + VIR_DOMAIN_BLKIO_PARAM_INT = VIR_TYPED_PARAM_INT, /* (Since: v1.0.0) */ + VIR_DOMAIN_BLKIO_PARAM_UINT = VIR_TYPED_PARAM_UINT, /* (Since: v1.0.0) */ + VIR_DOMAIN_BLKIO_PARAM_LLONG = VIR_TYPED_PARAM_LLONG, /* (Since: v1.0.0) */ + VIR_DOMAIN_BLKIO_PARAM_ULLONG = VIR_TYPED_PARAM_ULLONG, /* (Since: v1.0.0) */ + VIR_DOMAIN_BLKIO_PARAM_DOUBLE = VIR_TYPED_PARAM_DOUBLE, /* (Since: v1.0.0) */ + VIR_DOMAIN_BLKIO_PARAM_BOOLEAN = VIR_TYPED_PARAM_BOOLEAN, /* (Since: v1.0.0) */ } virBlkioParameterType; /** @@ -6322,12 +6334,12 @@ typedef virBlkioParameter *virBlkioParameterPtr; * */ typedef enum { - VIR_DOMAIN_MEMORY_PARAM_INT = VIR_TYPED_PARAM_INT, - VIR_DOMAIN_MEMORY_PARAM_UINT = VIR_TYPED_PARAM_UINT, - VIR_DOMAIN_MEMORY_PARAM_LLONG = VIR_TYPED_PARAM_LLONG, - VIR_DOMAIN_MEMORY_PARAM_ULLONG = VIR_TYPED_PARAM_ULLONG, - VIR_DOMAIN_MEMORY_PARAM_DOUBLE = VIR_TYPED_PARAM_DOUBLE, - VIR_DOMAIN_MEMORY_PARAM_BOOLEAN = VIR_TYPED_PARAM_BOOLEAN, + VIR_DOMAIN_MEMORY_PARAM_INT = VIR_TYPED_PARAM_INT, /* (Since: v1.0.0) */ + VIR_DOMAIN_MEMORY_PARAM_UINT = VIR_TYPED_PARAM_UINT, /* (Since: v1.0.0) */ + VIR_DOMAIN_MEMORY_PARAM_LLONG = VIR_TYPED_PARAM_LLONG, /* (Since: v1.0.0) */ + VIR_DOMAIN_MEMORY_PARAM_ULLONG = VIR_TYPED_PARAM_ULLONG, /* (Since: v1.0.0) */ + VIR_DOMAIN_MEMORY_PARAM_DOUBLE = VIR_TYPED_PARAM_DOUBLE, /* (Since: v1.0.0) */ + VIR_DOMAIN_MEMORY_PARAM_BOOLEAN = VIR_TYPED_PARAM_BOOLEAN, /* (Since: v1.0.0) */ } virMemoryParameterType; /** @@ -6379,7 +6391,7 @@ typedef enum { VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP = 2, /* Query ARP tables (Since: v4.2.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LAST + VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LAST /* (Since: v1.2.14) */ # endif } virDomainInterfaceAddressesSource; @@ -6479,12 +6491,12 @@ int virDomainSetBlockThreshold(virDomainPtr domain, * */ typedef enum { - VIR_DOMAIN_LIFECYCLE_POWEROFF = 0, - VIR_DOMAIN_LIFECYCLE_REBOOT = 1, - VIR_DOMAIN_LIFECYCLE_CRASH = 2, + VIR_DOMAIN_LIFECYCLE_POWEROFF = 0, /* (Since: v3.9.0) */ + VIR_DOMAIN_LIFECYCLE_REBOOT = 1, /* (Since: v3.9.0) */ + VIR_DOMAIN_LIFECYCLE_CRASH = 2, /* (Since: v3.9.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_LIFECYCLE_LAST + VIR_DOMAIN_LIFECYCLE_LAST /* (Since: v3.9.0) */ # endif } virDomainLifecycle; @@ -6495,15 +6507,15 @@ typedef enum { * */ typedef enum { - VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY = 0, - VIR_DOMAIN_LIFECYCLE_ACTION_RESTART = 1, /* Since: v3.9.0 */ - VIR_DOMAIN_LIFECYCLE_ACTION_RESTART_RENAME = 2, - VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE = 3, - VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROY = 4, - VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_RESTART = 5, + VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY = 0, /* (Since: v3.9.0) */ + VIR_DOMAIN_LIFECYCLE_ACTION_RESTART = 1, /* (Since: v3.9.0) */ + VIR_DOMAIN_LIFECYCLE_ACTION_RESTART_RENAME = 2, /* (Since: v3.9.0) */ + VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE = 3, /* (Since: v3.9.0) */ + VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROY = 4, /* (Since: v3.9.0) */ + VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_RESTART = 5, /* (Since: v3.9.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_LIFECYCLE_ACTION_LAST + VIR_DOMAIN_LIFECYCLE_ACTION_LAST /* (Since: v3.9.0) */ # endif } virDomainLifecycleAction; @@ -6650,9 +6662,9 @@ int virDomainGetGuestInfo(virDomainPtr domain, * */ typedef enum { - VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_BLOCK = -2, - VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_DEFAULT = -1, - VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_NOWAIT = 0, + VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_BLOCK = -2, /* (Since: v5.10.0) */ + VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_DEFAULT = -1, /* (Since: v5.10.0) */ + VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_NOWAIT = 0, /* (Since: v5.10.0) */ } virDomainAgentResponseTimeoutValues; int virDomainAgentSetResponseTimeout(virDomainPtr domain, @@ -6708,8 +6720,8 @@ int virDomainAuthorizedSSHKeysSet(virDomainPtr domain, * */ typedef enum { - VIR_DOMAIN_MESSAGE_DEPRECATION = (1 << 0), - VIR_DOMAIN_MESSAGE_TAINTING = (1 << 1), + VIR_DOMAIN_MESSAGE_DEPRECATION = (1 << 0), /* (Since: v7.1.0) */ + VIR_DOMAIN_MESSAGE_TAINTING = (1 << 1), /* (Since: v7.1.0) */ } virDomainMessageType; int virDomainGetMessages(virDomainPtr domain, @@ -6733,7 +6745,7 @@ typedef enum { completed (Since: v7.2.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_DOMAIN_DIRTYRATE_LAST + VIR_DOMAIN_DIRTYRATE_LAST /* (Since: v7.2.0) */ # endif } virDomainDirtyRateStatus; diff --git a/include/libvirt/libvirt-event.h b/include/libvirt/libvirt-event.h index 078439f3d6..c8f1b2fc85 100644 --- a/include/libvirt/libvirt-event.h +++ b/include/libvirt/libvirt-event.h @@ -39,10 +39,10 @@ * */ typedef enum { - VIR_EVENT_HANDLE_READABLE = (1 << 0), - VIR_EVENT_HANDLE_WRITABLE = (1 << 1), - VIR_EVENT_HANDLE_ERROR = (1 << 2), - VIR_EVENT_HANDLE_HANGUP = (1 << 3), + VIR_EVENT_HANDLE_READABLE = (1 << 0), /* (Since: v1.0.0) */ + VIR_EVENT_HANDLE_WRITABLE = (1 << 1), /* (Since: v1.0.0) */ + VIR_EVENT_HANDLE_ERROR = (1 << 2), /* (Since: v1.0.0) */ + VIR_EVENT_HANDLE_HANGUP = (1 << 3), /* (Since: v1.0.0) */ } virEventHandleType; /** diff --git a/include/libvirt/libvirt-host.h b/include/libvirt/libvirt-host.h index 74d3583bd7..ad955ea7e0 100644 --- a/include/libvirt/libvirt-host.h +++ b/include/libvirt/libvirt-host.h @@ -60,9 +60,9 @@ typedef virConnect *virConnectPtr; * */ typedef enum { - VIR_NODE_SUSPEND_TARGET_MEM = 0, - VIR_NODE_SUSPEND_TARGET_DISK = 1, - VIR_NODE_SUSPEND_TARGET_HYBRID = 2, + VIR_NODE_SUSPEND_TARGET_MEM = 0, /* (Since: v1.0.0) */ + VIR_NODE_SUSPEND_TARGET_DISK = 1, /* (Since: v1.0.0) */ + VIR_NODE_SUSPEND_TARGET_HYBRID = 2, /* (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS VIR_NODE_SUSPEND_TARGET_LAST /* This constant is subject to change (Since: v1.0.0) */ @@ -228,7 +228,7 @@ struct _virNodeInfo { * */ typedef enum { - VIR_NODE_CPU_STATS_ALL_CPUS = -1, + VIR_NODE_CPU_STATS_ALL_CPUS = -1, /* (Since: v1.0.0) */ } virNodeGetCPUStatsAllCPUs; /** @@ -333,7 +333,7 @@ struct _virNodeCPUStats { * */ typedef enum { - VIR_NODE_MEMORY_STATS_ALL_CELLS = -1, + VIR_NODE_MEMORY_STATS_ALL_CELLS = -1, /* (Since: v1.0.0) */ } virNodeGetMemoryStatsAllCells; /** @@ -658,7 +658,7 @@ typedef enum { VIR_CRED_CNONCE = 4, /* client supplies a nonce (Since: v1.0.0) */ VIR_CRED_PASSPHRASE = 5, /* Passphrase secret (Since: v1.0.0) */ VIR_CRED_ECHOPROMPT = 6, /* Challenge response (Since: v1.0.0) */ - VIR_CRED_NOECHOPROMPT = 7, /* Challenge response */ + VIR_CRED_NOECHOPROMPT = 7, /* Challenge response (Since: v1.0.0) */ VIR_CRED_REALM = 8, /* Authentication realm (Since: v1.0.0) */ VIR_CRED_EXTERNAL = 9, /* Externally managed credential (Since: v1.0.0) */ @@ -987,13 +987,13 @@ int virConnectIsAlive(virConnectPtr conn); * */ typedef enum { - VIR_CPU_COMPARE_ERROR = -1, - VIR_CPU_COMPARE_INCOMPATIBLE = 0, - VIR_CPU_COMPARE_IDENTICAL = 1, - VIR_CPU_COMPARE_SUPERSET = 2, + VIR_CPU_COMPARE_ERROR = -1, /* (Since: v1.0.0) */ + VIR_CPU_COMPARE_INCOMPATIBLE = 0, /* (Since: v1.0.0) */ + VIR_CPU_COMPARE_IDENTICAL = 1, /* (Since: v1.0.0) */ + VIR_CPU_COMPARE_SUPERSET = 2, /* (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_CPU_COMPARE_LAST + VIR_CPU_COMPARE_LAST /* (Since: v1.0.0) */ # endif } virCPUCompareResult; diff --git a/include/libvirt/libvirt-interface.h b/include/libvirt/libvirt-interface.h index bf7e915432..9bdffef14b 100644 --- a/include/libvirt/libvirt-interface.h +++ b/include/libvirt/libvirt-interface.h @@ -68,8 +68,8 @@ int virConnectListDefinedInterfaces (virConnectPtr conn, * */ typedef enum { - VIR_CONNECT_LIST_INTERFACES_INACTIVE = 1 << 0, - VIR_CONNECT_LIST_INTERFACES_ACTIVE = 1 << 1, + VIR_CONNECT_LIST_INTERFACES_INACTIVE = 1 << 0, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_INTERFACES_ACTIVE = 1 << 1, /* (Since: v1.0.0) */ } virConnectListAllInterfacesFlags; int virConnectListAllInterfaces (virConnectPtr conn, diff --git a/include/libvirt/libvirt-network.h b/include/libvirt/libvirt-network.h index 953a11e8f3..3b9fe35afe 100644 --- a/include/libvirt/libvirt-network.h +++ b/include/libvirt/libvirt-network.h @@ -110,14 +110,14 @@ int virConnectListDefinedNetworks (virConnectPtr conn, * */ typedef enum { - VIR_CONNECT_LIST_NETWORKS_INACTIVE = 1 << 0, - VIR_CONNECT_LIST_NETWORKS_ACTIVE = 1 << 1, + VIR_CONNECT_LIST_NETWORKS_INACTIVE = 1 << 0, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_NETWORKS_ACTIVE = 1 << 1, /* (Since: v1.0.0) */ - VIR_CONNECT_LIST_NETWORKS_PERSISTENT = 1 << 2, - VIR_CONNECT_LIST_NETWORKS_TRANSIENT = 1 << 3, + VIR_CONNECT_LIST_NETWORKS_PERSISTENT = 1 << 2, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_NETWORKS_TRANSIENT = 1 << 3, /* (Since: v1.0.0) */ - VIR_CONNECT_LIST_NETWORKS_AUTOSTART = 1 << 4, - VIR_CONNECT_LIST_NETWORKS_NO_AUTOSTART = 1 << 5, + VIR_CONNECT_LIST_NETWORKS_AUTOSTART = 1 << 4, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_NETWORKS_NO_AUTOSTART = 1 << 5, /* (Since: v1.0.0) */ } virConnectListAllNetworksFlags; int virConnectListAllNetworks (virConnectPtr conn, @@ -191,7 +191,7 @@ typedef enum { VIR_NETWORK_UPDATE_COMMAND_ADD_LAST = 3, /* add an element at end of list (Since: v1.0.0) */ VIR_NETWORK_UPDATE_COMMAND_ADD_FIRST = 4, /* add an element at start of list (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_NETWORK_UPDATE_COMMAND_LAST + VIR_NETWORK_UPDATE_COMMAND_LAST /* (Since: v1.0.0) */ # endif } virNetworkUpdateCommand; @@ -208,10 +208,10 @@ typedef enum { VIR_NETWORK_SECTION_NONE = 0, /* (invalid (Since: v1.0.0)) */ VIR_NETWORK_SECTION_BRIDGE = 1, /* <bridge> (Since: v1.0.0) */ VIR_NETWORK_SECTION_DOMAIN = 2, /* <domain> (Since: v1.0.0) */ - VIR_NETWORK_SECTION_IP = 3, /* <ip> */ + VIR_NETWORK_SECTION_IP = 3, /* <ip> (Since: v1.0.0) */ VIR_NETWORK_SECTION_IP_DHCP_HOST = 4, /* <ip>/<dhcp>/<host> (Since: v1.0.0) */ VIR_NETWORK_SECTION_IP_DHCP_RANGE = 5, /* <ip>/<dhcp>/<range> (Since: v1.0.0) */ - VIR_NETWORK_SECTION_FORWARD = 6, /* <forward> */ + VIR_NETWORK_SECTION_FORWARD = 6, /* <forward> (Since: v1.0.0) */ VIR_NETWORK_SECTION_FORWARD_INTERFACE = 7, /* <forward>/<interface> (Since: v1.0.0) */ VIR_NETWORK_SECTION_FORWARD_PF = 8, /* <forward>/<pf> (Since: v1.0.0) */ VIR_NETWORK_SECTION_PORTGROUP = 9, /* <portgroup> (Since: v1.0.0) */ @@ -219,7 +219,7 @@ typedef enum { VIR_NETWORK_SECTION_DNS_TXT = 11, /* <dns>/<txt> (Since: v1.0.0) */ VIR_NETWORK_SECTION_DNS_SRV = 12, /* <dns>/<srv> (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_NETWORK_SECTION_LAST + VIR_NETWORK_SECTION_LAST /* (Since: v1.0.0) */ # endif } virNetworkUpdateSection; @@ -289,13 +289,13 @@ int virNetworkIsPersistent(virNetworkPtr net); * */ typedef enum { - VIR_NETWORK_EVENT_DEFINED = 0, - VIR_NETWORK_EVENT_UNDEFINED = 1, - VIR_NETWORK_EVENT_STARTED = 2, - VIR_NETWORK_EVENT_STOPPED = 3, + VIR_NETWORK_EVENT_DEFINED = 0, /* (Since: v1.2.1) */ + VIR_NETWORK_EVENT_UNDEFINED = 1, /* (Since: v1.2.1) */ + VIR_NETWORK_EVENT_STARTED = 2, /* (Since: v1.2.1) */ + VIR_NETWORK_EVENT_STOPPED = 3, /* (Since: v1.2.1) */ # ifdef VIR_ENUM_SENTINELS - VIR_NETWORK_EVENT_LAST + VIR_NETWORK_EVENT_LAST /* (Since: v1.2.1) */ # endif } virNetworkEventLifecycleType; @@ -352,6 +352,8 @@ typedef enum { * NB: this enum value will increase over time as new events are * added to the libvirt API. It reflects the last event ID supported * by this version of the libvirt API. + * + * Since: v1.2.1 */ # endif } virNetworkEventID; @@ -363,11 +365,11 @@ typedef enum { * */ typedef enum { - VIR_IP_ADDR_TYPE_IPV4, - VIR_IP_ADDR_TYPE_IPV6, + VIR_IP_ADDR_TYPE_IPV4, /* (Since: v1.2.6) */ + VIR_IP_ADDR_TYPE_IPV6, /* (Since: v1.2.6) */ # ifdef VIR_ENUM_SENTINELS - VIR_IP_ADDR_TYPE_LAST + VIR_IP_ADDR_TYPE_LAST /* (Since: v1.2.6) */ # endif } virIPAddrType; diff --git a/include/libvirt/libvirt-nodedev.h b/include/libvirt/libvirt-nodedev.h index 4d05237cbe..f349289e8c 100644 --- a/include/libvirt/libvirt-nodedev.h +++ b/include/libvirt/libvirt-nodedev.h @@ -192,6 +192,8 @@ typedef enum { * NB: this enum value will increase over time as new events are * added to the libvirt API. It reflects the last event ID supported * by this version of the libvirt API. + * + * Since: v2.0.0 */ # endif } virNodeDeviceEventID; @@ -236,13 +238,13 @@ int virConnectNodeDeviceEventDeregisterAny(virConnectPtr conn, * */ typedef enum { - VIR_NODE_DEVICE_EVENT_CREATED = 0, - VIR_NODE_DEVICE_EVENT_DELETED = 1, - VIR_NODE_DEVICE_EVENT_DEFINED = 2, - VIR_NODE_DEVICE_EVENT_UNDEFINED = 3, + VIR_NODE_DEVICE_EVENT_CREATED = 0, /* (Since: v2.2.0) */ + VIR_NODE_DEVICE_EVENT_DELETED = 1, /* (Since: v2.2.0) */ + VIR_NODE_DEVICE_EVENT_DEFINED = 2, /* (Since: v7.3.0) */ + VIR_NODE_DEVICE_EVENT_UNDEFINED = 3, /* (Since: v7.3.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_NODE_DEVICE_EVENT_LAST + VIR_NODE_DEVICE_EVENT_LAST /* (Since: v2.2.0) */ # endif } virNodeDeviceEventLifecycleType; diff --git a/include/libvirt/libvirt-qemu.h b/include/libvirt/libvirt-qemu.h index e4c74d72c6..8acb442ab0 100644 --- a/include/libvirt/libvirt-qemu.h +++ b/include/libvirt/libvirt-qemu.h @@ -37,7 +37,7 @@ extern "C" { * */ typedef enum { - VIR_DOMAIN_QEMU_MONITOR_COMMAND_DEFAULT = 0, + VIR_DOMAIN_QEMU_MONITOR_COMMAND_DEFAULT = 0, /* (Since: v1.0.0) */ VIR_DOMAIN_QEMU_MONITOR_COMMAND_HMP = (1 << 0), /* cmd is in HMP (Since: v1.0.0) */ } virDomainQemuMonitorCommandFlags; @@ -63,11 +63,11 @@ virDomainPtr virDomainQemuAttach(virConnectPtr domain, * */ typedef enum { - VIR_DOMAIN_QEMU_AGENT_COMMAND_MIN = VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_BLOCK, - VIR_DOMAIN_QEMU_AGENT_COMMAND_BLOCK = VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_BLOCK, - VIR_DOMAIN_QEMU_AGENT_COMMAND_DEFAULT = VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_DEFAULT, - VIR_DOMAIN_QEMU_AGENT_COMMAND_NOWAIT = VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_NOWAIT, - VIR_DOMAIN_QEMU_AGENT_COMMAND_SHUTDOWN = 60, + VIR_DOMAIN_QEMU_AGENT_COMMAND_MIN = VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_BLOCK, /* (Since: v1.0.0) */ + VIR_DOMAIN_QEMU_AGENT_COMMAND_BLOCK = VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_BLOCK, /* (Since: v1.0.0) */ + VIR_DOMAIN_QEMU_AGENT_COMMAND_DEFAULT = VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_DEFAULT, /* (Since: v1.0.0) */ + VIR_DOMAIN_QEMU_AGENT_COMMAND_NOWAIT = VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_NOWAIT, /* (Since: v1.0.0) */ + VIR_DOMAIN_QEMU_AGENT_COMMAND_SHUTDOWN = 60, /* (Since: v1.2.15) */ } virDomainQemuAgentCommandTimeoutValues; char *virDomainQemuAgentCommand(virDomainPtr domain, const char *cmd, diff --git a/include/libvirt/libvirt-secret.h b/include/libvirt/libvirt-secret.h index a33cbc8779..7fe73dbc5c 100644 --- a/include/libvirt/libvirt-secret.h +++ b/include/libvirt/libvirt-secret.h @@ -54,12 +54,12 @@ typedef virSecret *virSecretPtr; * */ typedef enum { - VIR_SECRET_USAGE_TYPE_NONE = 0, - VIR_SECRET_USAGE_TYPE_VOLUME = 1, - VIR_SECRET_USAGE_TYPE_CEPH = 2, - VIR_SECRET_USAGE_TYPE_ISCSI = 3, - VIR_SECRET_USAGE_TYPE_TLS = 4, - VIR_SECRET_USAGE_TYPE_VTPM = 5, + VIR_SECRET_USAGE_TYPE_NONE = 0, /* (Since: v1.0.0) */ + VIR_SECRET_USAGE_TYPE_VOLUME = 1, /* (Since: v1.0.0) */ + VIR_SECRET_USAGE_TYPE_CEPH = 2, /* (Since: v1.0.0) */ + VIR_SECRET_USAGE_TYPE_ISCSI = 3, /* (Since: v1.0.4) */ + VIR_SECRET_USAGE_TYPE_TLS = 4, /* (Since: v2.3.0) */ + VIR_SECRET_USAGE_TYPE_VTPM = 5, /* (Since: v5.6.0) */ # ifdef VIR_ENUM_SENTINELS VIR_SECRET_USAGE_TYPE_LAST @@ -67,6 +67,8 @@ typedef enum { * NB: this enum value will increase over time as new usage types are * added to the libvirt API. It reflects the last usage type supported * by this version of the libvirt API. + * + * Since: v1.0.0 */ # endif } virSecretUsageType; @@ -89,12 +91,12 @@ int virConnectListSecrets (virConnectPtr conn, typedef enum { VIR_CONNECT_LIST_SECRETS_EPHEMERAL = 1 << 0, /* kept in memory, never stored persistently (Since: v1.0.0) */ - VIR_CONNECT_LIST_SECRETS_NO_EPHEMERAL = 1 << 1, + VIR_CONNECT_LIST_SECRETS_NO_EPHEMERAL = 1 << 1, /* (Since: v1.0.0) */ VIR_CONNECT_LIST_SECRETS_PRIVATE = 1 << 2, /* not revealed to any caller of libvirt, nor to any other node (Since: v1.0.0) */ - VIR_CONNECT_LIST_SECRETS_NO_PRIVATE = 1 << 3, + VIR_CONNECT_LIST_SECRETS_NO_PRIVATE = 1 << 3, /* (Since: v1.0.0) */ } virConnectListAllSecretsFlags; int virConnectListAllSecrets(virConnectPtr conn, @@ -170,6 +172,8 @@ typedef enum { * NB: this enum value will increase over time as new events are * added to the libvirt API. It reflects the last event ID supported * by this version of the libvirt API. + * + * Since: v3.0.0 */ # endif } virSecretEventID; @@ -214,11 +218,11 @@ int virConnectSecretEventDeregisterAny(virConnectPtr conn, * */ typedef enum { - VIR_SECRET_EVENT_DEFINED = 0, - VIR_SECRET_EVENT_UNDEFINED = 1, + VIR_SECRET_EVENT_DEFINED = 0, /* (Since: v3.0.0) */ + VIR_SECRET_EVENT_UNDEFINED = 1, /* (Since: v3.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_SECRET_EVENT_LAST + VIR_SECRET_EVENT_LAST /* (Since: v3.0.0) */ # endif } virSecretEventLifecycleType; diff --git a/include/libvirt/libvirt-storage.h b/include/libvirt/libvirt-storage.h index 3ce8ca92d6..9a0439f348 100644 --- a/include/libvirt/libvirt-storage.h +++ b/include/libvirt/libvirt-storage.h @@ -64,7 +64,7 @@ typedef enum { VIR_STORAGE_POOL_INACCESSIBLE = 4, /* Running, but not accessible (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_STORAGE_POOL_STATE_LAST + VIR_STORAGE_POOL_STATE_LAST /* (Since: v1.0.0) */ # endif } virStoragePoolState; @@ -185,7 +185,7 @@ typedef enum { VIR_STORAGE_VOL_PLOOP = 5, /* Ploop based volumes (Since: v1.3.4) */ # ifdef VIR_ENUM_SENTINELS - VIR_STORAGE_VOL_LAST + VIR_STORAGE_VOL_LAST /* (Since: v1.0.0) */ # endif } virStorageVolType; @@ -235,6 +235,8 @@ typedef enum { * NB: this enum value will increase over time as new algorithms are * added to the libvirt API. It reflects the last algorithm supported * by this version of the libvirt API. + * + * Since: v1.0.0 */ # endif } virStorageVolWipeAlgorithm; @@ -457,7 +459,7 @@ const char* virStorageVolGetKey (virStorageVolPtr vol); * */ typedef enum { - VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA = 1 << 0, + VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA = 1 << 0, /* (Since: v1.0.1) */ VIR_STORAGE_VOL_CREATE_REFLINK = 1 << 1, /* perform a btrfs lightweight copy (Since: v1.2.13) */ } virStorageVolCreateFlags; @@ -569,6 +571,8 @@ typedef enum { * NB: this enum value will increase over time as new events are * added to the libvirt API. It reflects the last event ID supported * by this version of the libvirt API. + * + * Since: v2.0.0 */ # endif } virStoragePoolEventID; @@ -613,15 +617,15 @@ int virConnectStoragePoolEventDeregisterAny(virConnectPtr conn, * */ typedef enum { - VIR_STORAGE_POOL_EVENT_DEFINED = 0, - VIR_STORAGE_POOL_EVENT_UNDEFINED = 1, - VIR_STORAGE_POOL_EVENT_STARTED = 2, - VIR_STORAGE_POOL_EVENT_STOPPED = 3, - VIR_STORAGE_POOL_EVENT_CREATED = 4, - VIR_STORAGE_POOL_EVENT_DELETED = 5, + VIR_STORAGE_POOL_EVENT_DEFINED = 0, /* (Since: v2.0.0) */ + VIR_STORAGE_POOL_EVENT_UNDEFINED = 1, /* (Since: v2.0.0) */ + VIR_STORAGE_POOL_EVENT_STARTED = 2, /* (Since: v2.0.0) */ + VIR_STORAGE_POOL_EVENT_STOPPED = 3, /* (Since: v2.0.0) */ + VIR_STORAGE_POOL_EVENT_CREATED = 4, /* (Since: v3.8.0) */ + VIR_STORAGE_POOL_EVENT_DELETED = 5, /* (Since: v3.8.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_STORAGE_POOL_EVENT_LAST + VIR_STORAGE_POOL_EVENT_LAST /* (Since: v2.0.0) */ # endif } virStoragePoolEventLifecycleType; diff --git a/include/libvirt/libvirt-stream.h b/include/libvirt/libvirt-stream.h index 1850b06684..9c72b79806 100644 --- a/include/libvirt/libvirt-stream.h +++ b/include/libvirt/libvirt-stream.h @@ -35,7 +35,7 @@ * */ typedef enum { - VIR_STREAM_NONBLOCK = (1 << 0), + VIR_STREAM_NONBLOCK = (1 << 0), /* (Since: v1.0.0) */ } virStreamFlags; virStreamPtr virStreamNew(virConnectPtr conn, @@ -57,7 +57,7 @@ int virStreamRecv(virStreamPtr st, * */ typedef enum { - VIR_STREAM_RECV_STOP_AT_HOLE = (1 << 0), + VIR_STREAM_RECV_STOP_AT_HOLE = (1 << 0), /* (Since: v3.4.0) */ } virStreamRecvFlagsValues; int virStreamRecvFlags(virStreamPtr st, @@ -263,10 +263,10 @@ int virStreamSparseRecvAll(virStreamPtr stream, * */ typedef enum { - VIR_STREAM_EVENT_READABLE = (1 << 0), - VIR_STREAM_EVENT_WRITABLE = (1 << 1), - VIR_STREAM_EVENT_ERROR = (1 << 2), - VIR_STREAM_EVENT_HANGUP = (1 << 3), + VIR_STREAM_EVENT_READABLE = (1 << 0), /* (Since: v1.0.0) */ + VIR_STREAM_EVENT_WRITABLE = (1 << 1), /* (Since: v1.0.0) */ + VIR_STREAM_EVENT_ERROR = (1 << 2), /* (Since: v1.0.0) */ + VIR_STREAM_EVENT_HANGUP = (1 << 3), /* (Since: v1.0.0) */ } virStreamEventType; diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h index aa47d59ba1..79ed8006d8 100644 --- a/include/libvirt/virterror.h +++ b/include/libvirt/virterror.h @@ -39,7 +39,7 @@ extern "C" { * */ typedef enum { - VIR_ERR_NONE = 0, + VIR_ERR_NONE = 0, /* (Since: v1.0.0) */ VIR_ERR_WARNING = 1, /* A simple warning (Since: v1.0.0) */ VIR_ERR_ERROR = 2 /* An error (Since: v1.0.0) */ } virErrorLevel; @@ -54,7 +54,7 @@ typedef enum { * */ typedef enum { - VIR_FROM_NONE = 0, + VIR_FROM_NONE = 0, /* (Since: v1.0.0) */ VIR_FROM_XEN = 1, /* Error at Xen hypervisor layer (Since: v1.0.0) */ VIR_FROM_XEND = 2, /* Error at connection with xend daemon (Since: v1.0.0) */ VIR_FROM_XENSTORE = 3, /* Error at connection with xen store (Since: v1.0.0) */ @@ -145,7 +145,7 @@ typedef enum { VIR_FROM_CH = 72, /* Error from Cloud-Hypervisor driver (Since: v7.5.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_ERR_DOMAIN_LAST + VIR_ERR_DOMAIN_LAST /* (Since: v1.0.0) */ # endif } virErrorDomain; @@ -226,7 +226,7 @@ struct _virError { * */ typedef enum { - VIR_ERR_OK = 0, + VIR_ERR_OK = 0, /* (Since: v1.0.0) */ VIR_ERR_INTERNAL_ERROR = 1, /* internal error (Since: v1.0.0) */ VIR_ERR_NO_MEMORY = 2, /* memory allocation failure (Since: v1.0.0) */ VIR_ERR_NO_SUPPORT = 3, /* no support for this function (Since: v1.0.0) */ @@ -297,7 +297,7 @@ typedef enum { VIR_WAR_NO_NWFILTER = 60, /* failed to start nwfilter driver (Since: v1.0.0) */ VIR_ERR_INVALID_NWFILTER = 61, /* invalid nwfilter object (Since: v1.0.0) */ VIR_ERR_NO_NWFILTER = 62, /* nw filter pool not found (Since: v1.0.0) */ - VIR_ERR_BUILD_FIREWALL = 63, /* nw filter pool not found */ + VIR_ERR_BUILD_FIREWALL = 63, /* nw filter pool not found (Since: v1.0.0) */ VIR_WAR_NO_SECRET = 64, /* failed to start secret storage (Since: v1.0.0) */ VIR_ERR_INVALID_SECRET = 65, /* invalid secret (Since: v1.0.0) */ VIR_ERR_NO_SECRET = 66, /* secret not found (Since: v1.0.0) */ @@ -356,7 +356,7 @@ typedef enum { VIR_ERR_MULTIPLE_DOMAINS = 110, /* more than one matching domain found (Since: v7.1.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_ERR_NUMBER_LAST + VIR_ERR_NUMBER_LAST /* (Since: v5.0.0) */ # endif } virErrorNumber; -- 2.35.1

This commit finishes the script work and adds docstring to types that are not documented.
From this commit onwards, all exported macros are versioned. Further commits will enforce that it stays like that with new additions.
Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-domain.h | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index 9163c9dcab..20a476412f 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -6244,6 +6244,14 @@ typedef enum { */ # define VIR_DOMAIN_SCHED_FIELD_LENGTH VIR_TYPED_PARAM_FIELD_LENGTH +/** + * _virSchedParameter: + * + * Since: v0.9.2 + * + */ +# define _virSchedParameter _virTypedParameter + /** * virSchedParameter: * @@ -6254,7 +6262,6 @@ typedef enum { * Since: v0.9.2 * */ -# define _virSchedParameter _virTypedParameter typedef struct _virTypedParameter virSchedParameter; /** @@ -6299,6 +6306,14 @@ typedef enum { */ # define VIR_DOMAIN_BLKIO_FIELD_LENGTH VIR_TYPED_PARAM_FIELD_LENGTH +/** + * _virBlkioParameter: + * + * Since: v0.9.2 + * + */ +# define _virBlkioParameter _virTypedParameter + /** * virBlkioParameter: * @@ -6309,7 +6324,6 @@ typedef enum { * Since: v0.9.2 * */ -# define _virBlkioParameter _virTypedParameter typedef struct _virTypedParameter virBlkioParameter; /** @@ -6354,6 +6368,14 @@ typedef enum { */ # define VIR_DOMAIN_MEMORY_FIELD_LENGTH VIR_TYPED_PARAM_FIELD_LENGTH +/** + * _virMemoryParameter: + * + * Since: v0.9.2 + * + */ +# define _virMemoryParameter _virTypedParameter + /** * virMemoryParameter: * @@ -6364,7 +6386,6 @@ typedef enum { * Since: v0.9.2 * */ -# define _virMemoryParameter _virTypedParameter typedef struct _virTypedParameter virMemoryParameter; /** -- 2.35.1

This commit adds Since metadata to the libvirt-common's macros, enums and functions. Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-common.h.in | 54 ++++++++++++++++++++------- src/util/virtypedparam-public.c | 57 +++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 13 deletions(-) diff --git a/include/libvirt/libvirt-common.h.in b/include/libvirt/libvirt-common.h.in index 4661ee9857..ba0a44351e 100644 --- a/include/libvirt/libvirt-common.h.in +++ b/include/libvirt/libvirt-common.h.in @@ -70,6 +70,8 @@ extern "C" { * * Macro providing the version of the library as * version * 1,000,000 + minor * 1000 + micro + * + * Since: v1.0.0 */ # define LIBVIR_VERSION_NUMBER @LIBVIRT_VERSION_NUMBER@ @@ -86,6 +88,8 @@ extern "C" { * #if LIBVIR_CHECK_VERSION(1,1,3) * // some code that only works in 1.1.3 and newer * #endif + * + * Since: v1.2.0 */ # define LIBVIR_CHECK_VERSION(major, minor, micro) \ ((major) * 1000000 + (minor) * 1000 + (micro) <= LIBVIR_VERSION_NUMBER) @@ -104,17 +108,26 @@ extern "C" { * from a context which is not re-entrant safe. Failure to * abide by this requirement may lead to application deadlocks * or crashes. + * + * Since: v1.0.0 + * */ typedef void (*virFreeCallback)(void *opaque); +/** + * virConnectCloseReason: + * + * Since: v1.0.0 + * + */ typedef enum { - VIR_CONNECT_CLOSE_REASON_ERROR = 0, /* Misc I/O error */ - VIR_CONNECT_CLOSE_REASON_EOF = 1, /* End-of-file from server */ - VIR_CONNECT_CLOSE_REASON_KEEPALIVE = 2, /* Keepalive timer triggered */ - VIR_CONNECT_CLOSE_REASON_CLIENT = 3, /* Client requested it */ + VIR_CONNECT_CLOSE_REASON_ERROR = 0, /* Misc I/O error (Since: v1.0.0) */ + VIR_CONNECT_CLOSE_REASON_EOF = 1, /* End-of-file from server (Since: v1.0.0) */ + VIR_CONNECT_CLOSE_REASON_KEEPALIVE = 2, /* Keepalive timer triggered (Since: v1.0.0) */ + VIR_CONNECT_CLOSE_REASON_CLIENT = 3, /* Client requested it (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_CONNECT_CLOSE_REASON_LAST + VIR_CONNECT_CLOSE_REASON_LAST /* (Since: v1.0.0) */ # endif } virConnectCloseReason; @@ -122,18 +135,20 @@ typedef enum { * virTypedParameterType: * * Express the type of a virTypedParameter + * + * Since: v1.0.0 */ typedef enum { - VIR_TYPED_PARAM_INT = 1, /* integer case */ - VIR_TYPED_PARAM_UINT = 2, /* unsigned integer case */ - VIR_TYPED_PARAM_LLONG = 3, /* long long case */ - VIR_TYPED_PARAM_ULLONG = 4, /* unsigned long long case */ - VIR_TYPED_PARAM_DOUBLE = 5, /* double case */ - VIR_TYPED_PARAM_BOOLEAN = 6, /* boolean(character) case */ - VIR_TYPED_PARAM_STRING = 7, /* string case */ + VIR_TYPED_PARAM_INT = 1, /* integer case (Since: v1.0.0) */ + VIR_TYPED_PARAM_UINT = 2, /* unsigned integer case (Since: v1.0.0) */ + VIR_TYPED_PARAM_LLONG = 3, /* long long case (Since: v1.0.0) */ + VIR_TYPED_PARAM_ULLONG = 4, /* unsigned long long case (Since: v1.0.0) */ + VIR_TYPED_PARAM_DOUBLE = 5, /* double case (Since: v1.0.0) */ + VIR_TYPED_PARAM_BOOLEAN = 6, /* boolean(character) case (Since: v1.0.0) */ + VIR_TYPED_PARAM_STRING = 7, /* string case (Since: v1.0.0) */ # ifdef VIR_ENUM_SENTINELS - VIR_TYPED_PARAM_LAST + VIR_TYPED_PARAM_LAST /* (Since: v1.0.0) */ # endif } virTypedParameterType; @@ -143,6 +158,8 @@ typedef enum { * Flags related to libvirt APIs that use virTypedParameter. * * These enums should not conflict with those of virDomainModificationImpact. + * + * Since: v1.0.0 */ typedef enum { /* 1 << 0 is reserved for virDomainModificationImpact */ @@ -157,6 +174,8 @@ typedef enum { * the user does not have to worry about it; however, manually * setting the flag can be used to reject servers that cannot * return typed strings, even if no strings would be returned. + * + * Since: v1.0.0 */ VIR_TYPED_PARAM_STRING_OKAY = 1 << 2, @@ -166,6 +185,9 @@ typedef enum { * VIR_TYPED_PARAM_FIELD_LENGTH: * * Macro providing the field length of virTypedParameter name + * + * Since: v1.0.0 + * */ # define VIR_TYPED_PARAM_FIELD_LENGTH 80 @@ -177,6 +199,9 @@ typedef enum { * The types virSchedParameter, virBlkioParameter, and * virMemoryParameter are aliases of this type, for use when * targeting libvirt earlier than 0.9.2. + * + * Since: v0.9.2 + * */ typedef struct _virTypedParameter virTypedParameter; @@ -198,6 +223,9 @@ struct _virTypedParameter { * virTypedParameterPtr: * * a pointer to a virTypedParameter structure. + * + * Since: v0.9.2 + * */ typedef virTypedParameter *virTypedParameterPtr; diff --git a/src/util/virtypedparam-public.c b/src/util/virtypedparam-public.c index 4cb54f7ab1..2e213f2ace 100644 --- a/src/util/virtypedparam-public.c +++ b/src/util/virtypedparam-public.c @@ -127,6 +127,9 @@ virTypedParameterAssignFromStr(virTypedParameterPtr param, * * Returns pointer to the parameter or NULL if it does not exist in @params. * This function does not raise an error, even when returning NULL. + * + * Since: v1.0.2 + * */ virTypedParameterPtr virTypedParamsGet(virTypedParameterPtr params, @@ -176,6 +179,9 @@ virTypedParamsGet(virTypedParameterPtr params, * * Returns 1 on success, 0 when the parameter does not exist in @params, or * -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsGetInt(virTypedParameterPtr params, @@ -212,6 +218,9 @@ virTypedParamsGetInt(virTypedParameterPtr params, * * Returns 1 on success, 0 when the parameter does not exist in @params, or * -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsGetUInt(virTypedParameterPtr params, @@ -248,6 +257,9 @@ virTypedParamsGetUInt(virTypedParameterPtr params, * * Returns 1 on success, 0 when the parameter does not exist in @params, or * -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsGetLLong(virTypedParameterPtr params, @@ -284,6 +296,9 @@ virTypedParamsGetLLong(virTypedParameterPtr params, * * Returns 1 on success, 0 when the parameter does not exist in @params, or * -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsGetULLong(virTypedParameterPtr params, @@ -320,6 +335,9 @@ virTypedParamsGetULLong(virTypedParameterPtr params, * * Returns 1 on success, 0 when the parameter does not exist in @params, or * -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsGetDouble(virTypedParameterPtr params, @@ -356,6 +374,9 @@ virTypedParamsGetDouble(virTypedParameterPtr params, * * Returns 1 on success, 0 when the parameter does not exist in @params, or * -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsGetBoolean(virTypedParameterPtr params, @@ -394,6 +415,9 @@ virTypedParamsGetBoolean(virTypedParameterPtr params, * * Returns 1 on success, 0 when the parameter does not exist in @params, or * -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsGetString(virTypedParameterPtr params, @@ -433,6 +457,9 @@ virTypedParamsGetString(virTypedParameterPtr params, * if the parameter already exists in @params. * * Returns 0 on success, -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsAddInt(virTypedParameterPtr *params, @@ -479,6 +506,9 @@ virTypedParamsAddInt(virTypedParameterPtr *params, * error if the parameter already exists in @params. * * Returns 0 on success, -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsAddUInt(virTypedParameterPtr *params, @@ -525,6 +555,9 @@ virTypedParamsAddUInt(virTypedParameterPtr *params, * error if the parameter already exists in @params. * * Returns 0 on success, -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsAddLLong(virTypedParameterPtr *params, @@ -571,6 +604,9 @@ virTypedParamsAddLLong(virTypedParameterPtr *params, * error if the parameter already exists in @params. * * Returns 0 on success, -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsAddULLong(virTypedParameterPtr *params, @@ -617,6 +653,9 @@ virTypedParamsAddULLong(virTypedParameterPtr *params, * error if the parameter already exists in @params. * * Returns 0 on success, -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsAddDouble(virTypedParameterPtr *params, @@ -663,6 +702,9 @@ virTypedParamsAddDouble(virTypedParameterPtr *params, * error if the parameter already exists in @params. * * Returns 0 on success, -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsAddBoolean(virTypedParameterPtr *params, @@ -711,6 +753,9 @@ virTypedParamsAddBoolean(virTypedParameterPtr *params, * already exists in @params. * * Returns 0 on success, -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsAddString(virTypedParameterPtr *params, @@ -757,6 +802,9 @@ virTypedParamsAddString(virTypedParameterPtr *params, * key @name. * * Returns 0 on success, -1 on error. + * + * Since: v1.2.17 + * */ int virTypedParamsAddStringList(virTypedParameterPtr *params, @@ -802,6 +850,9 @@ virTypedParamsAddStringList(virTypedParameterPtr *params, * exists in @params. * * Returns 0 on success, -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsAddFromString(virTypedParameterPtr *params, @@ -840,6 +891,9 @@ virTypedParamsAddFromString(virTypedParameterPtr *params, * is not freed; use virTypedParamsFree if you want it to be freed too. * * Returns nothing. + * + * Since: v1.0.2 + * */ void virTypedParamsClear(virTypedParameterPtr params, @@ -866,6 +920,9 @@ virTypedParamsClear(virTypedParameterPtr params, * @params. * * Returns nothing. + * + * Since: v1.0.2 + * */ void virTypedParamsFree(virTypedParameterPtr params, -- 2.35.1

This commit is similar to "docs: Fix generated documentation of virConnectListAllNodeDeviceFlags", check it out for more info. Using git diff --word-diff to show the fixed output xml (redacted). <enum name='VIR_STORAGE_VOL_GET_PHYSICAL' ... [-type='virStorageVolInfoFlags'/>-] {+type='virStorageVolInfoFlags' version='3.0.0' info='Return the physical size in allocation'/>+} ... <enum name='VIR_STORAGE_VOL_USE_ALLOCATION' ... type='virStorageVolInfoFlags' [-info='Return the physical size in allocation'/>-] {+version='3.0.0'/>+} Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-storage.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/include/libvirt/libvirt-storage.h b/include/libvirt/libvirt-storage.h index 9a0439f348..9d220c6f3c 100644 --- a/include/libvirt/libvirt-storage.h +++ b/include/libvirt/libvirt-storage.h @@ -248,11 +248,8 @@ typedef enum { * */ typedef enum { - VIR_STORAGE_VOL_USE_ALLOCATION = 0, - - /* Return the physical size in allocation */ - VIR_STORAGE_VOL_GET_PHYSICAL = 1 << 0, - + VIR_STORAGE_VOL_USE_ALLOCATION = 0, /* (Since: v3.0.0) */ + VIR_STORAGE_VOL_GET_PHYSICAL = 1 << 0, /* Return the physical size in allocation (Since: v3.0.0) */ } virStorageVolInfoFlags; /** -- 2.35.1

This commit is similar to "docs: Fix generated documentation of virConnectListAllNodeDeviceFlags", check it out for more info. Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-storage.h | 47 +++++++++++++++---------------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/include/libvirt/libvirt-storage.h b/include/libvirt/libvirt-storage.h index 9d220c6f3c..4d7fb116a0 100644 --- a/include/libvirt/libvirt-storage.h +++ b/include/libvirt/libvirt-storage.h @@ -321,30 +321,29 @@ int virConnectListDefinedStoragePools(virConnectPtr conn, * */ typedef enum { - VIR_CONNECT_LIST_STORAGE_POOLS_INACTIVE = 1 << 0, - VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE = 1 << 1, - - VIR_CONNECT_LIST_STORAGE_POOLS_PERSISTENT = 1 << 2, - VIR_CONNECT_LIST_STORAGE_POOLS_TRANSIENT = 1 << 3, - - VIR_CONNECT_LIST_STORAGE_POOLS_AUTOSTART = 1 << 4, - VIR_CONNECT_LIST_STORAGE_POOLS_NO_AUTOSTART = 1 << 5, - - /* List pools by type */ - VIR_CONNECT_LIST_STORAGE_POOLS_DIR = 1 << 6, - VIR_CONNECT_LIST_STORAGE_POOLS_FS = 1 << 7, - VIR_CONNECT_LIST_STORAGE_POOLS_NETFS = 1 << 8, - VIR_CONNECT_LIST_STORAGE_POOLS_LOGICAL = 1 << 9, - VIR_CONNECT_LIST_STORAGE_POOLS_DISK = 1 << 10, - VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI = 1 << 11, - VIR_CONNECT_LIST_STORAGE_POOLS_SCSI = 1 << 12, - VIR_CONNECT_LIST_STORAGE_POOLS_MPATH = 1 << 13, - VIR_CONNECT_LIST_STORAGE_POOLS_RBD = 1 << 14, - VIR_CONNECT_LIST_STORAGE_POOLS_SHEEPDOG = 1 << 15, - VIR_CONNECT_LIST_STORAGE_POOLS_GLUSTER = 1 << 16, - VIR_CONNECT_LIST_STORAGE_POOLS_ZFS = 1 << 17, - VIR_CONNECT_LIST_STORAGE_POOLS_VSTORAGE = 1 << 18, - VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI_DIRECT = 1 << 19, + VIR_CONNECT_LIST_STORAGE_POOLS_INACTIVE = 1 << 0, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE = 1 << 1, /* (Since: v1.0.0) */ + + VIR_CONNECT_LIST_STORAGE_POOLS_PERSISTENT = 1 << 2, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_STORAGE_POOLS_TRANSIENT = 1 << 3, /* (Since: v1.0.0) */ + + VIR_CONNECT_LIST_STORAGE_POOLS_AUTOSTART = 1 << 4, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_STORAGE_POOLS_NO_AUTOSTART = 1 << 5, /* (Since: v1.0.0) */ + + VIR_CONNECT_LIST_STORAGE_POOLS_DIR = 1 << 6, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_STORAGE_POOLS_FS = 1 << 7, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_STORAGE_POOLS_NETFS = 1 << 8, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_STORAGE_POOLS_LOGICAL = 1 << 9, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_STORAGE_POOLS_DISK = 1 << 10, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI = 1 << 11, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_STORAGE_POOLS_SCSI = 1 << 12, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_STORAGE_POOLS_MPATH = 1 << 13, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_STORAGE_POOLS_RBD = 1 << 14, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_STORAGE_POOLS_SHEEPDOG = 1 << 15, /* (Since: v1.0.0) */ + VIR_CONNECT_LIST_STORAGE_POOLS_GLUSTER = 1 << 16, /* (Since: v1.2.1) */ + VIR_CONNECT_LIST_STORAGE_POOLS_ZFS = 1 << 17, /* (Since: v1.2.8) */ + VIR_CONNECT_LIST_STORAGE_POOLS_VSTORAGE = 1 << 18, /* (Since: v3.1.0) */ + VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI_DIRECT = 1 << 19, /* (Since: v5.6.0) */ } virConnectListAllStoragePoolsFlags; int virConnectListAllStoragePools(virConnectPtr conn, -- 2.35.1

Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-domain.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index 20a476412f..8f9a3775f2 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -2758,18 +2758,18 @@ int virDomainGetVcpus (virDomainPtr domain, /** * virDomainDeviceModifyFlags: * + * These flags may be bitwise-OR'd in. + * * Since: v1.0.0 * */ typedef enum { - /* See virDomainModificationImpact for these flags. (Since: v1.0.0) */ - VIR_DOMAIN_DEVICE_MODIFY_CURRENT = VIR_DOMAIN_AFFECT_CURRENT, - VIR_DOMAIN_DEVICE_MODIFY_LIVE = VIR_DOMAIN_AFFECT_LIVE, - VIR_DOMAIN_DEVICE_MODIFY_CONFIG = VIR_DOMAIN_AFFECT_CONFIG, + VIR_DOMAIN_DEVICE_MODIFY_CURRENT = VIR_DOMAIN_AFFECT_CURRENT, /* See virDomainModificationImpact (Since: v1.0.0) */ + VIR_DOMAIN_DEVICE_MODIFY_LIVE = VIR_DOMAIN_AFFECT_LIVE, /* (Since: v1.0.0) */ + VIR_DOMAIN_DEVICE_MODIFY_CONFIG = VIR_DOMAIN_AFFECT_CONFIG, /* (Since: v1.0.0) */ - /* Additionally, these flags may be bitwise-OR'd in. (Since: v1.0.0) */ VIR_DOMAIN_DEVICE_MODIFY_FORCE = (1 << 2), /* Forcibly modify device - (ex. force eject a cdrom) */ + (ex. force eject a cdrom) (Since: v1.0.0) */ } virDomainDeviceModifyFlags; int virDomainAttachDevice(virDomainPtr domain, const char *xml); -- 2.35.1

Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-domain.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index 8f9a3775f2..015bc2faa4 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -1958,18 +1958,17 @@ int virDomainGetMemoryParameters(virDomainPtr domain, * virDomainMemoryModFlags: * * Memory size modification flags. + * These flags may be bitwise-OR'd in. * * Since: v1.0.0 * */ typedef enum { - /* See virDomainModificationImpact for these flags. (Since: v1.0.0) */ - VIR_DOMAIN_MEM_CURRENT = VIR_DOMAIN_AFFECT_CURRENT, - VIR_DOMAIN_MEM_LIVE = VIR_DOMAIN_AFFECT_LIVE, - VIR_DOMAIN_MEM_CONFIG = VIR_DOMAIN_AFFECT_CONFIG, + VIR_DOMAIN_MEM_CURRENT = VIR_DOMAIN_AFFECT_CURRENT, /* See virDomainModificationImpact (Since: v1.0.0) */ + VIR_DOMAIN_MEM_LIVE = VIR_DOMAIN_AFFECT_LIVE, /* See virDomainModificationImpact (Since: v1.0.0) */ + VIR_DOMAIN_MEM_CONFIG = VIR_DOMAIN_AFFECT_CONFIG, /* See virDomainModificationImpact (Since: v1.0.0) */ - /* Additionally, these flags may be bitwise-OR'd in. (Since: v1.0.0) */ - VIR_DOMAIN_MEM_MAXIMUM = (1 << 2), /* affect Max rather than current */ + VIR_DOMAIN_MEM_MAXIMUM = (1 << 2), /* affect Max rather than current (Since: v1.0.0) */ } virDomainMemoryModFlags; -- 2.35.1

Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-domain.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index 015bc2faa4..451a398c42 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -2491,20 +2491,19 @@ typedef virVcpuInfo *virVcpuInfoPtr; * virDomainVcpuFlags: * * Flags for controlling virtual CPU hot-plugging. + * These flags may be bitwise-OR'd in. * * Since: v1.0.0 * */ typedef enum { - /* See virDomainModificationImpact for these flags. (Since: v1.0.0) */ - VIR_DOMAIN_VCPU_CURRENT = VIR_DOMAIN_AFFECT_CURRENT, - VIR_DOMAIN_VCPU_LIVE = VIR_DOMAIN_AFFECT_LIVE, - VIR_DOMAIN_VCPU_CONFIG = VIR_DOMAIN_AFFECT_CONFIG, + VIR_DOMAIN_VCPU_CURRENT = VIR_DOMAIN_AFFECT_CURRENT, /* See virDomainModificationImpact (Since: v1.0.0) */ + VIR_DOMAIN_VCPU_LIVE = VIR_DOMAIN_AFFECT_LIVE, /* See virDomainModificationImpact (Since: v1.0.0) */ + VIR_DOMAIN_VCPU_CONFIG = VIR_DOMAIN_AFFECT_CONFIG, /* See virDomainModificationImpact (Since: v1.0.0) */ - /* Additionally, these flags may be bitwise-OR'd in. (Since: v1.0.0) */ VIR_DOMAIN_VCPU_MAXIMUM = (1 << 2), /* Max rather than current count (Since: v1.1.0) */ VIR_DOMAIN_VCPU_GUEST = (1 << 3), /* Modify state of the cpu in the guest (Since: v2.4.0) */ - VIR_DOMAIN_VCPU_HOTPLUGGABLE = (1 << 4), /* Make vcpus added hot(un)pluggable */ + VIR_DOMAIN_VCPU_HOTPLUGGABLE = (1 << 4), /* Make vcpus added hot(un)pluggable (Since: v2.4.0) */ } virDomainVcpuFlags; int virDomainSetVcpus (virDomainPtr domain, -- 2.35.1

This patch adds 'version' parameter to the generated XML API for enums. It'll require, for new additions, to add a comment with the version that the enum value was added. Note that the Since tag is removed from the comment as there is a proper field for it in the XML. Signed-off-by: Victor Toso <victortoso@redhat.com> --- scripts/apibuild.py | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/scripts/apibuild.py b/scripts/apibuild.py index bdd3077c48..4e9f802bde 100755 --- a/scripts/apibuild.py +++ b/scripts/apibuild.py @@ -2178,6 +2178,24 @@ class docBuilder: self.scanModules() self.scanVersions() + # Fetch tags from the comment. Only 'Since' supported at the moment. + # Return the tags and the original comment without the tags. + def retrieve_comment_tags(self, name: str, comment: str) -> (str, str): + since = "" + if comment is not None: + comment_match = re.search(r"\(?Since: v?(\d+\.\d+\.\d+)\)?", comment) + if comment_match: + # Remove Since tag from the comment + (start, end) = comment_match.span() + comment = comment[:start] + comment[end:] + comment = comment.strip() + # Only the version + since = comment_match.group(1) + + if since == "": + self.warning("Missing 'Since' tag for: " + name) + return (since, comment) + def modulename_file(self, file): module = os.path.basename(file) if module[-2:] == '.h': @@ -2211,7 +2229,15 @@ class docBuilder: if info[2] is not None and info[2] != '': output.write(" type='%s'" % info[2]) if info[1] is not None and info[1] != '': - output.write(" info='%s'" % escape(info[1])) + # Search for 'Since' version tag + (since, comment) = self.retrieve_comment_tags(name, info[1]) + if len(since) > 0: + output.write(" version='%s'" % escape(since)) + if len(comment) > 0: + output.write(" info='%s'" % escape(comment)) + else: + self.warning("Missing docstring for enum: " + name) + output.write("/>\n") def serialize_macro(self, output, name): -- 2.35.1

Removed the TODO as we can rely to the serialize_typedef() the job to report missing comments. Signed-off-by: Victor Toso <victortoso@redhat.com> --- scripts/apibuild.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/apibuild.py b/scripts/apibuild.py index 4e9f802bde..5335670c1c 100755 --- a/scripts/apibuild.py +++ b/scripts/apibuild.py @@ -1145,6 +1145,12 @@ class CParser: def parseTypedef(self, token): if token is None: return None + + # With typedef enum types, we can have comments parsed before the + # enum themselves. The parsing of enum values does clear the + # self.comment variable. So we store it here for later. + typedef_comment = self.comment + token = self.parseType(token) if token is None: self.error("parsing typedef") @@ -1168,7 +1174,7 @@ class CParser: "struct", type) base_type = "struct " + name else: - # TODO report missing or misformatted comments + self.comment = typedef_comment info = self.parseTypeComment(name, 1) self.index_add(name, self.filename, not self.is_header, "typedef", type, info) -- 2.35.1

This patch adds 'version' parameter to the generated XML API for typedefs It'll require, for new additions, to add a comment with the version that the typedef value was added. An example bellow of code diff and the change in the generated XML. Note that the Since tag is removed from the comment as there is a proper field for it in the XML. Signed-off-by: Victor Toso <victortoso@redhat.com> --- scripts/apibuild.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/apibuild.py b/scripts/apibuild.py index 5335670c1c..da70d67fa6 100755 --- a/scripts/apibuild.py +++ b/scripts/apibuild.py @@ -2296,9 +2296,11 @@ class docBuilder: def serialize_typedef(self, output, name): id = self.idx.typedefs[name] + (since, comment) = self.retrieve_comment_tags(name, id.extra) + version_tag = len(since) > 0 and f" version='{since}'" or "" if id.info[0:7] == 'struct ': - output.write(" <struct name='%s' file='%s' type='%s'" % ( - name, self.modulename_file(id.header), id.info)) + output.write(" <struct name='%s' file='%s' type='%s'%s" % ( + name, self.modulename_file(id.header), id.info, version_tag)) name = id.info[7:] if (name in self.idx.structs and isinstance(self.idx.structs[name].info, (list, tuple))): @@ -2321,12 +2323,11 @@ class docBuilder: else: output.write("/>\n") else: - output.write(" <typedef name='%s' file='%s' type='%s'" % ( - name, self.modulename_file(id.header), id.info)) + output.write(" <typedef name='%s' file='%s' type='%s'%s" % ( + name, self.modulename_file(id.header), id.info, version_tag)) try: - desc = id.extra - if desc is not None and desc != "": - output.write(">\n <info><![CDATA[%s]]></info>\n" % (desc)) + if comment is not None and comment != "": + output.write(">\n <info><![CDATA[%s]]></info>\n" % (comment)) output.write(" </typedef>\n") else: output.write("/>\n") -- 2.35.1

This patch adds 'version' parameter to the generated XML API for macros It'll require, for new additions, to add a comment with the version that the macro was added. An example bellow of code diff and the change in the generated XML. Note that the Since tag is removed from the comment as there is a proper field for it in the XML. Signed-off-by: Victor Toso <victortoso@redhat.com> --- scripts/apibuild.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/apibuild.py b/scripts/apibuild.py index da70d67fa6..c4ff733550 100755 --- a/scripts/apibuild.py +++ b/scripts/apibuild.py @@ -2265,11 +2265,15 @@ class docBuilder: output.write(" string='%s'" % strValue) else: output.write(" raw='%s'" % escape(rawValue)) + + (since, comment) = self.retrieve_comment_tags(name, desc) + if len(since) > 0: + output.write(" version='%s'" % escape(since)) output.write(">\n") - if desc is not None and desc != "": - output.write(" <info><![CDATA[%s]]></info>\n" % (desc)) - self.indexString(name, desc) + if comment is not None and comment != "": + output.write(" <info><![CDATA[%s]]></info>\n" % (comment)) + self.indexString(name, comment) for arg in args: (name, desc) = arg if desc is not None and desc != "": -- 2.35.1

This patch adds 'version' parameter to generated XML API for functions and functypes. The 'version' metadata has been added with e0e0bf6628 by parsing .syms files. This commit does not override that but it will warn if there is not 'Since' metadata with new additions. There is not clear benefit for keeping both. For now, I've added a warning in case there is a mismatch between the version provided by .syms and docstring. Signed-off-by: Victor Toso <victortoso@redhat.com> --- scripts/apibuild.py | 50 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/scripts/apibuild.py b/scripts/apibuild.py index c4ff733550..d16beaa4ae 100755 --- a/scripts/apibuild.py +++ b/scripts/apibuild.py @@ -2185,8 +2185,9 @@ class docBuilder: self.scanVersions() # Fetch tags from the comment. Only 'Since' supported at the moment. - # Return the tags and the original comment without the tags. - def retrieve_comment_tags(self, name: str, comment: str) -> (str, str): + # For functions, since tags are on Return comments. + # Return the tags and the original comments, but without the tags. + def retrieve_comment_tags(self, name: str, comment: str, return_comment="") -> (str, str, str): since = "" if comment is not None: comment_match = re.search(r"\(?Since: v?(\d+\.\d+\.\d+)\)?", comment) @@ -2198,9 +2199,19 @@ class docBuilder: # Only the version since = comment_match.group(1) + if since == "" and return_comment is not None: + return_match = re.search(r"\(?Since: v?(\d+\.\d+\.\d+)\)?", return_comment) + if return_match: + # Remove Since tag from the comment + (start, end) = return_match.span() + return_comment = return_comment[:start] + return_comment[end:] + return_comment = return_comment.strip() + # Only the version + since = return_match.group(1) + if since == "": self.warning("Missing 'Since' tag for: " + name) - return (since, comment) + return (since, comment, return_comment) def modulename_file(self, file): module = os.path.basename(file) @@ -2236,7 +2247,7 @@ class docBuilder: output.write(" type='%s'" % info[2]) if info[1] is not None and info[1] != '': # Search for 'Since' version tag - (since, comment) = self.retrieve_comment_tags(name, info[1]) + (since, comment, _) = self.retrieve_comment_tags(name, info[1]) if len(since) > 0: output.write(" version='%s'" % escape(since)) if len(comment) > 0: @@ -2266,7 +2277,7 @@ class docBuilder: else: output.write(" raw='%s'" % escape(rawValue)) - (since, comment) = self.retrieve_comment_tags(name, desc) + (since, comment, _) = self.retrieve_comment_tags(name, desc) if len(since) > 0: output.write(" version='%s'" % escape(since)) output.write(">\n") @@ -2300,7 +2311,7 @@ class docBuilder: def serialize_typedef(self, output, name): id = self.idx.typedefs[name] - (since, comment) = self.retrieve_comment_tags(name, id.extra) + (since, comment, _) = self.retrieve_comment_tags(name, id.extra) version_tag = len(since) > 0 and f" version='{since}'" or "" if id.info[0:7] == 'struct ': output.write(" <struct name='%s' file='%s' type='%s'%s" % ( @@ -2352,6 +2363,12 @@ class docBuilder: if name == debugsym and not quiet: print("=>", id) + (ret, params, desc) = id.info + return_comment = (ret is not None and ret[1] is not None) and ret[1] or "" + (since, comment, return_comment) = self.retrieve_comment_tags(name, desc, return_comment) + # Simple way to avoid setting empty version + version_tag = len(since) > 0 and f" version='{since}'" or "" + # NB: this is consumed by a regex in 'getAPIFilenames' in hvsupport.pl if id.type == "function": ver = self.versions[name] @@ -2361,9 +2378,10 @@ class docBuilder: name, self.modulename_file(id.header), self.modulename_file(id.module), self.versions[name])) else: - output.write(" <functype name='%s' file='%s' module='%s'>\n" % ( + output.write(" <functype name='%s' file='%s' module='%s'%s>\n" % ( name, self.modulename_file(id.header), - self.modulename_file(id.module))) + self.modulename_file(id.module), + version_tag)) # # Processing of conditionals modified by Bill 1/1/05 # @@ -2374,19 +2392,27 @@ class docBuilder: apstr = apstr + " && " apstr = apstr + cond output.write(" <cond>%s</cond>\n" % (apstr)) + try: - (ret, params, desc) = id.info - output.write(" <info><![CDATA[%s]]></info>\n" % (desc)) + # For functions, we get the since from .syms files. This is an extra check to see + # that docstrings are correct. Note that docstrings starts with 1.0.0. + ver = name in self.versions and self.versions[name] or None + if len(since) > 0 and ver is not None and int(ver[0]) != 0 and since != ver: + self.warning(f"Function {name} has symversion {ver} but docstring says {since}") + + output.write(" <info><![CDATA[%s]]></info>\n" % (comment)) self.indexString(name, desc) + if ret[0] is not None: if ret[0] == "void": output.write(" <return type='void'/>\n") - elif (ret[1] is None or ret[1] == '') and name not in ignored_functions: + elif (return_comment == '') and name not in ignored_functions: self.error("Missing documentation for return of function `%s'" % name) else: output.write(" <return type='%s' info='%s'/>\n" % ( - ret[0], escape(ret[1]))) + ret[0], escape(return_comment))) self.indexString(name, ret[1]) + for param in params: if param[0] == 'void': continue -- 2.35.1

So we can use for comments that are being hold in helper variables. Signed-off-by: Victor Toso <victortoso@redhat.com> --- scripts/apibuild.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/apibuild.py b/scripts/apibuild.py index d16beaa4ae..97f448f6bf 100755 --- a/scripts/apibuild.py +++ b/scripts/apibuild.py @@ -722,15 +722,18 @@ class CParser: line = line.replace('*', '', 1) return line - def cleanupComment(self): - if not isinstance(self.comment, str): - return - # remove the leading * on multi-line comments - lines = self.comment.splitlines(True) + def cleanup_code_comment(self, comment: str) -> str: + if not isinstance(self.comment, str) or comment == "": + return "" + + lines = comment.splitlines(True) com = "" for line in lines: com = com + self.strip_lead_star(line) - self.comment = com.strip() + return com.strip() + + def cleanupComment(self): + self.comment = self.cleanup_code_comment(self.comment) def parseComment(self, token): com = token[1] -- 2.35.1

scripts/apibuild.py did not consider exporting external variable's comments into the XML API. This commits fixes that. Noe that the way that CParser is designed, it is currently possible to lose a parsed comment when parsing other fields as self.comment in several places. I've added a comment to highlight this. Signed-off-by: Victor Toso <victortoso@redhat.com> --- scripts/apibuild.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/scripts/apibuild.py b/scripts/apibuild.py index 97f448f6bf..d1edfce3a6 100755 --- a/scripts/apibuild.py +++ b/scripts/apibuild.py @@ -1930,10 +1930,14 @@ class CParser: if token is None or token[0] != 'name': return token + variable_comment = None if token[1] == 'typedef': token = self.token() return self.parseTypedef(token) else: + # Store block of comment that might be from variable as + # the code uses self.comment a lot and it would lose it. + variable_comment = self.cleanup_code_comment(self.comment) token = self.parseType(token) type_orig = self.type if token is None or token[0] != "name": @@ -1979,8 +1983,10 @@ class CParser: not self.is_header, "struct", self.struct_fields) else: + # Just to use the cleanupComment function. + info = (type, variable_comment) self.index_add(self.name, self.filename, - not self.is_header, "variable", type) + not self.is_header, "variable", info) break elif token[1] == "(": token = self.token() @@ -2354,12 +2360,16 @@ class docBuilder: def serialize_variable(self, output, name): id = self.idx.variables[name] - if id.info is not None: - output.write(" <variable name='%s' file='%s' type='%s'/>\n" % ( - name, self.modulename_file(id.header), id.info)) + (type, comment) = id.info + (since, comment, _) = self.retrieve_comment_tags(name, comment) + version_tag = len(since) > 0 and f" version='{since}'" or "" + output.write(" <variable name='%s' file='%s' type='%s'%s" % ( + name, self.modulename_file(id.header), type, version_tag)) + if len(comment) == 0: + output.write("/>\n") else: - output.write(" <variable name='%s' file='%s'/>\n" % ( - name, self.modulename_file(id.header))) + output.write(">\n <info><![CDATA[%s]]></info>\n" % (comment)) + output.write(" </variable>\n") def serialize_function(self, output, name): id = self.idx.functions[name] -- 2.35.1

Discover this mismatch with the docstring work. scripts/apibuild.py complained. Signed-off-by: Victor Toso <victortoso@redhat.com> --- src/admin/libvirt_admin_public.syms | 58 ++++++++++++++++++++++------- 1 file changed, 45 insertions(+), 13 deletions(-) diff --git a/src/admin/libvirt_admin_public.syms b/src/admin/libvirt_admin_public.syms index 8126973e5b..79bfb76822 100644 --- a/src/admin/libvirt_admin_public.syms +++ b/src/admin/libvirt_admin_public.syms @@ -10,36 +10,63 @@ # soname version info can't enforce this since we never # change the soname # -LIBVIRT_ADMIN_2.0.0 { +LIBVIRT_ADMIN_1.2.17 { global: - virAdmInitialize; - virAdmClientFree; - virAdmClientGetID; - virAdmClientGetTimestamp; - virAdmClientGetTransport; virAdmConnectOpen; virAdmConnectClose; virAdmConnectRef; +}; + +LIBVIRT_ADMIN_1.3.0 { + global: virAdmGetVersion; +} LIBVIRT_ADMIN_1.2.17; + +LIBVIRT_ADMIN_1.3.1 { + global: virAdmConnectIsAlive; virAdmConnectGetURI; virAdmConnectGetLibVersion; virAdmConnectRegisterCloseCallback; virAdmConnectUnregisterCloseCallback; - virAdmConnectListServers; +} LIBVIRT_ADMIN_1.3.0; + +LIBVIRT_ADMIN_1.3.2 { + global: virAdmServerGetName; - virAdmServerGetThreadPoolParameters; virAdmServerFree; - virAdmServerLookupClient; + virAdmConnectListServers; +} LIBVIRT_ADMIN_1.3.1; + +LIBVIRT_ADMIN_1.3.3 { + global: virAdmConnectLookupServer; +} LIBVIRT_ADMIN_1.3.2; + +LIBVIRT_ADMIN_1.3.4 { + global: + virAdmServerGetThreadPoolParameters; virAdmServerSetThreadPoolParameters; - virAdmServerListClients; - virAdmClientGetInfo; +} LIBVIRT_ADMIN_1.3.3; + +LIBVIRT_ADMIN_1.3.5 { + global: virAdmClientClose; + virAdmClientFree; + virAdmClientGetID; + virAdmClientGetTimestamp; + virAdmClientGetInfo; + virAdmClientGetTransport; virAdmServerGetClientLimits; virAdmServerSetClientLimits; - virAdmServerUpdateTlsFiles; -}; + virAdmServerListClients; + virAdmServerLookupClient; +} LIBVIRT_ADMIN_1.3.4; + +LIBVIRT_ADMIN_2.0.0 { + global: + virAdmInitialize; +} LIBVIRT_ADMIN_1.3.5; LIBVIRT_ADMIN_3.0.0 { global: @@ -48,3 +75,8 @@ LIBVIRT_ADMIN_3.0.0 { virAdmConnectSetLoggingOutputs; virAdmConnectSetLoggingFilters; } LIBVIRT_ADMIN_2.0.0; + +LIBVIRT_ADMIN_6.2.0 { + global: + virAdmServerUpdateTlsFiles; +} LIBVIRT_ADMIN_3.0.0; -- 2.35.1

On Thu, Apr 14, 2022 at 22:47:43 +0200, Victor Toso wrote:
Discover this mismatch with the docstring work. scripts/apibuild.py complained.
Signed-off-by: Victor Toso <victortoso@redhat.com> --- src/admin/libvirt_admin_public.syms | 58 ++++++++++++++++++++++------- 1 file changed, 45 insertions(+), 13 deletions(-)
As noted in the reply to the cover letter: NACK, this breaks existing builds of apps which link against the admin client library: $ gcc -lvirt -lvirt-admin -o vc libvirt/examples/c/admin/client_limits.c $ ./vc asdf libvirt: XML-RPC error : Failed to connect socket to '/run/user/1000/libvirt/libvirt-admin-sock': No such file or directory $ LD_LIBRARY_PATH=/home/pipo/build/libvirt/gcc/src ./vc asdf ./vc: symbol lookup error: ./vc: undefined symbol: virAdmConnectOpen, version LIBVIRT_ADMIN_2.0.0

On Tue, Apr 19, 2022 at 03:26:45PM +0200, Peter Krempa wrote:
On Thu, Apr 14, 2022 at 22:47:43 +0200, Victor Toso wrote:
Discover this mismatch with the docstring work. scripts/apibuild.py complained.
Signed-off-by: Victor Toso <victortoso@redhat.com> --- src/admin/libvirt_admin_public.syms | 58 ++++++++++++++++++++++------- 1 file changed, 45 insertions(+), 13 deletions(-)
As noted in the reply to the cover letter:
NACK, this breaks existing builds of apps which link against the admin client library:
Further, the current .syms file is actually correct, though it may not be obvious if you look at git history. We comitted stuff incrementally in earlier versions, but it was not actually consumable by apps until 2.0.0, hence the version was set to 2.0.0 by: commit 52dbacc07a693e14079c445ec677ab03a0888106 Author: Erik Skultety <eskultet@redhat.com> Date: Fri Jun 24 19:27:09 2016 +0200 admin: enable both admin API functionality and tarball distribution This patch enables admin socket creation in daemon's code, bumps the library version in libvirt_admin_public.syms, and performs all necessary modifications to our makefiles so that admin API can finally be included in the tarball, and eventually become part of an rpm package (a patch later in this series). Signed-off-by: Erik Skultety <eskultet@redhat.com> With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

Found thanks to scripts/apibuild.py complain: | Function virDomainSetBlockThreshold has symversion 3.1.0 but docstring says 3.2.0 Add in bb09798fbe "lib: Add API for setting the threshold size for VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD" in 2017-03-27 Easy to check with git grep: | > git grep -r virDomainSetBlockThreshold v3.1.0 ./include | /* Fails */ | > git grep -r virDomainSetBlockThreshold v3.2.0 ./include | v3.2.0:include/libvirt/libvirt-domain.h: * The threshold size can be set via the virDomainSetBlockThreshold API. | v3.2.0:include/libvirt/libvirt-domain.h:int virDomainSetBlockThreshold(virDomainPtr domain, Signed-off-by: Victor Toso <victortoso@redhat.com> --- src/libvirt_public.syms | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms index f93692c427..84e608c7b0 100644 --- a/src/libvirt_public.syms +++ b/src/libvirt_public.syms @@ -755,10 +755,14 @@ LIBVIRT_3.0.0 { LIBVIRT_3.1.0 { global: - virDomainSetBlockThreshold; virDomainSetVcpu; } LIBVIRT_3.0.0; +LIBVIRT_3.2.0 { + global: + virDomainSetBlockThreshold; +} LIBVIRT_3.1.0; + LIBVIRT_3.4.0 { global: virStreamRecvFlags; @@ -766,7 +770,7 @@ LIBVIRT_3.4.0 { virStreamSendHole; virStreamSparseRecvAll; virStreamSparseSendAll; -} LIBVIRT_3.1.0; +} LIBVIRT_3.2.0; LIBVIRT_3.7.0 { global: -- 2.35.1

On Thu, Apr 14, 2022 at 22:47:44 +0200, Victor Toso wrote:
Found thanks to scripts/apibuild.py complain:
| Function virDomainSetBlockThreshold has symversion 3.1.0 but docstring says 3.2.0
Add in bb09798fbe "lib: Add API for setting the threshold size for VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD" in 2017-03-27
Easy to check with git grep: | > git grep -r virDomainSetBlockThreshold v3.1.0 ./include | /* Fails */ | > git grep -r virDomainSetBlockThreshold v3.2.0 ./include | v3.2.0:include/libvirt/libvirt-domain.h: * The threshold size can be set via the virDomainSetBlockThreshold API. | v3.2.0:include/libvirt/libvirt-domain.h:int virDomainSetBlockThreshold(virDomainPtr domain,
Signed-off-by: Victor Toso <victortoso@redhat.com> --- src/libvirt_public.syms | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
As noted in my reply to the cover letter. This breaks linking of existing builds of apps with libvirt: $ cat threshold.c #include <stddef.h> #include <libvirt/libvirt.h> int main() { virInitialize(); virDomainSetBlockThreshold(NULL, 0, 0, 0); return 0; } $ gcc threshold.c -o threshold -lvirt -pedantic -Wall $ ./threshold libvirt: Domain error : invalid domain pointer in virDomainSetBlockThreshold $ LD_LIBRARY_PATH=/home/pipo/build/libvirt/gcc/src/ ./threshold ./threshold: symbol lookup error: ./threshold: undefined symbol: virDomainSetBlockThreshold, version LIBVIRT_3.1.0 NACK

It doesn't need to fail the test if a reentrant function is found in a comment. Fixes: | ... | prohibit_nonreentrant | libvirt/ci/helper:33: default=os.getlogin(), # exempt from syntax-check | libvirt/include/libvirt/libvirt-storage.h:223: VIR_STORAGE_VOL_WIPE_ALG_PFITZNER7 = 6, /* 7-pass random (Since: v1.0.0) */ | libvirt/include/libvirt/libvirt-storage.h:225: VIR_STORAGE_VOL_WIPE_ALG_PFITZNER33 = 7, /* 33-pass random (Since: v1.0.0) */ | libvirt/include/libvirt/libvirt-storage.h:227: VIR_STORAGE_VOL_WIPE_ALG_RANDOM = 8, /* 1-pass random (Since: v1.0.0) */ Signed-off-by: Victor Toso <victortoso@redhat.com> --- build-aux/syntax-check.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index a6e3ada300..eb403f3d3f 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -300,7 +300,7 @@ sc_prohibit_PATH_MAX: include $(top_srcdir)/build-aux/Makefile.nonreentrant sc_prohibit_nonreentrant: @prohibit="\\<(${NON_REENTRANT_RE}) *\\(" \ - exclude='exempt from syntax-check' \ + exclude='exempt from syntax-check|\/\*.*\*\/' \ halt="use re-entrant functions (usually ending with _r)" \ $(_sc_search_regexp) -- 2.35.1

Hi, On Thu, Apr 14, 2022 at 10:47:11PM +0200, Victor Toso wrote:
Hi,
The goal of this patch series is to provide 'since' version to all exported types.
Forgot to add before/after diff... For 24h or so: https://paste.centos.org/view/be5b5c78 Cheers,
This is the non lazy version of the v1. In this series, we do change the docstrings of all exported types, to add the version metadata, in order to have scripts/apibuild.py to fetch it and add it to the appropriated XML API. This patch series also enforces that every new exported types requires a docstring with version with the proper format.
v1: https://listman.redhat.com/archives/libvir-list/2022-April/229881.html
I've created a script that helped me out and it covered a good amound of cases. I hand fixes all the missing docstrings and corner cases that my script missed.
As mentioned in v1, I've used:
git grep -rq $symbol $tag $includedir
This is used to find if a given $symbol exists in a given $tag or not. $tag starts with v1.0.0 and I have ignored any $tag that does not start with 'v' or has '-rc' in the name.
To help review this not so small changeset, the changes were split in the following order:
* docs: generated: 98% work from the script. I've split it further, by module + group type.
* docs: manual: -> 30% manual labor, 70% vim's macro. It was also split where it seems reasonable.
* docs: (...) -> Some fixes needed in the docs.
* scripts: -> Improvements to apibuild script.
* syms: -> Some fixes found with the found mismatch between docstring and sym files.
Other than that, I only caught two false positives, that is, a $symbol was present in a $tag but it was exported only at a latter $tag.
Branch : https://gitlab.com/victortoso/libvirt/-/commits/add-since-version Green CI: https://gitlab.com/victortoso/libvirt/-/pipelines/517262280
Cheers, Victor
Victor Toso (34): docs: Fix generated documentation of virConnectListAllNodeDeviceFlags docs: variable: Move docstring from source to header file docs: generated: enums: libvirt: append 'Since version' metadata docs: generated: enums: qemu: append 'Since version' metadata docs: generated: enums: admin: append 'Since version' metadata docs: generated: macros: libvirt: append 'Since version' metadata docs: generated: macros: admin: append 'Since version' metadata docs: generated: typedefs: libvirt: append 'Since version' metadata docs: generated: typedefs: qemu: append 'Since version' metadata docs: generated: typedefs: admin: append 'Since version' metadata docs: generated: functions: libvirt: append 'Since version' metadata docs: generated: functions: qemu: append 'Since version' metadata docs: generated: functions: lxc: append 'Since version' metadata docs: generated: functions: admin: append 'Since version' metadata docs: manual: typedef: add docstring and Since metadata docs: manual: functions: add Since metadata docs: manual: enums: add docstring and Since metadata docs: manual: macros: add docstring and Since metadata docs: manual: libvirt-common: add docstring and Since metadata docs: Fix generated documentation of virStorageVolInfoFlags docs: Fix and append Since to virConnectListAllStoragePoolsFlags docs: Fix and append Since to virDomainDeviceModifyFlags docs: Fix and append Since to virDomainMemoryModFlags docs: Fix and append Since to virDomainVcpuFlags scripts: apibuild: parse 'Since' version for enums scripts: apibuild: fix parsing block comments from typedef enum scripts: apibuild: parse 'Since' for typedefs scripts: apibuild: parse 'Since' for macros scripts: apibuild: parse 'Since' for functions scripts: apibuild: factor out comment cleaning scripts: apibuild: add parsing variable's comments syms: admin: Add sections to match when API was introduced syms: libvirt: move virDomainSetBlockThreshold to 3.2.0 syntax-check: sc_prohibit_nonreentrant: skip comments
build-aux/syntax-check.mk | 2 +- include/libvirt/libvirt-admin.h | 95 +- include/libvirt/libvirt-common.h.in | 54 +- include/libvirt/libvirt-domain-checkpoint.h | 62 +- include/libvirt/libvirt-domain-snapshot.h | 100 +- include/libvirt/libvirt-domain.h | 2665 +++++++++++++++---- include/libvirt/libvirt-event.h | 35 +- include/libvirt/libvirt-host.h | 320 ++- include/libvirt/libvirt-interface.h | 33 +- include/libvirt/libvirt-network.h | 195 +- include/libvirt/libvirt-nodedev.h | 100 +- include/libvirt/libvirt-nwfilter.h | 29 +- include/libvirt/libvirt-qemu.h | 39 +- include/libvirt/libvirt-secret.h | 81 +- include/libvirt/libvirt-storage.h | 316 ++- include/libvirt/libvirt-stream.h | 48 +- include/libvirt/virterror.h | 428 +-- scripts/apibuild.py | 136 +- src/admin/libvirt-admin.c | 93 + src/admin/libvirt_admin_public.syms | 58 +- src/libvirt-domain-checkpoint.c | 36 + src/libvirt-domain-snapshot.c | 63 + src/libvirt-domain.c | 557 +++- src/libvirt-host.c | 102 + src/libvirt-interface.c | 63 + src/libvirt-lxc.c | 12 + src/libvirt-network.c | 135 + src/libvirt-nodedev.c | 81 + src/libvirt-nwfilter.c | 72 + src/libvirt-qemu.c | 18 + src/libvirt-secret.c | 60 + src/libvirt-storage.c | 171 ++ src/libvirt-stream.c | 51 + src/libvirt.c | 29 +- src/libvirt_public.syms | 8 +- src/util/virerror.c | 45 + src/util/virevent.c | 27 + src/util/virtypedparam-public.c | 57 + 38 files changed, 5317 insertions(+), 1159 deletions(-)
-- 2.35.1

On Thu, Apr 14, 2022 at 22:47:11 +0200, Victor Toso wrote:
Hi,
Couple of comments which I summarize on the top level rather than doing specifics since they might need a reorg of the series:
The goal of this patch series is to provide 'since' version to all exported types.
This is the non lazy version of the v1. In this series, we do change the docstrings of all exported types, to add the version metadata, in order to have scripts/apibuild.py to fetch it and add it to the appropriated XML API. This patch series also enforces that every new exported types requires a docstring with version with the proper format.
v1: https://listman.redhat.com/archives/libvir-list/2022-April/229881.html
I've created a script that helped me out and it covered a good amound of cases. I hand fixes all the missing docstrings and corner cases that my script missed.
As mentioned in v1, I've used:
git grep -rq $symbol $tag $includedir
This is used to find if a given $symbol exists in a given $tag or not. $tag starts with v1.0.0 and I have ignored any $tag that does not start with 'v' or has '-rc' in the name.
To help review this not so small changeset, the changes were split in the following order:
* docs: generated: 98% work from the script. I've split it further, by module + group type.
* docs: manual: -> 30% manual labor, 70% vim's macro. It was also split where it seems reasonable.
* docs: (...) -> Some fixes needed in the docs.
* scripts: -> Improvements to apibuild script.
* syms: -> Some fixes found with the found mismatch between docstring and sym files.
Other than that, I only caught two false positives, that is, a $symbol was present in a $tag but it was exported only at a latter $tag.
Branch : https://gitlab.com/victortoso/libvirt/-/commits/add-since-version Green CI: https://gitlab.com/victortoso/libvirt/-/pipelines/517262280
Cheers, Victor
Victor Toso (34): docs: Fix generated documentation of virConnectListAllNodeDeviceFlags docs: variable: Move docstring from source to header file docs: generated: enums: libvirt: append 'Since version' metadata
The tree fails to build after this commit. Per our guidelines the tree must be buildable after every single commit: https://www.libvirt.org/hacking.html#preparing-patches This is to ensure bisectability. You'll need to reorganize the fixes you've done after applying the changes automatically to happen before or at the same time to ensure compliance.
docs: generated: enums: qemu: append 'Since version' metadata docs: generated: enums: admin: append 'Since version' metadata docs: generated: macros: libvirt: append 'Since version' metadata docs: generated: macros: admin: append 'Since version' metadata docs: generated: typedefs: libvirt: append 'Since version' metadata docs: generated: typedefs: qemu: append 'Since version' metadata docs: generated: typedefs: admin: append 'Since version' metadata docs: generated: functions: libvirt: append 'Since version' metadata docs: generated: functions: qemu: append 'Since version' metadata docs: generated: functions: lxc: append 'Since version' metadata docs: generated: functions: admin: append 'Since version' metadata docs: manual: typedef: add docstring and Since metadata docs: manual: functions: add Since metadata docs: manual: enums: add docstring and Since metadata docs: manual: macros: add docstring and Since metadata docs: manual: libvirt-common: add docstring and Since metadata docs: Fix generated documentation of virStorageVolInfoFlags docs: Fix and append Since to virConnectListAllStoragePoolsFlags docs: Fix and append Since to virDomainDeviceModifyFlags docs: Fix and append Since to virDomainMemoryModFlags docs: Fix and append Since to virDomainVcpuFlags
None of these actually change anything in the 'docs' directory. I'd suggest to pick an unambiguous prefix such as "symbols" or something similar.
scripts: apibuild: parse 'Since' version for enums scripts: apibuild: fix parsing block comments from typedef enum scripts: apibuild: parse 'Since' for typedefs scripts: apibuild: parse 'Since' for macros
After the fix mentioned below [1] the build of the tree breaks after this commit: FAILED: docs/libvirt-api.xml docs/libvirt-lxc-api.xml docs/libvirt-qemu-api.xml docs/libvirt-admin-api.xml /home/pipo/libvirt/scripts/meson-python.sh /bin/python3 /home/pipo/libvirt/scripts/apibuild.py /home/pipo/libvirt/docs /home/pipo/build/libvirt/gcc/docs Function virDomainSetBlockThreshold has symversion 3.1.0 but docstring says 3.2.0 Function virAdmClientClose has symversion 2.0.0 but docstring says 1.3.5 Function virAdmClientFree has symversion 2.0.0 but docstring says 1.3.5 Function virAdmClientGetID has symversion 2.0.0 but docstring says 1.3.5 ...
scripts: apibuild: parse 'Since' for functions scripts: apibuild: factor out comment cleaning scripts: apibuild: add parsing variable's comments
syms: admin: Add sections to match when API was introduced syms: libvirt: move virDomainSetBlockThreshold to 3.2.0
These two commits are not acceptable as they break existing builds of software that references the symbols. At some point in the past the mistake was noticed but we must not ever change it due to linking intricacies: Example: $ cat threshold.c #include <stddef.h> #include <libvirt/libvirt.h> int main() { virInitialize(); virDomainSetBlockThreshold(NULL, 0, 0, 0); return 0; } $ gcc threshold.c -o threshold -lvirt -pedantic -Wall $ ./threshold libvirt: Domain error : invalid domain pointer in virDomainSetBlockThreshold $ LD_LIBRARY_PATH=/home/pipo/build/libvirt/gcc/src/ ./threshold ./threshold: symbol lookup error: ./threshold: undefined symbol: virDomainSetBlockThreshold, version LIBVIRT_3.1.0 Now my system libvirt without your patches causes the example program to link against a different version of the symbol and your change then breaks everything linked against libvirt. The two changes must be dropped and the rest of the series modified to build cleanly.
syntax-check: sc_prohibit_nonreentrant: skip comments
Ah, so moving this commit to the beginning fixes the build issue I've seen after 3/34.

Hi, On Tue, Apr 19, 2022 at 02:31:01PM +0200, Peter Krempa wrote:
On Thu, Apr 14, 2022 at 22:47:11 +0200, Victor Toso wrote:
Hi,
Couple of comments which I summarize on the top level rather than doing specifics since they might need a reorg of the series:
The goal of this patch series is to provide 'since' version to all exported types.
This is the non lazy version of the v1. In this series, we do change the docstrings of all exported types, to add the version metadata, in order to have scripts/apibuild.py to fetch it and add it to the appropriated XML API. This patch series also enforces that every new exported types requires a docstring with version with the proper format.
v1: https://listman.redhat.com/archives/libvir-list/2022-April/229881.html
I've created a script that helped me out and it covered a good amound of cases. I hand fixes all the missing docstrings and corner cases that my script missed.
As mentioned in v1, I've used:
git grep -rq $symbol $tag $includedir
This is used to find if a given $symbol exists in a given $tag or not. $tag starts with v1.0.0 and I have ignored any $tag that does not start with 'v' or has '-rc' in the name.
To help review this not so small changeset, the changes were split in the following order:
* docs: generated: 98% work from the script. I've split it further, by module + group type.
* docs: manual: -> 30% manual labor, 70% vim's macro. It was also split where it seems reasonable.
* docs: (...) -> Some fixes needed in the docs.
* scripts: -> Improvements to apibuild script.
* syms: -> Some fixes found with the found mismatch between docstring and sym files.
Other than that, I only caught two false positives, that is, a $symbol was present in a $tag but it was exported only at a latter $tag.
Branch : https://gitlab.com/victortoso/libvirt/-/commits/add-since-version Green CI: https://gitlab.com/victortoso/libvirt/-/pipelines/517262280
Cheers, Victor
Victor Toso (34): docs: Fix generated documentation of virConnectListAllNodeDeviceFlags docs: variable: Move docstring from source to header file docs: generated: enums: libvirt: append 'Since version' metadata
The tree fails to build after this commit. Per our guidelines the tree must be buildable after every single commit:
https://www.libvirt.org/hacking.html#preparing-patches
This is to ensure bisectability. You'll need to reorganize the fixes you've done after applying the changes automatically to happen before or at the same time to ensure compliance.
Thank you. I thought I had it covered with a `git rebase -i --exec `. I'll double check and fix.
docs: generated: enums: qemu: append 'Since version' metadata docs: generated: enums: admin: append 'Since version' metadata docs: generated: macros: libvirt: append 'Since version' metadata docs: generated: macros: admin: append 'Since version' metadata docs: generated: typedefs: libvirt: append 'Since version' metadata docs: generated: typedefs: qemu: append 'Since version' metadata docs: generated: typedefs: admin: append 'Since version' metadata docs: generated: functions: libvirt: append 'Since version' metadata docs: generated: functions: qemu: append 'Since version' metadata docs: generated: functions: lxc: append 'Since version' metadata docs: generated: functions: admin: append 'Since version' metadata docs: manual: typedef: add docstring and Since metadata docs: manual: functions: add Since metadata docs: manual: enums: add docstring and Since metadata docs: manual: macros: add docstring and Since metadata docs: manual: libvirt-common: add docstring and Since metadata docs: Fix generated documentation of virStorageVolInfoFlags docs: Fix and append Since to virConnectListAllStoragePoolsFlags docs: Fix and append Since to virDomainDeviceModifyFlags docs: Fix and append Since to virDomainMemoryModFlags docs: Fix and append Since to virDomainVcpuFlags
None of these actually change anything in the 'docs' directory. I'd suggest to pick an unambiguous prefix such as "symbols" or something similar.
Makes sense. Would "docstrings" be preferred over "symbols" ?
scripts: apibuild: parse 'Since' version for enums scripts: apibuild: fix parsing block comments from typedef enum scripts: apibuild: parse 'Since' for typedefs scripts: apibuild: parse 'Since' for macros
After the fix mentioned below [1] the build of the tree breaks after this commit:
FAILED: docs/libvirt-api.xml docs/libvirt-lxc-api.xml docs/libvirt-qemu-api.xml docs/libvirt-admin-api.xml /home/pipo/libvirt/scripts/meson-python.sh /bin/python3 /home/pipo/libvirt/scripts/apibuild.py /home/pipo/libvirt/docs /home/pipo/build/libvirt/gcc/docs Function virDomainSetBlockThreshold has symversion 3.1.0 but docstring says 3.2.0 Function virAdmClientClose has symversion 2.0.0 but docstring says 1.3.5 Function virAdmClientFree has symversion 2.0.0 but docstring says 1.3.5 Function virAdmClientGetID has symversion 2.0.0 but docstring says 1.3.5
Considering your comment bellow, I'll remove the docstring's version comparison with what is provided by .syms file. My only question is, which one should be documented in the XML API?
...
scripts: apibuild: parse 'Since' for functions scripts: apibuild: factor out comment cleaning scripts: apibuild: add parsing variable's comments
syms: admin: Add sections to match when API was introduced syms: libvirt: move virDomainSetBlockThreshold to 3.2.0
These two commits are not acceptable as they break existing builds of software that references the symbols. At some point in the past the mistake was noticed but we must not ever change it due to linking intricacies:
Right.
Example:
$ cat threshold.c #include <stddef.h> #include <libvirt/libvirt.h>
int main() { virInitialize(); virDomainSetBlockThreshold(NULL, 0, 0, 0); return 0; }
$ gcc threshold.c -o threshold -lvirt -pedantic -Wall $ ./threshold libvirt: Domain error : invalid domain pointer in virDomainSetBlockThreshold $ LD_LIBRARY_PATH=/home/pipo/build/libvirt/gcc/src/ ./threshold ./threshold: symbol lookup error: ./threshold: undefined symbol: virDomainSetBlockThreshold, version LIBVIRT_3.1.0
Now my system libvirt without your patches causes the example program to link against a different version of the symbol and your change then breaks everything linked against libvirt.
The two changes must be dropped and the rest of the series modified to build cleanly.
Ok.
syntax-check: sc_prohibit_nonreentrant: skip comments
Ah, so moving this commit to the beginning fixes the build issue I've seen after 3/34.
I'll move it to the top. Thanks again, Victor

On Tue, Apr 19, 2022 at 15:23:07 +0200, Victor Toso wrote:
Hi,
On Tue, Apr 19, 2022 at 02:31:01PM +0200, Peter Krempa wrote:
On Thu, Apr 14, 2022 at 22:47:11 +0200, Victor Toso wrote:
Hi,
Couple of comments which I summarize on the top level rather than doing specifics since they might need a reorg of the series:
The goal of this patch series is to provide 'since' version to all exported types.
This is the non lazy version of the v1. In this series, we do change the docstrings of all exported types, to add the version metadata, in order to have scripts/apibuild.py to fetch it and add it to the appropriated XML API. This patch series also enforces that every new exported types requires a docstring with version with the proper format.
v1: https://listman.redhat.com/archives/libvir-list/2022-April/229881.html
I've created a script that helped me out and it covered a good amound of cases. I hand fixes all the missing docstrings and corner cases that my script missed.
As mentioned in v1, I've used:
git grep -rq $symbol $tag $includedir
This is used to find if a given $symbol exists in a given $tag or not. $tag starts with v1.0.0 and I have ignored any $tag that does not start with 'v' or has '-rc' in the name.
To help review this not so small changeset, the changes were split in the following order:
* docs: generated: 98% work from the script. I've split it further, by module + group type.
* docs: manual: -> 30% manual labor, 70% vim's macro. It was also split where it seems reasonable.
* docs: (...) -> Some fixes needed in the docs.
* scripts: -> Improvements to apibuild script.
* syms: -> Some fixes found with the found mismatch between docstring and sym files.
Other than that, I only caught two false positives, that is, a $symbol was present in a $tag but it was exported only at a latter $tag.
Branch : https://gitlab.com/victortoso/libvirt/-/commits/add-since-version Green CI: https://gitlab.com/victortoso/libvirt/-/pipelines/517262280
Cheers, Victor
Victor Toso (34): docs: Fix generated documentation of virConnectListAllNodeDeviceFlags docs: variable: Move docstring from source to header file docs: generated: enums: libvirt: append 'Since version' metadata
The tree fails to build after this commit. Per our guidelines the tree must be buildable after every single commit:
https://www.libvirt.org/hacking.html#preparing-patches
This is to ensure bisectability. You'll need to reorganize the fixes you've done after applying the changes automatically to happen before or at the same time to ensure compliance.
Thank you. I thought I had it covered with a `git rebase -i --exec `. I'll double check and fix.
docs: generated: enums: qemu: append 'Since version' metadata docs: generated: enums: admin: append 'Since version' metadata docs: generated: macros: libvirt: append 'Since version' metadata docs: generated: macros: admin: append 'Since version' metadata docs: generated: typedefs: libvirt: append 'Since version' metadata docs: generated: typedefs: qemu: append 'Since version' metadata docs: generated: typedefs: admin: append 'Since version' metadata docs: generated: functions: libvirt: append 'Since version' metadata docs: generated: functions: qemu: append 'Since version' metadata docs: generated: functions: lxc: append 'Since version' metadata docs: generated: functions: admin: append 'Since version' metadata docs: manual: typedef: add docstring and Since metadata docs: manual: functions: add Since metadata docs: manual: enums: add docstring and Since metadata docs: manual: macros: add docstring and Since metadata docs: manual: libvirt-common: add docstring and Since metadata docs: Fix generated documentation of virStorageVolInfoFlags docs: Fix and append Since to virConnectListAllStoragePoolsFlags docs: Fix and append Since to virDomainDeviceModifyFlags docs: Fix and append Since to virDomainMemoryModFlags docs: Fix and append Since to virDomainVcpuFlags
None of these actually change anything in the 'docs' directory. I'd suggest to pick an unambiguous prefix such as "symbols" or something similar.
Makes sense. Would "docstrings" be preferred over "symbols" ?
Sure
scripts: apibuild: parse 'Since' version for enums scripts: apibuild: fix parsing block comments from typedef enum scripts: apibuild: parse 'Since' for typedefs scripts: apibuild: parse 'Since' for macros
After the fix mentioned below [1] the build of the tree breaks after this commit:
FAILED: docs/libvirt-api.xml docs/libvirt-lxc-api.xml docs/libvirt-qemu-api.xml docs/libvirt-admin-api.xml /home/pipo/libvirt/scripts/meson-python.sh /bin/python3 /home/pipo/libvirt/scripts/apibuild.py /home/pipo/libvirt/docs /home/pipo/build/libvirt/gcc/docs Function virDomainSetBlockThreshold has symversion 3.1.0 but docstring says 3.2.0 Function virAdmClientClose has symversion 2.0.0 but docstring says 1.3.5 Function virAdmClientFree has symversion 2.0.0 but docstring says 1.3.5 Function virAdmClientGetID has symversion 2.0.0 but docstring says 1.3.5
Considering your comment bellow, I'll remove the docstring's version comparison with what is provided by .syms file.
Actually the check itself might be a good idea, because it gives you one more possibility to catch the mistake of e.g. exposing a symbol in the wrong version. IMO since we are actually not striving on adding any more miss-exported symbols I'd simply exempt the few wrong examples from the check.
My only question is, which one should be documented in the XML API?
I didn't look closely at the admin API changes, but in case of 'virDomainSetBlockThreshold' the API was really added in 3.2.0 even if the symbol is exported under the 3.1.0 version, so 3.2.0 is correct in this case. Arguably at this point it doesn't matter too much given how old those releases are.
participants (4)
-
Andrea Bolognani
-
Daniel P. Berrangé
-
Peter Krempa
-
Victor Toso