Hello community, here is the log from the commit of package libvirt-python for openSUSE:Factory checked in at 2016-04-28 16:55:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libvirt-python (Old) and /work/SRC/openSUSE:Factory/.libvirt-python.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libvirt-python" Changes: -------- --- /work/SRC/openSUSE:Factory/libvirt-python/libvirt-python.changes 2016-03-08 10:18:09.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.libvirt-python.new/libvirt-python.changes 2016-04-28 16:58:07.000000000 +0200 @@ -1,0 +2,6 @@ +Tue Apr 12 23:48:41 UTC 2016 - [email protected] + +- Update to 1.3.3 + - Add all new APIs and constants in libvirt 1.3.3 + +------------------------------------------------------------------- Old: ---- libvirt-python-1.3.2.tar.gz libvirt-python-1.3.2.tar.gz.asc New: ---- libvirt-python-1.3.3.tar.gz libvirt-python-1.3.3.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libvirt-python.spec ++++++ --- /var/tmp/diff_new_pack.DYAuM5/_old 2016-04-28 16:58:09.000000000 +0200 +++ /var/tmp/diff_new_pack.DYAuM5/_new 2016-04-28 16:58:09.000000000 +0200 @@ -18,7 +18,7 @@ Name: libvirt-python Url: http://libvirt.org/ -Version: 1.3.2 +Version: 1.3.3 Release: 0 Summary: Library providing a simple virtualization API License: LGPL-2.1+ ++++++ libvirt-python-1.3.2.tar.gz -> libvirt-python-1.3.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.3.2/AUTHORS new/libvirt-python-1.3.3/AUTHORS --- old/libvirt-python-1.3.2/AUTHORS 2016-03-01 05:47:10.000000000 +0100 +++ new/libvirt-python-1.3.3/AUTHORS 2016-04-06 09:29:58.000000000 +0200 @@ -61,6 +61,7 @@ Peter Krempa <[email protected]> Philipp Hahn <[email protected]> Pradipta Kr. Banerjee <[email protected]> + Qiaowei Ren <[email protected]> Richard W.M. Jones <[email protected]> Robie Basak <[email protected]> Serge E. Hallyn <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.3.2/ChangeLog new/libvirt-python-1.3.3/ChangeLog --- old/libvirt-python-1.3.2/ChangeLog 2016-03-01 05:47:10.000000000 +0100 +++ new/libvirt-python-1.3.3/ChangeLog 2016-04-06 09:29:58.000000000 +0200 @@ -1,3 +1,16 @@ +2016-03-31 Qiaowei Ren <[email protected]> + + python: add python binding for Perf API + This patch adds the python binding for virDomainSetPerfEvents and + virDomainSetPerfEvents API. + + + +2016-03-08 Jiri Denemark <[email protected]> + + Add support for JOB_COMPLETED event + + 2016-02-23 Pavel Hrdina <[email protected]> libvirt-override: fix PyArg_ParseTuple for size_t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.3.2/PKG-INFO new/libvirt-python-1.3.3/PKG-INFO --- old/libvirt-python-1.3.2/PKG-INFO 2016-03-01 05:47:10.000000000 +0100 +++ new/libvirt-python-1.3.3/PKG-INFO 2016-04-06 09:29:59.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: libvirt-python -Version: 1.3.2 +Version: 1.3.3 Summary: The libvirt virtualization API Home-page: http://www.libvirt.org Author: Libvirt Maintainers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.3.2/examples/event-test.py new/libvirt-python-1.3.3/examples/event-test.py --- old/libvirt-python-1.3.2/examples/event-test.py 2016-03-01 05:46:24.000000000 +0100 +++ new/libvirt-python-1.3.3/examples/event-test.py 2016-04-06 09:28:09.000000000 +0200 @@ -533,6 +533,8 @@ def myDomainEventMigrationIteration(conn, dom, iteration, opaque): print("myDomainEventMigrationIteration: Domain %s(%s) started migration iteration %d" % ( dom.name(), dom.ID(), iteration)) +def myDomainEventJobCompletedCallback(conn, dom, params, opaque): + print("myDomainEventJobCompletedCallback: Domain %s(%s) %s" % (dom.name(), dom.ID(), params)) ########################################################################## # Network events @@ -646,6 +648,7 @@ vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_AGENT_LIFECYCLE, myDomainEventAgentLifecycleCallback, None) vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_DEVICE_ADDED, myDomainEventDeviceAddedCallback, None) vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION, myDomainEventMigrationIteration, None) + vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_JOB_COMPLETED, myDomainEventJobCompletedCallback, None) vc.networkEventRegisterAny(None, libvirt.VIR_NETWORK_EVENT_ID_LIFECYCLE, myNetworkEventLifecycleCallback, None) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.3.2/generator.py new/libvirt-python-1.3.3/generator.py --- old/libvirt-python-1.3.2/generator.py 2015-11-04 04:07:40.000000000 +0100 +++ new/libvirt-python-1.3.3/generator.py 2016-04-06 09:28:09.000000000 +0200 @@ -488,6 +488,8 @@ 'virNodeAllocPages', 'virDomainGetFSInfo', 'virDomainInterfaceAddresses', + 'virDomainGetPerfEvents', + 'virDomainSetPerfEvents', ) lxc_skip_impl = ( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.3.2/libvirt-override-api.xml new/libvirt-python-1.3.3/libvirt-override-api.xml --- old/libvirt-python-1.3.2/libvirt-override-api.xml 2015-11-04 04:07:40.000000000 +0100 +++ new/libvirt-python-1.3.3/libvirt-override-api.xml 2016-04-06 09:28:09.000000000 +0200 @@ -344,6 +344,19 @@ <arg name='domain' type='virDomainPtr' info='pointer to domain object'/> <arg name='flags' type='int' info='an OR'ed set of virDomainModificationImpact'/> </function> + <function name='virDomainGetPerfEvents' file='python'> + <info>Get all perf events setting.</info> + <return type='char *' info='returns a dictionary of params in case of success, None in case of error'/> + <arg name='domain' type='virDomainPtr' info='pointer to domain object'/> + <arg name='flags' type='int' info='an OR'ed set of virDomainModificationImpact'/> + </function> + <function name='virDomainSetPerfEvents' file='python'> + <info>Enable or disable the particular list of perf events</info> + <return type='int' info='-1 in case of error, 0 in case of success.'/> + <arg name='domain' type='virDomainPtr' info='pointer to domain object'/> + <arg name='params' type='virTypedParameterPtr' info='pointer to perf events parameter object'/> + <arg name='flags' type='int' info='an OR'ed set of virDomainModificationImpact'/> + </function> <function name='virDomainSetInterfaceParameters' file='python'> <info>Change the bandwidth tunables for a interface device</info> <arg name='dom' type='virDomainPtr' info='pointer to the domain'/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.3.2/libvirt-override-virConnect.py new/libvirt-python-1.3.3/libvirt-override-virConnect.py --- old/libvirt-python-1.3.2/libvirt-override-virConnect.py 2016-03-01 05:46:24.000000000 +0100 +++ new/libvirt-python-1.3.3/libvirt-override-virConnect.py 2016-04-06 09:28:09.000000000 +0200 @@ -225,6 +225,15 @@ cb(self, virDomain(self, _obj=dom), iteration, opaque) return 0 + def _dispatchDomainEventJobCompletedCallback(self, dom, params, cbData): + """Dispatches event to python user domain job completed callbacks + """ + cb = cbData["cb"] + opaque = cbData["opaque"] + + cb(self, virDomain(self, _obj=dom), params, opaque) + return 0 + def domainEventDeregisterAny(self, callbackID): """Removes a Domain Event Callback. De-registering for a domain callback will disable delivery of this event type """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.3.2/libvirt-override.c new/libvirt-python-1.3.3/libvirt-override.c --- old/libvirt-python-1.3.2/libvirt-override.c 2016-03-01 05:46:24.000000000 +0100 +++ new/libvirt-python-1.3.3/libvirt-override.c 2016-04-06 09:28:09.000000000 +0200 @@ -6835,6 +6835,65 @@ } #endif /* VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION */ +#ifdef VIR_DOMAIN_EVENT_ID_JOB_COMPLETED +static int +libvirt_virConnectDomainEventJobCompletedCallback(virConnectPtr conn ATTRIBUTE_UNUSED, + virDomainPtr dom, + virTypedParameterPtr params, + int nparams, + void *opaque) +{ + PyObject *pyobj_cbData = (PyObject*)opaque; + PyObject *pyobj_dom; + PyObject *pyobj_ret = NULL; + PyObject *pyobj_conn; + PyObject *dictKey; + PyObject *pyobj_dict = NULL; + int ret = -1; + + LIBVIRT_ENSURE_THREAD_STATE; + + pyobj_dict = getPyVirTypedParameter(params, nparams); + if (!pyobj_dict) + goto cleanup; + + if (!(dictKey = libvirt_constcharPtrWrap("conn"))) + goto cleanup; + pyobj_conn = PyDict_GetItem(pyobj_cbData, dictKey); + Py_DECREF(dictKey); + + /* Create a python instance of this virDomainPtr */ + virDomainRef(dom); + if (!(pyobj_dom = libvirt_virDomainPtrWrap(dom))) { + virDomainFree(dom); + goto cleanup; + } + Py_INCREF(pyobj_cbData); + + /* Call the Callback Dispatcher */ + pyobj_ret = PyObject_CallMethod(pyobj_conn, + (char*)"_dispatchDomainEventJobCompletedCallback", + (char*)"OOO", + pyobj_dom, pyobj_dict, pyobj_cbData); + + Py_DECREF(pyobj_cbData); + Py_DECREF(pyobj_dom); + + cleanup: + if (!pyobj_ret) { + DEBUG("%s - ret:%p\n", __FUNCTION__, pyobj_ret); + PyErr_Print(); + Py_XDECREF(pyobj_dict); + } else { + Py_DECREF(pyobj_ret); + ret = 0; + } + + LIBVIRT_RELEASE_THREAD_STATE; + return ret; +} +#endif /* VIR_DOMAIN_EVENT_ID_JOB_COMPLETED */ + static PyObject * libvirt_virConnectDomainEventRegisterAny(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) @@ -6940,6 +6999,11 @@ cb = VIR_DOMAIN_EVENT_CALLBACK(libvirt_virConnectDomainEventMigrationIterationCallback); break; #endif /* VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION */ +#ifdef VIR_DOMAIN_EVENT_ID_JOB_COMPLETED + case VIR_DOMAIN_EVENT_ID_JOB_COMPLETED: + cb = VIR_DOMAIN_EVENT_CALLBACK(libvirt_virConnectDomainEventJobCompletedCallback); + break; +#endif /* VIR_DOMAIN_EVENT_ID_JOB_COMPLETED */ case VIR_DOMAIN_EVENT_ID_LAST: break; } @@ -8543,6 +8607,102 @@ #endif /* LIBVIR_CHECK_VERSION(1, 2, 11) */ +#if LIBVIR_CHECK_VERSION(1, 3, 3) +static PyObject * +libvirt_virDomainGetPerfEvents(PyObject *self ATTRIBUTE_UNUSED, + PyObject *args) +{ + PyObject *pyobj_domain; + virDomainPtr domain; + virTypedParameterPtr params = NULL; + int nparams = 0; + PyObject *dict = NULL; + unsigned int flags; + int rc; + + if (!PyArg_ParseTuple(args, (char *) "OI:virDomainGetPerfEvents", + &pyobj_domain, &flags)) + return NULL; + domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain); + + LIBVIRT_BEGIN_ALLOW_THREADS; + rc = virDomainGetPerfEvents(domain, ¶ms, &nparams, flags); + LIBVIRT_END_ALLOW_THREADS; + if (rc < 0) + return VIR_PY_NONE; + + if (!(dict = getPyVirTypedParameter(params, nparams))) + goto cleanup; + + cleanup: + virTypedParamsFree(params, nparams); + return dict; +} + +static PyObject * +libvirt_virDomainSetPerfEvents(PyObject *self ATTRIBUTE_UNUSED, + PyObject *args) +{ + virDomainPtr domain; + PyObject *pyobj_domain, *info; + PyObject *ret = NULL; + int i_retval; + int nparams = 0; + Py_ssize_t size = 0; + unsigned int flags; + virTypedParameterPtr params = NULL, new_params = NULL; + + if (!PyArg_ParseTuple(args, + (char *)"OOI:virDomainSetPerfEvents", + &pyobj_domain, &info, &flags)) + return NULL; + domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain); + + if ((size = PyDict_Size(info)) < 0) + return NULL; + + if (size == 0) { + PyErr_Format(PyExc_LookupError, + "Need non-empty dictionary to set attributes"); + return NULL; + } + + LIBVIRT_BEGIN_ALLOW_THREADS; + i_retval = virDomainGetPerfEvents(domain, ¶ms, &nparams, flags); + LIBVIRT_END_ALLOW_THREADS; + + if (i_retval < 0) + return VIR_PY_INT_FAIL; + + if (nparams == 0) { + PyErr_Format(PyExc_LookupError, + "Domain has no settable attributes"); + return NULL; + } + + new_params = setPyVirTypedParameter(info, params, nparams); + if (!new_params) + goto cleanup; + + LIBVIRT_BEGIN_ALLOW_THREADS; + i_retval = virDomainSetPerfEvents(domain, new_params, size, flags); + LIBVIRT_END_ALLOW_THREADS; + + if (i_retval < 0) { + ret = VIR_PY_INT_FAIL; + goto cleanup; + } + + ret = VIR_PY_INT_SUCCESS; + + cleanup: + virTypedParamsFree(params, nparams); + virTypedParamsFree(new_params, size); + return ret; +} +#endif /* LIBVIR_CHECK_VERSION(1, 3, 3) */ + + /************************************************************************ * * * The registration stuff * @@ -8746,6 +8906,10 @@ #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) */ {NULL, NULL, 0, NULL} }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.3.2/libvirt-python.spec new/libvirt-python-1.3.3/libvirt-python.spec --- old/libvirt-python-1.3.2/libvirt-python.spec 2016-03-01 05:47:10.000000000 +0100 +++ new/libvirt-python-1.3.3/libvirt-python.spec 2016-04-06 09:29:58.000000000 +0200 @@ -6,7 +6,7 @@ Summary: The libvirt virtualization API python2 binding Name: libvirt-python -Version: 1.3.2 +Version: 1.3.3 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-1.3.2/setup.py new/libvirt-python-1.3.3/setup.py --- old/libvirt-python-1.3.2/setup.py 2016-03-01 05:46:24.000000000 +0100 +++ new/libvirt-python-1.3.3/setup.py 2016-04-06 09:29:53.000000000 +0200 @@ -305,7 +305,7 @@ _c_modules, _py_modules = get_module_lists() setup(name = 'libvirt-python', - version = '1.3.2', + version = '1.3.3', url = 'http://www.libvirt.org', maintainer = 'Libvirt Maintainers', maintainer_email = '[email protected]',
