Hello community,
here is the log from the commit of package python-libvirt-python for
openSUSE:Factory checked in at 2018-07-28 12:45:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-libvirt-python (Old)
and /work/SRC/openSUSE:Factory/.python-libvirt-python.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-libvirt-python"
Sat Jul 28 12:45:35 2018 rev:13 rq:625842 version:4.5.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-libvirt-python/python-libvirt-python.changes
2018-07-06 10:43:32.867143904 +0200
+++
/work/SRC/openSUSE:Factory/.python-libvirt-python.new/python-libvirt-python.changes
2018-07-28 12:45:36.721012815 +0200
@@ -1,0 +2,6 @@
+Fri Jul 27 19:52:17 UTC 2018 - [email protected]
+
+- Update to 4.5.0
+ - Add all new APIs and constants in libvirt 4.5.0
+
+-------------------------------------------------------------------
Old:
----
libvirt-python-4.4.0.tar.gz
libvirt-python-4.4.0.tar.gz.asc
New:
----
libvirt-python-4.5.0.tar.gz
libvirt-python-4.5.0.tar.gz.asc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-libvirt-python.spec ++++++
--- /var/tmp/diff_new_pack.PdbJ2Y/_old 2018-07-28 12:45:37.249013775 +0200
+++ /var/tmp/diff_new_pack.PdbJ2Y/_new 2018-07-28 12:45:37.253013783 +0200
@@ -20,7 +20,7 @@
%define srcname libvirt-python
Name: python-libvirt-python
Url: https://libvirt.org/
-Version: 4.4.0
+Version: 4.5.0
Release: 0
Summary: Library providing a virtualization API
License: LGPL-2.1-or-later
++++++ libvirt-python-4.4.0.tar.gz -> libvirt-python-4.5.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libvirt-python-4.4.0/AUTHORS
new/libvirt-python-4.5.0/AUTHORS
--- old/libvirt-python-4.4.0/AUTHORS 2018-06-04 22:32:32.000000000 +0200
+++ new/libvirt-python-4.5.0/AUTHORS 2018-07-02 22:18:22.000000000 +0200
@@ -28,6 +28,7 @@
Doug Goldstein <[email protected]>
Edgar Kaziakhmedov <[email protected]>
Eric Blake <[email protected]>
+ Erik Skultety <[email protected]>
Federico Simoncelli <[email protected]>
Giuseppe Scrivano <[email protected]>
Guan Qiang <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libvirt-python-4.4.0/ChangeLog
new/libvirt-python-4.5.0/ChangeLog
--- old/libvirt-python-4.4.0/ChangeLog 2018-06-04 22:32:32.000000000 +0200
+++ new/libvirt-python-4.5.0/ChangeLog 2018-07-02 22:18:22.000000000 +0200
@@ -1,9 +1,110 @@
+2018-07-02 Daniel Veillard <[email protected]>
+
+ Release of libvirt-python-4.5.0
+ * setup.py: updated for release
+
+
+
+2018-06-28 Daniel P. Berrangé <[email protected]>
+
+ Fix bugs in nwfilter binding APIs
+ We did not correctly mangle the API names in two cases, and we also
+ forgot to specialize the lookup method name in the sanity test.
+
+
+
+2018-06-28 Daniel P. Berrangé <[email protected]>
+
+ Add support for nwfilter binding objects / apis
+
+
+2018-06-27 Cole Robinson <[email protected]>
+
+ libvirtaio: Fix compat with python 3.7
+ In python 3.7, async is now a keyword, so this throws a syntax error:
+
+ File "/usr/lib64/python3.7/site-packages/libvirtaio.py", line 49
+ from asyncio import async as ensure_future
+ ^
+ SyntaxError: invalid syntax
+
+ Switch to getattr trickery to accomplish the same goal
+
+ Reviewed-by: Pavel Hrdina <[email protected]>
+ Reviewed-by: Andrea Bolognani <[email protected]>
+
+
+2018-06-14 Erik Skultety <[email protected]>
+
+ Add support for virNodeGetSEVInfo
+ This binding allows to query the AMD's SEV firmware for various platform
+ specific things, like a PDH certificate and a certificate chain to
+ establish a trusted connection with the firmware. Because the API uses
+ typed params, it's exempted from generation.
+
+ Reviewed-by: Ján Tomko <[email protected]>
+
+
+2018-06-14 Erik Skultety <[email protected]>
+
+ Add support for virDomainGetLaunchSecurityInfo
+ Libvirt recently introduced support for getting launch security
+ parameters, most notably AMD SEV VM memory measurement. This API can't
+ be generated as it's using typed parameters which we need to allocate.
+
+ Reviewed-by: Ján Tomko <[email protected]>
+
+
+2018-06-12 Pavel Hrdina <[email protected]>
+
+ libvirt_charPtrUnwrap: remove unnecessary check of returned string
+ Function libvirt_charPtrUnwrap() either fails or always sets the
+ unwrapped string so there is no need to check it explicitly.
+
+ Reviewed-by: Ján Tomko <[email protected]>
+
+
+2018-06-12 Pavel Hrdina <[email protected]>
+
+ libvirt-override: Reset exception if the error is ignored
+ In virConnectCredCallbackWrapper() we ignore the error case of
+ libvirt_charPtrUnwrap() function so we should also reset the exception.
+
+ Reviewed-by: Ján Tomko <[email protected]>
+
+
+2018-06-12 Pavel Hrdina <[email protected]>
+
+ typewrappers: Fix libvirt_charPtrUnwrap to set an exception if it fails
+ If the function fails it should always set an exception.
+
+ Reviewed-by: Ján Tomko <[email protected]>
+
+
+2018-06-12 Pavel Hrdina <[email protected]>
+
+ libvirt-utils: remove unused py_str function
+ Commit <57a160b5248ba47d4e1c9d22d95847dad8e0524f> removed last usage
+ but did not remove the function itself.
+
+ Reviewed-by: Ján Tomko <[email protected]>
+
+
+2018-06-06 Daniel P. Berrangé <[email protected]>
+
+ Blacklist virGetLastError{Code,Domain}
+ These methods will not be exposed to apps, since we auto raise
+ all errors.
+
+
+
2018-06-04 Daniel Veillard <[email protected]>
Release of libvirt-python-4.4.0
* setup.py: update for release
+
2018-06-01 Jiri Denemark <[email protected]>
Add support for virConnectBaselineHypervisorCPU
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libvirt-python-4.4.0/PKG-INFO
new/libvirt-python-4.5.0/PKG-INFO
--- old/libvirt-python-4.4.0/PKG-INFO 2018-06-04 22:32:32.000000000 +0200
+++ new/libvirt-python-4.5.0/PKG-INFO 2018-07-02 22:18:22.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: libvirt-python
-Version: 4.4.0
+Version: 4.5.0
Summary: The libvirt virtualization API python binding
Home-page: http://www.libvirt.org
Author: Libvirt Maintainers
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libvirt-python-4.4.0/generator.py
new/libvirt-python-4.5.0/generator.py
--- old/libvirt-python-4.4.0/generator.py 2018-06-04 22:28:09.000000000
+0200
+++ new/libvirt-python-4.5.0/generator.py 2018-07-02 22:16:59.000000000
+0200
@@ -356,6 +356,10 @@
'virNWFilter *': ('O', "virNWFilter", "virNWFilterPtr", "virNWFilterPtr"),
'const virNWFilter *': ('O', "virNWFilter", "virNWFilterPtr",
"virNWFilterPtr"),
+ 'virNWFilterBindingPtr': ('O', "virNWFilterBinding",
"virNWFilterBindingPtr", "virNWFilterBindingPtr"),
+ 'virNWFilterBinding *': ('O', "virNWFilterBinding",
"virNWFilterBindingPtr", "virNWFilterBindingPtr"),
+ 'const virNWFilterBinding *': ('O', "virNWFilterBinding",
"virNWFilterBindingPtr", "virNWFilterBindingPtr"),
+
'virStreamPtr': ('O', "virStream", "virStreamPtr", "virStreamPtr"),
'virStream *': ('O', "virStream", "virStreamPtr", "virStreamPtr"),
'const virStream *': ('O', "virStream", "virStreamPtr", "virStreamPtr"),
@@ -489,6 +493,8 @@
'virDomainSetPerfEvents',
'virDomainGetGuestVcpus',
'virConnectBaselineHypervisorCPU',
+ 'virDomainGetLaunchSecurityInfo',
+ 'virNodeGetSEVInfo',
)
lxc_skip_impl = (
@@ -537,6 +543,7 @@
'virConnectListAllInterfaces', # overridden in virConnect.py
'virConnectListAllNodeDevices', # overridden in virConnect.py
'virConnectListAllNWFilters', # overridden in virConnect.py
+ 'virConnectListAllNWFilterBindings', # overridden in virConnect.py
'virConnectListAllSecrets', # overridden in virConnect.py
'virConnectGetAllDomainStats', # overridden in virConnect.py
'virDomainListGetStats', # overriden in virConnect.py
@@ -570,6 +577,7 @@
"virNodeDeviceRef",
"virSecretRef",
"virNWFilterRef",
+ "virNWFilterBindingRef",
"virStoragePoolRef",
"virStorageVolRef",
"virStreamRef",
@@ -1008,6 +1016,8 @@
"virSecret *": ("._o", "virSecret(self, _obj=%s)", "virSecret"),
"virNWFilterPtr": ("._o", "virNWFilter(self, _obj=%s)", "virNWFilter"),
"virNWFilter *": ("._o", "virNWFilter(self, _obj=%s)", "virNWFilter"),
+ "virNWFilterBindingPtr": ("._o", "virNWFilterBinding(self, _obj=%s)",
"virNWFilterBinding"),
+ "virNWFilterBinding *": ("._o", "virNWFilterBinding(self, _obj=%s)",
"virNWFilterBinding"),
"virStreamPtr": ("._o", "virStream(self, _obj=%s)", "virStream"),
"virStream *": ("._o", "virStream(self, _obj=%s)", "virStream"),
"virConnectPtr": ("._o", "virConnect(_obj=%s)", "virConnect"),
@@ -1019,7 +1029,8 @@
primary_classes = ["virDomain", "virNetwork", "virInterface",
"virStoragePool", "virStorageVol",
"virConnect", "virNodeDevice", "virSecret",
- "virNWFilter", "virStream", "virDomainSnapshot"]
+ "virNWFilter", "virNWFilterBinding",
+ "virStream", "virDomainSnapshot"]
classes_destructors = {
"virDomain": "virDomainFree",
@@ -1030,6 +1041,7 @@
"virNodeDevice" : "virNodeDeviceFree",
"virSecret": "virSecretFree",
"virNWFilter": "virNWFilterFree",
+ "virNWFilterBinding": "virNWFilterBindingFree",
"virDomainSnapshot": "virDomainSnapshotFree",
# We hand-craft __del__ for this one
#"virStream": "virStreamFree",
@@ -1056,6 +1068,8 @@
'virSecretGetUsageType': True,
'virSecretGetUsageID': True,
'virNWFilterGetName': True,
+ 'virNWFilterBindingGetFilterName': True,
+ 'virNWFilterBindingGetPortDev': True,
}
function_classes = {}
@@ -1111,6 +1125,18 @@
elif name[0:15] == "virSecretLookup":
func = name[3:]
func = func[0:1].lower() + func[1:]
+ elif name[0:27] == "virNWFilterBindingCreateXML":
+ func = name[3:]
+ func = func[0:3].lower() + func[3:]
+ elif name[0:24] == "virNWFilterBindingLookup":
+ func = name[3:]
+ func = func[0:3].lower() + func[3:]
+ elif name[0:24] == "virNWFilterBindingDefine":
+ func = name[3:]
+ func = func[0:3].lower() + func[3:]
+ elif name[0:24] == "virNWFilterBindingLookup":
+ func = name[3:]
+ func = func[0:3].lower() + func[3:]
elif name[0:17] == "virNWFilterDefine":
func = name[3:]
func = func[0:3].lower() + func[3:]
@@ -1187,6 +1213,12 @@
elif name[0:9] == 'virSecret':
func = name[9:]
func = func[0:1].lower() + func[1:]
+ elif name[0:21] == 'virNWFilterBindingGet':
+ func = name[21:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:18] == 'virNWFilterBinding':
+ func = name[18:]
+ func = func[0:1].lower() + func[1:]
elif name[0:14] == 'virNWFilterGet':
func = name[14:]
func = func[0:1].lower() + func[1:]
@@ -1466,7 +1498,7 @@
classes.write("class %s(object):\n" % (classname))
if classname in [ "virDomain", "virNetwork", "virInterface",
"virStoragePool",
"virStorageVol", "virNodeDevice",
"virSecret","virStream",
- "virNWFilter" ]:
+ "virNWFilter", "virNWFilterBinding" ]:
classes.write(" def __init__(self, conn, _obj=None):\n")
elif classname in [ 'virDomainSnapshot' ]:
classes.write(" def __init__(self, dom, _obj=None):\n")
@@ -1474,7 +1506,7 @@
classes.write(" def __init__(self, _obj=None):\n")
if classname in [ "virDomain", "virNetwork", "virInterface",
"virNodeDevice", "virSecret", "virStream",
- "virNWFilter" ]:
+ "virNWFilter", "virNWFilterBinding" ]:
classes.write(" self._conn = conn\n")
elif classname in [ "virStorageVol", "virStoragePool" ]:
classes.write(" self._conn = conn\n" + \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libvirt-python-4.4.0/libvirt-override-api.xml
new/libvirt-python-4.5.0/libvirt-override-api.xml
--- old/libvirt-python-4.4.0/libvirt-override-api.xml 2018-06-04
22:28:09.000000000 +0200
+++ new/libvirt-python-4.5.0/libvirt-override-api.xml 2018-07-02
22:16:59.000000000 +0200
@@ -485,6 +485,12 @@
<arg name='flags' type='unsigned int' info='optional flags'/>
<return type='char *' info='the list of network filters or None in case
of error'/>
</function>
+ <function name='virConnectListAllNWFilterBindings' file='python'>
+ <info>returns list of all network fitler bindings</info>
+ <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor
connection'/>
+ <arg name='flags' type='unsigned int' info='optional flags'/>
+ <return type='char *' info='the list of network filter bindings or None
in case of error'/>
+ </function>
<function name='virNWFilterLookupByUUID' file='python'>
<info>Try to lookup a network filter on the given hypervisor based on
its UUID.</info>
<return type='virNWFilterPtr' info='a new network filter object or NULL
in case of failure'/>
@@ -728,5 +734,17 @@
<arg name='xmlCPUs' type='const char **' info='array of XML descriptions
of CPUs'/>
<arg name='flags' type='unsigned int' info='bitwise-OR of
virConnectBaselineCPUFlags'/>
</function>
+ <function name='virDomainGetLaunchSecurityInfo' file='python'>
+ <info>Get launch security info for a domain</info>
+ <return type='char *' info='None in case of error, returns a dictionary
of params'/>
+ <arg name='domain' type='virDomainPtr' info='pointer to domain object'/>
+ <arg name='flags' type='int' info='unused, always pass 0'/>
+ </function>
+ <function name='virNodeGetSEVInfo' file='python'>
+ <info>Get platform specific information from the SEV firmware</info>
+ <return type='char *' info='None in case of error, returns a dictionary
of params'/>
+ <arg name='conn' type='virConnectPtr' info='pointer to hypervisor
connection'/>
+ <arg name='flags' type='int' info='unused, always pass 0'/>
+ </function>
</symbols>
</api>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libvirt-python-4.4.0/libvirt-override-virConnect.py
new/libvirt-python-4.5.0/libvirt-override-virConnect.py
--- old/libvirt-python-4.4.0/libvirt-override-virConnect.py 2018-06-04
22:28:09.000000000 +0200
+++ new/libvirt-python-4.5.0/libvirt-override-virConnect.py 2018-07-02
22:16:59.000000000 +0200
@@ -531,6 +531,18 @@
return retlist
+ def listAllNWFilterBindings(self, flags=0):
+ """Returns a list of network filter binding objects"""
+ ret = libvirtmod.virConnectListAllNWFilterBindings(self._o, flags)
+ if ret is None:
+ raise libvirtError("virConnectListAllNWFilterBindings() failed",
conn=self)
+
+ retlist = list()
+ for filter_ptr in ret:
+ retlist.append(virNWFilterBinding(self, _obj=filter_ptr))
+
+ return retlist
+
def listAllSecrets(self, flags=0):
"""Returns a list of secret objects"""
ret = libvirtmod.virConnectListAllSecrets(self._o, flags)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libvirt-python-4.4.0/libvirt-override.c
new/libvirt-python-4.5.0/libvirt-override.c
--- old/libvirt-python-4.4.0/libvirt-override.c 2018-06-04 22:28:09.000000000
+0200
+++ new/libvirt-python-4.5.0/libvirt-override.c 2018-07-02 22:16:59.000000000
+0200
@@ -1918,8 +1918,10 @@
char *result = NULL;
pycreditem = PyTuple_GetItem(pycred, i);
pyresult = PyList_GetItem(pycreditem, 4);
- if (pyresult != Py_None)
+ if (pyresult != Py_None) {
libvirt_charPtrUnwrap(pyresult, &result);
+ PyErr_Clear();
+ }
if (result != NULL) {
cred[i].result = result;
cred[i].resultlen = strlen(result);
@@ -4444,6 +4446,54 @@
}
#endif /* LIBVIR_CHECK_VERSION(0, 10, 2) */
+#if LIBVIR_CHECK_VERSION(4, 5, 0)
+static PyObject *
+libvirt_virConnectListAllNWFilterBindings(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
+ PyObject *pyobj_conn;
+ PyObject *py_retval = NULL;
+ virConnectPtr conn;
+ virNWFilterBindingPtr *bindings = NULL;
+ int c_retval = 0;
+ ssize_t i;
+ unsigned int flags;
+
+ if (!PyArg_ParseTuple(args, (char *)"OI:virConnectListAllNWFilterBindings",
+ &pyobj_conn, &flags))
+ return NULL;
+ conn = (virConnectPtr) PyvirConnect_Get(pyobj_conn);
+
+ LIBVIRT_BEGIN_ALLOW_THREADS;
+ c_retval = virConnectListAllNWFilterBindings(conn, &bindings, flags);
+ LIBVIRT_END_ALLOW_THREADS;
+
+ if (c_retval < 0)
+ return VIR_PY_NONE;
+
+ if (!(py_retval = PyList_New(c_retval)))
+ goto cleanup;
+
+ for (i = 0; i < c_retval; i++) {
+ VIR_PY_LIST_SET_GOTO(py_retval, i,
+ libvirt_virNWFilterBindingPtrWrap(bindings[i]),
error);
+ /* python steals the pointer */
+ bindings[i] = NULL;
+ }
+
+ cleanup:
+ for (i = 0; i < c_retval; i++)
+ if (bindings[i])
+ virNWFilterBindingFree(bindings[i]);
+ VIR_FREE(bindings);
+ return py_retval;
+
+ error:
+ Py_CLEAR(py_retval);
+ goto cleanup;
+}
+#endif /* LIBVIR_CHECK_VERSION(4, 5, 0) */
+
static PyObject *
libvirt_virConnectListInterfaces(PyObject *self ATTRIBUTE_UNUSED,
PyObject *args)
@@ -4637,8 +4687,7 @@
for (i = 0; i < ncpus; i++) {
if (libvirt_charPtrUnwrap(PyList_GetItem(list, i),
- &(xmlcpus[i])) < 0 ||
- xmlcpus[i] == NULL) {
+ &(xmlcpus[i])) < 0) {
for (j = 0 ; j < i ; j++)
VIR_FREE(xmlcpus[j]);
VIR_FREE(xmlcpus);
@@ -8243,8 +8292,7 @@
for (i = 0; i < nmountpoints; i++) {
if (libvirt_charPtrUnwrap(PyList_GetItem(pyobj_list, i),
- mountpoints+i) < 0 ||
- mountpoints[i] == NULL)
+ mountpoints+i) < 0)
goto cleanup;
}
}
@@ -8291,8 +8339,7 @@
for (i = 0; i < nmountpoints; i++) {
if (libvirt_charPtrUnwrap(PyList_GetItem(pyobj_list, i),
- mountpoints+i) < 0 ||
- mountpoints[i] == NULL)
+ mountpoints+i) < 0)
goto cleanup;
}
}
@@ -9741,8 +9788,7 @@
for (i = 0; i < ncpus; i++) {
if (libvirt_charPtrUnwrap(PyList_GetItem(list, i),
- &(xmlCPUs[i])) < 0 ||
- !xmlCPUs[i])
+ &(xmlCPUs[i])) < 0)
goto cleanup;
}
}
@@ -9765,6 +9811,76 @@
#endif /* LIBVIR_CHECK_VERSION(4, 4, 0) */
+#if LIBVIR_CHECK_VERSION(4, 5, 0)
+static PyObject *
+libvirt_virDomainGetLaunchSecurityInfo(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
+ PyObject *pyobj_dom = NULL;
+ PyObject *ret = NULL;
+
+ virDomainPtr dom = NULL;
+ virTypedParameterPtr params = NULL;
+ int nparams = 0;
+ unsigned int flags = 0;
+ int i_retval;
+
+ if (!PyArg_ParseTuple(args, (char *)"OI:virDomainGetLaunchSecurityInfo",
+ &pyobj_dom, &flags))
+ return NULL;
+ dom = (virDomainPtr) PyvirDomain_Get(pyobj_dom);
+
+ LIBVIRT_BEGIN_ALLOW_THREADS;
+ i_retval = virDomainGetLaunchSecurityInfo(dom, ¶ms, &nparams, flags);
+ LIBVIRT_END_ALLOW_THREADS;
+
+ if (i_retval < 0) {
+ ret = VIR_PY_NONE;
+ goto cleanup;
+ }
+
+ ret = getPyVirTypedParameter(params, nparams);
+ cleanup:
+ virTypedParamsFree(params, nparams);
+ return ret;
+}
+
+
+static PyObject *
+libvirt_virNodeGetSEVInfo(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
+ PyObject *pyobj_conn = NULL;
+ PyObject *ret = NULL;
+
+ virConnectPtr conn = NULL;
+ virTypedParameterPtr params = NULL;
+ int nparams = 0;
+ unsigned int flags = 0;
+ int i_retval;
+
+ if (!PyArg_ParseTuple(args, (char *)"OI:virNodeGetSEVInfo",
+ &pyobj_conn, &flags))
+ return NULL;
+ conn = (virConnectPtr) PyvirConnect_Get(pyobj_conn);
+
+ LIBVIRT_BEGIN_ALLOW_THREADS;
+ i_retval = virNodeGetSEVInfo(conn, ¶ms, &nparams, flags);
+ LIBVIRT_END_ALLOW_THREADS;
+
+ if (i_retval < 0) {
+ ret = VIR_PY_NONE;
+ goto cleanup;
+ }
+
+ ret = getPyVirTypedParameter(params, nparams);
+ cleanup:
+ virTypedParamsFree(params, nparams);
+ return ret;
+}
+#endif /* LIBVIR_CHECK_VERSION(4, 5, 0) */
+
+
/************************************************************************
* *
* The registration stuff *
@@ -9903,6 +10019,9 @@
#if LIBVIR_CHECK_VERSION(0, 10, 2)
{(char *) "virConnectListAllNWFilters",
libvirt_virConnectListAllNWFilters, METH_VARARGS, NULL},
#endif /* LIBVIR_CHECK_VERSION(0, 10, 2) */
+#if LIBVIR_CHECK_VERSION(4, 5, 0)
+ {(char *) "virConnectListAllNWFilterBindings",
libvirt_virConnectListAllNWFilterBindings, METH_VARARGS, NULL},
+#endif /* LIBVIR_CHECK_VERSION(4, 5, 0) */
{(char *) "virConnectListInterfaces", libvirt_virConnectListInterfaces,
METH_VARARGS, NULL},
{(char *) "virConnectListDefinedInterfaces",
libvirt_virConnectListDefinedInterfaces, METH_VARARGS, NULL},
#if LIBVIR_CHECK_VERSION(0, 10, 2)
@@ -10001,6 +10120,10 @@
#if LIBVIR_CHECK_VERSION(4, 4, 0)
{(char *) "virConnectBaselineHypervisorCPU",
libvirt_virConnectBaselineHypervisorCPU, METH_VARARGS, NULL},
#endif /* LIBVIR_CHECK_VERSION(4, 4, 0) */
+#if LIBVIR_CHECK_VERSION(4, 5, 0)
+ {(char *) "virDomainGetLaunchSecurityInfo",
libvirt_virDomainGetLaunchSecurityInfo, METH_VARARGS, NULL},
+ {(char *) "virNodeGetSEVInfo", libvirt_virNodeGetSEVInfo, METH_VARARGS,
NULL},
+#endif /* LIBVIR_CHECK_VERSION(4, 5, 0) */
{NULL, NULL, 0, NULL}
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libvirt-python-4.4.0/libvirt-python.spec
new/libvirt-python-4.5.0/libvirt-python.spec
--- old/libvirt-python-4.4.0/libvirt-python.spec 2018-06-04
22:32:32.000000000 +0200
+++ new/libvirt-python-4.5.0/libvirt-python.spec 2018-07-02
22:18:22.000000000 +0200
@@ -33,7 +33,7 @@
Summary: The libvirt virtualization API python2 binding
Name: libvirt-python
-Version: 4.4.0
+Version: 4.5.0
Release: 1%{?dist}%{?extra_release}
Source0: http://libvirt.org/sources/python/%{name}-%{version}.tar.gz
Url: http://libvirt.org
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libvirt-python-4.4.0/libvirt-utils.c
new/libvirt-python-4.5.0/libvirt-utils.c
--- old/libvirt-python-4.4.0/libvirt-utils.c 2018-05-02 14:42:55.000000000
+0200
+++ new/libvirt-python-4.5.0/libvirt-utils.c 2018-07-02 22:16:59.000000000
+0200
@@ -199,20 +199,6 @@
}
#endif /* ! LIBVIR_CHECK_VERSION(1, 0, 2) */
-char *
-py_str(PyObject *obj)
-{
- PyObject *str = PyObject_Str(obj);
- char *ret;
- if (!str) {
- PyErr_Print();
- PyErr_Clear();
- return NULL;
- };
- libvirt_charPtrUnwrap(str, &ret);
- return ret;
-}
-
/* Helper function to convert a virTypedParameter output array into a
* Python dictionary for return to the user. Return NULL on failure,
* after raising a python exception. */
@@ -316,8 +302,7 @@
while (PyDict_Next(info, &pos, &key, &value)) {
char *keystr = NULL;
- if (libvirt_charPtrUnwrap(key, &keystr) < 0 ||
- keystr == NULL)
+ if (libvirt_charPtrUnwrap(key, &keystr) < 0)
goto cleanup;
for (i = 0; i < nparams; i++) {
@@ -373,8 +358,7 @@
case VIR_TYPED_PARAM_STRING:
{
char *string_val;
- if (libvirt_charPtrUnwrap(value, &string_val) < 0 ||
- !string_val)
+ if (libvirt_charPtrUnwrap(value, &string_val) < 0)
goto cleanup;
temp->value.s = string_val;
break;
@@ -503,7 +487,6 @@
{
char *val;;
if (libvirt_charPtrUnwrap(value, &val) < 0 ||
- !val ||
virTypedParamsAddString(params, n, max, keystr, val) < 0) {
VIR_FREE(val);
goto cleanup;
@@ -555,8 +538,7 @@
return -1;
while (PyDict_Next(dict, &pos, &key, &value)) {
- if (libvirt_charPtrUnwrap(key, &keystr) < 0 ||
- !keystr)
+ if (libvirt_charPtrUnwrap(key, &keystr) < 0)
goto cleanup;
if (PyList_Check(value) || PyTuple_Check(value)) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libvirt-python-4.4.0/libvirt-utils.h
new/libvirt-python-4.5.0/libvirt-utils.h
--- old/libvirt-python-4.4.0/libvirt-utils.h 2018-05-02 14:42:55.000000000
+0200
+++ new/libvirt-python-4.5.0/libvirt-utils.h 2018-07-02 22:16:59.000000000
+0200
@@ -319,7 +319,6 @@
void virTypedParamsFree(virTypedParameterPtr params, int nparams);
# endif /* ! LIBVIR_CHECK_VERSION(1, 0, 2) */
-char * py_str(PyObject *obj);
PyObject * getPyVirTypedParameter(const virTypedParameter *params,
int nparams);
virTypedParameterPtr setPyVirTypedParameter(PyObject *info,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libvirt-python-4.4.0/libvirtaio.py
new/libvirt-python-4.5.0/libvirtaio.py
--- old/libvirt-python-4.4.0/libvirtaio.py 2018-05-02 14:42:55.000000000
+0200
+++ new/libvirt-python-4.5.0/libvirtaio.py 2018-07-02 22:16:59.000000000
+0200
@@ -43,10 +43,13 @@
import libvirt
-try:
- from asyncio import ensure_future
-except ImportError:
- from asyncio import async as ensure_future
+# Python < 3.4.4 doesn't have 'ensure_future', so we have to fall
+# back to 'async'; however, since 'async' is a reserved keyword
+# in Python >= 3.7, we can't perform a straightforward import and
+# we have to resort to getattr() instead
+ensure_future = getattr(asyncio, "ensure_future", None)
+if not ensure_future:
+ ensure_future = getattr(asyncio, "async")
class Callback(object):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libvirt-python-4.4.0/sanitytest.py
new/libvirt-python-4.5.0/sanitytest.py
--- old/libvirt-python-4.4.0/sanitytest.py 2018-05-02 14:42:55.000000000
+0200
+++ new/libvirt-python-4.5.0/sanitytest.py 2018-07-02 22:16:59.000000000
+0200
@@ -234,7 +234,9 @@
"ErrorFunc", "FreeError",
"SaveLastError", "ResetError"]:
continue
- elif func in ["GetLastError", "GetLastErrorMessage", "ResetLastError",
"Initialize"]:
+ elif func in ["GetLastError", "GetLastErrorMessage",
+ "GetLastErrorCode", "GetLastErrorDomain",
+ "ResetLastError", "Initialize"]:
func = "vir" + func
elif func == "SetErrorFunc":
func = "RegisterErrorHandler"
@@ -258,7 +260,7 @@
"LookupByUUIDString", "LookupByVolume" "LookupByName",
"LookupByID", "LookupByName", "LookupByKey", "LookupByPath",
"LookupByMACString", "LookupByUsage", "LookupByVolume",
- "LookupByTargetPath","LookupSCSIHostByWWN",
+ "LookupByTargetPath","LookupSCSIHostByWWN", "LookupByPortDev",
"Restore", "RestoreFlags",
"SaveImageDefineXML", "SaveImageGetXMLDesc", "DefineXMLFlags"]:
if klass != "virDomain":
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libvirt-python-4.4.0/setup.py
new/libvirt-python-4.5.0/setup.py
--- old/libvirt-python-4.4.0/setup.py 2018-06-04 22:28:44.000000000 +0200
+++ new/libvirt-python-4.5.0/setup.py 2018-07-02 22:17:27.000000000 +0200
@@ -334,7 +334,7 @@
_c_modules, _py_modules = get_module_lists()
setup(name = 'libvirt-python',
- version = '4.4.0',
+ version = '4.5.0',
url = 'http://www.libvirt.org',
maintainer = 'Libvirt Maintainers',
maintainer_email = '[email protected]',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libvirt-python-4.4.0/typewrappers.c
new/libvirt-python-4.5.0/typewrappers.c
--- old/libvirt-python-4.4.0/typewrappers.c 2018-05-02 14:42:55.000000000
+0200
+++ new/libvirt-python-4.5.0/typewrappers.c 2018-07-02 22:16:59.000000000
+0200
@@ -384,8 +384,11 @@
#else
ret = PyString_AsString(obj);
#endif
- if (ret)
+ if (ret) {
*str = strdup(ret);
+ if (!*str)
+ PyErr_NoMemory();
+ }
#if PY_MAJOR_VERSION > 2
Py_DECREF(bytes);
#endif
@@ -539,6 +542,19 @@
return ret;
}
+PyObject *
+libvirt_virNWFilterBindingPtrWrap(virNWFilterBindingPtr node)
+{
+ PyObject *ret;
+
+ if (node == NULL) {
+ return VIR_PY_NONE;
+ }
+
+ ret = libvirt_buildPyObject(node, "virNWFilterBindingPtr", NULL);
+ return ret;
+}
+
PyObject *
libvirt_virStreamPtrWrap(virStreamPtr node)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libvirt-python-4.4.0/typewrappers.h
new/libvirt-python-4.5.0/typewrappers.h
--- old/libvirt-python-4.4.0/typewrappers.h 2018-05-02 14:42:55.000000000
+0200
+++ new/libvirt-python-4.5.0/typewrappers.h 2018-07-02 22:16:59.000000000
+0200
@@ -106,6 +106,15 @@
} PyvirNWFilter_Object;
+#define PyvirNWFilterBinding_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyvirNWFilterBinding_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ virNWFilterBindingPtr obj;
+} PyvirNWFilterBinding_Object;
+
+
#define PyvirStream_Get(v) (((v) == Py_None) ? NULL : \
(((PyvirStream_Object *)(v))->obj))
@@ -189,6 +198,7 @@
PyObject * libvirt_virNodeDevicePtrWrap(virNodeDevicePtr node);
PyObject * libvirt_virSecretPtrWrap(virSecretPtr node);
PyObject * libvirt_virNWFilterPtrWrap(virNWFilterPtr node);
+PyObject * libvirt_virNWFilterBindingPtrWrap(virNWFilterBindingPtr node);
PyObject * libvirt_virStreamPtrWrap(virStreamPtr node);
PyObject * libvirt_virDomainSnapshotPtrWrap(virDomainSnapshotPtr node);