The libvirt python module is supposed to build with historical versions
of the API back to 0.9.1, which means all constants / methods must be
commit 314b2346df2d8e2d7d705b003c693b4fa0189bdf
Author: Edgar Kaziakhmedov <edgar.kaziakhmedov(a)virtuozzo.com>
Date: Wed Feb 7 17:49:30 2018 +0300
Set hints for virPyDictToTypedParams
Predefine hints for all parameters possible to avoid wrong type
convert.
This broke the build against any libvirt < 2.0.0
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
libvirt-override.c | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/libvirt-override.c b/libvirt-override.c
index 580c259..b4c1529 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -7740,22 +7740,54 @@ libvirt_virDomainMigrateGetMaxDowntime(PyObject *self
ATTRIBUTE_UNUSED,
#if LIBVIR_CHECK_VERSION(1, 1, 0)
static virPyTypedParamsHint virPyDomainMigrate3Params[] = {
+# ifdef VIR_MIGRATE_PARAM_URI
{ VIR_MIGRATE_PARAM_URI, VIR_TYPED_PARAM_STRING },
+# endif
+# ifdef VIR_MIGRATE_PARAM_DEST_NAME
{ VIR_MIGRATE_PARAM_DEST_NAME, VIR_TYPED_PARAM_STRING },
+# endif
+# ifdef VIR_MIGRATE_PARAM_DEST_XML
{ VIR_MIGRATE_PARAM_DEST_XML, VIR_TYPED_PARAM_STRING },
+# endif
+# ifdef VIR_MIGRATE_PARAM_PERSIST_XML
{ VIR_MIGRATE_PARAM_PERSIST_XML, VIR_TYPED_PARAM_STRING },
+# endif
+# ifdef VIR_MIGRATE_PARAM_BANDWIDTH
{ VIR_MIGRATE_PARAM_BANDWIDTH, VIR_TYPED_PARAM_ULLONG },
+# endif
+# ifdef VIR_MIGRATE_PARAM_GRAPHICS_URI
{ VIR_MIGRATE_PARAM_GRAPHICS_URI, VIR_TYPED_PARAM_STRING },
+# endif
+# ifdef VIR_MIGRATE_PARAM_LISTEN_ADDRESS
{ VIR_MIGRATE_PARAM_LISTEN_ADDRESS, VIR_TYPED_PARAM_STRING },
+# endif
+# ifdef VIR_MIGRATE_PARAM_MIGRATE_DISKS
{ VIR_MIGRATE_PARAM_MIGRATE_DISKS, VIR_TYPED_PARAM_STRING },
+# endif
+# ifdef VIR_MIGRATE_PARAM_DISKS_PORT
{ VIR_MIGRATE_PARAM_DISKS_PORT, VIR_TYPED_PARAM_INT },
+# endif
+# ifdef VIR_MIGRATE_PARAM_COMPRESSION
{ VIR_MIGRATE_PARAM_COMPRESSION, VIR_TYPED_PARAM_STRING },
+# endif
+# ifdef VIR_MIGRATE_PARAM_COMPRESSION_MT_LEVEL
{ VIR_MIGRATE_PARAM_COMPRESSION_MT_LEVEL, VIR_TYPED_PARAM_INT },
+# endif
+# ifdef VIR_MIGRATE_PARAM_COMPRESSION_MT_THREADS
{ VIR_MIGRATE_PARAM_COMPRESSION_MT_THREADS, VIR_TYPED_PARAM_INT },
+# endif
+# ifdef VIR_MIGRATE_PARAM_COMPRESSION_MT_DTHREADS
{ VIR_MIGRATE_PARAM_COMPRESSION_MT_DTHREADS, VIR_TYPED_PARAM_INT },
+# endif
+# ifdef VIR_MIGRATE_PARAM_COMPRESSION_XBZRLE_CACHE
{ VIR_MIGRATE_PARAM_COMPRESSION_XBZRLE_CACHE, VIR_TYPED_PARAM_ULLONG },
+# endif
+# ifdef VIR_MIGRATE_PARAM_AUTO_CONVERGE_INITIAL
{ VIR_MIGRATE_PARAM_AUTO_CONVERGE_INITIAL, VIR_TYPED_PARAM_INT },
+# endif
+# ifdef VIR_MIGRATE_PARAM_AUTO_CONVERGE_INCREMENT
{ VIR_MIGRATE_PARAM_AUTO_CONVERGE_INCREMENT, VIR_TYPED_PARAM_INT },
+# endif
};
--
2.14.3