Hello community,
here is the log from the commit of package libvirt-python for openSUSE:Factory checked in at 2014-09-10 07:28:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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 2014-08-13 17:08:39.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libvirt-python.new/libvirt-python.changes 2014-09-10 10:20:01.000000000 +0200
@@ -1,0 +2,6 @@
+Tue Sep 2 09:28:25 MDT 2014 - jfehlig@suse.com
+
+- Update to 1.2.8
+ - Add all new APIs and constants in libvirt 1.2.8
+
+-------------------------------------------------------------------
Old:
----
libvirt-python-1.2.7.tar.bz2
New:
----
libvirt-python-1.2.8.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libvirt-python.spec ++++++
--- /var/tmp/diff_new_pack.yWsF2F/_old 2014-09-10 10:20:02.000000000 +0200
+++ /var/tmp/diff_new_pack.yWsF2F/_new 2014-09-10 10:20:02.000000000 +0200
@@ -18,7 +18,7 @@
Name: libvirt-python
Url: http://libvirt.org/
-Version: 1.2.7
+Version: 1.2.8
Release: 0
Summary: Library providing a simple virtualization API
License: LGPL-2.1+
++++++ libvirt-python-1.2.7.tar.bz2 -> libvirt-python-1.2.8.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.2.7/AUTHORS new/libvirt-python-1.2.8/AUTHORS
--- old/libvirt-python-1.2.7/AUTHORS 2014-08-05 09:36:12.000000000 +0200
+++ new/libvirt-python-1.2.8/AUTHORS 2014-09-02 09:38:01.000000000 +0200
@@ -350,6 +350,8 @@
Eric Blake
Eric Blake
Eric Blake
+ Eric Blake
+ Eric Blake
Federico Simoncelli
Giuseppe Scrivano
Giuseppe Scrivano
@@ -477,6 +479,7 @@
Miloslav Trmač
Minoru Usui
Minoru Usui
+ Mo Yuxiang
Nehal J Wani
Nehal J Wani
Nikunj A. Dadhania
@@ -510,6 +513,11 @@
Osier Yang
Osier Yang
Oskari Saarenmaa
+ Pavel Hrdina
+ Pavel Hrdina
+ Pavel Hrdina
+ Peter Krempa
+ Peter Krempa
Peter Krempa
Peter Krempa
Peter Krempa
@@ -549,3 +557,4 @@
Viktor Mihajlovski
Viktor Mihajlovski
Zeeshan Ali (Khattak)
+ Zhou Yimin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.2.7/ChangeLog new/libvirt-python-1.2.8/ChangeLog
--- old/libvirt-python-1.2.7/ChangeLog 2014-08-05 09:36:12.000000000 +0200
+++ new/libvirt-python-1.2.8/ChangeLog 2014-09-02 09:38:01.000000000 +0200
@@ -1,3 +1,91 @@
+2014-09-01 Pavel Hrdina
+
+ Implement API bindings for virDomainBlockCopy
+
+
+2014-09-01 Pavel Hrdina
+
+ API: Implement bindings for virDomainListGetStats
+ Implement the function by returning a list of tuples instead the array
+ of virDomainStatsRecords and store the typed parameters as dict.
+
+
+
+2014-09-01 Peter Krempa
+
+ API: Implement bindings for virConnectGetAllDomainStats
+ Implement the function by returning a list of tuples instead the array
+ of virDomainStatsRecords and store the typed parameters as dict.
+
+
+
+2014-09-01 Peter Krempa
+
+ API: Skip 'virDomainStatsRecordListFree'
+ The new API function doesn't make sense to be exported in python. The
+ bindings will return native types instead of the struct array.
+
+
+
+2014-09-01 Pavel Hrdina
+
+ generator: resolve one level of enum reference
+ In the libvirt.h we have one enum defined by references from another
+ enum and it leads in wrong order of definitons in python code. To
+ prevent this we should resolve that references before we generate the
+ python code.
+
+ For now we have only one level of references so we will count with that
+ in the generator but we should update it in the future to be more
+ flexible.
+
+
+
+2014-08-19 Mo Yuxiang
+
+ build: Fix build warning on libvirt-python
+ On compiling libvirt-python, we get such a warning:
+
+ libvirt-qemu-override.c: In function ‘libvirt_qemu_virConnectDomainQemuMonitorEventRegister’:
+ libvirt-qemu-override.c:304: warning: suggest explicit braces to avoid ambiguous ‘else’
+
+ Py_DECREF is a macro using if/else on older Python releases.
+ The solution is to add braces.
+ Python 2.7 and newer has the macro wrapped in a do { } while(0) block.
+
+
+
+2014-08-11 Zhou Yimin
+
+ Fix libvirt_longlongWrap returning a very large value
+ If hypervisor is not Xen, the errs in struct _virDomainBlockStats will be -1.
+ But in KVM when we call domain.blockStats(), errs is 18446744073709551615.
+
+ To fix that, this patch has two changes:
+ 1. Replace use of the PyLong_FromUnsignedLongLong with PyLong_FromLongLong
+ in function libvirt_longlongWrap
+ 2. If the paramemter of libvirt_longlongWrap is unsigned long long,
+ use libvirt_ulonglongWrap instead because of above change.
+
+ After this patch, errs is -1 which is consistent with virDomainBlockStats api.
+
+
+
+2014-08-04 Eric Blake
+
+ maint: document use of libvirt's run script
+ Ever since libvirt commit 78c09530, it's easier to just use the
+ run script.
+
+ * README: Mention run script.
+
+
+
+2014-08-04 Eric Blake
+
+ Bump version to 1.2.8 for new dev cycle
+
+
2014-07-29 Jiri Denemark
spec: Reorganize to satisfy buggy spectool
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.2.7/PKG-INFO new/libvirt-python-1.2.8/PKG-INFO
--- old/libvirt-python-1.2.7/PKG-INFO 2014-08-05 09:36:12.000000000 +0200
+++ new/libvirt-python-1.2.8/PKG-INFO 2014-09-02 09:38:02.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: libvirt-python
-Version: 1.2.7
+Version: 1.2.8
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.2.7/README new/libvirt-python-1.2.8/README
--- old/libvirt-python-1.2.7/README 2014-06-30 08:25:00.000000000 +0200
+++ new/libvirt-python-1.2.8/README 2014-09-02 09:10:06.000000000 +0200
@@ -32,10 +32,11 @@
rather than directly invoking setup.py.
As of libvirt 1.2.6, it is possible to develop against an uninstalled
-libvirt.git checkout, by setting some environment variables:
+libvirt.git checkout, by setting PKG_CONFIG_PATH and LD_LIBRARY_PATH
+environment variables to point into that libvirt tree; you can even
+automate this by using libvirt's run script:
- export PKG_CONFIG_PATH=/path/to/libvirt/git/src/
- export LD_LIBRARY_PATH=/path/to/libvirt/git/src/.libs/
+ /path/to/libvirt/run python setup.py build
Patches for this code should be sent to the main libvirt
development mailing list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.2.7/generator.py new/libvirt-python-1.2.8/generator.py
--- old/libvirt-python-1.2.7/generator.py 2014-06-30 08:25:00.000000000 +0200
+++ new/libvirt-python-1.2.8/generator.py 2014-09-02 09:10:06.000000000 +0200
@@ -464,6 +464,7 @@
'virConnectGetCPUModelNames',
'virNodeGetFreePages',
'virNetworkGetDHCPLeases',
+ 'virDomainBlockCopy',
)
lxc_skip_impl = (
@@ -507,6 +508,8 @@
'virConnectListAllNodeDevices', # overridden in virConnect.py
'virConnectListAllNWFilters', # overridden in virConnect.py
'virConnectListAllSecrets', # overridden in virConnect.py
+ 'virConnectGetAllDomainStats', # overridden in virConnect.py
+ 'virDomainListGetStats', # overriden in virConnect.py
'virStreamRecvAll', # Pure python libvirt-override-virStream.py
'virStreamSendAll', # Pure python libvirt-override-virStream.py
@@ -571,6 +574,7 @@
"virTypedParamsGetULLong",
'virNetworkDHCPLeaseFree', # only useful in C, python code uses list
+ 'virDomainStatsRecordListFree', # only useful in C, python uses dict
)
lxc_skip_function = (
@@ -1785,12 +1789,26 @@
value = float('inf')
return value
+ # Resolve only one level of reference
+ def resolveEnum(enum, data):
+ for name,val in enum.items():
+ try:
+ int(val)
+ except ValueError:
+ enum[name] = data[val]
+ return enum
+
enumvals = list(enums.items())
+ # convert list of dicts to one dict
+ enumData = {}
+ for type,enum in enumvals:
+ enumData.update(enum)
+
if enumvals is not None:
enumvals.sort(key=lambda x: x[0])
for type,enum in enumvals:
classes.write("# %s\n" % type)
- items = list(enum.items())
+ items = list(resolveEnum(enum, enumData).items())
items.sort(key=enumsSortKey)
if items[-1][0].endswith('_LAST'):
del items[-1]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.2.7/libvirt-override-api.xml new/libvirt-python-1.2.8/libvirt-override-api.xml
--- old/libvirt-python-1.2.7/libvirt-override-api.xml 2014-06-30 08:25:00.000000000 +0200
+++ new/libvirt-python-1.2.8/libvirt-override-api.xml 2014-09-02 09:10:06.000000000 +0200
@@ -640,5 +640,14 @@
<arg name='flags' type='unsigned int' info='unused, pass 0'/>
<return type='char *' info="list of leases"/>
</function>
+ <function name="virDomainBlockCopy" file="python">
+ <info>Copy the guest-visible contents of a disk image to a new file described by destxml</info>
+ <arg name='dom' type='virDomainPtr' info='pointer to domain object'/>
+ <arg name='disk' type='const char *' info='path to the block device, or device shorthand'/>
+ <arg name='destxml' type='const char *' info='XML description of the copy destination'/>
+ <arg name='params' type='virTypedParameterPtr' info='optional pointer to block copy parameter object, or NULL'/>
+ <arg name='flags' type='unsigned int' info='bitwise-OR of virDomainBlockCopyFlags'/>
+ <return type='int' info='0 if the operation has started, -1 on failure'/>
+ </function>
</symbols>
</api>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.2.7/libvirt-override-virConnect.py new/libvirt-python-1.2.8/libvirt-override-virConnect.py
--- old/libvirt-python-1.2.7/libvirt-override-virConnect.py 2014-06-30 08:25:00.000000000 +0200
+++ new/libvirt-python-1.2.8/libvirt-override-virConnect.py 2014-09-02 09:10:06.000000000 +0200
@@ -383,3 +383,103 @@
if ret is None:raise libvirtError('virDomainCreateXMLWithFiles() failed', conn=self)
__tmp = virDomain(self,_obj=ret)
return __tmp
+
+ def getAllDomainStats(self, stats = 0, flags=0):
+ """Query statistics for all domains on a given connection.
+
+ Report statistics of various parameters for a running VM according to @stats
+ field. The statistics are returned as an array of structures for each queried
+ domain. The structure contains an array of typed parameters containing the
+ individual statistics. The typed parameter name for each statistic field
+ consists of a dot-separated string containing name of the requested group
+ followed by a group specific description of the statistic value.
+
+ The statistic groups are enabled using the @stats parameter which is a
+ binary-OR of enum virDomainStatsTypes. The following groups are available
+ (although not necessarily implemented for each hypervisor):
+
+ VIR_DOMAIN_STATS_STATE: Return domain state and reason for entering that
+ state. The typed parameter keys are in this format:
+ "state.state" - state of the VM, returned as int from virDomainState enum
+ "state.reason" - reason for entering given state, returned as int from
+ virDomain*Reason enum corresponding to given state.
+
+ Using 0 for @stats returns all stats groups supported by the given
+ hypervisor.
+
+ Specifying VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS as @flags makes
+ the function return error in case some of the stat types in @stats were
+ not recognized by the daemon.
+
+ Similarly to virConnectListAllDomains, @flags can contain various flags to
+ filter the list of domains to provide stats for.
+
+ VIR_CONNECT_GET_ALL_DOMAINS_STATS_ACTIVE selects online domains while
+ VIR_CONNECT_GET_ALL_DOMAINS_STATS_INACTIVE selects offline ones.
+
+ VIR_CONNECT_GET_ALL_DOMAINS_STATS_PERSISTENT and
+ VIR_CONNECT_GET_ALL_DOMAINS_STATS_TRANSIENT allow to filter the list
+ according to their persistence.
+
+ To filter the list of VMs by domain state @flags can contain
+ VIR_CONNECT_GET_ALL_DOMAINS_STATS_RUNNING,
+ VIR_CONNECT_GET_ALL_DOMAINS_STATS_PAUSED,
+ VIR_CONNECT_GET_ALL_DOMAINS_STATS_SHUTOFF and/or
+ VIR_CONNECT_GET_ALL_DOMAINS_STATS_OTHER for all other states. """
+ ret = libvirtmod.virConnectGetAllDomainStats(self._o, stats, flags)
+ if ret is None:
+ raise libvirtError("virConnectGetAllDomainStats() failed", conn=self)
+
+ retlist = list()
+ for elem in ret:
+ record = (virDomain(self, _obj=elem[0]) , elem[1])
+ retlist.append(record)
+
+ return retlist
+
+ def domainListGetStats(self, doms, stats=0, flags=0):
+ """ Query statistics for given domains.
+
+ Report statistics of various parameters for a running VM according to @stats
+ field. The statistics are returned as an array of structures for each queried
+ domain. The structure contains an array of typed parameters containing the
+ individual statistics. The typed parameter name for each statistic field
+ consists of a dot-separated string containing name of the requested group
+ followed by a group specific description of the statistic value.
+
+ The statistic groups are enabled using the @stats parameter which is a
+ binary-OR of enum virDomainStatsTypes. The following groups are available
+ (although not necessarily implemented for each hypervisor):
+
+ VIR_DOMAIN_STATS_STATE: Return domain state and reason for entering that
+ state. The typed parameter keys are in this format:
+ "state.state" - state of the VM, returned as int from virDomainState enum
+ "state.reason" - reason for entering given state, returned as int from
+ virDomain*Reason enum corresponding to given state.
+
+ Using 0 for @stats returns all stats groups supported by the given
+ hypervisor.
+
+ Specifying VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS as @flags makes
+ the function return error in case some of the stat types in @stats were
+ not recognized by the daemon.
+
+ Get statistics about domains provided as a list in @doms. @stats is
+ a bit field selecting requested statistics types."""
+ domlist = list()
+ for dom in doms:
+ if not isinstance(dom, virDomain):
+ raise libvirtError("domain list contains non-domain elements", conn=self)
+
+ domlist.append(dom._o)
+
+ ret = libvirtmod.virDomainListGetStats(self._o, domlist, stats, flags)
+ if ret is None:
+ raise libvirtError("virDomainListGetStats() failed", conn=self)
+
+ retlist = list()
+ for elem in ret:
+ record = (virDomain(self, _obj=elem[0]) , elem[1])
+ retlist.append(record)
+
+ return retlist
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.2.7/libvirt-override.c new/libvirt-python-1.2.8/libvirt-override.c
--- old/libvirt-python-1.2.7/libvirt-override.c 2014-06-30 08:25:00.000000000 +0200
+++ new/libvirt-python-1.2.8/libvirt-override.c 2014-09-02 09:10:06.000000000 +0200
@@ -1625,7 +1625,7 @@
PyTuple_SetItem(info, 1, item) < 0)
goto itemError;
- if ((item = libvirt_longlongWrap((long long)cpuinfo[i].cpuTime)) == NULL ||
+ if ((item = libvirt_ulonglongWrap(cpuinfo[i].cpuTime)) == NULL ||
PyTuple_SetItem(info, 2, item) < 0)
goto itemError;
@@ -2794,7 +2794,7 @@
PyList_SetItem(py_retval, 2, libvirt_ulongWrap(info.memory));
PyList_SetItem(py_retval, 3, libvirt_intWrap((int) info.nrVirtCpu));
PyList_SetItem(py_retval, 4,
- libvirt_longlongWrap((unsigned long long) info.cpuTime));
+ libvirt_ulonglongWrap(info.cpuTime));
return py_retval;
}
@@ -2849,7 +2849,7 @@
py_retval = PyList_New(3);
PyList_SetItem(py_retval, 0, libvirt_intWrap(info.state));
PyList_SetItem(py_retval, 1, libvirt_intWrap(info.details));
- PyList_SetItem(py_retval, 2, libvirt_longlongWrap(info.stateTime));
+ PyList_SetItem(py_retval, 2, libvirt_ulonglongWrap(info.stateTime));
return py_retval;
}
@@ -3354,7 +3354,7 @@
py_retval = PyList_New(c_retval);
for (i = 0; i < c_retval; i++) {
PyList_SetItem(py_retval, i,
- libvirt_longlongWrap((long long) freeMems[i]));
+ libvirt_ulonglongWrap(freeMems[i]));
}
VIR_FREE(freeMems);
return py_retval;
@@ -3794,11 +3794,11 @@
PyList_SetItem(py_retval, 0, libvirt_intWrap((int) info.state));
PyList_SetItem(py_retval, 1,
- libvirt_longlongWrap((unsigned long long) info.capacity));
+ libvirt_ulonglongWrap(info.capacity));
PyList_SetItem(py_retval, 2,
- libvirt_longlongWrap((unsigned long long) info.allocation));
+ libvirt_ulonglongWrap(info.allocation));
PyList_SetItem(py_retval, 3,
- libvirt_longlongWrap((unsigned long long) info.available));
+ libvirt_ulonglongWrap(info.available));
return py_retval;
}
@@ -3825,9 +3825,9 @@
return VIR_PY_NONE;
PyList_SetItem(py_retval, 0, libvirt_intWrap((int) info.type));
PyList_SetItem(py_retval, 1,
- libvirt_longlongWrap((unsigned long long) info.capacity));
+ libvirt_ulonglongWrap(info.capacity));
PyList_SetItem(py_retval, 2,
- libvirt_longlongWrap((unsigned long long) info.allocation));
+ libvirt_ulonglongWrap(info.allocation));
return py_retval;
}
@@ -7955,6 +7955,183 @@
#endif /* LIBVIR_CHECK_VERSION(1, 2, 6) */
+#if LIBVIR_CHECK_VERSION(1, 2, 8)
+
+static PyObject *
+convertDomainStatsRecord(virDomainStatsRecordPtr *records,
+ int nrecords)
+{
+ PyObject *py_retval;
+ PyObject *py_record;
+ PyObject *py_record_domain;
+ PyObject *py_record_stats;
+ size_t i;
+
+ if (!(py_retval = PyList_New(nrecords)))
+ return NULL;
+
+ for (i = 0; i < nrecords; i++) {
+ if (!(py_record = PyTuple_New(2)))
+ goto error;
+
+ /* libvirt_virDomainPtrWrap steals the object */
+ virDomainRef(records[i]->dom);
+ if (!(py_record_domain = libvirt_virDomainPtrWrap(records[i]->dom))) {
+ virDomainFree(records[i]->dom);
+ goto error;
+ }
+
+ if (!(py_record_stats = getPyVirTypedParameter(records[i]->params,
+ records[i]->nparams)))
+ goto error;
+
+ if (PyTuple_SetItem(py_record, 0, py_record_domain) < 0)
+ goto error;
+
+ py_record_domain = NULL;
+
+ if (PyTuple_SetItem(py_record, 1, py_record_stats) < 0)
+ goto error;
+
+ py_record_stats = NULL;
+
+ if (PyList_SetItem(py_retval, i, py_record) < 0)
+ goto error;
+
+ py_record = NULL;
+ }
+
+ return py_retval;
+
+ error:
+ Py_XDECREF(py_retval);
+ Py_XDECREF(py_record);
+ Py_XDECREF(py_record_domain);
+ Py_XDECREF(py_record_stats);
+ return NULL;
+}
+
+
+static PyObject *
+libvirt_virConnectGetAllDomainStats(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
+ PyObject *pyobj_conn;
+ PyObject *py_retval;
+ virConnectPtr conn;
+ virDomainStatsRecordPtr *records;
+ int nrecords;
+ unsigned int flags;
+ unsigned int stats;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oii:virConnectGetAllDomainStats",
+ &pyobj_conn, &stats, &flags))
+ return NULL;
+ conn = (virConnectPtr) PyvirConnect_Get(pyobj_conn);
+
+ LIBVIRT_BEGIN_ALLOW_THREADS;
+ nrecords = virConnectGetAllDomainStats(conn, stats, &records, flags);
+ LIBVIRT_END_ALLOW_THREADS;
+
+ if (nrecords < 0)
+ return VIR_PY_NONE;
+
+ if (!(py_retval = convertDomainStatsRecord(records, nrecords)))
+ py_retval = VIR_PY_NONE;
+
+ cleanup:
+ virDomainStatsRecordListFree(records);
+
+ return py_retval;
+}
+
+
+static PyObject *
+libvirt_virDomainListGetStats(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
+ PyObject *pyobj_conn;
+ PyObject *py_retval;
+ PyObject *py_domlist;
+ virConnectPtr conn;
+ virDomainStatsRecordPtr *records = NULL;
+ virDomainPtr *doms = NULL;
+ int nrecords;
+ int ndoms;
+ size_t i;
+ unsigned int flags;
+ unsigned int stats;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOii:virDomainListGetStats",
+ &pyobj_conn, &py_domlist, &stats, &flags))
+ return NULL;
+ conn = (virConnectPtr) PyvirConnect_Get(pyobj_conn);
+
+ if (PyList_Check(py_domlist)) {
+ ndoms = PyList_Size(py_domlist);
+
+ if (VIR_ALLOC_N(doms, ndoms + 1) < 0)
+ return PyErr_NoMemory();
+
+ for (i = 0; i < ndoms; i++)
+ doms[i] = PyvirDomain_Get(PyList_GetItem(py_domlist, i));
+ }
+
+ LIBVIRT_BEGIN_ALLOW_THREADS;
+ nrecords = virDomainListGetStats(doms, stats, &records, flags);
+ LIBVIRT_END_ALLOW_THREADS;
+
+ if (nrecords < 0) {
+ py_retval = VIR_PY_NONE;
+ goto cleanup;
+ }
+
+ if (!(py_retval = convertDomainStatsRecord(records, nrecords)))
+ py_retval = VIR_PY_NONE;
+
+ cleanup:
+ virDomainStatsRecordListFree(records);
+ VIR_FREE(doms);
+
+ return py_retval;
+}
+
+
+static PyObject *
+libvirt_virDomainBlockCopy(PyObject *self ATTRIBUTE_UNUSED, PyObject *args)
+{
+ PyObject *pyobj_dom = NULL;
+ PyObject *pyobj_dict = NULL;
+
+ virDomainPtr dom;
+ char *disk = NULL;
+ char *destxml = NULL;
+ virTypedParameterPtr params = NULL;
+ int nparams = 0;
+ unsigned int flags;
+ int c_retval;
+
+ if (!PyArg_ParseTuple(args, (char *) "Ozz|Oi:virDomainBlockCopy",
+ &pyobj_dom, &disk, &destxml, &pyobj_dict, ¶ms,
+ &flags))
+ return VIR_PY_INT_FAIL;
+
+ if (PyDict_Check(pyobj_dict)) {
+ if (virPyDictToTypedParams(pyobj_dict, ¶ms, &nparams, NULL, 0) < 0)
+ return VIR_PY_INT_FAIL;
+ }
+
+ dom = (virDomainPtr) PyvirDomain_Get(pyobj_dom);
+
+ LIBVIRT_BEGIN_ALLOW_THREADS;
+ c_retval = virDomainBlockCopy(dom, disk, destxml, params, nparams, flags);
+ LIBVIRT_END_ALLOW_THREADS;
+
+ return libvirt_intWrap(c_retval);
+}
+
+#endif /* LIBVIR_CHECK_VERSION(1, 2, 8) */
+
/************************************************************************
* *
* The registration stuff *
@@ -8140,6 +8317,11 @@
{(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) */
{NULL, NULL, 0, NULL}
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.2.7/libvirt-python.spec new/libvirt-python-1.2.8/libvirt-python.spec
--- old/libvirt-python-1.2.7/libvirt-python.spec 2014-08-05 09:36:12.000000000 +0200
+++ new/libvirt-python-1.2.8/libvirt-python.spec 2014-09-02 09:38:01.000000000 +0200
@@ -6,7 +6,7 @@
Summary: The libvirt virtualization API python2 binding
Name: libvirt-python
-Version: 1.2.7
+Version: 1.2.8
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.2.7/libvirt-qemu-override.c new/libvirt-python-1.2.8/libvirt-qemu-override.c
--- old/libvirt-python-1.2.7/libvirt-qemu-override.c 2014-06-30 08:25:00.000000000 +0200
+++ new/libvirt-python-1.2.8/libvirt-qemu-override.c 2014-09-02 09:10:06.000000000 +0200
@@ -301,8 +301,9 @@
flags);
LIBVIRT_END_ALLOW_THREADS;
- if (ret < 0)
+ if (ret < 0) {
Py_DECREF(pyobj_cbData);
+ }
py_retval = libvirt_intWrap(ret);
return py_retval;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.2.7/sanitytest.py new/libvirt-python-1.2.8/sanitytest.py
--- old/libvirt-python-1.2.7/sanitytest.py 2014-06-30 08:25:00.000000000 +0200
+++ new/libvirt-python-1.2.8/sanitytest.py 2014-09-02 09:10:06.000000000 +0200
@@ -81,6 +81,12 @@
if name[0:23] == "virNetworkDHCPLeaseFree":
continue
+ if name[0:28] == "virDomainStatsRecordListFree":
+ continue
+
+ if name[0:21] == "virDomainListGetStats":
+ name = "virConnectDomainListGetStats"
+
# These aren't functions, they're callback signatures
if name in ["virConnectAuthCallbackPtr", "virConnectCloseFunc",
"virStreamSinkFunc", "virStreamSourceFunc", "virStreamEventCallback",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.2.7/setup.py new/libvirt-python-1.2.8/setup.py
--- old/libvirt-python-1.2.7/setup.py 2014-08-05 09:35:59.000000000 +0200
+++ new/libvirt-python-1.2.8/setup.py 2014-08-05 09:42:33.000000000 +0200
@@ -309,7 +309,7 @@
_c_modules, _py_modules = get_module_lists()
setup(name = 'libvirt-python',
- version = '1.2.7',
+ version = '1.2.8',
url = 'http://www.libvirt.org',
maintainer = 'Libvirt Maintainers',
maintainer_email = 'libvir-list@redhat.com',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-1.2.7/typewrappers.c new/libvirt-python-1.2.8/typewrappers.c
--- old/libvirt-python-1.2.7/typewrappers.c 2014-06-30 08:25:00.000000000 +0200
+++ new/libvirt-python-1.2.8/typewrappers.c 2014-09-02 09:10:06.000000000 +0200
@@ -79,7 +79,7 @@
libvirt_longlongWrap(long long val)
{
PyObject *ret;
- ret = PyLong_FromUnsignedLongLong((unsigned long long) val);
+ ret = PyLong_FromLongLong(val);
return ret;
}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org