mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
python: Implement virDomainMigrateGetCompressionCache wrapper
This commit is contained in:
parent
34f44e911f
commit
4802d59e6a
@ -491,6 +491,13 @@
|
||||
<arg name='flags' type='unsigned int' info='fine-tuning flags, currently unused, pass 0.'/>
|
||||
<return type='virDomainBlockJobInfo' info='A dictionary containing job information.' />
|
||||
</function>
|
||||
<function name='virDomainMigrateGetCompressionCache' file='python'>
|
||||
<info>Get current size of the cache (in bytes) used for compressing
|
||||
repeatedly transferred memory pages during live migration.</info>
|
||||
<arg name='domain' type='virDomainPtr' info='a domain object'/>
|
||||
<arg name='flags' type='unsigned int' info='flags, currently unused, pass 0.'/>
|
||||
<return type='unsigned long long' info='current cache size, or None in case of error'/>
|
||||
</function>
|
||||
<function name='virDomainMigrateGetMaxSpeed' file='python'>
|
||||
<info>Get currently configured maximum migration speed for a domain</info>
|
||||
<arg name='domain' type='virDomainPtr' info='a domain object'/>
|
||||
|
@ -6321,6 +6321,33 @@ libvirt_virDomainSendKey(PyObject *self ATTRIBUTE_UNUSED,
|
||||
return py_retval;
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
libvirt_virDomainMigrateGetCompressionCache(PyObject *self ATTRIBUTE_UNUSED,
|
||||
PyObject *args)
|
||||
{
|
||||
PyObject *pyobj_domain;
|
||||
virDomainPtr domain;
|
||||
unsigned int flags;
|
||||
unsigned long long cacheSize;
|
||||
int rc;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
(char *) "Oi:virDomainMigrateGetCompressionCache",
|
||||
&pyobj_domain, &flags))
|
||||
return VIR_PY_NONE;
|
||||
|
||||
domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain);
|
||||
|
||||
LIBVIRT_BEGIN_ALLOW_THREADS;
|
||||
rc = virDomainMigrateGetCompressionCache(domain, &cacheSize, flags);
|
||||
LIBVIRT_END_ALLOW_THREADS;
|
||||
|
||||
if (rc < 0)
|
||||
return VIR_PY_NONE;
|
||||
|
||||
return libvirt_ulonglongWrap(cacheSize);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
libvirt_virDomainMigrateGetMaxSpeed(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
|
||||
PyObject *py_retval;
|
||||
@ -6724,6 +6751,7 @@ static PyMethodDef libvirtMethods[] = {
|
||||
{(char *) "virDomainSetBlockIoTune", libvirt_virDomainSetBlockIoTune, METH_VARARGS, NULL},
|
||||
{(char *) "virDomainGetBlockIoTune", libvirt_virDomainGetBlockIoTune, METH_VARARGS, NULL},
|
||||
{(char *) "virDomainSendKey", libvirt_virDomainSendKey, METH_VARARGS, NULL},
|
||||
{(char *) "virDomainMigrateGetCompressionCache", libvirt_virDomainMigrateGetCompressionCache, METH_VARARGS, NULL},
|
||||
{(char *) "virDomainMigrateGetMaxSpeed", libvirt_virDomainMigrateGetMaxSpeed, METH_VARARGS, NULL},
|
||||
{(char *) "virDomainBlockPeek", libvirt_virDomainBlockPeek, METH_VARARGS, NULL},
|
||||
{(char *) "virDomainMemoryPeek", libvirt_virDomainMemoryPeek, METH_VARARGS, NULL},
|
||||
|
Loading…
x
Reference in New Issue
Block a user