[libvirt-python][PATCH] maint: Require libvirt-3.4.0 at least

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently, we require 0.9.11. However, some APIs are missing
there and thus sanity check fails:

DEBUG: /usr/bin/python sanitytest.py build/lib.linux-s390x-2.7 /usr/share/libvirt/api/libvirt-api.xml
DEBUG: FAIL virStream.sparseRecvAll       (Python API not mapped to C)
DEBUG: FAIL virStream.sparseSendAll       (Python API not mapped to C)
DEBUG: error: command '/usr/bin/python' failed with exit status 1

I'm not sure how to fix that so raising minimal required libvirt
version is the solution.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 setup.py           |   2 +-
 README             |   2 +-
 libvirt-override.c | 149 -----------------------------------------------------
 3 files changed, 2 insertions(+), 151 deletions(-)

diff --git a/setup.py b/setup.py
index f33ff1a..f929eb2 100755
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,7 @@ import re
 import shutil
 import time
 
-MIN_LIBVIRT = "0.9.11"
+MIN_LIBVIRT = "3.4.0"
 MIN_LIBVIRT_LXC = "1.0.2"
 
 # Hack to stop 'pip install' failing with error
diff --git a/README b/README
index 96082f0..bc3ee77 100644
--- a/README
+++ b/README
@@ -5,7 +5,7 @@ This package provides a python binding to the libvirt.so,
 libvirt-qemu.so and libvirt-lxc.so library APIs.
 
 It is written to build against any version of libvirt that
-is 0.9.11 or newer.
+is 3.4.0 or newer.
 
 This code is distributed under the terms of the LGPL version
 2 or later.
diff --git a/libvirt-override.c b/libvirt-override.c
index 9eba4ed..280856d 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -66,20 +66,9 @@ getPyNodeCPUCount(virConnectPtr conn)
 {
     int i_retval;
 
-#if LIBVIR_CHECK_VERSION(1, 0, 0)
     LIBVIRT_BEGIN_ALLOW_THREADS;
     i_retval = virNodeGetCPUMap(conn, NULL, NULL, 0);
     LIBVIRT_END_ALLOW_THREADS;
-#else /* fallback: use nodeinfo */
-    virNodeInfo nodeinfo;
-
-    LIBVIRT_BEGIN_ALLOW_THREADS;
-    i_retval = virNodeGetInfo(conn, &nodeinfo);
-    LIBVIRT_END_ALLOW_THREADS;
-
-    if (i_retval >= 0)
-        i_retval = VIR_NODEINFO_MAXCPUS(nodeinfo);
-#endif /* LIBVIR_CHECK_VERSION(1, 0, 0) */
 
     return i_retval;
 }
@@ -398,14 +387,12 @@ libvirt_virDomainMemoryStats(PyObject *self ATTRIBUTE_UNUSED,
         case VIR_DOMAIN_MEMORY_STAT_RSS:
             key = libvirt_constcharPtrWrap("rss");
             break;
-#if LIBVIR_CHECK_VERSION(2, 1, 0)
         case VIR_DOMAIN_MEMORY_STAT_USABLE:
             key = libvirt_constcharPtrWrap("usable");
             break;
         case VIR_DOMAIN_MEMORY_STAT_LAST_UPDATE:
             key = libvirt_constcharPtrWrap("last_update");
             break;
-#endif /* LIBVIR_CHECK_VERSION(2, 1, 0) */
         default:
             continue;
         }
@@ -1451,7 +1438,6 @@ libvirt_virDomainGetVcpuPinInfo(PyObject *self ATTRIBUTE_UNUSED,
 }
 
 
-#if LIBVIR_CHECK_VERSION(0, 10, 0)
 static PyObject *
 libvirt_virDomainPinEmulator(PyObject *self ATTRIBUTE_UNUSED,
                              PyObject *args)
@@ -1547,9 +1533,7 @@ libvirt_virDomainGetEmulatorPinInfo(PyObject *self ATTRIBUTE_UNUSED,
     Py_CLEAR(pycpumap);
     goto cleanup;
 }
-#endif /* LIBVIR_CHECK_VERSION(0, 10, 0) */
 
-#if LIBVIR_CHECK_VERSION(1, 2, 14)
 static PyObject *
 libvirt_virDomainGetIOThreadInfo(PyObject *self ATTRIBUTE_UNUSED,
                                  PyObject *args)
@@ -1668,7 +1652,6 @@ libvirt_virDomainPinIOThread(PyObject *self ATTRIBUTE_UNUSED,
     return ret;
 }
 
-#endif /* LIBVIR_CHECK_VERSION(1, 2, 14) */
 
 /************************************************************************
  *									*
@@ -2037,7 +2020,6 @@ libvirt_virConnectGetVersion(PyObject *self ATTRIBUTE_UNUSED,
     return libvirt_intWrap(hvVersion);
 }
 
-#if LIBVIR_CHECK_VERSION(1, 1, 3)
 static PyObject *
 libvirt_virConnectGetCPUModelNames(PyObject *self ATTRIBUTE_UNUSED,
                                    PyObject *args)
@@ -2083,7 +2065,6 @@ libvirt_virConnectGetCPUModelNames(PyObject *self ATTRIBUTE_UNUSED,
     Py_CLEAR(rv);
     goto done;
 }
-#endif /* LIBVIR_CHECK_VERSION(1, 1, 3) */
 
 static PyObject *
 libvirt_virConnectGetLibVersion(PyObject *self ATTRIBUTE_UNUSED,
@@ -2162,7 +2143,6 @@ libvirt_virConnectListDomainsID(PyObject *self ATTRIBUTE_UNUSED,
     return NULL;
 }
 
-#if LIBVIR_CHECK_VERSION(0, 9, 13)
 static PyObject *
 libvirt_virConnectListAllDomains(PyObject *self ATTRIBUTE_UNUSED,
                                  PyObject *args)
@@ -2206,7 +2186,6 @@ libvirt_virConnectListAllDomains(PyObject *self ATTRIBUTE_UNUSED,
     Py_CLEAR(py_retval);
     goto cleanup;
 }
-#endif /* LIBVIR_CHECK_VERSION(0, 9, 13) */
 
 static PyObject *
 libvirt_virConnectListDefinedDomains(PyObject *self ATTRIBUTE_UNUSED,
@@ -2317,7 +2296,6 @@ libvirt_virDomainSnapshotListNames(PyObject *self ATTRIBUTE_UNUSED,
     goto cleanup;
 }
 
-#if LIBVIR_CHECK_VERSION(0, 9, 13)
 static PyObject *
 libvirt_virDomainListAllSnapshots(PyObject *self ATTRIBUTE_UNUSED,
                                   PyObject *args)
@@ -2361,7 +2339,6 @@ libvirt_virDomainListAllSnapshots(PyObject *self ATTRIBUTE_UNUSED,
     Py_CLEAR(py_retval);
     goto cleanup;
 }
-#endif /* LIBVIR_CHECK_VERSION(0, 9, 13) */
 
 static PyObject *
 libvirt_virDomainSnapshotListChildrenNames(PyObject *self ATTRIBUTE_UNUSED,
@@ -2417,7 +2394,6 @@ libvirt_virDomainSnapshotListChildrenNames(PyObject *self ATTRIBUTE_UNUSED,
     goto cleanup;
 }
 
-#if LIBVIR_CHECK_VERSION(0, 9, 13)
 static PyObject *
 libvirt_virDomainSnapshotListAllChildren(PyObject *self ATTRIBUTE_UNUSED,
                                          PyObject *args)
@@ -2461,7 +2437,6 @@ libvirt_virDomainSnapshotListAllChildren(PyObject *self ATTRIBUTE_UNUSED,
     Py_CLEAR(py_retval);
     goto cleanup;
 }
-#endif /* LIBVIR_CHECK_VERSION(0, 9, 13) */
 
 static PyObject *
 libvirt_virDomainRevertToSnapshot(PyObject *self ATTRIBUTE_UNUSED,
@@ -2752,7 +2727,6 @@ libvirt_virDomainGetSecurityLabel(PyObject *self ATTRIBUTE_UNUSED,
     return NULL;
 }
 
-#if LIBVIR_CHECK_VERSION(0, 10, 0)
 static PyObject *
 libvirt_virDomainGetSecurityLabelList(PyObject *self ATTRIBUTE_UNUSED,
                                       PyObject *args)
@@ -2803,7 +2777,6 @@ libvirt_virDomainGetSecurityLabelList(PyObject *self ATTRIBUTE_UNUSED,
     Py_CLEAR(py_retval);
     goto cleanup;
 }
-#endif /* LIBVIR_CHECK_VERSION(0, 10, 0) */
 
 static PyObject *
 libvirt_virDomainGetUUID(PyObject *self ATTRIBUTE_UNUSED,
@@ -2992,7 +2965,6 @@ libvirt_virConnectListDefinedNetworks(PyObject *self ATTRIBUTE_UNUSED,
     goto cleanup;
 }
 
-#if LIBVIR_CHECK_VERSION(0, 10, 2)
 static PyObject *
 libvirt_virConnectListAllNetworks(PyObject *self ATTRIBUTE_UNUSED,
                                   PyObject *args)
@@ -3036,7 +3008,6 @@ libvirt_virConnectListAllNetworks(PyObject *self ATTRIBUTE_UNUSED,
     Py_CLEAR(py_retval);
     goto cleanup;
 }
-#endif /* LIBVIR_CHECK_VERSION(0, 10, 2) */
 
 
 static PyObject *
@@ -3437,7 +3408,6 @@ libvirt_virConnectListDefinedStoragePools(PyObject *self ATTRIBUTE_UNUSED,
     goto cleanup;
 }
 
-#if LIBVIR_CHECK_VERSION(0, 10, 2)
 static PyObject *
 libvirt_virConnectListAllStoragePools(PyObject *self ATTRIBUTE_UNUSED,
                                       PyObject *args)
@@ -3482,7 +3452,6 @@ libvirt_virConnectListAllStoragePools(PyObject *self ATTRIBUTE_UNUSED,
     Py_CLEAR(py_retval);
     goto cleanup;
 }
-#endif /* LIBVIR_CHECK_VERSION(0, 10, 2) */
 
 static PyObject *
 libvirt_virStoragePoolListVolumes(PyObject *self ATTRIBUTE_UNUSED,
@@ -3539,7 +3508,6 @@ libvirt_virStoragePoolListVolumes(PyObject *self ATTRIBUTE_UNUSED,
     goto cleanup;
 }
 
-#if LIBVIR_CHECK_VERSION(0, 10, 2)
 static PyObject *
 libvirt_virStoragePoolListAllVolumes(PyObject *self ATTRIBUTE_UNUSED,
                                      PyObject *args)
@@ -3585,7 +3553,6 @@ libvirt_virStoragePoolListAllVolumes(PyObject *self ATTRIBUTE_UNUSED,
     Py_CLEAR(py_retval);
     goto cleanup;
 }
-#endif /* LIBVIR_CHECK_VERSION(0, 10, 2) */
 
 
 static PyObject *
@@ -3689,7 +3656,6 @@ libvirt_virStorageVolGetInfo(PyObject *self ATTRIBUTE_UNUSED,
     return NULL;
 }
 
-#if LIBVIR_CHECK_VERSION(3, 0, 0)
 static PyObject *
 libvirt_virStorageVolGetInfoFlags(PyObject *self ATTRIBUTE_UNUSED,
                                   PyObject *args)
@@ -3727,7 +3693,6 @@ libvirt_virStorageVolGetInfoFlags(PyObject *self ATTRIBUTE_UNUSED,
     Py_DECREF(py_retval);
     return NULL;
 }
-#endif
 
 static PyObject *
 libvirt_virStoragePoolGetUUID(PyObject *self ATTRIBUTE_UNUSED,
@@ -3863,7 +3828,6 @@ libvirt_virNodeListDevices(PyObject *self ATTRIBUTE_UNUSED,
     goto cleanup;
 }
 
-#if LIBVIR_CHECK_VERSION(0, 10, 2)
 static PyObject *
 libvirt_virConnectListAllNodeDevices(PyObject *self ATTRIBUTE_UNUSED,
                                      PyObject *args)
@@ -3908,7 +3872,6 @@ libvirt_virConnectListAllNodeDevices(PyObject *self ATTRIBUTE_UNUSED,
     Py_CLEAR(py_retval);
     goto cleanup;
 }
-#endif /* LIBVIR_CHECK_VERSION(0, 10, 2) */
 
 static PyObject *
 libvirt_virNodeDeviceListCaps(PyObject *self ATTRIBUTE_UNUSED,
@@ -4094,7 +4057,6 @@ libvirt_virConnectListSecrets(PyObject *self ATTRIBUTE_UNUSED,
     goto cleanup;
 }
 
-#if LIBVIR_CHECK_VERSION(0, 10, 2)
 static PyObject *
 libvirt_virConnectListAllSecrets(PyObject *self ATTRIBUTE_UNUSED,
                                  PyObject *args)
@@ -4139,7 +4101,6 @@ libvirt_virConnectListAllSecrets(PyObject *self ATTRIBUTE_UNUSED,
     Py_CLEAR(py_retval);
     goto cleanup;
 }
-#endif /* LIBVIR_CHECK_VERSION(0, 10, 2) */
 
 static PyObject *
 libvirt_virSecretGetValue(PyObject *self ATTRIBUTE_UNUSED,
@@ -4327,7 +4288,6 @@ libvirt_virConnectListNWFilters(PyObject *self ATTRIBUTE_UNUSED,
     goto cleanup;
 }
 
-#if LIBVIR_CHECK_VERSION(0, 10, 2)
 static PyObject *
 libvirt_virConnectListAllNWFilters(PyObject *self ATTRIBUTE_UNUSED,
                                    PyObject *args)
@@ -4372,7 +4332,6 @@ libvirt_virConnectListAllNWFilters(PyObject *self ATTRIBUTE_UNUSED,
     Py_CLEAR(py_retval);
     goto cleanup;
 }
-#endif /* LIBVIR_CHECK_VERSION(0, 10, 2) */
 
 static PyObject *
 libvirt_virConnectListInterfaces(PyObject *self ATTRIBUTE_UNUSED,
@@ -4489,7 +4448,6 @@ libvirt_virConnectListDefinedInterfaces(PyObject *self ATTRIBUTE_UNUSED,
 }
 
 
-#if LIBVIR_CHECK_VERSION(0, 10, 2)
 static PyObject *
 libvirt_virConnectListAllInterfaces(PyObject *self ATTRIBUTE_UNUSED,
                                     PyObject *args)
@@ -4534,7 +4492,6 @@ libvirt_virConnectListAllInterfaces(PyObject *self ATTRIBUTE_UNUSED,
     Py_CLEAR(py_retval);
     goto cleanup;
 }
-#endif /* LIBVIR_CHECK_VERSION(0, 10, 2) */
 
 static PyObject *
 libvirt_virConnectBaselineCPU(PyObject *self ATTRIBUTE_UNUSED,
@@ -4645,7 +4602,6 @@ libvirt_virDomainGetJobInfo(PyObject *self ATTRIBUTE_UNUSED,
     return NULL;
 }
 
-#if LIBVIR_CHECK_VERSION(1, 0, 3)
 static PyObject *
 libvirt_virDomainGetJobStats(PyObject *self ATTRIBUTE_UNUSED,
                              PyObject *args)
@@ -4684,7 +4640,6 @@ libvirt_virDomainGetJobStats(PyObject *self ATTRIBUTE_UNUSED,
     Py_CLEAR(dict);
     goto cleanup;
 }
-#endif /* LIBVIR_CHECK_VERSION(1, 0, 3) */
 
 static PyObject *
 libvirt_virDomainGetBlockJobInfo(PyObject *self ATTRIBUTE_UNUSED,
@@ -4913,7 +4868,6 @@ libvirt_virDomainGetDiskErrors(PyObject *self ATTRIBUTE_UNUSED,
 }
 
 
-#if LIBVIR_CHECK_VERSION(1, 2, 14)
 static PyObject *
 libvirt_virDomainInterfaceAddresses(PyObject *self ATTRIBUTE_UNUSED,
                                     PyObject *args)
@@ -5000,7 +4954,6 @@ libvirt_virDomainInterfaceAddresses(PyObject *self ATTRIBUTE_UNUSED,
     Py_CLEAR(py_retval);
     goto cleanup;
 }
-#endif /* LIBVIR_CHECK_VERSION(1, 2, 14) */
 
 
 /*******************************************
@@ -7156,7 +7109,6 @@ libvirt_virConnectDomainEventDeregisterAny(PyObject *self ATTRIBUTE_UNUSED,
     return libvirt_intWrap(ret);
 }
 
-#if LIBVIR_CHECK_VERSION(1, 2, 1)
 static void
 libvirt_virConnectNetworkEventFreeFunc(void *opaque)
 {
@@ -7299,9 +7251,7 @@ libvirt_virConnectNetworkEventDeregisterAny(PyObject *self ATTRIBUTE_UNUSED,
 
     return libvirt_intWrap(ret);
 }
-#endif /* LIBVIR_CHECK_VERSION(1, 2, 1)*/
 
-#if LIBVIR_CHECK_VERSION(0, 10, 0)
 static void
 libvirt_virConnectCloseCallbackDispatch(virConnectPtr conn ATTRIBUTE_UNUSED,
                                         int reason,
@@ -7398,7 +7348,6 @@ libvirt_virConnectUnregisterCloseCallback(PyObject * self ATTRIBUTE_UNUSED,
 
     return libvirt_intWrap(ret);
 }
-#endif /* LIBVIR_CHECK_VERSION(0, 10, 0) */
 
 static void
 libvirt_virStreamEventFreeFunc(void *opaque)
@@ -7585,7 +7534,6 @@ libvirt_virDomainSendKey(PyObject *self ATTRIBUTE_UNUSED,
     return libvirt_intWrap(ret);
 }
 
-#if LIBVIR_CHECK_VERSION(1, 0, 3)
 static PyObject *
 libvirt_virDomainMigrateGetCompressionCache(PyObject *self ATTRIBUTE_UNUSED,
                                             PyObject *args)
@@ -7612,7 +7560,6 @@ libvirt_virDomainMigrateGetCompressionCache(PyObject *self ATTRIBUTE_UNUSED,
 
     return libvirt_ulonglongWrap(cacheSize);
 }
-#endif /* LIBVIR_CHECK_VERSION(1, 0, 3) */
 
 static PyObject *
 libvirt_virDomainMigrateGetMaxSpeed(PyObject *self ATTRIBUTE_UNUSED,
@@ -7669,7 +7616,6 @@ libvirt_virDomainMigrateGetMaxDowntime(PyObject *self ATTRIBUTE_UNUSED,
 }
 #endif /* LIBVIR_CHECK_VERSION(3, 7, 0) */
 
-#if LIBVIR_CHECK_VERSION(1, 1, 0)
 static PyObject *
 libvirt_virDomainMigrate3(PyObject *self ATTRIBUTE_UNUSED,
                           PyObject *args)
@@ -7731,7 +7677,6 @@ libvirt_virDomainMigrateToURI3(PyObject *self ATTRIBUTE_UNUSED,
     virTypedParamsFree(params, nparams);
     return libvirt_intWrap(ret);
 }
-#endif /* LIBVIR_CHECK_VERSION(1, 1, 0) */
 
 static PyObject *
 libvirt_virDomainBlockPeek(PyObject *self ATTRIBUTE_UNUSED,
@@ -7810,7 +7755,6 @@ libvirt_virDomainMemoryPeek(PyObject *self ATTRIBUTE_UNUSED,
     return py_retval;
 }
 
-#if LIBVIR_CHECK_VERSION(0, 10, 2)
 static PyObject *
 libvirt_virNodeSetMemoryParameters(PyObject *self ATTRIBUTE_UNUSED,
                                    PyObject *args)
@@ -7930,9 +7874,7 @@ libvirt_virNodeGetMemoryParameters(PyObject *self ATTRIBUTE_UNUSED,
     virTypedParamsFree(params, nparams);
     return ret;
 }
-#endif /* LIBVIR_CHECK_VERSION(0, 10, 2) */
 
-#if LIBVIR_CHECK_VERSION(1, 0, 0)
 static PyObject *
 libvirt_virNodeGetCPUMap(PyObject *self ATTRIBUTE_UNUSED,
                          PyObject *args)
@@ -7986,10 +7928,8 @@ libvirt_virNodeGetCPUMap(PyObject *self ATTRIBUTE_UNUSED,
     Py_CLEAR(ret);
     goto cleanup;
 }
-#endif /* LIBVIR_CHECK_VERSION(1, 0, 0) */
 
 
-#if LIBVIR_CHECK_VERSION(1, 1, 1)
 static PyObject *
 libvirt_virDomainCreateWithFiles(PyObject *self ATTRIBUTE_UNUSED,
                                  PyObject *args)
@@ -8083,10 +8023,8 @@ libvirt_virDomainCreateXMLWithFiles(PyObject *self ATTRIBUTE_UNUSED,
     VIR_FREE(files);
     return py_retval;
 }
-#endif /* LIBVIR_CHECK_VERSION(1, 1, 1) */
 
 
-#if LIBVIR_CHECK_VERSION(1, 2, 5)
 static PyObject *
 libvirt_virDomainFSFreeze(PyObject *self ATTRIBUTE_UNUSED,
                           PyObject *args)
@@ -8274,10 +8212,8 @@ libvirt_virDomainSetTime(PyObject *self ATTRIBUTE_UNUSED,
 
     return libvirt_intWrap(c_retval);
 }
-#endif /* LIBVIR_CHECK_VERSION(1, 2, 5) */
 
 
-#if LIBVIR_CHECK_VERSION(1, 2, 6)
 static PyObject *
 libvirt_virNodeGetFreePages(PyObject *self ATTRIBUTE_UNUSED,
                             PyObject *args)
@@ -8441,9 +8377,7 @@ libvirt_virNetworkGetDHCPLeases(PyObject *self ATTRIBUTE_UNUSED,
     goto cleanup;
 }
 
-#endif /* LIBVIR_CHECK_VERSION(1, 2, 6) */
 
-#if LIBVIR_CHECK_VERSION(1, 2, 8)
 
 static PyObject *
 convertDomainStatsRecord(virDomainStatsRecordPtr *records,
@@ -8601,9 +8535,7 @@ libvirt_virDomainBlockCopy(PyObject *self ATTRIBUTE_UNUSED,
     return libvirt_intWrap(c_retval);
 }
 
-#endif /* LIBVIR_CHECK_VERSION(1, 2, 8) */
 
-#if LIBVIR_CHECK_VERSION(1, 2, 9)
 static PyObject *
 libvirt_virNodeAllocPages(PyObject *self ATTRIBUTE_UNUSED,
                           PyObject *args)
@@ -8665,9 +8597,7 @@ libvirt_virNodeAllocPages(PyObject *self ATTRIBUTE_UNUSED,
     VIR_FREE(pageCounts);
     return NULL;
 }
-#endif /* LIBVIR_CHECK_VERSION(1, 2, 8) */
 
-#if LIBVIR_CHECK_VERSION(1, 2, 11)
 
 static PyObject *
 libvirt_virDomainGetFSInfo(PyObject *self ATTRIBUTE_UNUSED,
@@ -8742,9 +8672,7 @@ libvirt_virDomainGetFSInfo(PyObject *self ATTRIBUTE_UNUSED,
     goto cleanup;
 }
 
-#endif /* LIBVIR_CHECK_VERSION(1, 2, 11) */
 
-#if LIBVIR_CHECK_VERSION(1, 3, 3)
 static PyObject *
 libvirt_virDomainGetPerfEvents(PyObject *self ATTRIBUTE_UNUSED,
                                PyObject *args)
@@ -8837,9 +8765,7 @@ libvirt_virDomainSetPerfEvents(PyObject *self ATTRIBUTE_UNUSED,
     virTypedParamsFree(new_params, size);
     return ret;
 }
-#endif /* LIBVIR_CHECK_VERSION(1, 3, 3) */
 
-#if LIBVIR_CHECK_VERSION(2, 0, 0)
 static void
 libvirt_virConnectStoragePoolEventFreeFunc(void *opaque)
 {
@@ -9072,9 +8998,7 @@ libvirt_virDomainGetGuestVcpus(PyObject *self ATTRIBUTE_UNUSED,
     virTypedParamsFree(params, nparams);
     return ret;
 }
-#endif /* LIBVIR_CHECK_VERSION(2, 0, 0)*/
 
-#if LIBVIR_CHECK_VERSION(2, 2, 0)
 static void
 libvirt_virConnectNodeDeviceEventFreeFunc(void *opaque)
 {
@@ -9276,9 +9200,7 @@ libvirt_virConnectNodeDeviceEventDeregisterAny(PyObject *self ATTRIBUTE_UNUSED,
     return libvirt_intWrap(ret);
 }
 
-#endif /* LIBVIR_CHECK_VERSION(2, 2, 0)*/
 
-#if LIBVIR_CHECK_VERSION(3, 0, 0)
 static void
 libvirt_virConnectSecretEventFreeFunc(void *opaque)
 {
@@ -9475,10 +9397,8 @@ libvirt_virConnectSecretEventDeregisterAny(PyObject *self ATTRIBUTE_UNUSED,
 
     return libvirt_intWrap(ret);
 }
-#endif /* LIBVIR_CHECK_VERSION(3, 0, 0)*/
 
 
-#if LIBVIR_CHECK_VERSION(3, 4, 0)
 static PyObject *
 libvirt_virStreamRecvHole(PyObject *self ATTRIBUTE_UNUSED,
                           PyObject *args)
@@ -9571,7 +9491,6 @@ libvirt_virStreamRecvFlags(PyObject *self ATTRIBUTE_UNUSED,
     return rv;
 }
 
-#endif /* LIBVIR_CHECK_VERSION(3, 4, 0) */
 
 
 /************************************************************************
@@ -9583,28 +9502,20 @@ static PyMethodDef libvirtMethods[] = {
 #include "build/libvirt-export.c"
     {(char *) "virGetVersion", libvirt_virGetVersion, METH_VARARGS, NULL},
     {(char *) "virConnectGetVersion", libvirt_virConnectGetVersion, METH_VARARGS, NULL},
-#if LIBVIR_CHECK_VERSION(1, 1, 3)
     {(char *) "virConnectGetCPUModelNames", libvirt_virConnectGetCPUModelNames, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(1, 1, 3) */
     {(char *) "virConnectGetLibVersion", libvirt_virConnectGetLibVersion, METH_VARARGS, NULL},
     {(char *) "virConnectOpenAuth", libvirt_virConnectOpenAuth, METH_VARARGS, NULL},
     {(char *) "virConnectListDomainsID", libvirt_virConnectListDomainsID, METH_VARARGS, NULL},
     {(char *) "virConnectListDefinedDomains", libvirt_virConnectListDefinedDomains, METH_VARARGS, NULL},
-#if LIBVIR_CHECK_VERSION(0, 9, 13)
     {(char *) "virConnectListAllDomains", libvirt_virConnectListAllDomains, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(0, 9, 13) */
     {(char *) "virConnectDomainEventRegister", libvirt_virConnectDomainEventRegister, METH_VARARGS, NULL},
     {(char *) "virConnectDomainEventDeregister", libvirt_virConnectDomainEventDeregister, METH_VARARGS, NULL},
     {(char *) "virConnectDomainEventRegisterAny", libvirt_virConnectDomainEventRegisterAny, METH_VARARGS, NULL},
     {(char *) "virConnectDomainEventDeregisterAny", libvirt_virConnectDomainEventDeregisterAny, METH_VARARGS, NULL},
-#if LIBVIR_CHECK_VERSION(1, 2, 1)
     {(char *) "virConnectNetworkEventRegisterAny", libvirt_virConnectNetworkEventRegisterAny, METH_VARARGS, NULL},
     {(char *) "virConnectNetworkEventDeregisterAny", libvirt_virConnectNetworkEventDeregisterAny, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(1, 2, 1) */
-#if LIBVIR_CHECK_VERSION(0, 10, 0)
     {(char *) "virConnectRegisterCloseCallback", libvirt_virConnectRegisterCloseCallback, METH_VARARGS, NULL},
     {(char *) "virConnectUnregisterCloseCallback", libvirt_virConnectUnregisterCloseCallback, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(0, 10, 0) */
     {(char *) "virStreamEventAddCallback", libvirt_virStreamEventAddCallback, METH_VARARGS, NULL},
     {(char *) "virStreamRecv", libvirt_virStreamRecv, METH_VARARGS, NULL},
     {(char *) "virStreamSend", libvirt_virStreamSend, METH_VARARGS, NULL},
@@ -9615,9 +9526,7 @@ static PyMethodDef libvirtMethods[] = {
     {(char *) "virNodeGetInfo", libvirt_virNodeGetInfo, METH_VARARGS, NULL},
     {(char *) "virNodeGetSecurityModel", libvirt_virNodeGetSecurityModel, METH_VARARGS, NULL},
     {(char *) "virDomainGetSecurityLabel", libvirt_virDomainGetSecurityLabel, METH_VARARGS, NULL},
-#if LIBVIR_CHECK_VERSION(0, 10, 0)
     {(char *) "virDomainGetSecurityLabelList", libvirt_virDomainGetSecurityLabelList, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(0, 10, 0) */
     {(char *) "virNodeGetCPUStats", libvirt_virNodeGetCPUStats, METH_VARARGS, NULL},
     {(char *) "virNodeGetMemoryStats", libvirt_virNodeGetMemoryStats, METH_VARARGS, NULL},
     {(char *) "virDomainGetUUID", libvirt_virDomainGetUUID, METH_VARARGS, NULL},
@@ -9628,9 +9537,7 @@ static PyMethodDef libvirtMethods[] = {
     {(char *) "virConnGetLastError", libvirt_virConnGetLastError, METH_VARARGS, NULL},
     {(char *) "virConnectListNetworks", libvirt_virConnectListNetworks, METH_VARARGS, NULL},
     {(char *) "virConnectListDefinedNetworks", libvirt_virConnectListDefinedNetworks, METH_VARARGS, NULL},
-#if LIBVIR_CHECK_VERSION(0, 10, 2)
     {(char *) "virConnectListAllNetworks", libvirt_virConnectListAllNetworks, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(0, 10, 2) */
     {(char *) "virNetworkGetUUID", libvirt_virNetworkGetUUID, METH_VARARGS, NULL},
     {(char *) "virNetworkGetUUIDString", libvirt_virNetworkGetUUIDString, METH_VARARGS, NULL},
     {(char *) "virNetworkLookupByUUID", libvirt_virNetworkLookupByUUID, METH_VARARGS, NULL},
@@ -9659,29 +9566,19 @@ static PyMethodDef libvirtMethods[] = {
     {(char *) "virDomainPinVcpu", libvirt_virDomainPinVcpu, METH_VARARGS, NULL},
     {(char *) "virDomainPinVcpuFlags", libvirt_virDomainPinVcpuFlags, METH_VARARGS, NULL},
     {(char *) "virDomainGetVcpuPinInfo", libvirt_virDomainGetVcpuPinInfo, METH_VARARGS, NULL},
-#if LIBVIR_CHECK_VERSION(0, 10, 0)
     {(char *) "virDomainGetEmulatorPinInfo", libvirt_virDomainGetEmulatorPinInfo, METH_VARARGS, NULL},
     {(char *) "virDomainPinEmulator", libvirt_virDomainPinEmulator, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(0, 10, 0) */
-#if LIBVIR_CHECK_VERSION(1, 2, 14)
     {(char *) "virDomainGetIOThreadInfo", libvirt_virDomainGetIOThreadInfo, METH_VARARGS, NULL},
     {(char *) "virDomainPinIOThread", libvirt_virDomainPinIOThread, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(1, 2, 14) */
     {(char *) "virConnectListStoragePools", libvirt_virConnectListStoragePools, METH_VARARGS, NULL},
     {(char *) "virConnectListDefinedStoragePools", libvirt_virConnectListDefinedStoragePools, METH_VARARGS, NULL},
-#if LIBVIR_CHECK_VERSION(0, 10, 2)
     {(char *) "virConnectListAllStoragePools", libvirt_virConnectListAllStoragePools, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(0, 10, 2) */
     {(char *) "virStoragePoolGetAutostart", libvirt_virStoragePoolGetAutostart, METH_VARARGS, NULL},
     {(char *) "virStoragePoolListVolumes", libvirt_virStoragePoolListVolumes, METH_VARARGS, NULL},
-#if LIBVIR_CHECK_VERSION(0, 10, 2)
     {(char *) "virStoragePoolListAllVolumes", libvirt_virStoragePoolListAllVolumes, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(0, 10, 2) */
     {(char *) "virStoragePoolGetInfo", libvirt_virStoragePoolGetInfo, METH_VARARGS, NULL},
     {(char *) "virStorageVolGetInfo", libvirt_virStorageVolGetInfo, METH_VARARGS, NULL},
-#if LIBVIR_CHECK_VERSION(3, 0, 0)
     {(char *) "virStorageVolGetInfoFlags", libvirt_virStorageVolGetInfoFlags, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(3, 0, 0) */
     {(char *) "virStoragePoolGetUUID", libvirt_virStoragePoolGetUUID, METH_VARARGS, NULL},
     {(char *) "virStoragePoolGetUUIDString", libvirt_virStoragePoolGetUUIDString, METH_VARARGS, NULL},
     {(char *) "virStoragePoolLookupByUUID", libvirt_virStoragePoolLookupByUUID, METH_VARARGS, NULL},
@@ -9692,121 +9589,75 @@ static PyMethodDef libvirtMethods[] = {
     {(char *) "virEventInvokeTimeoutCallback", libvirt_virEventInvokeTimeoutCallback, METH_VARARGS, NULL},
     {(char *) "virEventInvokeFreeCallback", libvirt_virEventInvokeFreeCallback, METH_VARARGS, NULL},
     {(char *) "virNodeListDevices", libvirt_virNodeListDevices, METH_VARARGS, NULL},
-#if LIBVIR_CHECK_VERSION(0, 10, 2)
     {(char *) "virConnectListAllNodeDevices", libvirt_virConnectListAllNodeDevices, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(0, 10, 2) */
     {(char *) "virNodeDeviceListCaps", libvirt_virNodeDeviceListCaps, METH_VARARGS, NULL},
     {(char *) "virSecretGetUUID", libvirt_virSecretGetUUID, METH_VARARGS, NULL},
     {(char *) "virSecretGetUUIDString", libvirt_virSecretGetUUIDString, METH_VARARGS, NULL},
     {(char *) "virSecretLookupByUUID", libvirt_virSecretLookupByUUID, METH_VARARGS, NULL},
     {(char *) "virConnectListSecrets", libvirt_virConnectListSecrets, METH_VARARGS, NULL},
-#if LIBVIR_CHECK_VERSION(0, 10, 2)
     {(char *) "virConnectListAllSecrets", libvirt_virConnectListAllSecrets, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(0, 10, 2) */
     {(char *) "virSecretGetValue", libvirt_virSecretGetValue, METH_VARARGS, NULL},
     {(char *) "virSecretSetValue", libvirt_virSecretSetValue, METH_VARARGS, NULL},
     {(char *) "virNWFilterGetUUID", libvirt_virNWFilterGetUUID, METH_VARARGS, NULL},
     {(char *) "virNWFilterGetUUIDString", libvirt_virNWFilterGetUUIDString, METH_VARARGS, NULL},
     {(char *) "virNWFilterLookupByUUID", libvirt_virNWFilterLookupByUUID, METH_VARARGS, NULL},
     {(char *) "virConnectListNWFilters", libvirt_virConnectListNWFilters, METH_VARARGS, NULL},
-#if LIBVIR_CHECK_VERSION(0, 10, 2)
     {(char *) "virConnectListAllNWFilters", libvirt_virConnectListAllNWFilters, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(0, 10, 2) */
     {(char *) "virConnectListInterfaces", libvirt_virConnectListInterfaces, METH_VARARGS, NULL},
     {(char *) "virConnectListDefinedInterfaces", libvirt_virConnectListDefinedInterfaces, METH_VARARGS, NULL},
-#if LIBVIR_CHECK_VERSION(0, 10, 2)
     {(char *) "virConnectListAllInterfaces", libvirt_virConnectListAllInterfaces, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(0, 10, 2) */
     {(char *) "virConnectBaselineCPU", libvirt_virConnectBaselineCPU, METH_VARARGS, NULL},
     {(char *) "virDomainGetJobInfo", libvirt_virDomainGetJobInfo, METH_VARARGS, NULL},
-#if LIBVIR_CHECK_VERSION(1, 0, 3)
     {(char *) "virDomainGetJobStats", libvirt_virDomainGetJobStats, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(1, 0, 3) */
     {(char *) "virDomainSnapshotListNames", libvirt_virDomainSnapshotListNames, METH_VARARGS, NULL},
-#if LIBVIR_CHECK_VERSION(0, 9, 13)
     {(char *) "virDomainListAllSnapshots", libvirt_virDomainListAllSnapshots, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(0, 9, 13) */
     {(char *) "virDomainSnapshotListChildrenNames", libvirt_virDomainSnapshotListChildrenNames, METH_VARARGS, NULL},
-#if LIBVIR_CHECK_VERSION(0, 9, 13)
     {(char *) "virDomainSnapshotListAllChildren", libvirt_virDomainSnapshotListAllChildren, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(0, 9, 13) */
     {(char *) "virDomainRevertToSnapshot", libvirt_virDomainRevertToSnapshot, METH_VARARGS, NULL},
     {(char *) "virDomainGetBlockJobInfo", libvirt_virDomainGetBlockJobInfo, METH_VARARGS, NULL},
     {(char *) "virDomainSetBlockIoTune", libvirt_virDomainSetBlockIoTune, METH_VARARGS, NULL},
     {(char *) "virDomainGetBlockIoTune", libvirt_virDomainGetBlockIoTune, METH_VARARGS, NULL},
     {(char *) "virDomainSendKey", libvirt_virDomainSendKey, METH_VARARGS, NULL},
-#if LIBVIR_CHECK_VERSION(1, 0, 3)
     {(char *) "virDomainMigrateGetCompressionCache", libvirt_virDomainMigrateGetCompressionCache, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(1, 0, 3) */
     {(char *) "virDomainMigrateGetMaxSpeed", libvirt_virDomainMigrateGetMaxSpeed, METH_VARARGS, NULL},
 #if LIBVIR_CHECK_VERSION(3, 7, 0)
     {(char *) "virDomainMigrateGetMaxDowntime", libvirt_virDomainMigrateGetMaxDowntime, METH_VARARGS, NULL},
 #endif /* LIBVIR_CHECK_VERSION(3, 7, 0) */
     {(char *) "virDomainMigrateGetMaxSpeed", libvirt_virDomainMigrateGetMaxSpeed, METH_VARARGS, NULL},
-#if LIBVIR_CHECK_VERSION(1, 1, 0)
     {(char *) "virDomainMigrate3", libvirt_virDomainMigrate3, METH_VARARGS, NULL},
     {(char *) "virDomainMigrateToURI3", libvirt_virDomainMigrateToURI3, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(1, 1, 0) */
     {(char *) "virDomainBlockPeek", libvirt_virDomainBlockPeek, METH_VARARGS, NULL},
     {(char *) "virDomainMemoryPeek", libvirt_virDomainMemoryPeek, METH_VARARGS, NULL},
     {(char *) "virDomainGetDiskErrors", libvirt_virDomainGetDiskErrors, METH_VARARGS, NULL},
-#if LIBVIR_CHECK_VERSION(0, 10, 2)
     {(char *) "virNodeGetMemoryParameters", libvirt_virNodeGetMemoryParameters, METH_VARARGS, NULL},
     {(char *) "virNodeSetMemoryParameters", libvirt_virNodeSetMemoryParameters, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(0, 10, 2) */
-#if LIBVIR_CHECK_VERSION(1, 0, 0)
     {(char *) "virNodeGetCPUMap", libvirt_virNodeGetCPUMap, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(1, 0, 0) */
-#if LIBVIR_CHECK_VERSION(1, 1, 1)
     {(char *) "virDomainCreateXMLWithFiles", libvirt_virDomainCreateXMLWithFiles, METH_VARARGS, NULL},
     {(char *) "virDomainCreateWithFiles", libvirt_virDomainCreateWithFiles, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(1, 1, 1) */
-#if LIBVIR_CHECK_VERSION(1, 2, 5)
     {(char *) "virDomainFSFreeze", libvirt_virDomainFSFreeze, METH_VARARGS, NULL},
     {(char *) "virDomainFSThaw", libvirt_virDomainFSThaw, METH_VARARGS, NULL},
     {(char *) "virDomainGetTime", libvirt_virDomainGetTime, METH_VARARGS, NULL},
     {(char *) "virDomainSetTime", libvirt_virDomainSetTime, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(1, 2, 5) */
-#if LIBVIR_CHECK_VERSION(1, 2, 6)
     {(char *) "virNodeGetFreePages", libvirt_virNodeGetFreePages, METH_VARARGS, NULL},
     {(char *) "virNetworkGetDHCPLeases", libvirt_virNetworkGetDHCPLeases, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(1, 2, 6) */
-#if LIBVIR_CHECK_VERSION(1, 2, 8)
     {(char *) "virConnectGetAllDomainStats", libvirt_virConnectGetAllDomainStats, METH_VARARGS, NULL},
     {(char *) "virDomainListGetStats", libvirt_virDomainListGetStats, METH_VARARGS, NULL},
     {(char *) "virDomainBlockCopy", libvirt_virDomainBlockCopy, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(1, 2, 8) */
-#if LIBVIR_CHECK_VERSION(1, 2, 9)
     {(char *) "virNodeAllocPages", libvirt_virNodeAllocPages, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(1, 2, 9) */
-#if LIBVIR_CHECK_VERSION(1, 2, 11)
     {(char *) "virDomainGetFSInfo", libvirt_virDomainGetFSInfo, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(1, 2, 11) */
-#if LIBVIR_CHECK_VERSION(1, 2, 14)
     {(char *) "virDomainInterfaceAddresses", libvirt_virDomainInterfaceAddresses, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(1, 2, 14) */
-#if LIBVIR_CHECK_VERSION(1, 3, 3)
     {(char *) "virDomainGetPerfEvents", libvirt_virDomainGetPerfEvents, METH_VARARGS, NULL},
     {(char *) "virDomainSetPerfEvents", libvirt_virDomainSetPerfEvents, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(1, 3, 3) */
-#if LIBVIR_CHECK_VERSION(2, 0, 0)
     {(char *) "virConnectStoragePoolEventRegisterAny", libvirt_virConnectStoragePoolEventRegisterAny, METH_VARARGS, NULL},
     {(char *) "virConnectStoragePoolEventDeregisterAny", libvirt_virConnectStoragePoolEventDeregisterAny, METH_VARARGS, NULL},
     {(char *) "virDomainGetGuestVcpus", libvirt_virDomainGetGuestVcpus, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(2, 0, 0) */
-#if LIBVIR_CHECK_VERSION(2, 2, 0)
     {(char *) "virConnectNodeDeviceEventRegisterAny", libvirt_virConnectNodeDeviceEventRegisterAny, METH_VARARGS, NULL},
     {(char *) "virConnectNodeDeviceEventDeregisterAny", libvirt_virConnectNodeDeviceEventDeregisterAny, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(2, 2, 0) */
-#if LIBVIR_CHECK_VERSION(3, 0, 0)
     {(char *) "virConnectSecretEventRegisterAny", libvirt_virConnectSecretEventRegisterAny, METH_VARARGS, NULL},
     {(char *) "virConnectSecretEventDeregisterAny", libvirt_virConnectSecretEventDeregisterAny, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(3, 0, 0) */
-#if LIBVIR_CHECK_VERSION(3, 4, 0)
     {(char *) "virStreamRecvHole", libvirt_virStreamRecvHole, METH_VARARGS, NULL},
     {(char *) "virStreamSendHole", libvirt_virStreamSendHole, METH_VARARGS, NULL},
     {(char *) "virStreamRecvFlags", libvirt_virStreamRecvFlags, METH_VARARGS, NULL},
-#endif /* LIBVIR_CHECK_VERSION(3, 4, 0) */
     {NULL, NULL, 0, NULL}
 };
 
-- 
2.13.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux