[libvirt] [libvirt-python PATCH 0/2] Rename IOThreads* APIs to IOThread

These depend on the rename being pushed to libvirt.git: (first four patches of:) https://www.redhat.com/archives/libvir-list/2015-March/msg01325.html Ján Tomko (2): Rename virDomainIOThreadsInfoFree to virDomainIOThreadInfoFree Rename virDomainGetIOThreadsInfo to virDomainGetIOThreadInfo generator.py | 6 +++--- libvirt-override-api.xml | 2 +- libvirt-override.c | 12 ++++++------ sanitytest.py | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) -- 2.0.5

--- generator.py | 2 +- libvirt-override.c | 2 +- sanitytest.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/generator.py b/generator.py index df7a74d..05ccbc8 100755 --- a/generator.py +++ b/generator.py @@ -594,7 +594,7 @@ skip_function = ( 'virNetworkDHCPLeaseFree', # only useful in C, python code uses list 'virDomainStatsRecordListFree', # only useful in C, python uses dict 'virDomainFSInfoFree', # only useful in C, python code uses list - 'virDomainIOThreadsInfoFree', # only useful in C, python code uses list + 'virDomainIOThreadInfoFree', # only useful in C, python code uses list ) lxc_skip_function = ( diff --git a/libvirt-override.c b/libvirt-override.c index 1241305..9a72f87 100644 --- a/libvirt-override.c +++ b/libvirt-override.c @@ -2075,7 +2075,7 @@ libvirt_virDomainGetIOThreadsInfo(PyObject *self ATTRIBUTE_UNUSED, cleanup: for (i = 0; i < niothreads; i++) - virDomainIOThreadsInfoFree(iothrinfo[i]); + virDomainIOThreadInfoFree(iothrinfo[i]); VIR_FREE(iothrinfo); Py_XDECREF(py_iothrinfo); return py_retval; diff --git a/sanitytest.py b/sanitytest.py index 0e6e0e5..cff9811 100644 --- a/sanitytest.py +++ b/sanitytest.py @@ -142,7 +142,7 @@ for cname in wantfunctions: if name[0:19] == "virDomainFSInfoFree": continue - if name[0:26] == "virDomainIOThreadsInfoFree": + if name[0:26] == "virDomainIOThreadInfoFree": continue if name[0:21] == "virDomainListGetStats": -- 2.0.5

On 03/26/2015 08:43 AM, Ján Tomko wrote:
--- generator.py | 2 +- libvirt-override.c | 2 +- sanitytest.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/generator.py b/generator.py index df7a74d..05ccbc8 100755 --- a/generator.py +++ b/generator.py @@ -594,7 +594,7 @@ skip_function = ( 'virNetworkDHCPLeaseFree', # only useful in C, python code uses list 'virDomainStatsRecordListFree', # only useful in C, python uses dict 'virDomainFSInfoFree', # only useful in C, python code uses list - 'virDomainIOThreadsInfoFree', # only useful in C, python code uses list + 'virDomainIOThreadInfoFree', # only useful in C, python code uses list )
lxc_skip_function = ( diff --git a/libvirt-override.c b/libvirt-override.c index 1241305..9a72f87 100644 --- a/libvirt-override.c +++ b/libvirt-override.c @@ -2075,7 +2075,7 @@ libvirt_virDomainGetIOThreadsInfo(PyObject *self ATTRIBUTE_UNUSED,
cleanup: for (i = 0; i < niothreads; i++) - virDomainIOThreadsInfoFree(iothrinfo[i]); + virDomainIOThreadInfoFree(iothrinfo[i]); VIR_FREE(iothrinfo); Py_XDECREF(py_iothrinfo); return py_retval; diff --git a/sanitytest.py b/sanitytest.py index 0e6e0e5..cff9811 100644 --- a/sanitytest.py +++ b/sanitytest.py @@ -142,7 +142,7 @@ for cname in wantfunctions: if name[0:19] == "virDomainFSInfoFree": continue
- if name[0:26] == "virDomainIOThreadsInfoFree": + if name[0:26] == "virDomainIOThreadInfoFree":
s/26/25 John
continue
if name[0:21] == "virDomainListGetStats":

--- generator.py | 4 ++-- libvirt-override-api.xml | 2 +- libvirt-override.c | 10 +++++----- sanitytest.py | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/generator.py b/generator.py index 05ccbc8..729daa2 100755 --- a/generator.py +++ b/generator.py @@ -435,7 +435,7 @@ skip_impl = ( 'virDomainGetVcpuPinInfo', 'virDomainGetEmulatorPinInfo', 'virDomainPinEmulator', - 'virDomainGetIOThreadsInfo', + 'virDomainGetIOThreadInfo', 'virDomainPinIOThread', 'virSecretGetValue', 'virSecretSetValue', @@ -1147,7 +1147,7 @@ def nameFixup(name, classe, type, file): elif name[0:20] == "virDomainGetCPUStats": func = name[9:] func = func[0:1].lower() + func[1:] - elif name[0:25] == "virDomainGetIOThreadsInfo": + elif name[0:24] == "virDomainGetIOThreadInfo": func = name[12:] func = func[0:2].lower() + func[2:] elif name[0:18] == "virDomainGetFSInfo": diff --git a/libvirt-override-api.xml b/libvirt-override-api.xml index 4660c9f..cf46090 100644 --- a/libvirt-override-api.xml +++ b/libvirt-override-api.xml @@ -278,7 +278,7 @@ <arg name='cpumap' type='unsigned char *' info='pointer to a bit map of real CPUs (in 8-bit bytes) (IN) Each bit set to 1 means that corresponding CPU is usable. Bytes are stored in little-endian order: CPU0-7, 8-15... In each byte, lowest CPU number is least significant bit.'/> <arg name='flags' type='int' info='flags to specify'/> </function> - <function name='virDomainGetIOThreadsInfo' file='python'> + <function name='virDomainGetIOThreadInfo' file='python'> <info>Query the CPU affinity setting of the IOThreads of the domain</info> <arg name='domain' type='virDomainPtr' info='pointer to domain object, or NULL for Domain0'/> <arg name='flags' type='int' info='an OR'ed set of virDomainModificationImpact'/> diff --git a/libvirt-override.c b/libvirt-override.c index 9a72f87..0699ae3 100644 --- a/libvirt-override.c +++ b/libvirt-override.c @@ -1992,8 +1992,8 @@ libvirt_virDomainGetEmulatorPinInfo(PyObject *self ATTRIBUTE_UNUSED, #if LIBVIR_CHECK_VERSION(1, 2, 14) static PyObject * -libvirt_virDomainGetIOThreadsInfo(PyObject *self ATTRIBUTE_UNUSED, - PyObject *args) +libvirt_virDomainGetIOThreadInfo(PyObject *self ATTRIBUTE_UNUSED, + PyObject *args) { virDomainPtr domain; PyObject *pyobj_domain; @@ -2004,7 +2004,7 @@ libvirt_virDomainGetIOThreadsInfo(PyObject *self ATTRIBUTE_UNUSED, size_t pcpu, i; int niothreads, cpunum; - if (!PyArg_ParseTuple(args, (char *)"OI:virDomainGetIOThreadsInfo", + if (!PyArg_ParseTuple(args, (char *)"OI:virDomainGetIOThreadInfo", &pyobj_domain, &flags)) return NULL; domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain); @@ -2013,7 +2013,7 @@ libvirt_virDomainGetIOThreadsInfo(PyObject *self ATTRIBUTE_UNUSED, return VIR_PY_NONE; LIBVIRT_BEGIN_ALLOW_THREADS; - niothreads = virDomainGetIOThreadsInfo(domain, &iothrinfo, flags); + niothreads = virDomainGetIOThreadInfo(domain, &iothrinfo, flags); LIBVIRT_END_ALLOW_THREADS; if (niothreads < 0) { @@ -8640,7 +8640,7 @@ static PyMethodDef libvirtMethods[] = { {(char *) "virDomainPinEmulator", libvirt_virDomainPinEmulator, METH_VARARGS, NULL}, #endif /* LIBVIR_CHECK_VERSION(0, 10, 0) */ #if LIBVIR_CHECK_VERSION(1, 2, 14) - {(char *) "virDomainGetIOThreadsInfo", libvirt_virDomainGetIOThreadsInfo, METH_VARARGS, NULL}, + {(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}, diff --git a/sanitytest.py b/sanitytest.py index cff9811..aafc487 100644 --- a/sanitytest.py +++ b/sanitytest.py @@ -279,8 +279,8 @@ for name in sorted(basicklassmap): func = "nwfilter" + func[8:] if func[0:8] == "fSFreeze" or func[0:6] == "fSThaw" or func[0:6] == "fSInfo": func = "fs" + func[2:] - if func[0:13] == "iOThreadsInfo": - func = "ioThreadsInfo" + if func[0:13] == "iOThreadInfo": + func = "ioThreadInfo" if klass == "virNetwork": func = func.replace("dHCP", "DHCP") -- 2.0.5

On 03/26/2015 08:43 AM, Ján Tomko wrote:
--- generator.py | 4 ++-- libvirt-override-api.xml | 2 +- libvirt-override.c | 10 +++++----- sanitytest.py | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/generator.py b/generator.py index 05ccbc8..729daa2 100755 --- a/generator.py +++ b/generator.py @@ -435,7 +435,7 @@ skip_impl = ( 'virDomainGetVcpuPinInfo', 'virDomainGetEmulatorPinInfo', 'virDomainPinEmulator', - 'virDomainGetIOThreadsInfo', + 'virDomainGetIOThreadInfo', 'virDomainPinIOThread', 'virSecretGetValue', 'virSecretSetValue', @@ -1147,7 +1147,7 @@ def nameFixup(name, classe, type, file): elif name[0:20] == "virDomainGetCPUStats": func = name[9:] func = func[0:1].lower() + func[1:] - elif name[0:25] == "virDomainGetIOThreadsInfo": + elif name[0:24] == "virDomainGetIOThreadInfo": func = name[12:] func = func[0:2].lower() + func[2:] elif name[0:18] == "virDomainGetFSInfo": diff --git a/libvirt-override-api.xml b/libvirt-override-api.xml index 4660c9f..cf46090 100644 --- a/libvirt-override-api.xml +++ b/libvirt-override-api.xml @@ -278,7 +278,7 @@ <arg name='cpumap' type='unsigned char *' info='pointer to a bit map of real CPUs (in 8-bit bytes) (IN) Each bit set to 1 means that corresponding CPU is usable. Bytes are stored in little-endian order: CPU0-7, 8-15... In each byte, lowest CPU number is least significant bit.'/> <arg name='flags' type='int' info='flags to specify'/> </function> - <function name='virDomainGetIOThreadsInfo' file='python'> + <function name='virDomainGetIOThreadInfo' file='python'> <info>Query the CPU affinity setting of the IOThreads of the domain</info> <arg name='domain' type='virDomainPtr' info='pointer to domain object, or NULL for Domain0'/> <arg name='flags' type='int' info='an OR'ed set of virDomainModificationImpact'/> diff --git a/libvirt-override.c b/libvirt-override.c index 9a72f87..0699ae3 100644 --- a/libvirt-override.c +++ b/libvirt-override.c @@ -1992,8 +1992,8 @@ libvirt_virDomainGetEmulatorPinInfo(PyObject *self ATTRIBUTE_UNUSED,
#if LIBVIR_CHECK_VERSION(1, 2, 14) static PyObject * -libvirt_virDomainGetIOThreadsInfo(PyObject *self ATTRIBUTE_UNUSED, - PyObject *args) +libvirt_virDomainGetIOThreadInfo(PyObject *self ATTRIBUTE_UNUSED, + PyObject *args) { virDomainPtr domain; PyObject *pyobj_domain; @@ -2004,7 +2004,7 @@ libvirt_virDomainGetIOThreadsInfo(PyObject *self ATTRIBUTE_UNUSED, size_t pcpu, i; int niothreads, cpunum;
- if (!PyArg_ParseTuple(args, (char *)"OI:virDomainGetIOThreadsInfo", + if (!PyArg_ParseTuple(args, (char *)"OI:virDomainGetIOThreadInfo", &pyobj_domain, &flags)) return NULL; domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain); @@ -2013,7 +2013,7 @@ libvirt_virDomainGetIOThreadsInfo(PyObject *self ATTRIBUTE_UNUSED, return VIR_PY_NONE;
LIBVIRT_BEGIN_ALLOW_THREADS; - niothreads = virDomainGetIOThreadsInfo(domain, &iothrinfo, flags); + niothreads = virDomainGetIOThreadInfo(domain, &iothrinfo, flags); LIBVIRT_END_ALLOW_THREADS;
if (niothreads < 0) {
If you've added the CPU Time it needs to be handled here too John
@@ -8640,7 +8640,7 @@ static PyMethodDef libvirtMethods[] = { {(char *) "virDomainPinEmulator", libvirt_virDomainPinEmulator, METH_VARARGS, NULL}, #endif /* LIBVIR_CHECK_VERSION(0, 10, 0) */ #if LIBVIR_CHECK_VERSION(1, 2, 14) - {(char *) "virDomainGetIOThreadsInfo", libvirt_virDomainGetIOThreadsInfo, METH_VARARGS, NULL}, + {(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}, diff --git a/sanitytest.py b/sanitytest.py index cff9811..aafc487 100644 --- a/sanitytest.py +++ b/sanitytest.py @@ -279,8 +279,8 @@ for name in sorted(basicklassmap): func = "nwfilter" + func[8:] if func[0:8] == "fSFreeze" or func[0:6] == "fSThaw" or func[0:6] == "fSInfo": func = "fs" + func[2:] - if func[0:13] == "iOThreadsInfo": - func = "ioThreadsInfo" + if func[0:13] == "iOThreadInfo":
s/13/12
+ func = "ioThreadInfo"
if klass == "virNetwork": func = func.replace("dHCP", "DHCP")

On Thu, Mar 26, 2015 at 11:37:28 -0400, John Ferlan wrote:
On 03/26/2015 08:43 AM, Ján Tomko wrote:
--- generator.py | 4 ++-- libvirt-override-api.xml | 2 +- libvirt-override.c | 10 +++++----- sanitytest.py | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/generator.py b/generator.py index 05ccbc8..729daa2 100755 --- a/generator.py +++ b/generator.py @@ -435,7 +435,7 @@ skip_impl = ( 'virDomainGetVcpuPinInfo', 'virDomainGetEmulatorPinInfo', 'virDomainPinEmulator', - 'virDomainGetIOThreadsInfo', + 'virDomainGetIOThreadInfo', 'virDomainPinIOThread', 'virSecretGetValue', 'virSecretSetValue', @@ -1147,7 +1147,7 @@ def nameFixup(name, classe, type, file): elif name[0:20] == "virDomainGetCPUStats": func = name[9:] func = func[0:1].lower() + func[1:] - elif name[0:25] == "virDomainGetIOThreadsInfo": + elif name[0:24] == "virDomainGetIOThreadInfo": func = name[12:] func = func[0:2].lower() + func[2:] elif name[0:18] == "virDomainGetFSInfo": diff --git a/libvirt-override-api.xml b/libvirt-override-api.xml index 4660c9f..cf46090 100644 --- a/libvirt-override-api.xml +++ b/libvirt-override-api.xml @@ -278,7 +278,7 @@ <arg name='cpumap' type='unsigned char *' info='pointer to a bit map of real CPUs (in 8-bit bytes) (IN) Each bit set to 1 means that corresponding CPU is usable. Bytes are stored in little-endian order: CPU0-7, 8-15... In each byte, lowest CPU number is least significant bit.'/> <arg name='flags' type='int' info='flags to specify'/> </function> - <function name='virDomainGetIOThreadsInfo' file='python'> + <function name='virDomainGetIOThreadInfo' file='python'> <info>Query the CPU affinity setting of the IOThreads of the domain</info> <arg name='domain' type='virDomainPtr' info='pointer to domain object, or NULL for Domain0'/> <arg name='flags' type='int' info='an OR'ed set of virDomainModificationImpact'/> diff --git a/libvirt-override.c b/libvirt-override.c index 9a72f87..0699ae3 100644 --- a/libvirt-override.c +++ b/libvirt-override.c @@ -1992,8 +1992,8 @@ libvirt_virDomainGetEmulatorPinInfo(PyObject *self ATTRIBUTE_UNUSED,
#if LIBVIR_CHECK_VERSION(1, 2, 14) static PyObject * -libvirt_virDomainGetIOThreadsInfo(PyObject *self ATTRIBUTE_UNUSED, - PyObject *args) +libvirt_virDomainGetIOThreadInfo(PyObject *self ATTRIBUTE_UNUSED, + PyObject *args) { virDomainPtr domain; PyObject *pyobj_domain; @@ -2004,7 +2004,7 @@ libvirt_virDomainGetIOThreadsInfo(PyObject *self ATTRIBUTE_UNUSED, size_t pcpu, i; int niothreads, cpunum;
- if (!PyArg_ParseTuple(args, (char *)"OI:virDomainGetIOThreadsInfo", + if (!PyArg_ParseTuple(args, (char *)"OI:virDomainGetIOThreadInfo", &pyobj_domain, &flags)) return NULL; domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain); @@ -2013,7 +2013,7 @@ libvirt_virDomainGetIOThreadsInfo(PyObject *self ATTRIBUTE_UNUSED, return VIR_PY_NONE;
LIBVIRT_BEGIN_ALLOW_THREADS; - niothreads = virDomainGetIOThreadsInfo(domain, &iothrinfo, flags); + niothreads = virDomainGetIOThreadInfo(domain, &iothrinfo, flags); LIBVIRT_END_ALLOW_THREADS;
if (niothreads < 0) {
If you've added the CPU Time it needs to be handled here too
John
@@ -8640,7 +8640,7 @@ static PyMethodDef libvirtMethods[] = { {(char *) "virDomainPinEmulator", libvirt_virDomainPinEmulator, METH_VARARGS, NULL}, #endif /* LIBVIR_CHECK_VERSION(0, 10, 0) */ #if LIBVIR_CHECK_VERSION(1, 2, 14) - {(char *) "virDomainGetIOThreadsInfo", libvirt_virDomainGetIOThreadsInfo, METH_VARARGS, NULL}, + {(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}, diff --git a/sanitytest.py b/sanitytest.py index cff9811..aafc487 100644 --- a/sanitytest.py +++ b/sanitytest.py @@ -279,8 +279,8 @@ for name in sorted(basicklassmap): func = "nwfilter" + func[8:] if func[0:8] == "fSFreeze" or func[0:6] == "fSThaw" or func[0:6] == "fSInfo": func = "fs" + func[2:] - if func[0:13] == "iOThreadsInfo": - func = "ioThreadsInfo" + if func[0:13] == "iOThreadInfo":
s/13/12
Actually, why don't we use something like func.startswith("iOThreadInfo") everywhere instead of this fragile [0:n] approach? Are we targeting some old versions of python which did not support that (I don't know if such versions even exist, though)? Jirka

On Thu, Mar 26, 2015 at 08:36:34PM +0100, Jiri Denemark wrote:
On Thu, Mar 26, 2015 at 11:37:28 -0400, John Ferlan wrote:
On 03/26/2015 08:43 AM, Ján Tomko wrote:
--- generator.py | 4 ++-- libvirt-override-api.xml | 2 +- libvirt-override.c | 10 +++++----- sanitytest.py | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/generator.py b/generator.py index 05ccbc8..729daa2 100755 --- a/generator.py +++ b/generator.py @@ -435,7 +435,7 @@ skip_impl = ( 'virDomainGetVcpuPinInfo', 'virDomainGetEmulatorPinInfo', 'virDomainPinEmulator', - 'virDomainGetIOThreadsInfo', + 'virDomainGetIOThreadInfo', 'virDomainPinIOThread', 'virSecretGetValue', 'virSecretSetValue', @@ -1147,7 +1147,7 @@ def nameFixup(name, classe, type, file): elif name[0:20] == "virDomainGetCPUStats": func = name[9:] func = func[0:1].lower() + func[1:] - elif name[0:25] == "virDomainGetIOThreadsInfo": + elif name[0:24] == "virDomainGetIOThreadInfo": func = name[12:] func = func[0:2].lower() + func[2:] elif name[0:18] == "virDomainGetFSInfo": diff --git a/libvirt-override-api.xml b/libvirt-override-api.xml index 4660c9f..cf46090 100644 --- a/libvirt-override-api.xml +++ b/libvirt-override-api.xml @@ -278,7 +278,7 @@ <arg name='cpumap' type='unsigned char *' info='pointer to a bit map of real CPUs (in 8-bit bytes) (IN) Each bit set to 1 means that corresponding CPU is usable. Bytes are stored in little-endian order: CPU0-7, 8-15... In each byte, lowest CPU number is least significant bit.'/> <arg name='flags' type='int' info='flags to specify'/> </function> - <function name='virDomainGetIOThreadsInfo' file='python'> + <function name='virDomainGetIOThreadInfo' file='python'> <info>Query the CPU affinity setting of the IOThreads of the domain</info> <arg name='domain' type='virDomainPtr' info='pointer to domain object, or NULL for Domain0'/> <arg name='flags' type='int' info='an OR'ed set of virDomainModificationImpact'/> diff --git a/libvirt-override.c b/libvirt-override.c index 9a72f87..0699ae3 100644 --- a/libvirt-override.c +++ b/libvirt-override.c @@ -1992,8 +1992,8 @@ libvirt_virDomainGetEmulatorPinInfo(PyObject *self ATTRIBUTE_UNUSED,
#if LIBVIR_CHECK_VERSION(1, 2, 14) static PyObject * -libvirt_virDomainGetIOThreadsInfo(PyObject *self ATTRIBUTE_UNUSED, - PyObject *args) +libvirt_virDomainGetIOThreadInfo(PyObject *self ATTRIBUTE_UNUSED, + PyObject *args) { virDomainPtr domain; PyObject *pyobj_domain; @@ -2004,7 +2004,7 @@ libvirt_virDomainGetIOThreadsInfo(PyObject *self ATTRIBUTE_UNUSED, size_t pcpu, i; int niothreads, cpunum;
- if (!PyArg_ParseTuple(args, (char *)"OI:virDomainGetIOThreadsInfo", + if (!PyArg_ParseTuple(args, (char *)"OI:virDomainGetIOThreadInfo", &pyobj_domain, &flags)) return NULL; domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain); @@ -2013,7 +2013,7 @@ libvirt_virDomainGetIOThreadsInfo(PyObject *self ATTRIBUTE_UNUSED, return VIR_PY_NONE;
LIBVIRT_BEGIN_ALLOW_THREADS; - niothreads = virDomainGetIOThreadsInfo(domain, &iothrinfo, flags); + niothreads = virDomainGetIOThreadInfo(domain, &iothrinfo, flags); LIBVIRT_END_ALLOW_THREADS;
if (niothreads < 0) {
If you've added the CPU Time it needs to be handled here too
I haven't pushed the CPU time changes.
John
@@ -8640,7 +8640,7 @@ static PyMethodDef libvirtMethods[] = { {(char *) "virDomainPinEmulator", libvirt_virDomainPinEmulator, METH_VARARGS, NULL}, #endif /* LIBVIR_CHECK_VERSION(0, 10, 0) */ #if LIBVIR_CHECK_VERSION(1, 2, 14) - {(char *) "virDomainGetIOThreadsInfo", libvirt_virDomainGetIOThreadsInfo, METH_VARARGS, NULL}, + {(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}, diff --git a/sanitytest.py b/sanitytest.py index cff9811..aafc487 100644 --- a/sanitytest.py +++ b/sanitytest.py @@ -279,8 +279,8 @@ for name in sorted(basicklassmap): func = "nwfilter" + func[8:] if func[0:8] == "fSFreeze" or func[0:6] == "fSThaw" or func[0:6] == "fSInfo": func = "fs" + func[2:] - if func[0:13] == "iOThreadsInfo": - func = "ioThreadsInfo" + if func[0:13] == "iOThreadInfo":
s/13/12
Actually, why don't we use something like func.startswith("iOThreadInfo") everywhere instead of this fragile [0:n] approach? Are we targeting some old versions of python which did not support that (I don't know if such versions even exist, though)?
That's better left for a separate cleanup. Jan

On 03/26/2015 08:43 AM, Ján Tomko wrote:
These depend on the rename being pushed to libvirt.git: (first four patches of:) https://www.redhat.com/archives/libvir-list/2015-March/msg01325.html
Ján Tomko (2): Rename virDomainIOThreadsInfoFree to virDomainIOThreadInfoFree Rename virDomainGetIOThreadsInfo to virDomainGetIOThreadInfo
generator.py | 6 +++--- libvirt-override-api.xml | 2 +- libvirt-override.c | 12 ++++++------ sanitytest.py | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-)
ACK - although you won't be able to build/test this validate until Pavel's changes are in for virDomainInterfacesAddresses... John

On Fri, Mar 27, 2015 at 05:39:18PM -0400, John Ferlan wrote:
On 03/26/2015 08:43 AM, Ján Tomko wrote:
These depend on the rename being pushed to libvirt.git: (first four patches of:) https://www.redhat.com/archives/libvir-list/2015-March/msg01325.html
Ján Tomko (2): Rename virDomainIOThreadsInfoFree to virDomainIOThreadInfoFree Rename virDomainGetIOThreadsInfo to virDomainGetIOThreadInfo
generator.py | 6 +++--- libvirt-override-api.xml | 2 +- libvirt-override.c | 12 ++++++------ sanitytest.py | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-)
ACK - although you won't be able to build/test this validate until Pavel's changes are in for virDomainInterfacesAddresses...
Thanks, I applied the patch locally and the ioThreadInfo API works for me. Now pushed. Jan
participants (3)
-
Jiri Denemark
-
John Ferlan
-
Ján Tomko